@vectoriox/iox-ui 5.96.0 → 5.96.2
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
|
@@ -76,7 +76,8 @@ function setText(el: Element | null | undefined, words: string): void {
|
|
|
76
76
|
function wordsOf(el: Element | null | undefined): Element | null {
|
|
77
77
|
if (!el) return null;
|
|
78
78
|
let cur: Element = el;
|
|
79
|
-
|
|
79
|
+
// Never INTO the count this runtime appended to a title — a second stamp would nest another inside it.
|
|
80
|
+
while (cur.children.length === 1 && !cur.children[0].hasAttribute(CART_TITLE_COUNT_ATTRIBUTE)) cur = cur.children[0];
|
|
80
81
|
return cur;
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -308,7 +308,7 @@ export function buildVariantPickerRecipe(create: CompositeNodeFactory): Composit
|
|
|
308
308
|
export function buildQuantityRecipe(create: CompositeNodeFactory, compact = false, key = 'quantity'): CompositeNode {
|
|
309
309
|
const size = compact ? '30px' : 'var(--iox-stepper-size)';
|
|
310
310
|
const root = part(create, key, Type.Container, ShopRole.Quantity, Style.Quantity, {}, SHOP_LABELS.quantity,
|
|
311
|
-
{ ...ROW, alignItems: 'stretch', gap: '0px',
|
|
311
|
+
{ ...ROW, alignItems: 'stretch', gap: '0px', minHeight: size });
|
|
312
312
|
const down = button(create, `${key}-down`, ShopRole.QuantityDown, Style.QuantityButton, 'Decrease', 'Decrease quantity',
|
|
313
313
|
{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', minWidth: size, padding: ZERO });
|
|
314
314
|
down.children = [icon(create, `${key}-down-icon`, 'ph ph-minus', compact ? '14px' : '16px')];
|
|
@@ -347,7 +347,7 @@ export function buildCartButtonRecipe(create: CompositeNodeFactory): CompositeNo
|
|
|
347
347
|
const root = button(create, 'cart-button', ShopRole.CartButton, Style.CartButton, SHOP_LABELS.cartButton, SHOP_RECIPE_WORDS.cart,
|
|
348
348
|
{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 'auto', height: 'auto', padding: '6px 6px 6px 6px', position: 'relative' });
|
|
349
349
|
const count = part(create, 'cart-count', Type.Container, ShopRole.CartCount, Style.CartCount, {}, 'Count',
|
|
350
|
-
{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 'auto', height: 'auto', minHeight: '
|
|
350
|
+
{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 'auto', height: 'auto', minHeight: 'var(--iox-cart-count-size)', padding: '0px 4px 0px 4px', position: 'absolute', top: '-5px', right: '-5px' });
|
|
351
351
|
const words = text(create, 'cart-count-text', null, Style.Label, SHOP_RECIPE_WORDS.count, 'Text', { ...WORDS, lineHeight: '1' }, 'span');
|
|
352
352
|
bindSlot(words, 'content', '$cart', 'count');
|
|
353
353
|
count.children = [words];
|
package/styles/iox-design.css
CHANGED
|
@@ -991,6 +991,9 @@ html:has(.iox-bar-reserve) .iox-toasts[data-iox-edge='bottom'] { bottom: calc(16
|
|
|
991
991
|
[data-iox-shop-hidden] { display: none !important; }
|
|
992
992
|
/* The earlier price shows only when there is one: `$variant.compareAt | money` reads '' otherwise. */
|
|
993
993
|
.iox-role-shop-price-compare:empty { display: none !important; }
|
|
994
|
+
/* A swatch is a word-less button named by its aria-label: the canvas's "Button" placeholder for an empty button never
|
|
995
|
+
covers its colour. */
|
|
996
|
+
.iox-role-shop-variant-swatch > [data-iox-chrome] { display: none !important; }
|
|
994
997
|
/* An empty bag: no count on the bag button; the drawer shows its "empty" words and nothing else of the bag. */
|
|
995
998
|
.iox-role-shop-cart-button[data-iox-cart-empty] .iox-role-shop-cart-count { display: none !important; }
|
|
996
999
|
.iox-role-shop-cart-drawer[data-iox-cart-empty] :is(.iox-role-shop-cart-lines, .iox-role-shop-cart-summary, .iox-role-shop-cart-vat-note,
|