{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A dashboard counter: an icon, a big number, a caption. With `href` the whole tile is a link, without it the tile is a plain figure.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/parts/stat-tile.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/link\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// StatTileProps are the props of StatTile; the values are the JSON shapes of the TypeScript props.\ntype StatTileProps struct {\n\tLabel any `json:\"label\"`\n\tValue any `json:\"value\"`\n\tIcon any `json:\"icon\"`\n\tHref any `json:\"href\"`\n\tHint any `json:\"hint\"`\n}\n\n// A dashboard counter: an icon, a big number, a caption. With `href` the whole tile is a link, without it the tile is a plain figure.\ntempl StatTile(p StatTileProps) {\n\t{{ vLabel := p.Label }}\n\t{{ vValue := p.Value }}\n\t{{ vIcon := p.Icon }}\n\t{{ vHref := p.Href }}\n\t{{ vHint := p.Hint }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"min-w-0\", Attrs: uiutils.Attrs(\"data-slot\", \"stat-tile\")}}) {\n\t\tif uiutils.T(vHref) {\n\t\t\t@compose.Link(compose.LinkProps{Variant: \"block\", LinkProps: link.LinkProps{Href: uiutils.URL(vHref, false), Class: \"flex min-w-0 flex-col gap-4 rounded bg-card p-6 text-foreground no-underline inset-ring inset-ring-border hover:bg-muted\"}}) {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-2\"}}) {\n\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-xs font-bold text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vLabel) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.IconBadge(compose.IconBadgeProps{Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(vIcon), Size: 16})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"2xl\", Weight: \"bold\", TextProps: text.TextProps{Class: \"m-0 leading-8\"}}) {\n\t\t\t\t\t{ uiutils.Text(vValue) }\n\t\t\t\t}\n\t\t\t\tif uiutils.T(vHint) {\n\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-xs font-medium text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vHint) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex min-w-0 flex-col gap-4 rounded bg-card p-6 text-foreground inset-ring inset-ring-border\"}}) {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-2\"}}) {\n\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-xs font-bold text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vLabel) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.IconBadge(compose.IconBadgeProps{Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(vIcon), Size: 16})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"2xl\", Weight: \"bold\", TextProps: text.TextProps{Class: \"m-0 leading-8\"}}) {\n\t\t\t\t\t{ uiutils.Text(vValue) }\n\t\t\t\t}\n\t\t\t\tif uiutils.T(vHint) {\n\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-xs font-medium text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vHint) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/stat-tile.templ",
      "target": "blocks/stat-tile.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "stat-tile",
  "registryDependencies": [
    "box",
    "icon-badge",
    "kit-box",
    "kit-link",
    "kit-text",
    "link",
    "lucide-icon",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Stat Tile",
  "type": "registry:component"
}
