{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A form field: label, control (children), hint and error text. `htmlFor` ties the label to the id of the control.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/parts/field.json\n    A form field: label, control (children), hint and error text. `htmlFor` ties the label to the id of the control.\n    Props (p): label, htmlFor, hint, error, className; children: markup. -#}\n{%- set v_label = og_def(p['label'], none) -%}\n{%- set v_htmlFor = og_def(p['htmlFor'], none) -%}\n{%- set v_hint = og_def(p['hint'], none) -%}\n{%- set v_error = og_def(p['error'], none) -%}\n{%- set c_4 -%}\n  {%- set c_1 -%}\n    {{ og_text(v_label) }}\n  {%- endset -%}\n  {{ og_include('compose/label.html.j2', {'p': {'Class': 'text-xs font-bold text-foreground', 'For': og_s(v_htmlFor)}, 'children': c_1}) }}\n  {{ og_slot(og_def(children, none))|safe }}\n  {%- if og_t(v_error) %}\n    {%- set c_2 -%}\n      {{ og_text(v_error) }}\n    {%- endset -%}\n    {{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-xs font-semibold text-destructive', 'Attrs': og_attrs(['role', 'alert'])}, 'children': c_2}) }}\n  {%- elif og_t(v_hint) %}\n    {%- set c_3 -%}\n      {{ og_text(v_hint) }}\n    {%- endset -%}\n    {{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-xs font-medium text-muted-foreground'}, 'children': c_3}) }}\n  {%- endif %}\n{%- endset -%}\n{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['flex min-w-0 flex-col gap-2', og_def(p['className'], '')]))}, 'children': c_4}) }}\n",
      "path": "blocks/field.html.j2",
      "target": "blocks/field.html.j2"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "jinja2",
      "component"
    ]
  },
  "name": "field",
  "registryDependencies": [
    "box",
    "label",
    "text",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Field",
  "type": "registry:component"
}
