{#- chirp-ui: Selection Bar Stateful bulk-action container shown when list/table rows are selected. If count <= 0, renders nothing (default, server-gated mode). Usage: from "chirpui/selection_bar.html" import selection_bar call selection_bar(count=3) Export selected Clear end Controlled mode (controlled=true): the bar is always in the DOM (no server count>0 gate) and uses Alpine `x-show`/`x-text` hooks so an enclosing `chirpuiGridSelection` scope can show/hide it and update the count with zero server roundtrip. Used by data_grid. Default `controlled=false` is byte-identical to the historical server-gated render. -#} {% def selection_bar(count=0, label="selected", live_region=false, aria_label="Bulk actions", controlled=false, cls="") %} {% if controlled %}
{% elif count > 0 %} {% end %} {% end %}