@vectoriox/iox-ui 5.123.0 → 5.124.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.
package/package.json
CHANGED
|
@@ -1201,13 +1201,18 @@ function withStore(globals: SerializedNode[], locale: string): SerializedNode[]
|
|
|
1201
1201
|
const out = [...globals];
|
|
1202
1202
|
const header = out.find(g => g.id === GlobalSlot.Header);
|
|
1203
1203
|
if (header) {
|
|
1204
|
-
const
|
|
1204
|
+
const top = header.children ?? (header.children = []);
|
|
1205
1205
|
const account = ACCOUNT_RECIPES[AccountRecipe.Entry](recipeFactory(ACCOUNT_ENTRY_ID, ACCOUNT_ENTRY_KEY), locale) as SerializedNode;
|
|
1206
1206
|
const bag = SHOP_RECIPES[ShopRecipe.CartButton](recipeFactory(SHOP_CART_BUTTON_ID, CART_BUTTON_KEY)) as SerializedNode;
|
|
1207
|
+
// HI1: a bar of side cells (between, a centred name, a name-and-menu) takes the slots in its END cell — the cells
|
|
1208
|
+
// share the free space, so the name stays where its arrangement puts it. Otherwise the root's, as before (R-H4).
|
|
1209
|
+
const cells = top.filter(k => k.role === NavRole.Cell);
|
|
1210
|
+
const host = cells.length ? cells[cells.length - 1] : header;
|
|
1211
|
+
const kids = host.children ?? (host.children = []);
|
|
1207
1212
|
const menu = kids.findIndex(k => k.role === NavRole.MenuButton);
|
|
1208
1213
|
kids.splice(menu >= 0 ? menu : kids.length, 0, account, bag);
|
|
1209
|
-
const brand =
|
|
1210
|
-
if (brand) setStyleProps(brand, { flexGrow: '1' });
|
|
1214
|
+
const brand = top.find(k => k.role === NavRole.Brand);
|
|
1215
|
+
if (brand && !cells.length) setStyleProps(brand, { flexGrow: '1' });
|
|
1211
1216
|
}
|
|
1212
1217
|
const drawer = SHOP_RECIPES[ShopRecipe.CartDrawer](recipeFactory(SHOP_CART_DRAWER_ID, CART_DRAWER_KEY)) as SerializedNode;
|
|
1213
1218
|
drawer.isGlobal = true;
|
|
@@ -353,8 +353,9 @@ function bodyOf(mix: HeaderMix, ctx: HeaderContext): { lay: Record<string, strin
|
|
|
353
353
|
const other = actions ? [actions] : [];
|
|
354
354
|
return { lay: flex, c: [cell('start', start ? menuSide : other), brand, links([]), cell('end', start ? other : menuSide)] };
|
|
355
355
|
}
|
|
356
|
-
// The name and the menu: the name at the
|
|
357
|
-
|
|
356
|
+
// The name and the menu. At the end: the name at the start, what the bar keeps by the button. At the start (Vonder):
|
|
357
|
+
// the button and the pinned page at the start, the name in the middle, the actions at the end — two equal side cells.
|
|
358
|
+
return { lay: flex, c: start ? [cell('start', pinned ? [pinned] : []), brand, links([]), cell('end', actions ? [actions] : [])] : [brand, links([]), cell('end', kept)] };
|
|
358
359
|
}
|
|
359
360
|
|
|
360
361
|
/** What the composer stamps for a header mix: the pattern, its phone shape and where its menu button sits. Check it first
|
package/styles/iox-design.css
CHANGED
|
@@ -459,8 +459,11 @@ dialog[data-iox-dialog] {
|
|
|
459
459
|
|
|
460
460
|
/* A navigation's link lists (board 1): no underline at rest — the current page's link is the one
|
|
461
461
|
underlined (the link's `current` state, link-current-decoration). Keyed on the list's ROLE, so a
|
|
462
|
-
composed or adopted header and its drawer read it and no Link holds a literal over its element style.
|
|
462
|
+
composed or adopted header and its drawer read it and no Link holds a literal over its element style.
|
|
463
|
+
HI1: the pages a menu header keeps in the bar (pinned) and its actions (a quiet link) are the bar's links too. */
|
|
463
464
|
.iox-role-nav-links,
|
|
465
|
+
.iox-role-nav-pinned,
|
|
466
|
+
.iox-role-nav-actions,
|
|
464
467
|
.iox-role-nav-drawer-links {
|
|
465
468
|
--iox-link-decoration: none;
|
|
466
469
|
--iox-link-underline-rest: 0;
|