{
	"$schema": "https://shadcn-svelte.com/schema/registry-item.json",
	"name": "button",
	"title": "Button",
	"type": "registry:ui",
	"description": "Displays a button or a link with a set of accessible visual variants.",
	"dependencies": [
		"bits-ui@^2.19.0"
	],
	"registryDependencies": [
		"./utils.json"
	],
	"meta": {
		"docs": {
			"usage": "Use the href prop to render an anchor, or omit it to render a native button.",
			"api": [
				{
					"name": "variant",
					"type": "default | destructive | outline | secondary | ghost | link",
					"default": "default"
				},
				{
					"name": "size",
					"type": "default | sm | lg | icon",
					"default": "default"
				},
				{
					"name": "href",
					"type": "string",
					"default": "—"
				},
				{
					"name": "disabled",
					"type": "boolean",
					"default": "false"
				}
			]
		}
	},
	"files": [
		{
			"content": "<script lang=\"ts\" module>\n\timport { cw } from '$UTILS$';\n\n\texport type ButtonVariant =\n\t\t'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';\n\texport type ButtonSize = 'default' | 'sm' | 'lg' | 'icon';\n\n\texport const buttonVariants = ({\n\t\tvariant = 'default',\n\t\tsize = 'default',\n\t\tclass: className\n\t}: {\n\t\tvariant?: ButtonVariant;\n\t\tsize?: ButtonSize;\n\t\tclass?: import('clsx').ClassValue;\n\t} = {}) =>\n\t\tcw(\n\t\t\t'inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n\t\t\t{\n\t\t\t\t'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90': variant === 'default',\n\t\t\t\t'bg-destructive text-white shadow-sm hover:bg-destructive/90': variant === 'destructive',\n\t\t\t\t'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground':\n\t\t\t\t\tvariant === 'outline',\n\t\t\t\t'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80':\n\t\t\t\t\tvariant === 'secondary',\n\t\t\t\t'hover:bg-accent hover:text-accent-foreground': variant === 'ghost',\n\t\t\t\t'text-primary underline-offset-4 hover:underline': variant === 'link',\n\t\t\t\t'h-10 px-4 py-2': size === 'default',\n\t\t\t\t'h-9 rounded-md px-3': size === 'sm',\n\t\t\t\t'h-11 rounded-md px-8': size === 'lg',\n\t\t\t\t'size-10': size === 'icon'\n\t\t\t},\n\t\t\tclassName\n\t\t);\n</script>\n\n<script lang=\"ts\">\n\timport { Button as ButtonPrimitive } from 'bits-ui';\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tvariant = 'default',\n\t\tsize = 'default',\n\t\t...restProps\n\t}: ButtonPrimitive.RootProps & { variant?: ButtonVariant; size?: ButtonSize } = $props();\n</script>\n\n<ButtonPrimitive.Root\n\tbind:ref\n\tdata-slot=\"button\"\n\tclass={buttonVariants({ variant, size, class: className })}\n\t{...restProps}\n/>\n",
			"type": "registry:ui",
			"target": "button/button.svelte"
		},
		{
			"content": "export { default as Button, buttonVariants } from './button.svelte';\nexport type { ButtonSize, ButtonVariant } from './button.svelte';\n",
			"type": "registry:ui",
			"target": "button/index.ts"
		}
	]
}