{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Icon primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by @ui8kit/codegen. DO NOT EDIT. -->\n<!--\n  Icon renders span[data-slot=icon]; Label switches to role=img + aria-label.\n-->\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { iconClasses, type IconSize } from \"./icon.shared\";\nimport { isSetStr, safeRest } from \"../../utils/expr\";\n\ndefineOptions({ name: \"Icon\", inheritAttrs: false });\n\nconst props = defineProps<{\n  size?: IconSize;\n  label?: string;\n}>();\n\nconst attrs = useAttrs();\nconst callerClass = computed(() => attrs.class as string | undefined);\nconst restAttrs = computed(() => {\n  const { class: _class, ...restEntries } = attrs;\n  return safeRest(restEntries);\n});\nconst cls = computed(() => iconClasses({ size: props.size, className: callerClass.value }));\n</script>\n\n<template>\n  <span data-slot=\"icon\" :class=\"cls || undefined\" :aria-hidden=\"!(isSetStr(props.label)) ? 'true' : undefined\" :role=\"isSetStr(props.label) ? 'img' : undefined\" :aria-label=\"isSetStr(props.label) ? props.label : undefined\" v-bind=\"restAttrs\">\n    <slot />\n  </span>\n</template>\n",
      "path": "kit/ui/icon/Icon.vue",
      "target": "kit/ui/icon/Icon.vue"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.icon — shared TypeScript contract (types + classes helpers)\n\nimport { cn, composeRecipe, type RecipeKey } from \"../../utils\";\nimport iconRecipeJson from \"./icon.variants.json\";\n\nexport const iconRecipe = iconRecipeJson;\n\nexport type IconSize = RecipeKey<typeof iconRecipe, \"size\">;\n\n/** Icon renders span[data-slot=icon]; Label switches to role=img + aria-label. */\nexport type IconBaseProps = {\n  size?: IconSize;\n  label?: string;\n};\n\nexport type IconClassesInput = {\n  size?: IconSize;\n  className?: string;\n};\n\n/** Compose Icon classes without rendering — the cross-runtime `asChild` substitute. */\nexport function iconClasses(input: IconClassesInput = {}): string {\n  return cn(composeRecipe(iconRecipe, { size: input.size }), input.className);\n}\n",
      "path": "kit/ui/icon/icon.shared.ts",
      "target": "kit/ui/icon/icon.shared.ts"
    },
    {
      "content": "{\n  \"base\": \"inline-flex shrink-0 items-center justify-center\",\n  \"byKey\": {\n    \"size\": {\n      \"xs\": \"size-3\",\n      \"sm\": \"size-4\",\n      \"md\": \"size-5\",\n      \"lg\": \"size-6\",\n      \"xl\": \"size-8\"\n    }\n  },\n  \"defaults\": {\n    \"size\": \"sm\"\n  },\n  \"id\": \"ui.icon\",\n  \"keys\": [\n    \"size\"\n  ]\n}\n",
      "path": "kit/ui/icon/icon.variants.json",
      "target": "kit/ui/icon/icon.variants.json"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "vue",
      "primitive"
    ]
  },
  "name": "kit-icon",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "vue",
  "title": "Kit Icon",
  "type": "registry:ui"
}
