{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "title": "Button",
  "description": "Aurora button component with multiple variants and states",
  "dependencies": [
    "@radix-ui/react-slot",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "source/ui/button/button.tsx",
      "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@aurora/lib/utils\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap \" +\n    \"text-sm font-medium transition-all duration-200 \" +\n    \"disabled:pointer-events-none disabled:opacity-50 \" +\n    \"aria-disabled:pointer-events-none aria-disabled:opacity-50 \" +\n    \"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 \" +\n    \"active:scale-[0.98]\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n        secondary:\n          \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n        outline:\n          \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        destructive:\n          \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n      },\n      size: {\n        default: \"h-10 px-4 py-2\",\n        sm: \"h-8 rounded-md px-3 text-xs\",\n        lg: \"h-12 rounded-md px-6 text-base\",\n        icon: \"h-10 w-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  asChild?: boolean\n  loading?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  (\n    {\n      className,\n      variant,\n      size,\n      asChild = false,\n      loading = false,\n      disabled,\n      children,\n      onClick,\n      tabIndex,\n      type,\n      ...props\n    },\n    ref\n  ) => {\n    const Comp = asChild ? Slot : \"button\"\n    const isDisabled = Boolean(disabled || loading)\n    const handleClick: React.MouseEventHandler<HTMLElement> = (event) => {\n      if (isDisabled) {\n        event.preventDefault()\n        event.stopPropagation()\n        return\n      }\n\n      onClick?.(event as React.MouseEvent<HTMLButtonElement>)\n    }\n\n    return (\n      <Comp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n        type={asChild ? undefined : type ?? \"button\"}\n        disabled={asChild ? undefined : isDisabled}\n        aria-disabled={asChild && isDisabled ? true : undefined}\n        aria-busy={loading || undefined}\n        data-loading={loading || undefined}\n        tabIndex={asChild && isDisabled ? -1 : tabIndex}\n        onClick={handleClick}\n      >\n        {loading && !asChild && (\n          <span\n            aria-hidden=\"true\"\n            className=\"inline-flex h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n          />\n        )}\n        {children}\n      </Comp>\n    )\n  }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n",
      "type": "registry:ui",
      "target": "@aurora/ui/button.tsx"
    }
  ],
  "type": "registry:ui"
}