@vectoriox/iox-ui 5.174.0 → 5.176.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22837,9 +22837,21 @@ const BAR_CROWDED_AT = 3;
22837
22837
  const PHONE_BAR_CONTROL_ROLES = ['nav.menu-button', 'shop.cart-button', 'account', 'nav.pinned', 'nav.actions'];
22838
22838
  /** What never counts: the drawer (a Dialog) and everything in it. */
22839
22839
  const BAR_SKIPPED_TYPES = ['Dialog'];
22840
- /** The phone layers that may hide a part (responsive-breakpoints plan: `mobile` ≤ 767, `small` ≤ 479). */
22841
- const PHONE_LAYERS = ['mobile', 'small'];
22842
- const hiddenOnPhone = (node) => node.styleProps?.['display'] === 'none' || PHONE_LAYERS.some(bp => node.responsive?.[bp]?.styleProps?.['display'] === 'none');
22840
+ /** The layers that reach a phone held upright, widest → narrowest — the cascade order (iox-ui `BREAKPOINTS`: `laptop`
22841
+ * ≤ 1200, `tablet` ≤ 991, `mobile` ≤ 767, `small` ≤ 479). Spelled here: design-core reads no Angular entry. */
22842
+ const PHONE_CASCADE = ['laptop', 'tablet', 'mobile', 'small'];
22843
+ /** Hidden on a phone: its display where a phone held upright lands, the last layer that says one (base → `small`).
22844
+ * vectoriox/iox-ui#143: a menu button is `none` at base and shown from its breakpoint down — read by its base alone it
22845
+ * was "hidden", the store bar (account · bag · menu) counted two and was never crowded, and its name broke at 390. */
22846
+ const hiddenOnPhone = (node) => {
22847
+ let display = node.styleProps?.['display'];
22848
+ for (const bp of PHONE_CASCADE) {
22849
+ const layer = node.responsive?.[bp]?.styleProps?.['display'];
22850
+ if (layer !== undefined && layer !== null && layer !== '')
22851
+ display = layer;
22852
+ }
22853
+ return display === 'none';
22854
+ };
22843
22855
  /** How many controls sit beside the name in the navigation's phone bar. */
22844
22856
  function phoneBarControls(nav) {
22845
22857
  let n = 0;