{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Button primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by @ui8kit/codegen. DO NOT EDIT.\n    Button: Button renders a button element, or an anchor when Href is set.\n    Type/Form apply only in button mode; Disabled on anchors uses aria-disabled.\n    Pressed (button mode) and Expanded print aria-pressed / aria-expanded as \"true\"/\"false\";\n    unset omits the attribute.\n    Props (p): Class (string), Type (string), Form (string), Href (string), Disabled (bool), Pressed (bool), Expanded (bool), AriaLabel (string), AriaPressed (string), AriaExpanded (string), AriaControls (string), Attrs (attrs), Children (children).\n    children: TRUSTED HTML printed with |safe — never pass unescaped user input.\n    Classes without rendering: button_classes(p) (no asChild in Jinja2). -#}\n{%- if ui_is_set_str(ui_def(p['Href'], '')) %}<a\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'href') %}{%- if ui_is_set_str(ui_safe_url(ui_def(p['Href'], ''))) %} href=\"{{ ui_safe_url(ui_def(p['Href'], '')) }}\"{%- endif %}{%- endif %}\n  {%- with cls = button_classes(p) %}{%- if cls %} class=\"{{ cls }}\"{%- endif %}{%- endwith %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-expanded') %}{%- if not ui_is_set_str(p['AriaExpanded']) %}{%- if ui_is_set_str(ui_opt_bool_str(ui_def(p['Expanded'], none))) %} aria-expanded=\"{{ ui_opt_bool_str(ui_def(p['Expanded'], none)) }}\"{%- endif %}{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-label') %}{%- if ui_is_set_str(p['AriaLabel']) %} aria-label=\"{{ p['AriaLabel'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-pressed') %}{%- if ui_is_set_str(p['AriaPressed']) %} aria-pressed=\"{{ p['AriaPressed'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-expanded') %}{%- if ui_is_set_str(p['AriaExpanded']) %} aria-expanded=\"{{ p['AriaExpanded'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-controls') %}{%- if ui_is_set_str(p['AriaControls']) %} aria-controls=\"{{ p['AriaControls'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-disabled') %}{%- if ui_def(p['Disabled'], false) %} aria-disabled=\"{{ 'true' }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'tabindex') %}{%- if ui_def(p['Disabled'], false) %} tabindex=\"{{ ui_s(-1) }}\"{%- endif %}{%- endif %}\n  {{ ui_attr_html(ui_def(p['Attrs'], {}), false, ['aria-label', 'aria-pressed', 'aria-expanded', 'aria-controls']) }}\n>{{ children|default('', true)|safe }}</a>{%- else %}<button\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'type') %} type=\"{{ ui_map_or(ui_def(p['Type'], ''), {'submit': 'submit', 'reset': 'reset'}, 'button') }}\"{%- endif %}\n  {%- with cls = button_classes(p) %}{%- if cls %} class=\"{{ cls }}\"{%- endif %}{%- endwith %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'disabled') %}{%- if ui_def(p['Disabled'], false) %} disabled{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'form') %}{%- if ui_is_set_str(p['Form']) %} form=\"{{ p['Form'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-pressed') %}{%- if not ui_is_set_str(p['AriaPressed']) %}{%- if ui_is_set_str(ui_opt_bool_str(ui_def(p['Pressed'], none))) %} aria-pressed=\"{{ ui_opt_bool_str(ui_def(p['Pressed'], none)) }}\"{%- endif %}{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-expanded') %}{%- if not ui_is_set_str(p['AriaExpanded']) %}{%- if ui_is_set_str(ui_opt_bool_str(ui_def(p['Expanded'], none))) %} aria-expanded=\"{{ ui_opt_bool_str(ui_def(p['Expanded'], none)) }}\"{%- endif %}{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-label') %}{%- if ui_is_set_str(p['AriaLabel']) %} aria-label=\"{{ p['AriaLabel'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-pressed') %}{%- if ui_is_set_str(p['AriaPressed']) %} aria-pressed=\"{{ p['AriaPressed'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-expanded') %}{%- if ui_is_set_str(p['AriaExpanded']) %} aria-expanded=\"{{ p['AriaExpanded'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-controls') %}{%- if ui_is_set_str(p['AriaControls']) %} aria-controls=\"{{ p['AriaControls'] }}\"{%- endif %}{%- endif %}\n  {{ ui_attr_html(ui_def(p['Attrs'], {}), false, ['form', 'aria-label', 'aria-pressed', 'aria-expanded', 'aria-controls']) }}\n>{{ children|default('', true)|safe }}</button>{%- endif %}\n",
      "path": "ui/button/button.html.j2",
      "target": "ui/button/button.html.j2"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "jinja2",
      "primitive"
    ]
  },
  "name": "kit-button",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Kit Button",
  "type": "registry:ui"
}
