{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "title": "Button",
  "description": "Button with default, outline, secondary, ghost, inverse, destructive and link variants and squircle icon sizes.",
  "dependencies": [
    "class-variance-authority@^0.7.1",
    "radix-ui@^1.6.7"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/button.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Motion: hover colour resolves at `duration-fast` so it reads as instant, and\n   the press is a small spring scale on top of the existing 1px sink. Timing is\n   swapped only for the duration of `:active`, so the press settles on a spring\n   and the release runs back on the shorter base tween — enter long, exit short.\n   No hover scale: at this many buttons per screen it reads as noise, and it\n   fights the press. `not-disabled` keeps the press inert on a disabled button,\n   and the `aria-haspopup` guard matches the sink — a trigger that scales would\n   drag its anchored popup with it. */\nconst buttonVariants = cva(\n  \"group/button inline-flex shrink-0 items-center justify-center gap-2 rounded-lg border border-transparent bg-clip-padding shadow-xs text-body font-medium whitespace-nowrap transition-all duration-fast ease-out-expo outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:duration-spring-press active:ease-spring-press active:not-aria-[haspopup]:translate-y-px active:not-aria-[haspopup]:not-disabled:scale-97 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"bg-primary text-primary-foreground bg-clip-border shadow-none hover:bg-primary/90\",\n        outline:\n          \"border-border/70 bg-card text-foreground hover:bg-accent hover:text-foreground aria-expanded:bg-accent dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent\",\n        ghost:\n          \"shadow-none hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        inverse:\n          \"bg-inverse-foreground text-inverse hover:bg-inverse-foreground/90\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-info underline-offset-4 shadow-none hover:underline\",\n      },\n      size: {\n        xs: \"h-7 gap-1 rounded-md px-3 text-xs [&_svg:not([class*='size-'])]:size-3.5\",\n        sm: \"h-9 gap-1.5 rounded-md px-4 text-sm\",\n        default: \"h-10 px-5\",\n        lg: \"h-11 px-6\",\n        xl: \"h-14 gap-2.5 px-7 text-base font-semibold [&_svg:not([class*='size-'])]:size-5\",\n        /* Icon buttons are squircles, not circles, so they echo the card corners */\n        icon: \"size-10 rounded-[13px]\",\n        \"icon-sm\": \"size-9 rounded-[11px]\",\n        \"icon-lg\": \"size-11 rounded-[15px]\",\n        \"icon-round\": \"size-10 rounded-full\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}