{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "panel-card",
  "title": "Panel Card",
  "description": "Card whose header leads with an icon chip and whose footer is a single action link.",
  "dependencies": [
    "class-variance-authority@^0.7.1",
    "lucide-react@^1.27.0"
  ],
  "registryDependencies": [
    "@pestoui/card",
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/components/panel-card.tsx",
      "content": "import * as React from \"react\"\nimport { ArrowRight } from \"lucide-react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { Card, CardFooter } from \"@/components/ui/card\"\nimport { cn } from \"@/lib/utils\"\n\n/* A card whose header leads with an icon chip and whose footer is a single\n   action link.\n *\n * This exists because of one gap, not because Card is insufficient. CardHeader\n * is a two-track grid — `[1fr_auto]` when a card-action is present — so there\n * is nowhere for a leading mark to sit without it landing inside the title\n * column and pushing the description out of alignment. PanelCardHeader is the\n * same idea at three tracks.\n *\n * Everything else is composition. The footer is CardFooter with a link inside\n * it; Card's own `has-data-[slot=card-footer]:pb-0` already collapses the\n * bottom padding, so nothing here re-implements card chrome. */\n\nconst panelCardIconVariants = cva(\n  \"flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0\",\n  {\n    variants: {\n      tone: {\n        /* Default is deliberately inert. The chip is a wayfinding mark, not a\n           status, so a tinted one has to be asked for. */\n        muted: \"bg-secondary text-muted-foreground\",\n        selected: \"bg-selected/10 text-selected\",\n        success: \"bg-success/10 text-success\",\n        warning: \"bg-warning/15 text-warning-ink\",\n        destructive: \"bg-destructive/10 text-destructive\",\n        info: \"bg-info/10 text-info\",\n        \"chart-1\": \"bg-chart-1/12 text-chart-1\",\n        \"chart-2\": \"bg-chart-2/12 text-chart-2\",\n        \"chart-3\": \"bg-chart-3/12 text-chart-3\",\n        \"chart-4\": \"bg-chart-4/12 text-chart-4\",\n        \"chart-5\": \"bg-chart-5/12 text-chart-5\",\n      },\n      size: {\n        sm: \"size-7 [&_svg]:size-3.5\",\n        default: \"size-9 [&_svg]:size-4\",\n      },\n    },\n    defaultVariants: { tone: \"muted\", size: \"default\" },\n  },\n)\n\ntype PanelCardIconTone = NonNullable<\n  VariantProps<typeof panelCardIconVariants>[\"tone\"]\n>\n\nfunction PanelCard({ className, ...props }: React.ComponentProps<typeof Card>) {\n  return <Card data-slot=\"panel-card\" className={className} {...props} />\n}\n\n/**\n * Three tracks: mark, text, action. The action track collapses when no\n * `PanelCardAction` is present, so a card without an overflow menu does not\n * carry a dead column.\n */\nfunction PanelCardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-header\"\n      className={cn(\n        \"grid grid-cols-[auto_1fr] items-start gap-3 px-(--card-spacing)\",\n        \"has-data-[slot=panel-card-action]:grid-cols-[auto_1fr_auto]\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction PanelCardIcon({\n  className,\n  tone,\n  size,\n  ...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof panelCardIconVariants>) {\n  return (\n    <span\n      data-slot=\"panel-card-icon\"\n      data-tone={tone}\n      /* aria-hidden: the title beside it already names the card, so announcing\n         the mark would just repeat it. */\n      aria-hidden=\"true\"\n      className={cn(panelCardIconVariants({ tone, size }), className)}\n      {...props}\n    />\n  )\n}\n\n/* The text track. Kept as its own part so the title and description stack\n   inside one grid cell rather than becoming two rows of the outer grid. */\nfunction PanelCardHeading({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-heading\"\n      className={cn(\"flex min-w-0 flex-col gap-0.5\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction PanelCardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-title\"\n      className={cn(\"leading-none font-semibold\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction PanelCardDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-description\"\n      className={cn(\"text-muted-foreground text-sm\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction PanelCardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-action\"\n      className={cn(\"flex shrink-0 items-center gap-1\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction PanelCardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"panel-card-content\"\n      className={cn(\"px-(--card-spacing)\", className)}\n      {...props}\n    />\n  )\n}\n\n/**\n * The footer as one action link spanning the card.\n *\n * Rendered as a real `<button>`/`<a>` rather than a div with a click handler so\n * it is reachable by keyboard and announced as an action. `justify-between`\n * pushes the arrow to the far edge, which is what makes the row read as\n * \"continue\" rather than as a caption.\n */\nfunction PanelCardFooterLink({\n  className,\n  children,\n  href,\n  ...props\n}: React.ComponentProps<\"a\">) {\n  return (\n    <CardFooter className=\"p-0\">\n      <a\n        data-slot=\"panel-card-footer-link\"\n        href={href}\n        className={cn(\n          \"flex w-full items-center justify-between gap-2 rounded-b-xl\",\n          \"p-(--card-spacing) text-sm transition-colors duration-fast\",\n          \"hover:bg-accent focus-visible:ring-ring/50 focus-visible:ring-3\",\n          \"outline-none\",\n          className,\n        )}\n        {...props}\n      >\n        <span className=\"text-muted-foreground\">{children}</span>\n        <ArrowRight className=\"text-muted-foreground size-4 shrink-0\" aria-hidden=\"true\" />\n      </a>\n    </CardFooter>\n  )\n}\n\nexport {\n  PanelCard,\n  PanelCardAction,\n  PanelCardContent,\n  PanelCardDescription,\n  PanelCardFooterLink,\n  PanelCardHeader,\n  PanelCardHeading,\n  PanelCardIcon,\n  PanelCardTitle,\n  panelCardIconVariants,\n}\nexport type { PanelCardIconTone }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}