{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core"
  ],
  "files": [
    {
      "path": "ui/toggle.tsx",
      "content": "import type { ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport * as ToggleButtonPrimitive from \"@kobalte/core/toggle-button\"\nimport type { VariantProps } from \"class-variance-authority\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toggleVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-[color,box-shadow] hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[pressed]:bg-accent data-[state=on]:bg-accent data-[pressed]:text-accent-foreground data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-transparent\",\n        outline: \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\"\n      },\n      size: {\n        default: \"h-9 min-w-9 px-2\",\n        sm: \"h-8 min-w-8 px-1.5\",\n        lg: \"h-10 min-w-10 px-2.5\"\n      }\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\"\n    }\n  }\n)\n\ntype ToggleButtonRootProps<T extends ValidComponent = \"button\"> =\n  ToggleButtonPrimitive.ToggleButtonRootProps<T> &\n    VariantProps<typeof toggleVariants> & { class?: string | undefined }\n\nconst Toggle = <T extends ValidComponent = \"button\">(\n  props: PolymorphicProps<T, ToggleButtonRootProps<T>>\n) => {\n  const [local, others] = splitProps(props as ToggleButtonRootProps, [\"class\", \"variant\", \"size\"])\n  return (\n    <ToggleButtonPrimitive.Root\n      class={cn(toggleVariants({ variant: local.variant, size: local.size }), local.class)}\n      data-slot=\"toggle\"\n      {...others}\n    />\n  )\n}\n\nexport type { ToggleButtonRootProps as ToggleProps }\nexport { toggleVariants, Toggle }\n",
      "type": "registry:ui"
    }
  ]
}