Multi-select

Filter by several values of one dimension. Never pills, never a single select.

Helper
multi_select(
  name:,
  label:,
  options:,                  # values or { value:, label:, sub:, status:, color: }
  selected: nil,             # nil = all
  icon: nil,
  all_label: "Todos",
  none_label: "Nenhum",
  many_label: "%{count} selecionados",
  searchable: nil,           # nil = more than 8 options
  search_placeholder: "Buscar",
  align: :left
)

Options are values or hashes (value, label, optional sub, status or color). It submits name[] with the checked values; selected: nil means all. The summary on the trigger follows the choice: all, none, the one name, or many_label with %{count}. Search appears by itself above 8 options.

It dispatches componeer--multi-select:change with the chosen values, so a form can submit itself: data-action="componeer--multi-select:change->filters#submit".