{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Box primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.box — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\n/** Box renders the requested structural HTML element (default div). */\nexport type BoxBaseProps = {\n  tag?: \"div\" | \"section\" | \"article\" | \"aside\" | \"header\" | \"footer\" | \"main\" | \"nav\" | \"figure\" | \"search\" | \"ul\" | \"ol\" | \"li\" | \"dl\" | \"dt\" | \"dd\" | \"fieldset\" | \"table\" | \"thead\" | \"tbody\" | \"tfoot\" | \"tr\" | \"th\" | \"td\" | \"caption\" | \"colgroup\" | \"col\";\n};\n\nexport type BoxClassesInput = {\n  className?: string;\n};\n\n/** Compose Box classes without rendering — the cross-runtime `asChild` substitute. */\nexport function boxClasses(input: BoxClassesInput = {}): string {\n  return cn(input.className);\n}\n",
      "path": "kit/ui/box/box.shared.ts",
      "target": "kit/ui/box/box.shared.ts"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Box is the polymorphic structural primitive. `tag` accepts HTML5 structural\n * elements only (sections, lists, tables, fieldset); anything else falls back to div.\n * Forms use the Form primitive (Box no longer accepts `form`).\n */\n\nimport { forwardRef, type ReactNode, type HTMLAttributes, type ElementType, type Ref } from \"react\";\nimport { boxClasses } from \"./box.shared\";\nimport { safeRest } from \"../../utils/expr\";\nimport { resolveTag, TagGroup } from \"../../utils/tags\";\nimport { Slot } from \"../slot/slot\";\n\n/**\n * Box renders the requested structural HTML element (default div).\n */\nexport type BoxProps = Omit<HTMLAttributes<HTMLElement>, \"className\" | \"children\" | \"tag\"> & {\n  tag?: \"div\" | \"section\" | \"article\" | \"aside\" | \"header\" | \"footer\" | \"main\" | \"nav\" | \"figure\" | \"search\" | \"ul\" | \"ol\" | \"li\" | \"dl\" | \"dt\" | \"dd\" | \"fieldset\" | \"table\" | \"thead\" | \"tbody\" | \"tfoot\" | \"tr\" | \"th\" | \"td\" | \"caption\" | \"colgroup\" | \"col\";\n  className?: string;\n  children?: ReactNode;\n  asChild?: boolean;\n};\n\nexport const Box = forwardRef<HTMLElement, BoxProps>(function Box(\n  { tag, className, children, asChild, ...rawRest },\n  ref\n) {\n  const rest = safeRest(rawRest);\n  const cls = boxClasses({ className });\n  const resolvedTagValue = resolveTag(tag, \"div\", TagGroup.Box);\n  const Tag = resolvedTagValue as ElementType;\n  if (asChild) {\n    return (\n      <Slot ref={ref} className={cls} {...rest}>\n        {children}\n      </Slot>\n    );\n  }\n  return (\n    <Tag ref={ref as Ref<HTMLElement>} className={cls || undefined} {...rest}>\n      {children}\n    </Tag>\n  );\n});\nBox.displayName = \"Box\";\n",
      "path": "kit/ui/box/box.tsx",
      "target": "kit/ui/box/box.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "react",
      "primitive"
    ]
  },
  "name": "kit-box",
  "registryDependencies": [
    "kit-slot",
    "utils"
  ],
  "runtime": "react",
  "title": "Kit Box",
  "type": "registry:ui"
}
