{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "File Tree 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<!-- A row of a file tree: a folder with a disclosure chevron, or a file. The glyphs are Lucide. -->\n<script lang=\"ts\">\nimport { variants } from \"../utils\";\n\n/** FileTreeItem: the classes of each value (shadcn/cva style). */\nexport const fileTreeItemVariants = variants({\n  base: \"flex h-6 w-full items-center gap-4 text-xs font-bold text-muted-foreground data-[state=selected]:bg-muted\",\n  variants: {\n    kind: {\n      folder: \"\",\n      file: \"px-8\",\n    },\n  },\n  defaultVariants: { kind: \"file\" },\n});\n\nexport type FileTreeItemProps = {\n  kind?: \"folder\" | \"file\";\n  label: string;\n  selected?: boolean;\n  expanded?: boolean;\n  class?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport ButtonPlain from \"../compose/ButtonPlain.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport { cn } from \"../utils\";\n\nconst {\n  kind = \"file\",\n  label,\n  selected = false,\n  expanded = false,\n  class: className,\n} = defineProps<FileTreeItemProps>();\nconst emit = defineEmits<{ click: [] }>();\n</script>\n\n<template>\n  <ButtonPlain\n    type=\"button\"\n    role=\"treeitem\"\n    :class=\"cn(fileTreeItemVariants({ kind: kind }), className)\"\n    :aria-selected=\"selected\"\n    :tabindex=\"(selected ? 0 : -1)\"\n    :aria-expanded=\"(((kind as string) === 'folder') ? expanded : undefined)\"\n    data-slot=\"file-tree-item\"\n    :data-kind=\"kind\"\n    :data-state=\"(selected ? 'selected' : 'default')\"\n    @click=\"() => emit('click')\"\n  >\n    <template v-if=\"((kind as string) === 'folder')\">\n      <LucideIcon :name=\"(expanded ? 'chevron-down' : 'chevron-right')\" :size=\"16\" />\n      <LucideIcon name=\"folder-open\" :size=\"16\" />\n    </template>\n    <LucideIcon v-else name=\"file\" :size=\"16\" />\n    <Inline class=\"whitespace-nowrap\" data-slot=\"file-tree-label\">\n      {{ label }}\n    </Inline>\n  </ButtonPlain>\n</template>\n",
      "path": "components/file-tree-item.vue",
      "target": "components/file-tree-item.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "file-tree-item",
  "registryDependencies": [
    "button-plain",
    "inline",
    "lucide-icon",
    "utils"
  ],
  "runtime": "vue",
  "title": "File Tree Item",
  "type": "registry:component"
}
