{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stat-card",
  "title": "Stat Card",
  "description": "KPI tile: uppercase label, large tabular value, optional icon, hint and monochrome delta arrow.",
  "dependencies": [
    "cn",
    "lucide-react"
  ],
  "registryDependencies": [
    "@sav/card"
  ],
  "files": [
    {
      "path": "registry/sav/components/stat-card.tsx",
      "content": "// @sav-registry: stat-card\nimport type { LucideIcon } from \"lucide-react\"\nimport { cn } from \"cn\"\n\nimport { Card, CardContent } from \"@/registry/sav/ui/card\"\n\n/**\n * Unified KPI/stat tile: uppercase label, large tabular value, optional hint\n * and previous-period delta. Monochrome — delta uses an arrow glyph + weight,\n * not colour. Reused by dashboards and reports.\n */\nexport function StatCard({\n  label,\n  value,\n  hint,\n  delta,\n  icon: Icon,\n  className,\n}: {\n  label: string\n  value: string\n  hint?: string\n  delta?: { value: string; direction: \"up\" | \"down\" | \"flat\" }\n  icon?: LucideIcon\n  className?: string\n}) {\n  return (\n    <Card size=\"sm\" className={className}>\n      <CardContent className=\"flex flex-col gap-1\">\n        <span className=\"flex items-center justify-between text-xs font-medium tracking-wide text-muted-foreground uppercase\">\n          {label}\n          {Icon ? <Icon className=\"size-4\" aria-hidden /> : null}\n        </span>\n        <span className=\"text-2xl font-semibold tabular-nums\">{value}</span>\n        <span className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n          {delta ? (\n            <span\n              className={cn(\n                \"font-medium tabular-nums text-foreground\",\n                delta.direction === \"flat\" && \"text-muted-foreground\"\n              )}\n            >\n              {delta.direction === \"up\"\n                ? \"↑\"\n                : delta.direction === \"down\"\n                  ? \"↓\"\n                  : \"→\"}{\" \"}\n              {delta.value}\n            </span>\n          ) : null}\n          {hint ? <span>{hint}</span> : null}\n        </span>\n      </CardContent>\n    </Card>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/stat-card.tsx"
    }
  ],
  "categories": [
    "patterns"
  ],
  "type": "registry:component"
}