// SortDropdown.js — Decoupled sort trigger. // // The native with a custom trigger + menu that mirror its state, so the // trigger sizes to the selected text while the menu sizes to its content. // // The native behavior so the control remains fully accessible. const SORT_GROUP_SELECTOR = '.sort-dropdown-group'; const ACTIVE_GROUP_SELECTOR = '.sort-dropdown-group.active, .dropdown-group.active'; /** * Initialize a decoupled sort dropdown around a native