{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "files": [
    {
      "path": "ui/switch/Switch.astro",
      "content": "---\n// Generated from bejamas-juno style registry. Do not edit packages/ui/src/components/switch/Switch.astro directly.\n/**\n * @component Switch\n * @title Switch\n * @description A toggle control for switching between checked and unchecked states.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2509-4236&t=YFStJ3V8fXEO8QD8-4\n *\n * @status stable\n * @since 0.1.0\n *\n * @preview\n *\n * <div class=\"flex items-center gap-3\">\n *   <Switch id=\"notifications\" />\n *   <Label for=\"notifications\">Enable notifications</Label>\n * </div>\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { Switch } from '@bejamas/ui/components/switch';\n * import { Label } from '@bejamas/ui/components/label';\n * ---\n *\n * <div class=\"flex items-center gap-3\">\n *   <Switch id=\"notifications\" />\n *   <Label for=\"notifications\">Enable notifications</Label>\n * </div>\n * ```\n */\n\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Props extends HTMLAttributes<\"span\"> {\n  class?: string;\n  id?: string;\n  size?: \"sm\" | \"default\";\n  checked?: boolean;\n  defaultChecked?: boolean;\n  name?: string;\n  value?: string;\n  uncheckedValue?: string;\n  disabled?: boolean;\n  readOnly?: boolean;\n  required?: boolean;\n  \"aria-invalid\"?: boolean | \"true\" | \"false\";\n}\n\nconst {\n  class: className = \"\",\n  id = \"\",\n  size = \"default\",\n  checked,\n  defaultChecked,\n  name,\n  value,\n  uncheckedValue,\n  disabled = false,\n  readOnly = false,\n  required = false,\n  \"aria-invalid\": ariaInvalid,\n  ...rest\n} = Astro.props as Props;\n\nconst initialChecked = checked ?? defaultChecked ?? false;\n---\n\n<span\n  {...rest}\n  id={id}\n  data-slot=\"switch\"\n  data-size={size}\n  data-default-checked={initialChecked ? \"true\" : undefined}\n  data-name={name}\n  data-value={value}\n  data-unchecked-value={uncheckedValue}\n  data-disabled={disabled ? \"true\" : undefined}\n  data-read-only={readOnly ? \"true\" : undefined}\n  data-required={required ? \"true\" : undefined}\n  data-checked={initialChecked ? \"true\" : undefined}\n  data-unchecked={initialChecked ? undefined : \"true\"}\n  aria-invalid={ariaInvalid}\n  class={cn(\n    \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n    className,\n  )}\n>\n  <span\n    data-slot=\"switch-thumb\"\n    data-checked={initialChecked ? \"true\" : undefined}\n    data-unchecked={initialChecked ? undefined : \"true\"}\n    data-disabled={disabled ? \"true\" : undefined}\n    data-readonly={readOnly ? \"true\" : undefined}\n    data-required={required ? \"true\" : undefined}\n    class=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform\"\n    aria-hidden=\"true\"\n  ></span>\n</span>\n\n<script>\n  import { create } from \"@data-slot/switch\";\n\n  create();\n</script>\n",
      "type": "registry:ui"
    },
    {
      "path": "ui/switch/index.ts",
      "content": "// Generated from bejamas-juno style registry. Do not edit packages/ui/src/components/switch/index.ts directly.\nexport { default as Switch } from \"./Switch.astro\";\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}