{# Heatmap region — UX-035 adopter #13. Contract: ~/.claude/skills/ux-architect/components/heatmap-region.md (UX-064) v0.62 CSS refactor: inline Tailwind → semantic .dz-heatmap-* classes. Threshold-banded cell tints route through data-dz-heatmap-tone (bad / warn / good) attribute selectors so the template emits a single data-attribute instead of three Tailwind class strings. #} {% from 'macros/region_wrapper.html' import region_card %} {% call region_card(title) %}
{% if heatmap_matrix %}
{% for col in heatmap_col_values %} {% endfor %} {% for row in heatmap_matrix %} {# action_url is row-scoped — attached to the so clicking the row label (leftmost {% for cell in row.cells %} {% endfor %} {% endfor %}
{{ col }}
) navigates too (#845). Per-cell hover feedback stays for the threshold-colour cells below. #}
{{ row.row }}= 2 -%} {%- if cell.value < heatmap_thresholds[0] %} data-dz-heatmap-tone="bad" {%- elif cell.value < heatmap_thresholds[1] %} data-dz-heatmap-tone="warn" {%- else %} data-dz-heatmap-tone="good" {%- endif -%} {%- elif heatmap_thresholds|length == 1 -%} {%- if cell.value < heatmap_thresholds[0] %} data-dz-heatmap-tone="bad" {%- else %} data-dz-heatmap-tone="good" {%- endif -%} {%- endif %}> {{ "%.1f"|format(cell.value) }}
{% if total > items|length %}

Showing {{ items|length }} of {{ total }}

{% endif %} {% else %}

{{ empty_message | default("No data available.") }}

{% endif %}
{% endcall %}