{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-section-cards",
  "title": "Section Cards",
  "description": "Grid de cards estatísticos com gradiente, badge trend e footer — extraído de shadcn dashboard-01 SectionCards.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "@lema-ds/card",
    "@lema-ds/badge",
    "@lema-ds/skeleton"
  ],
  "files": [
    {
      "path": "components/ds/ds-section-cards.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { TrendingUpIcon, TrendingDownIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Badge } from \"@/components/ui/badge\"\nimport {\n  Card,\n  CardAction,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\n// ── Types ──\n\nexport interface SectionCardItem {\n  title: string\n  value: string\n  badge?: { value: string; trend: \"up\" | \"down\" }\n  description?: string\n  footerTitle?: string\n  footerDescription?: string\n}\n\nexport interface SectionCardsProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof sectionCardsVariants> {\n  items: SectionCardItem[]\n  loading?: boolean\n}\n\n// ── Variants ──\n\nexport const sectionCardsVariants = cva(\"\", {\n  variants: {\n    columns: {\n      2: \"@xl/main:grid-cols-2\",\n      4: \"@xl/main:grid-cols-2 @5xl/main:grid-cols-4\",\n    },\n    variant: {\n      default: \"\",\n      gradient: \"\",\n    },\n  },\n  defaultVariants: {\n    columns: 4,\n    variant: \"gradient\",\n  },\n})\n\n// ── Component ──\n\nexport function SectionCards({\n  items,\n  columns = 4,\n  variant = \"gradient\",\n  loading = false,\n  className,\n  ...props\n}: SectionCardsProps) {\n  if (loading) {\n    return (\n      <div\n        data-slot=\"section-cards-skeleton\"\n        className={cn(\n          \"grid grid-cols-1 gap-4 px-4 lg:px-6\",\n          sectionCardsVariants({ columns, variant }),\n          className\n        )}\n        {...props}\n      >\n        {Array.from({ length: columns === 2 ? 2 : 4 }).map((_, i) => (\n          <Card key={i} className=\"@container/card\">\n            <CardHeader>\n              <Skeleton className=\"h-3 w-24\" />\n              <Skeleton className=\"h-7 w-32\" />\n            </CardHeader>\n            <CardFooter className=\"flex-col items-start gap-1.5\">\n              <Skeleton className=\"h-3 w-40\" />\n              <Skeleton className=\"h-3 w-32\" />\n            </CardFooter>\n          </Card>\n        ))}\n      </div>\n    )\n  }\n\n  return (\n    <div\n      data-slot=\"section-cards\"\n      className={cn(\n        \"grid grid-cols-1 gap-4 px-4 lg:px-6\",\n        sectionCardsVariants({ columns, variant }),\n        variant === \"gradient\" &&\n          \"*:data-[slot=card]:bg-gradient-to-t *:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card *:data-[slot=card]:shadow-xs\",\n        className\n      )}\n      {...props}\n    >\n      {items.map((item) => (\n        <Card key={item.title} className=\"@container/card\">\n          <CardHeader>\n            <CardDescription>{item.title}</CardDescription>\n            <CardTitle className=\"text-2xl font-semibold tabular-nums @[250px]/card:text-3xl\">\n              {item.value}\n            </CardTitle>\n            {item.badge && (\n              <CardAction>\n                <Badge\n                  variant=\"outline\"\n                  className={cn(\n                    item.badge.trend === \"down\" && \"text-destructive\"\n                  )}\n                >\n                  {item.badge.trend === \"up\" ? (\n                    <TrendingUpIcon className=\"size-4\" aria-hidden=\"true\" />\n                  ) : (\n                    <TrendingDownIcon className=\"size-4\" aria-hidden=\"true\" />\n                  )}\n                  {item.badge.value}\n                </Badge>\n              </CardAction>\n            )}\n          </CardHeader>\n          {(item.footerTitle || item.footerDescription) && (\n            <CardFooter className=\"flex-col items-start gap-1.5 text-sm\">\n              {item.footerTitle && (\n                <div className=\"line-clamp-1 flex gap-2 font-medium\">\n                  {item.footerTitle}\n                  {item.badge?.trend === \"up\" ? (\n                    <TrendingUpIcon className=\"size-4\" aria-hidden=\"true\" />\n                  ) : item.badge?.trend === \"down\" ? (\n                    <TrendingDownIcon className=\"size-4\" aria-hidden=\"true\" />\n                  ) : null}\n                </div>\n              )}\n              {item.footerDescription && (\n                <div className=\"text-muted-foreground\">\n                  {item.footerDescription}\n                </div>\n              )}\n            </CardFooter>\n          )}\n        </Card>\n      ))}\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
