{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Switcher component",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  A segmented switcher: a tab list whose items (SwitcherItem) share size and layout. Canary handed these down\n  through context; here each item takes the same two props. Arrow keys: attach `moveFocus` to the keydown\n  (horizontal, activate).\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import { variants } from \"../utils\";\n\n  /** Switcher: the classes of each value (shadcn/cva style). */\n  export const switcherVariants = variants({\n    base: \"inline-flex max-w-full items-center gap-1 overflow-x-auto bg-muted inset-ring inset-ring-border rounded\",\n    variants: {\n      size: {\n        sm: \"h-8 p-1\",\n        default: \"h-10 p-1\",\n        lg: \"h-12 p-1\",\n      },\n      layout: {\n        text: \"\",\n        icon: \"gap-0\",\n      },\n    },\n    defaultVariants: { size: \"default\", layout: \"text\" },\n  });\n\n  export type SwitcherProps = {\n    size?: \"sm\" | \"default\" | \"lg\";\n    layout?: \"text\" | \"icon\";\n    label?: string;\n    class?: string;\n    children?: Snippet;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import { cn } from \"../utils\";\n\n  let { size = \"default\", layout = \"text\", label, class: className, children }: SwitcherProps = $props();\n</script>\n\n<Box\n  class={cn(switcherVariants({ size: size, layout: layout }), className)}\n  role=\"tablist\"\n  aria-label={label}\n  data-slot=\"switcher\"\n>\n  {@render children?.()}\n</Box>\n",
      "path": "components/switcher.svelte",
      "target": "components/switcher.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "switcher",
  "registryDependencies": [
    "box",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Switcher",
  "type": "registry:component"
}
