{# Grid region — first adopter of the shared region_card macro (UX-035). Contract: ~/.claude/skills/ux-architect/components/grid-region.md (UX-066) v0.62 CSS refactor: inline Tailwind → semantic .dz-grid-* classes (components/regions.css). Cell hover-state lives on .is-clickable modifier (toggled by `{% if action_url %}`); attention accent still flows through the unchanged attention_classes macro. #} {% from 'macros/status_badge.html' import render_status_badge %} {% from 'macros/region_wrapper.html' import region_card %} {% from 'macros/attention_accent.html' import attention_classes %} {% from 'macros/ref_cell.html' import ref_cell %} {% call region_card(title) %}
{% if items %}
{% for item in items %} {% set attn = item.get("_attention") if item.get is defined else none %} {# Item cell is intentionally plain — no bg/border/full chrome. The visible card chrome lives on the enclosing region_card macro (rounded-[6px] + border + bg). Duplicating chrome here produced a card-within-a-card effect; see issue #794 and its follow-up. #}

{% set _primary = item[display_key] %} {% if _primary is none %}{{ item.get("name", (entity_name|default("Item"))) }}{% else %}{{ _primary }}{% endif %}

{% for col in columns %} {% if col.key != display_key %}

{{ col.label }}: {% if col.type == "badge" %} {{ render_status_badge(value=item[col.key]) }} {% elif col.type == "bool" %} {{ item[col.key] | bool_icon }} {% elif col.type == "date" %} {{ item[col.key] | dateformat }} {% elif col.type == "currency" %} {{ item[col.key] | currency }} {% elif col.type == "ref" %} {{ ref_cell(item[col.key], item.get(col.key ~ "_display", ""), col.ref_route or "", 'link_stop') }} {% else %} {{ item[col.key] | default("") | truncate_text }} {% endif %}

{% endif %} {% endfor %}
{% endfor %}
{% else %} {% include "fragments/empty_state.html" %} {% endif %}
{% endcall %}