{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "title": "Card",
  "description": "Surface container with header, title, description, action, content and footer parts and an elevation axis.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/card.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Card had no cva: one long class string plus a `size` prop rendered as\n   data-size. It now has an `elevation` axis, because a design system whose\n   cards can only be one weight cannot express two design languages — a ledger\n   screen and a soft workspace screen were coming out identical apart from\n   colour, with call sites faking flatness by passing shadow-none.\n\n   `soft` reproduces the original declaration byte for byte and is the default.\n   Everything a caller does not opt into is unchanged. */\nconst cardVariants = cva(\n  \"group/card flex flex-col gap-(--card-spacing) overflow-hidden text-sm text-card-foreground [--card-spacing:--spacing(6)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl py-(--card-spacing)\",\n  {\n    variants: {\n      elevation: {\n        /* The original, unchanged. */\n        soft: \"rounded-xl border border-border bg-card shadow-hairline\",\n        /* Separation from the hairline alone. A register of figures reads\n           better without every row of cards casting its own shadow. */\n        flat: \"rounded-md border border-border bg-card\",\n        /* For a card that genuinely floats above a busy canvas. */\n        raised: \"rounded-xl border border-border bg-card shadow-card\",\n        /* No outer border and no shadow — a leading rule instead, so a stack\n           of these reads as one continuous ledger rather than as separate\n           objects. Deliberately square: a radius with no border to follow it\n           just clips content for no visible gain. */\n        ruled: \"border-t border-border bg-card\",\n      },\n    },\n    defaultVariants: { elevation: \"soft\" },\n  },\n)\n\nfunction Card({\n  className,\n  size = \"default\",\n  elevation,\n  ...props\n}: React.ComponentProps<\"div\"> &\n  VariantProps<typeof cardVariants> & { size?: \"default\" | \"sm\" }) {\n  return (\n    <div\n      data-slot=\"card\"\n      data-size={size}\n      /* Emitted for descendants to select on, never read by Card itself. */\n      data-elevation={elevation ?? \"soft\"}\n      className={cn(cardVariants({ elevation }), className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-header\"\n      className={cn(\n        \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-title\"\n      className={cn(\n        \"font-heading text-lg leading-snug font-semibold tracking-snug group-data-[size=sm]/card:text-base\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-description\"\n      className={cn(\"text-body leading-normal text-muted-foreground\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-action\"\n      className={cn(\n        \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-content\"\n      className={cn(\"px-(--card-spacing)\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-footer\"\n      className={cn(\n        \"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Card,\n  CardHeader,\n  CardFooter,\n  CardTitle,\n  CardAction,\n  CardDescription,\n  CardContent,\n  cardVariants,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}