{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "title": "Card",
  "description": "A card component.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@cubby-ui/elevated"
  ],
  "files": [
    {
      "path": "registry/default/card/card.tsx",
      "content": "import * as React from \"react\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\n\r\nimport { cn } from \"@/lib/utils\";\r\nimport {\r\n  solidSurface,\r\n  type SurfaceLevel,\r\n} from \"@/registry/default/lib/elevated\";\r\n\r\nconst cardVariants = cva(\"text-card-foreground flex flex-col\", {\r\n  variants: {\r\n    variant: {\r\n      default: \"gap-6 rounded-2xl py-6\",\r\n      inset: \"rounded-2xl p-1\",\r\n    },\r\n  },\r\n  defaultVariants: {\r\n    variant: \"default\",\r\n  },\r\n});\r\n\r\nexport interface CardProps\r\n  extends\r\n    React.HTMLAttributes<HTMLDivElement>,\r\n    VariantProps<typeof cardVariants> {\r\n  level?: SurfaceLevel;\r\n  shadowLevel?: SurfaceLevel;\r\n}\r\n\r\nfunction Card({\r\n  className,\r\n  variant = \"default\",\r\n  level = 3,\r\n  shadowLevel = 1,\r\n  ...props\r\n}: CardProps) {\r\n  return (\r\n    <div\r\n      data-slot=\"card\"\r\n      data-variant={variant}\r\n      data-level={level}\r\n      className={cn(\r\n        cardVariants({ variant }),\r\n        solidSurface(level, shadowLevel),\r\n        // bg-muted overrides solidSurface's bg, making the outer a gray frame\r\n        // while keeping its shadow, rim, and --popup-surface.\r\n        variant === \"inset\" && \"bg-muted\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-header\"\r\n      className={cn(\r\n        \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start has-[[data-slot=card-action]]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\r\n        \"[[data-variant=default]>_&]:gap-1.5 [[data-variant=default]>_&]:px-6\",\r\n        \"[[data-variant=inset]>_&]:px-3 [[data-variant=inset]>_&]:py-2 [[data-variant=inset]>_&]:pt-1\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-title\"\r\n      className={cn(\r\n        \"font-semibold [[data-variant=default]_&]:leading-none\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-description\"\r\n      className={cn(\"text-muted-foreground text-sm\", className)}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-action\"\r\n      className={cn(\r\n        \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-content\"\r\n      className={cn(\r\n        \"[[data-variant=default]>_&]:px-6\",\r\n        \"[[data-variant=inset]>_&]:bg-surface-3 [[data-variant=inset]>_&]:flex [[data-variant=inset]>_&]:flex-1 [[data-variant=inset]>_&]:flex-col [[data-variant=inset]>_&]:rounded-lg [[data-variant=inset]>_&]:p-4 [[data-variant=inset]>_&]:shadow-[var(--surface-shadow-3),var(--surface-rim-3)] [[data-variant=inset]>_&]:[--popup-surface:var(--surface-3)]\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\r\n  return (\r\n    <div\r\n      data-slot=\"card-footer\"\r\n      className={cn(\r\n        \"flex items-center [.border-t]:pt-6\",\r\n        \"[[data-variant=default]>_&]:px-6\",\r\n        \"[[data-variant=inset]>_&]:mt-auto [[data-variant=inset]>_&]:justify-end [[data-variant=inset]>_&]:pt-4\",\r\n        className,\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nexport {\r\n  Card,\r\n  CardHeader,\r\n  CardAction,\r\n  CardTitle,\r\n  CardDescription,\r\n  CardContent,\r\n  CardFooter,\r\n  cardVariants,\r\n};\r\n",
      "type": "registry:ui",
      "target": "components/ui/cubby-ui/card.tsx"
    }
  ],
  "type": "registry:ui"
}