{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "title": "Button",
  "description": "Push buttons in every macOS 27 style: the accent-filled default button, bordered, tinted, borderless and destructive, from mini to extra large.",
  "dependencies": [
    "class-variance-authority",
    "@base-ui/react"
  ],
  "registryDependencies": [
    "@cupertinoui/macos-theme"
  ],
  "files": [
    {
      "path": "registry/macos/ui/button.tsx",
      "content": "\"use client\"\n\nimport { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n// macOS 27 buttons are flat: a translucent fill, a medium-weight label and no\n// shadow. Large and extra-large buttons are capsules.\nconst buttonVariants = cva(\n  \"inline-flex shrink-0 cursor-default items-center justify-center gap-1.5 font-medium whitespace-nowrap select-none transition-[background-color,color,opacity] outline-none focus-visible:mac-focus-ring disabled:pointer-events-none data-disabled:pointer-events-none aria-invalid:mac-focus-ring [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n  {\n    variants: {\n      variant: {\n        // The window's default button: filled with the accent color.\n        default:\n          \"bg-mac-accent text-mac-accent-foreground active:brightness-90 disabled:opacity-45\",\n        destructive:\n          \"bg-mac-red text-white active:brightness-90 disabled:opacity-45\",\n        // The standard macOS push button (\"Bordered\").\n        secondary:\n          \"bg-mac-control text-mac-label active:bg-mac-control-pressed disabled:bg-mac-control-disabled disabled:text-mac-label-tertiary\",\n        // An accent-tinted button (\"Bordered - Tinted\").\n        tinted:\n          \"bg-mac-accent/20 text-mac-accent active:bg-mac-accent/30 disabled:opacity-45\",\n        // A bordered button without fill, e.g. inside grouped content.\n        outline:\n          \"bg-transparent text-mac-label shadow-[inset_0_0_0_1px_var(--mac-grid)] hover:bg-mac-fill-tertiary active:bg-mac-control-pressed disabled:text-mac-label-tertiary\",\n        // Borderless button, as used in toolbars and title bars.\n        ghost:\n          \"text-mac-label hover:bg-mac-fill-tertiary active:bg-mac-control-pressed disabled:text-mac-label-tertiary\",\n        link: \"h-auto px-0 text-mac-link underline-offset-2 hover:underline disabled:opacity-45\",\n      },\n      size: {\n        default:\n          \"h-6 rounded-[6px] px-4 text-mac-body has-[>svg]:px-3 [&_svg:not([class*='size-'])]:size-3.5\",\n        xs: \"h-4 gap-1 rounded-[4px] px-[7px] text-[10px] [&_svg:not([class*='size-'])]:size-2.5\",\n        sm: \"h-5 gap-1 rounded-[5px] px-2.5 text-mac-subheadline [&_svg:not([class*='size-'])]:size-3\",\n        lg: \"h-7 rounded-full px-4 text-mac-body [&_svg:not([class*='size-'])]:size-4\",\n        xl: \"h-9 rounded-full px-4 text-mac-body [&_svg:not([class*='size-'])]:size-4\",\n        icon: \"size-6 rounded-[6px] [&_svg:not([class*='size-'])]:size-3.5\",\n        \"icon-xs\": \"size-4 rounded-[4px] [&_svg:not([class*='size-'])]:size-2.5\",\n        \"icon-sm\": \"size-5 rounded-[5px] [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-lg\": \"size-7 rounded-full [&_svg:not([class*='size-'])]:size-4\",\n        \"icon-xl\": \"size-9 rounded-full [&_svg:not([class*='size-'])]:size-[18px]\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\n// Base UI's Button. To render a link or another element with the button's\n// styles, pass it as `render` (with `nativeButton={false}` when it isn't a\n// <button>).\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n  return (\n    <ButtonPrimitive\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"
}