{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "kbd",
  "title": "Kbd",
  "description": "Keyboard key label, single or grouped, for shortcuts.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/kbd.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Explicit pixel radii — a token radius would round a 24px key into a pill.\n   min-w matches the height so single characters read square.\n   The font size lives only in the size variants, one per size: cva joins base\n   and variant without merging, so a size in both would leave the winner of\n   kbdVariants() used without cn() to stylesheet order. cva returns no size\n   class for a null size, so a compound variant restores the default size there:\n   kbdVariants({ size: null }) still carries exactly one size class. */\nconst kbdVariants = cva(\n  \"inline-flex shrink-0 items-center justify-center gap-0.5 rounded-[6px] border border-border bg-card align-middle font-mono font-medium tracking-normal whitespace-nowrap text-muted-foreground shadow-soft select-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3\",\n  {\n    variants: {\n      variant: {\n        default: \"dark:border-input dark:bg-input/30\",\n        muted: \"border-transparent bg-secondary shadow-none dark:bg-muted/60\",\n        inverse:\n          \"border-inverse-foreground/15 bg-inverse-foreground/10 text-inverse-muted shadow-none\",\n      },\n      size: {\n        sm: \"h-5 min-w-5 rounded-[5px] px-1 text-micro\",\n        default: \"h-6 min-w-6 px-1.5 text-caption-sm\",\n        lg: \"h-7 min-w-7 rounded-[7px] px-2 text-caption\",\n      },\n    },\n    compoundVariants: [{ size: null, class: \"text-caption-sm\" }],\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n)\n\nfunction Kbd({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  ...props\n}: React.ComponentProps<\"kbd\"> & VariantProps<typeof kbdVariants>) {\n  return (\n    <kbd\n      data-slot=\"kbd\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(kbdVariants({ variant, size }), className)}\n      {...props}\n    />\n  )\n}\n\n/* The separator stays readable to assistive tech — \"Ctrl + K\" and \"G then H\"\n   are meaningful, not decoration. */\nfunction KbdGroup({\n  className,\n  separator = \"+\",\n  children,\n  ...props\n}: React.ComponentProps<\"span\"> & { separator?: React.ReactNode }) {\n  const keys = React.Children.toArray(children)\n\n  return (\n    <span\n      data-slot=\"kbd-group\"\n      className={cn(\n        \"inline-flex w-fit items-center gap-1 align-middle text-caption-sm text-muted-foreground\",\n        className,\n      )}\n      {...props}\n    >\n      {keys.map((child, index) => (\n        <React.Fragment key={index}>\n          {index > 0 && (\n            <span\n              data-slot=\"kbd-separator\"\n              className=\"px-px font-medium text-muted-foreground select-none\"\n            >\n              {separator}\n            </span>\n          )}\n          {child}\n        </React.Fragment>\n      ))}\n    </span>\n  )\n}\n\nexport { Kbd, KbdGroup, kbdVariants }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}