{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Editor Tab 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  An editor file tab (40 px high): a file icon, the label and a close button. `preview` marks a tab that is not\n  pinned yet. Keyboard (Enter and Space activate, Delete closes) is the programmer's behind the click and close\n  events.\n-->\n<script lang=\"ts\">\nexport type EditorTabProps = {\n  label: string;\n  closeLabel: string;\n  active?: boolean;\n  preview?: boolean;\n  class?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport { cn } from \"../utils\";\n\nconst {\n  label,\n  closeLabel,\n  active = false,\n  preview = false,\n  class: className,\n} = defineProps<EditorTabProps>();\nconst emit = defineEmits<{ click: [], close: [] }>();\ndefineSlots<{ icon?(): unknown }>();\n</script>\n\n<template>\n  <Box\n    :class=\"cn(\n      'flex h-10 shrink-0 cursor-pointer flex-col justify-center data-[state=active]:bg-card ' +\n        '[&_svg]:text-muted-foreground',\n      'border-r border-border',\n      className\n    )\"\n    role=\"tab\"\n    :aria-selected=\"active\"\n    :tabindex=\"(active ? 0 : -1)\"\n    data-slot=\"editor-tab\"\n    :data-state=\"(active ? 'active' : 'default')\"\n    @click=\"() => emit('click')\"\n  >\n    <Inline class=\"flex h-10 items-center gap-2 px-3\" data-slot=\"editor-tab-content\">\n      <slot name=\"icon\" />\n      <Inline\n        :class=\"cn('text-xs text-foreground', (preview ? 'font-semibold italic' : 'font-bold'))\"\n        data-slot=\"editor-tab-label\"\n      >\n        {{ label }}\n      </Inline>\n      <Button\n        variant=\"ghost\"\n        size=\"sm\"\n        layout=\"icon\"\n        :class=\"'p-0 [&>svg]:size-4'\"\n        :aria-label=\"closeLabel\"\n        :tabindex=\"-1\"\n        data-slot=\"editor-tab-close\"\n        @click=\"() => emit('close')\"\n      >\n        <LucideIcon name=\"x\" :size=\"16\" />\n      </Button>\n    </Inline>\n  </Box>\n</template>\n",
      "path": "components/editor-tab.vue",
      "target": "components/editor-tab.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "editor-tab",
  "registryDependencies": [
    "box",
    "button",
    "inline",
    "lucide-icon",
    "utils"
  ],
  "runtime": "vue",
  "title": "Editor Tab",
  "type": "registry:component"
}
