{
  "$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// 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": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Icon is a sized frame for a consumer-supplied glyph (svg, sprite, font).\n * No registry: the glyph is the children/slot. Decorative unless Label is set.\n */\n\nimport { forwardRef, type ReactNode, type HTMLAttributes } from \"react\";\nimport { iconClasses, type IconSize } from \"./icon.shared\";\nimport { isSetStr, safeRest } from \"../../utils/expr\";\n\n/**\n * Icon renders span[data-slot=icon]; Label switches to role=img + aria-label.\n */\nexport type IconProps = Omit<HTMLAttributes<HTMLSpanElement>, \"className\" | \"children\" | \"size\" | \"label\"> & {\n  size?: IconSize;\n  label?: string;\n  className?: string;\n  children?: ReactNode;\n};\n\nexport const Icon = forwardRef<HTMLSpanElement, IconProps>(function Icon(\n  { size, label, className, children, ...rawRest },\n  ref\n) {\n  const rest = safeRest(rawRest);\n  const cls = iconClasses({ size, className });\n  return (\n    <span ref={ref} data-slot=\"icon\" className={cls || undefined} aria-hidden={!(isSetStr(label)) ? \"true\" : undefined} role={isSetStr(label) ? \"img\" : undefined} aria-label={isSetStr(label) ? label : undefined} {...rest}>\n      {children}\n    </span>\n  );\n});\nIcon.displayName = \"Icon\";\n",
      "path": "kit/ui/icon/icon.tsx",
      "target": "kit/ui/icon/icon.tsx"
    },
    {
      "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": [
      "react",
      "primitive"
    ]
  },
  "name": "kit-icon",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "react",
  "title": "Kit Icon",
  "type": "registry:ui"
}
