{
  "$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 { splitProps, type JSX, type Component } from \"solid-js\";\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<JSX.FormHTMLAttributes<HTMLFormElement>, \"class\" | \"className\" | \"children\" | \"method\" | \"noValidate\"> & {\n  method?: \"get\" | \"post\" | \"dialog\";\n  noValidate?: boolean;\n  class?: string;\n  className?: string;\n  children?: JSX.Element;\n};\n\nexport const Form: Component<FormProps> = (props) => {\n  const [local, rest] = splitProps(props, [\"method\", \"noValidate\", \"class\", \"className\", \"children\"]);\n  const cls = () => formClasses({ className: local.class ?? local.className });\n  return (\n    <form {...(cls() ? { class: cls() } : {})} method={orUndef(oneOfOrLower(local.method, \"\", \"get\", \"post\", \"dialog\"))} novalidate={local.noValidate || undefined} {...safeRest(rest, { blank: [\"id\", \"name\", \"action\", \"enctype\", \"autocomplete\", \"target\", \"aria-label\", \"aria-labelledby\", \"aria-describedby\"] })}>\n      {local.children}\n    </form>\n  );\n};\n",
      "path": "kit/ui/form/form.solid.tsx",
      "target": "kit/ui/form/form.solid.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "solid",
      "primitive"
    ]
  },
  "name": "kit-form",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "solid",
  "title": "Kit Form",
  "type": "registry:ui"
}
