{
  "$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\n/*\nForm is the native <form>. Submission, validation and state are the consumer's;\nthe primitive only types the native form attributes.\n*/\n\npackage form\n\nimport (\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/utils\"\n)\n\n// FormProps configures Form.\ntype FormProps struct {\n\t// Class — token class names supplied by the consumer\n\tClass string\n\tID string\n\tName string\n\t// Action — submission URL\n\tAction string\n\t// Method — HTTP method: get | post | dialog (omitted when empty)\n\tMethod string\n\t// Enctype — encoding for post (e.g. multipart/form-data)\n\tEnctype string\n\t// NoValidate — skip native constraint validation\n\tNoValidate bool\n\t// Autocomplete — on | off\n\tAutocomplete string\n\t// Target — browsing context for the response\n\tTarget string\n\tAriaLabel string\n\tAriaLabelledBy string\n\tAriaDescribedBy string\n\tAttrs templ.Attributes\n}\n\n// FormClasses composes Form classes without rendering —\n// the server-composition escape hatch for custom root elements (no asChild in templ).\nfunc FormClasses(p FormProps) string {\n\treturn uiutils.Cn(p.Class)\n}\n\n// Form renders the Form contract.\ntempl Form(p FormProps) {\n\t<form\n\t\tif FormClasses(p) != \"\" {\n\t\t\tclass={ FormClasses(p) }\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"id\") {\n\t\t\tif uiutils.IsSetStr(p.ID) {\n\t\t\t\tid={ p.ID }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"name\") {\n\t\t\tif uiutils.IsSetStr(p.Name) {\n\t\t\t\tname={ p.Name }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"action\") {\n\t\t\tif uiutils.IsSetStr(uiutils.SafeURL(p.Action)) {\n\t\t\t\taction={ uiutils.SafeURL(p.Action) }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"method\") {\n\t\t\tif uiutils.IsSetStr(uiutils.OneOfOrLower(p.Method, \"\", \"get\", \"post\", \"dialog\")) {\n\t\t\t\tmethod={ uiutils.OneOfOrLower(p.Method, \"\", \"get\", \"post\", \"dialog\") }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"enctype\") {\n\t\t\tif uiutils.IsSetStr(p.Enctype) {\n\t\t\t\tenctype={ p.Enctype }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"novalidate\") {\n\t\t\tnovalidate?={ p.NoValidate }\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"autocomplete\") {\n\t\t\tif uiutils.IsSetStr(p.Autocomplete) {\n\t\t\t\tautocomplete={ p.Autocomplete }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"target\") {\n\t\t\tif uiutils.IsSetStr(p.Target) {\n\t\t\t\ttarget={ p.Target }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"aria-label\") {\n\t\t\tif uiutils.IsSetStr(p.AriaLabel) {\n\t\t\t\taria-label={ p.AriaLabel }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"aria-labelledby\") {\n\t\t\tif uiutils.IsSetStr(p.AriaLabelledBy) {\n\t\t\t\taria-labelledby={ p.AriaLabelledBy }\n\t\t\t}\n\t\t}\n\t\tif !uiutils.HasAttr(p.Attrs, \"aria-describedby\") {\n\t\t\tif uiutils.IsSetStr(p.AriaDescribedBy) {\n\t\t\t\taria-describedby={ p.AriaDescribedBy }\n\t\t\t}\n\t\t}\n\t\t{ uiutils.RestAttrs(p.Attrs, false, \"id\", \"name\", \"action\", \"enctype\", \"autocomplete\", \"target\", \"aria-label\", \"aria-labelledby\", \"aria-describedby\")... }\n\t>\n\t\t{ children... }\n\t</form>\n}\n",
      "path": "ui/form/form.templ",
      "target": "ui/form/form.templ"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "templ",
      "primitive"
    ]
  },
  "name": "kit-form",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "templ",
  "title": "Kit Form",
  "type": "registry:ui"
}
