{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Switcher Item 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<!-- One item of a Switcher (default or active). Pass the same size and layout as the Switcher. -->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import { variants } from \"../utils\";\n\n  /** SwitcherItem: the classes of each value (shadcn/cva style). */\n  export const switcherItemVariants = variants({\n    base:\n      \"inline-flex shrink-0 items-center justify-center whitespace-nowrap font-bold text-muted-foreground inset-ring \" +\n      \"inset-ring-transparent rounded\",\n    variants: {\n      size: {\n        sm: \"h-6 gap-1 px-3 text-xs\",\n        default: \"h-8 gap-2 px-4 text-sm\",\n        lg: \"h-10 gap-2 px-5 text-sm\",\n      },\n      state: {\n        default: \"\",\n        active: \"bg-background text-foreground inset-ring-border\",\n      },\n      layout: {\n        text: \"\",\n        icon: \"[&>svg]:size-4\",\n      },\n    },\n    defaultVariants: { size: \"default\", state: \"default\", layout: \"text\" },\n    compoundVariants: [\n      { layout: \"icon\", size: \"sm\", class: \"w-6 px-0\" },\n      { layout: \"icon\", size: \"default\", class: \"w-8 px-0\" },\n      { layout: \"icon\", size: \"lg\", class: \"w-10 px-0\" },\n    ],\n  });\n\n  export type SwitcherItemProps = {\n    active?: boolean;\n    size?: \"sm\" | \"default\" | \"lg\";\n    layout?: \"text\" | \"icon\";\n    class?: string;\n    children?: Snippet;\n    onclick?: () => void;\n  };\n</script>\n\n<script lang=\"ts\">\n  import ButtonPlain from \"../compose/ButtonPlain.svelte\";\n  import { cn } from \"../utils\";\n\n  let {\n    active = false,\n    size = \"default\",\n    layout = \"text\",\n    class: className,\n    children,\n    onclick,\n  }: SwitcherItemProps = $props();\n</script>\n\n<ButtonPlain\n  type=\"button\"\n  role=\"tab\"\n  class={cn(\n    switcherItemVariants({ size: size, layout: layout, state: (active ? \"active\" : \"default\") }),\n    className\n  )}\n  aria-selected={active}\n  tabindex={(active ? 0 : -1)}\n  data-slot=\"switcher-item\"\n  data-state={(active ? \"active\" : \"default\")}\n  onclick={() => onclick?.()}\n>\n  {@render children?.()}\n</ButtonPlain>\n",
      "path": "components/switcher-item.svelte",
      "target": "components/switcher-item.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "switcher-item",
  "registryDependencies": [
    "button-plain",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Switcher Item",
  "type": "registry:component"
}
