{# mirrorwall/components.html — the component macros three applications share (spec §4). Every macro is keyword-driven with defaults that make sense for any application: nothing here has a required parameter shaped by one product's data model, which is the specific failure mode this extraction exists to avoid. Accessibility is not a later pass. Each macro emits the ARIA its pattern requires — a labelled table, a `role="status"` toast region, a `aria-modal` dialog with a heading it is labelled by — and the accessibility tests assert those attributes rather than trusting them. #} {% macro button(label, variant="default", type="button", name=None, value=None, disabled=False, aria_label=None, extra="") -%} {%- endmacro %} {% macro badge(label, tone="neutral", title=None) -%} {{ label }} {%- endmacro %} {% macro input(name, label, value="", type="text", hint=None, error=None, required=False, placeholder=None) -%} {% set field_id = "mw-field-" ~ name %}
{{ error }}
{% elif hint %}{{ hint }}
{% endif %}{{ hint }}
{% endif %}| {{ column.label }} | {% endfor %}
|---|
| {{ cell }} | {% endfor %}
{{ row_count }} row{{ '' if row_count == 1 else 's' }}
{% endif %} {%- endmacro %} {% macro empty_state(message, action_label=None, action_href=None) -%}{{ message }}
{% if action_label and action_href %}{% endif %}{{ payload | json_pretty }}
{{ description }}
{{ caller() }}