{
  "$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 lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { IconSize } from \"./icon.shared\";\n\n  export type IconProps = {\n    size?: IconSize;\n    label?: string;\n    class?: string;\n    children?: Snippet;\n    [key: string]: unknown;\n  };\n</script>\n\n<script lang=\"ts\">\n  import { iconClasses } from \"./icon.shared\";\n  import { isSetStr, safeRest } from \"../../utils/expr\";\n\n  let {\n    size,\n    label,\n    class: className,\n    children,\n    ...rawRest\n  }: IconProps = $props();\n\n  const rest = $derived(safeRest(rawRest));\n  const cls = $derived(iconClasses({ size, className }));\n</script>\n\n<span data-slot=\"icon\" {...(cls ? { class: cls } : {})} aria-hidden={!(isSetStr(label)) ? \"true\" : undefined} role={isSetStr(label) ? \"img\" : undefined} aria-label={isSetStr(label) ? label : undefined} {...rest}>\n  {@render children?.()}\n</span>\n",
      "path": "kit/ui/icon/Icon.svelte",
      "target": "kit/ui/icon/Icon.svelte"
    },
    {
      "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": [
      "svelte",
      "primitive"
    ]
  },
  "name": "kit-icon",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "svelte",
  "title": "Kit Icon",
  "type": "registry:ui"
}
