{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Form primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.form — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\n/** Form renders a native form element; method is whitelisted (get|post|dialog). */\nexport type FormBaseProps = {\n  method?: \"get\" | \"post\" | \"dialog\";\n  noValidate?: boolean;\n};\n\nexport type FormClassesInput = {\n  className?: string;\n};\n\n/** Compose Form classes without rendering — the cross-runtime `asChild` substitute. */\nexport function formClasses(input: FormClassesInput = {}): string {\n  return cn(input.className);\n}\n",
      "path": "kit/ui/form/form.shared.ts",
      "target": "kit/ui/form/form.shared.ts"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Form is the native <form>. Submission, validation and state are the consumer's;\n * the primitive only types the native form attributes.\n */\n\nimport { forwardRef, type ReactNode, type FormHTMLAttributes } from \"react\";\nimport { formClasses } from \"./form.shared\";\nimport { oneOfOrLower, orUndef, safeRest } from \"../../utils/expr\";\n\n/**\n * Form renders a native form element; method is whitelisted (get|post|dialog).\n */\nexport type FormProps = Omit<FormHTMLAttributes<HTMLFormElement>, \"className\" | \"children\" | \"method\" | \"noValidate\"> & {\n  method?: \"get\" | \"post\" | \"dialog\";\n  noValidate?: boolean;\n  className?: string;\n  children?: ReactNode;\n};\n\nexport const Form = forwardRef<HTMLFormElement, FormProps>(function Form(\n  { method, noValidate, className, children, ...rawRest },\n  ref\n) {\n  const rest = safeRest(rawRest, { blank: [\"id\", \"name\", \"action\", \"enctype\", \"autocomplete\", \"target\", \"aria-label\", \"aria-labelledby\", \"aria-describedby\"] });\n  const cls = formClasses({ className });\n  return (\n    <form ref={ref} className={cls || undefined} method={orUndef(oneOfOrLower(method, \"\", \"get\", \"post\", \"dialog\"))} noValidate={noValidate} {...rest}>\n      {children}\n    </form>\n  );\n});\nForm.displayName = \"Form\";\n",
      "path": "kit/ui/form/form.tsx",
      "target": "kit/ui/form/form.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "react",
      "primitive"
    ]
  },
  "name": "kit-form",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "react",
  "title": "Kit Form",
  "type": "registry:ui"
}
