{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ui-button",
  "title": "Button",
  "description": "A button with the kit's own variant and size set, a 44px minimum touch target, and support for rendering as another element. Adapted from the upstream shadcn button; see NOTICE.md for what changed.",
  "dependencies": [
    "@base-ui/react@1.8.0",
    "class-variance-authority@0.7.1"
  ],
  "registryDependencies": [
    "@registrystack/lib-utils"
  ],
  "files": [
    {
      "path": "ui/button.tsx",
      "content": "// Adapted from shadcn/ui's Base UI Button, MIT. See blocks/NOTICE.md.\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/blocks/lib/utils\";\nexport const buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-normal rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 shrink-0 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"border border-primary bg-primary text-primary-foreground hover:bg-(--primary-dark) hover:shadow-sm active:shadow-none\",\n        outline:\n          \"border border-input bg-background hover:border-primary hover:bg-accent\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent\",\n        destructive: \"bg-destructive text-white hover:bg-destructive/90\",\n      },\n      size: {\n        // Heights come from the --control-h tokens (styles.css): a 44px tap\n        // target by default, shadcn's own denser heights inside the officer\n        // shell on a mouse. The padding fits inside the densest of them.\n        default: \"min-h-(--control-h) px-3 py-1\",\n        sm: \"min-h-(--control-h-sm) rounded-md px-2.5\",\n        lg: \"min-h-(--control-h-lg) px-6 py-2\",\n        icon: \"size-(--control-h)\",\n        \"icon-xs\": \"size-(--control-h-xs) rounded-md\",\n        \"icon-sm\": \"size-(--control-h-sm) rounded-md\",\n        \"icon-lg\": \"size-(--control-h-lg)\",\n      },\n    },\n    defaultVariants: { variant: \"default\", size: \"default\" },\n  },\n);\n/**\n * `render` replaces the `<button>` with the element it is given, keeping the\n * button's classes and props. A link keeps link semantics: Base UI's button\n * primitive would add `role=\"button\"`, so this composes `useRender` directly.\n */\nexport function Button({\n  className,\n  variant,\n  size,\n  render,\n  type,\n  nativeButton: _nativeButton,\n  ...props\n}: useRender.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    /**\n     * Read by Base UI's button primitive. This button takes its semantics from\n     * the element `render` returns, so the value is accepted and dropped rather\n     * than reaching the DOM as an attribute.\n     */\n    nativeButton?: boolean;\n  }) {\n  return useRender({\n    defaultTagName: \"button\",\n    render,\n    props: {\n      \"data-slot\": \"button\",\n      className: cn(buttonVariants({ variant, size, className })),\n      ...(render ? {} : { type: type ?? \"button\" }),\n      ...props,\n    },\n  });\n}\n",
      "type": "registry:ui",
      "target": "@ui/button.tsx"
    }
  ],
  "type": "registry:ui"
}