{
  "$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\">\nimport { variants } from \"../utils\";\n\n/** SwitcherItem: the classes of each value (shadcn/cva style). */\nexport 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\nexport type SwitcherItemProps = {\n  active?: boolean;\n  size?: \"sm\" | \"default\" | \"lg\";\n  layout?: \"text\" | \"icon\";\n  class?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport ButtonPlain from \"../compose/ButtonPlain.vue\";\nimport { cn } from \"../utils\";\n\nconst {\n  active = false,\n  size = \"default\",\n  layout = \"text\",\n  class: className,\n} = defineProps<SwitcherItemProps>();\nconst emit = defineEmits<{ click: [] }>();\ndefineSlots<{ default?(): unknown }>();\n</script>\n\n<template>\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    @click=\"() => emit('click')\"\n  >\n    <slot />\n  </ButtonPlain>\n</template>\n",
      "path": "components/switcher-item.vue",
      "target": "components/switcher-item.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "switcher-item",
  "registryDependencies": [
    "button-plain",
    "utils"
  ],
  "runtime": "vue",
  "title": "Switcher Item",
  "type": "registry:component"
}
