@vectoriox/iox-ui 5.86.4 → 5.88.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/actions-core/index.d.ts +17 -3
- package/composite-core/index.d.ts +208 -2
- package/design-core/index.d.ts +373 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +30 -4
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +656 -116
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +444 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +28 -8
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +231 -7
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +603 -20
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +26 -2
- package/index.d.ts +196 -2
- package/package.json +1 -1
- package/scene-core/index.d.ts +158 -2
- package/src/actions-core/action.model.ts +3 -0
- package/src/actions-core/element-actions.ts +32 -3
- package/src/composite-core/marquee-runtime.ts +255 -0
- package/src/composite-core/marquee.ts +267 -0
- package/src/composite-core/public-api.ts +3 -0
- package/src/composite-core/scroll-recipes.ts +74 -0
- package/src/composite-core/structure.ts +7 -0
- package/src/design-core/contrast-audit.ts +6 -1
- package/src/design-core/flavor-spec.generated.ts +435 -1
- package/src/generation-core/ai-run.ts +9 -6
- package/src/generation-core/node-baselines.generated.ts +5 -1
- package/src/generation-core/pictures.ts +32 -0
- package/src/scene-core/public-api.ts +1 -0
- package/src/scene-core/scroll-driver.ts +98 -0
- package/src/scene-core/scroll-range.ts +195 -0
- package/styles/iox-design.css +49 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readOwnedTrait, writeOwnedTrait, ROW_INDEX_ATTRIBUTE, elementStyleById, switchElementStyle, LinkType, setColorScheme, COLOR_SCHEME_TRAIT, repeatedRowIndex, roleClass, headerBehaviourOf, HeaderTrait, headerEdgeOf, headerStaysAtTop } from '@vectoriox/iox-ui/design-core';
|
|
1
|
+
import { readOwnedTrait, writeOwnedTrait, ROW_INDEX_ATTRIBUTE, elementStyleById, switchElementStyle, LinkType, setColorScheme, COLOR_SCHEME_TRAIT, repeatedRowIndex, roleClass as roleClass$1, headerBehaviourOf, HeaderTrait, headerEdgeOf, headerStaysAtTop } from '@vectoriox/iox-ui/design-core';
|
|
2
2
|
export { ROW_INDEX_ATTRIBUTE } from '@vectoriox/iox-ui/design-core';
|
|
3
3
|
|
|
4
4
|
/** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one
|
|
@@ -409,7 +409,7 @@ const ACCORDION_WORDS = [
|
|
|
409
409
|
{ question: 'Write the third question', answer: 'Answer it plainly, in two or three short sentences.' },
|
|
410
410
|
];
|
|
411
411
|
const ACCORDION_NEW_ITEM_WORDS = { question: 'Write a new question', answer: 'Answer it plainly, in two or three short sentences.' };
|
|
412
|
-
var Type$
|
|
412
|
+
var Type$7;
|
|
413
413
|
(function (Type) {
|
|
414
414
|
Type["Container"] = "Container";
|
|
415
415
|
Type["LinkedContainer"] = "LinkedContainer";
|
|
@@ -417,8 +417,8 @@ var Type$5;
|
|
|
417
417
|
Type["Text"] = "Text";
|
|
418
418
|
Type["Icon"] = "Icon";
|
|
419
419
|
Type["Repeater"] = "Repeater";
|
|
420
|
-
})(Type$
|
|
421
|
-
var Style$
|
|
420
|
+
})(Type$7 || (Type$7 = {}));
|
|
421
|
+
var Style$6;
|
|
422
422
|
(function (Style) {
|
|
423
423
|
Style["Root"] = "box";
|
|
424
424
|
Style["Item"] = "accordion-item";
|
|
@@ -427,7 +427,7 @@ var Style$5;
|
|
|
427
427
|
Style["Icon"] = "icon";
|
|
428
428
|
Style["Panel"] = "accordion-panel";
|
|
429
429
|
Style["Answer"] = "body";
|
|
430
|
-
})(Style$
|
|
430
|
+
})(Style$6 || (Style$6 = {}));
|
|
431
431
|
const ZERO_BOX$4 = '0px 0px 0px 0px';
|
|
432
432
|
const HEADING_LEVELS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
433
433
|
const DEFAULT_LEVEL = 'h3';
|
|
@@ -454,7 +454,7 @@ function make$4(create, key, type, role, style, props = {}, label) {
|
|
|
454
454
|
* ITS item (`stateTriggers`). ONE builder for both kinds. */
|
|
455
455
|
function buildCompositeIcon(create, key, icon, itemId, role = AccordionRole.Icon) {
|
|
456
456
|
const glyph = ACCORDION_ICON_GLYPH[icon];
|
|
457
|
-
const node = makeCompositePart(create, { key, type: Type$
|
|
457
|
+
const node = makeCompositePart(create, { key, type: Type$7.Icon, props: { iconClass: glyph.iconClass }, elementStyle: Style$6.Icon }, role, 'Icon', PART_BASE$3[AccordionRole.Icon]);
|
|
458
458
|
node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { rotate: glyph.turn } };
|
|
459
459
|
if (itemId)
|
|
460
460
|
node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: itemId };
|
|
@@ -462,14 +462,14 @@ function buildCompositeIcon(create, key, icon, itemId, role = AccordionRole.Icon
|
|
|
462
462
|
}
|
|
463
463
|
/** One item: header (question + icon) and panel (answer). `key` makes every part's recipe key unique. */
|
|
464
464
|
function buildAccordionItem(create, words, itemKey, icon = AccordionIcon.Chevron) {
|
|
465
|
-
const item = make$4(create, `${itemKey}`, Type$
|
|
465
|
+
const item = make$4(create, `${itemKey}`, Type$7.Container, AccordionRole.Item, Style$6.Item, {}, 'Item');
|
|
466
466
|
item.itemKey = itemKey;
|
|
467
|
-
const trigger = make$4(create, `${itemKey}-trigger`, Type$
|
|
468
|
-
const question = make$4(create, `${itemKey}-question`, Type$
|
|
467
|
+
const trigger = make$4(create, `${itemKey}-trigger`, Type$7.LinkedContainer, AccordionRole.Trigger, Style$6.Trigger, {}, 'Header');
|
|
468
|
+
const question = make$4(create, `${itemKey}-question`, Type$7.Heading, null, Style$6.Question, { content: words.question, level: DEFAULT_LEVEL }, 'Heading');
|
|
469
469
|
writeStyles(question, QUESTION_BASE);
|
|
470
470
|
trigger.children = [question, ...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, `${itemKey}-icon`, icon, item.id)])];
|
|
471
|
-
const panel = make$4(create, `${itemKey}-panel`, Type$
|
|
472
|
-
const answer = make$4(create, `${itemKey}-answer`, Type$
|
|
471
|
+
const panel = make$4(create, `${itemKey}-panel`, Type$7.Container, AccordionRole.Panel, Style$6.Panel, {}, 'Panel');
|
|
472
|
+
const answer = make$4(create, `${itemKey}-answer`, Type$7.Text, null, Style$6.Answer, { content: words.answer, tag: 'p' }, 'Text');
|
|
473
473
|
writeStyles(answer, ANSWER_BASE);
|
|
474
474
|
panel.children = [answer];
|
|
475
475
|
item.children = [trigger, panel];
|
|
@@ -477,7 +477,7 @@ function buildAccordionItem(create, words, itemKey, icon = AccordionIcon.Chevron
|
|
|
477
477
|
}
|
|
478
478
|
/** A fresh Accordion: three items, one open at a time, the first open by default (board 4). */
|
|
479
479
|
function buildAccordionRecipe(create, options = {}) {
|
|
480
|
-
const root = make$4(create, 'accordion', Type$
|
|
480
|
+
const root = make$4(create, 'accordion', Type$7.Container, AccordionRole.Accordion, Style$6.Root, {}, 'Accordion');
|
|
481
481
|
writeProp(root, CompositeBehaviourTrait.Multiple, options.multiple ?? false);
|
|
482
482
|
writeProp(root, CompositeBehaviourTrait.DefaultOn, options.defaultOn ?? AccordionDefaultOn.First);
|
|
483
483
|
const words = options.items ?? ACCORDION_WORDS;
|
|
@@ -516,18 +516,18 @@ function accordionItemOf(node, path) {
|
|
|
516
516
|
}
|
|
517
517
|
/** True when the root takes its items from content (a Repeater bound to a list, R3). */
|
|
518
518
|
function isAccordionFromContent(root) {
|
|
519
|
-
return !!root && root.type === Type$
|
|
519
|
+
return !!root && root.type === Type$7.Repeater;
|
|
520
520
|
}
|
|
521
521
|
/** The root's items in order — every item (Manual), or the one template item (From content). */
|
|
522
522
|
function accordionItems(root) {
|
|
523
523
|
return (root.children ?? []).filter(c => c.role === AccordionRole.Item);
|
|
524
524
|
}
|
|
525
|
-
const asBool = (v) => v === true || v === 'true';
|
|
525
|
+
const asBool$1 = (v) => v === true || v === 'true';
|
|
526
526
|
/** The root's behaviour (an unset trait reads its default: one at a time, the first open). */
|
|
527
527
|
function accordionBehaviour(root) {
|
|
528
528
|
const raw = root ? readProp(root, CompositeBehaviourTrait.DefaultOn) : undefined;
|
|
529
529
|
const defaultOn = ACCORDION_DEFAULT_ONS.includes(raw) ? raw : AccordionDefaultOn.First;
|
|
530
|
-
return { multiple: root ? asBool(readProp(root, CompositeBehaviourTrait.Multiple)) : false, defaultOn };
|
|
530
|
+
return { multiple: root ? asBool$1(readProp(root, CompositeBehaviourTrait.Multiple)) : false, defaultOn };
|
|
531
531
|
}
|
|
532
532
|
/** Behaviour ▸ Allow several open / Open by default. False when the node has no such trait. */
|
|
533
533
|
function setAccordionBehaviour(root, patch) {
|
|
@@ -563,9 +563,9 @@ function accordionQuestionOf(item) {
|
|
|
563
563
|
let text;
|
|
564
564
|
if (trigger)
|
|
565
565
|
walkComposite(trigger, n => {
|
|
566
|
-
if (!hit && n.type === Type$
|
|
566
|
+
if (!hit && n.type === Type$7.Heading)
|
|
567
567
|
hit = n;
|
|
568
|
-
if (!text && n.type === Type$
|
|
568
|
+
if (!text && n.type === Type$7.Text)
|
|
569
569
|
text = n;
|
|
570
570
|
});
|
|
571
571
|
return hit ?? text;
|
|
@@ -575,7 +575,7 @@ function accordionAnswerOf(item) {
|
|
|
575
575
|
const panel = accordionPanelOf(item);
|
|
576
576
|
let hit;
|
|
577
577
|
if (panel)
|
|
578
|
-
walkComposite(panel, n => { if (!hit && n.type === Type$
|
|
578
|
+
walkComposite(panel, n => { if (!hit && n.type === Type$7.Text)
|
|
579
579
|
hit = n; });
|
|
580
580
|
return hit;
|
|
581
581
|
}
|
|
@@ -596,7 +596,7 @@ function accordionHeadingLevel(trigger) {
|
|
|
596
596
|
const visit = (n) => {
|
|
597
597
|
if (level !== undefined)
|
|
598
598
|
return;
|
|
599
|
-
if (n.type === Type$
|
|
599
|
+
if (n.type === Type$7.Heading) {
|
|
600
600
|
level = readProp(n, 'level');
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
@@ -963,7 +963,7 @@ const TRACK_SELECTOR = `.${AccordionClass.Track}`;
|
|
|
963
963
|
const REGION_SELECTOR = `.${AccordionClass.Region}`;
|
|
964
964
|
/** How long a closing track may take before its region is hidden (dur-base is 200–320ms in every pack). */
|
|
965
965
|
const MAX_CLOSE_MS = 600;
|
|
966
|
-
const REDUCED_MOTION = '(prefers-reduced-motion: reduce)';
|
|
966
|
+
const REDUCED_MOTION$1 = '(prefers-reduced-motion: reduce)';
|
|
967
967
|
/** The composite (accordion or disclosure) an element belongs to (the element itself when it is a root). */
|
|
968
968
|
function closestAccordion(el) {
|
|
969
969
|
return el?.closest?.(ROOT_SELECTOR$1) ?? null;
|
|
@@ -1176,7 +1176,7 @@ class AccordionRuntime {
|
|
|
1176
1176
|
if (this.options.reducedMotion)
|
|
1177
1177
|
return this.options.reducedMotion();
|
|
1178
1178
|
try {
|
|
1179
|
-
return typeof matchMedia === 'function' && matchMedia(REDUCED_MOTION).matches;
|
|
1179
|
+
return typeof matchMedia === 'function' && matchMedia(REDUCED_MOTION$1).matches;
|
|
1180
1180
|
}
|
|
1181
1181
|
catch {
|
|
1182
1182
|
return false;
|
|
@@ -1347,20 +1347,20 @@ const DISCLOSURE_WORDS = {
|
|
|
1347
1347
|
};
|
|
1348
1348
|
/** A disclosure's one item key — its root IS its item. */
|
|
1349
1349
|
const DISCLOSURE_ITEM_KEY = 'k1';
|
|
1350
|
-
var Type$
|
|
1350
|
+
var Type$6;
|
|
1351
1351
|
(function (Type) {
|
|
1352
1352
|
Type["Container"] = "Container";
|
|
1353
1353
|
Type["LinkedContainer"] = "LinkedContainer";
|
|
1354
1354
|
Type["Text"] = "Text";
|
|
1355
|
-
})(Type$
|
|
1356
|
-
var Style$
|
|
1355
|
+
})(Type$6 || (Type$6 = {}));
|
|
1356
|
+
var Style$5;
|
|
1357
1357
|
(function (Style) {
|
|
1358
1358
|
Style["Root"] = "box";
|
|
1359
1359
|
Style["Trigger"] = "accordion-trigger";
|
|
1360
1360
|
Style["Word"] = "body";
|
|
1361
1361
|
Style["Panel"] = "accordion-panel";
|
|
1362
1362
|
Style["Body"] = "body";
|
|
1363
|
-
})(Style$
|
|
1363
|
+
})(Style$5 || (Style$5 = {}));
|
|
1364
1364
|
const ZERO_BOX$3 = '0px 0px 0px 0px';
|
|
1365
1365
|
const HIDDEN = 'none';
|
|
1366
1366
|
const INHERIT = 'inherit';
|
|
@@ -1390,7 +1390,7 @@ function make$3(create, key, type, role, style, props, label) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
/** One of the trigger's two words: shown while the disclosure is closed (`more`) or open (`less`). */
|
|
1392
1392
|
function buildWord(create, role, words, rootId) {
|
|
1393
|
-
const node = make$3(create, role === DisclosureRole.More ? 'more' : 'less', Type$
|
|
1393
|
+
const node = make$3(create, role === DisclosureRole.More ? 'more' : 'less', Type$6.Text, role, Style$5.Word, { content: words, tag: 'span' }, 'Text');
|
|
1394
1394
|
node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { display: role === DisclosureRole.More ? HIDDEN : SHOWN } };
|
|
1395
1395
|
if (rootId)
|
|
1396
1396
|
node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: rootId };
|
|
@@ -1399,18 +1399,18 @@ function buildWord(create, role, words, rootId) {
|
|
|
1399
1399
|
/** A fresh Disclosure: "Read more" opens the text below and reads "Read less" while it is open; closed by default. */
|
|
1400
1400
|
function buildDisclosureRecipe(create, options = {}) {
|
|
1401
1401
|
const words = { ...DISCLOSURE_WORDS, ...(options.words ?? {}) };
|
|
1402
|
-
const root = make$3(create, 'disclosure', Type$
|
|
1402
|
+
const root = make$3(create, 'disclosure', Type$6.Container, DisclosureRole.Disclosure, Style$5.Root, {}, 'Disclosure');
|
|
1403
1403
|
root.itemKey = DISCLOSURE_ITEM_KEY;
|
|
1404
1404
|
writeProp(root, CompositeBehaviourTrait.DefaultOn, options.open ? AccordionDefaultOn.First : AccordionDefaultOn.None);
|
|
1405
1405
|
const icon = options.icon ?? AccordionIcon.Chevron;
|
|
1406
|
-
const trigger = make$3(create, 'trigger', Type$
|
|
1406
|
+
const trigger = make$3(create, 'trigger', Type$6.LinkedContainer, DisclosureRole.Trigger, Style$5.Trigger, {}, 'Toggle');
|
|
1407
1407
|
trigger.children = [
|
|
1408
1408
|
buildWord(create, DisclosureRole.More, words.more, root.id),
|
|
1409
1409
|
buildWord(create, DisclosureRole.Less, words.less, root.id),
|
|
1410
1410
|
...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, 'icon', icon, root.id, DisclosureRole.Icon)]),
|
|
1411
1411
|
];
|
|
1412
|
-
const panel = make$3(create, 'panel', Type$
|
|
1413
|
-
const body = make$3(create, 'body', Type$
|
|
1412
|
+
const panel = make$3(create, 'panel', Type$6.Container, DisclosureRole.Panel, Style$5.Panel, {}, 'Panel');
|
|
1413
|
+
const body = make$3(create, 'body', Type$6.Text, null, Style$5.Body, { content: words.body, tag: 'p' }, 'Text');
|
|
1414
1414
|
writeStyles(body, BODY_BASE$1);
|
|
1415
1415
|
panel.children = [body];
|
|
1416
1416
|
root.children = [trigger, panel];
|
|
@@ -1573,7 +1573,7 @@ const CARD_WORDS = {
|
|
|
1573
1573
|
};
|
|
1574
1574
|
/** The breakpoint whose layer stacks an "Image side" card (Breakpoint.Mobile, ≤767px). */
|
|
1575
1575
|
const CARD_STACK_BREAKPOINT = 'mobile';
|
|
1576
|
-
var Type$
|
|
1576
|
+
var Type$5;
|
|
1577
1577
|
(function (Type) {
|
|
1578
1578
|
Type["Container"] = "Container";
|
|
1579
1579
|
Type["Image"] = "Image";
|
|
@@ -1581,8 +1581,8 @@ var Type$3;
|
|
|
1581
1581
|
Type["Text"] = "Text";
|
|
1582
1582
|
Type["Icon"] = "Icon";
|
|
1583
1583
|
Type["ButtonBlock"] = "ButtonBlock";
|
|
1584
|
-
})(Type$
|
|
1585
|
-
var Style$
|
|
1584
|
+
})(Type$5 || (Type$5 = {}));
|
|
1585
|
+
var Style$4;
|
|
1586
1586
|
(function (Style) {
|
|
1587
1587
|
Style["Card"] = "card";
|
|
1588
1588
|
Style["Box"] = "box";
|
|
@@ -1595,7 +1595,7 @@ var Style$3;
|
|
|
1595
1595
|
Style["Ghost"] = "button-ghost";
|
|
1596
1596
|
Style["Icon"] = "icon";
|
|
1597
1597
|
Style["Scrim"] = "media-scrim";
|
|
1598
|
-
})(Style$
|
|
1598
|
+
})(Style$4 || (Style$4 = {}));
|
|
1599
1599
|
var Scheme;
|
|
1600
1600
|
(function (Scheme) {
|
|
1601
1601
|
Scheme["Default"] = "default";
|
|
@@ -1605,9 +1605,9 @@ const LINK_TYPE = 'linkType';
|
|
|
1605
1605
|
const SAVE_ICON = 'ph ph-bookmark-simple';
|
|
1606
1606
|
/** A value an element style writes — read from the contract, never retyped. */
|
|
1607
1607
|
const styleValue = (style, trait) => String(elementStyleById(style)?.base[trait] ?? '');
|
|
1608
|
-
const CARD_PAD = styleValue(Style$
|
|
1609
|
-
const IMAGE_RADIUS = styleValue(Style$
|
|
1610
|
-
const TITLE_SIZE = styleValue(Style$
|
|
1608
|
+
const CARD_PAD = styleValue(Style$4.Card, 'padding');
|
|
1609
|
+
const IMAGE_RADIUS = styleValue(Style$4.Media, 'borderRadius');
|
|
1610
|
+
const TITLE_SIZE = styleValue(Style$4.Title, 'fontSize');
|
|
1611
1611
|
const LEAD_SIZE = 'var(--iox-size-lead)';
|
|
1612
1612
|
const ZERO_BOX$2 = '0px 0px 0px 0px';
|
|
1613
1613
|
/** What every card part holds in every layout — the recipe's box. */
|
|
@@ -1635,7 +1635,7 @@ const LAYOUTS = {
|
|
|
1635
1635
|
card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },
|
|
1636
1636
|
media: { ...IN_FLOW, flexBasis: 'auto' },
|
|
1637
1637
|
image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },
|
|
1638
|
-
content: GROWING_CONTENT, contentStyle: Style$
|
|
1638
|
+
content: GROWING_CONTENT, contentStyle: Style$4.Box, contentScheme: Scheme.Default,
|
|
1639
1639
|
title: { fontSize: TITLE_SIZE },
|
|
1640
1640
|
badgeOnMedia: true,
|
|
1641
1641
|
},
|
|
@@ -1643,7 +1643,7 @@ const LAYOUTS = {
|
|
|
1643
1643
|
card: { flexDirection: 'row', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },
|
|
1644
1644
|
media: { ...IN_FLOW, flexBasis: '42%' },
|
|
1645
1645
|
image: { aspectRatio: 'auto', height: '100%', minHeight: '180px', borderRadius: IMAGE_RADIUS },
|
|
1646
|
-
content: GROWING_CONTENT, contentStyle: Style$
|
|
1646
|
+
content: GROWING_CONTENT, contentStyle: Style$4.Box, contentScheme: Scheme.Default,
|
|
1647
1647
|
title: { fontSize: TITLE_SIZE },
|
|
1648
1648
|
badgeOnMedia: true,
|
|
1649
1649
|
stack: {
|
|
@@ -1657,7 +1657,7 @@ const LAYOUTS = {
|
|
|
1657
1657
|
media: { position: 'absolute', top: '0px', right: '0px', bottom: '0px', left: '0px', flexBasis: 'auto' },
|
|
1658
1658
|
image: { aspectRatio: 'auto', height: '100%', minHeight: 'auto', borderRadius: '0px' },
|
|
1659
1659
|
content: { position: 'relative', flexGrow: '0', flexShrink: '0', flexBasis: 'auto', padding: `72px ${CARD_PAD} ${CARD_PAD} ${CARD_PAD}` },
|
|
1660
|
-
contentStyle: Style$
|
|
1660
|
+
contentStyle: Style$4.Scrim, contentScheme: Scheme.Inverse,
|
|
1661
1661
|
title: { fontSize: TITLE_SIZE },
|
|
1662
1662
|
badgeOnMedia: false,
|
|
1663
1663
|
},
|
|
@@ -1665,7 +1665,7 @@ const LAYOUTS = {
|
|
|
1665
1665
|
card: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },
|
|
1666
1666
|
media: { ...IN_FLOW, flexBasis: '72px' },
|
|
1667
1667
|
image: { aspectRatio: '1 / 1', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },
|
|
1668
|
-
content: GROWING_CONTENT, contentStyle: Style$
|
|
1668
|
+
content: GROWING_CONTENT, contentStyle: Style$4.Box, contentScheme: Scheme.Default,
|
|
1669
1669
|
title: { fontSize: LEAD_SIZE },
|
|
1670
1670
|
badgeOnMedia: false,
|
|
1671
1671
|
partsOff: [CardPart.Text, CardPart.Actions],
|
|
@@ -1686,15 +1686,15 @@ function make$2(create, key, type, role, elementStyle, props = {}, label) {
|
|
|
1686
1686
|
return node;
|
|
1687
1687
|
}
|
|
1688
1688
|
function buttonLabel(create, key, words) {
|
|
1689
|
-
const label = make$2(create, key, Type$
|
|
1689
|
+
const label = make$2(create, key, Type$5.Text, null, Style$4.Label, { content: words, tag: 'span' });
|
|
1690
1690
|
writeStyles(label, LABEL_BASE$2);
|
|
1691
1691
|
return label;
|
|
1692
1692
|
}
|
|
1693
1693
|
/** Each optional part (and the locked title) as the recipe builds it. */
|
|
1694
1694
|
const PART_BUILDERS = {
|
|
1695
1695
|
[CardPart.Media]: (create) => {
|
|
1696
|
-
const media = make$2(create, 'media', Type$
|
|
1697
|
-
const image = make$2(create, 'image', Type$
|
|
1696
|
+
const media = make$2(create, 'media', Type$5.Container, CardRole.Media, Style$4.Box, {}, 'Media');
|
|
1697
|
+
const image = make$2(create, 'image', Type$5.Image, null, Style$4.Media, { src: '', alt: '' });
|
|
1698
1698
|
writeStyles(image, IMAGE_BASE$2);
|
|
1699
1699
|
media.children = [image];
|
|
1700
1700
|
return media;
|
|
@@ -1705,14 +1705,14 @@ const PART_BUILDERS = {
|
|
|
1705
1705
|
badge.label = 'Badge';
|
|
1706
1706
|
return badge;
|
|
1707
1707
|
},
|
|
1708
|
-
[CardPart.Eyebrow]: (create, words) => make$2(create, 'eyebrow', Type$
|
|
1709
|
-
[CardPart.Text]: (create, words) => make$2(create, 'text', Type$
|
|
1708
|
+
[CardPart.Eyebrow]: (create, words) => make$2(create, 'eyebrow', Type$5.Text, CardRole.Eyebrow, Style$4.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),
|
|
1709
|
+
[CardPart.Text]: (create, words) => make$2(create, 'text', Type$5.Text, CardRole.Text, Style$4.Body, { content: words.text, tag: 'p' }, 'Text'),
|
|
1710
1710
|
[CardPart.Actions]: (create, words) => {
|
|
1711
|
-
const actions = make$2(create, 'actions', Type$
|
|
1712
|
-
const primary = make$2(create, 'primary', Type$
|
|
1711
|
+
const actions = make$2(create, 'actions', Type$5.Container, CardRole.Actions, Style$4.Box, {}, 'Buttons');
|
|
1712
|
+
const primary = make$2(create, 'primary', Type$5.ButtonBlock, null, Style$4.Primary);
|
|
1713
1713
|
primary.children = [buttonLabel(create, 'primary-label', words.primary)];
|
|
1714
|
-
const ghost = make$2(create, 'secondary', Type$
|
|
1715
|
-
const icon = make$2(create, 'secondary-icon', Type$
|
|
1714
|
+
const ghost = make$2(create, 'secondary', Type$5.ButtonBlock, null, Style$4.Ghost);
|
|
1715
|
+
const icon = make$2(create, 'secondary-icon', Type$5.Icon, null, Style$4.Icon, { iconClass: SAVE_ICON });
|
|
1716
1716
|
writeStyles(icon, INLINE_ICON);
|
|
1717
1717
|
ghost.children = [icon, buttonLabel(create, 'secondary-label', words.secondary)];
|
|
1718
1718
|
actions.children = [primary, ghost];
|
|
@@ -1720,15 +1720,15 @@ const PART_BUILDERS = {
|
|
|
1720
1720
|
},
|
|
1721
1721
|
};
|
|
1722
1722
|
function buildTitle(create, words) {
|
|
1723
|
-
return make$2(create, 'title', Type$
|
|
1723
|
+
return make$2(create, 'title', Type$5.Heading, CardRole.Title, Style$4.Title, { content: words.title, level: 'h3', [LINK_TYPE]: LinkType.None }, 'Title');
|
|
1724
1724
|
}
|
|
1725
1725
|
/** A fresh Card v2: every part a node with its role and element style, laid out by `options.layout`. */
|
|
1726
1726
|
function buildCardRecipe(create, options = {}) {
|
|
1727
1727
|
const words = { ...CARD_WORDS, ...(options.words ?? {}) };
|
|
1728
1728
|
const tone = options.badgeTone ?? BadgeTone.Accent;
|
|
1729
1729
|
const on = (part) => options.parts?.[part] !== false;
|
|
1730
|
-
const card = make$2(create, 'card', Type$
|
|
1731
|
-
const content = make$2(create, 'content', Type$
|
|
1730
|
+
const card = make$2(create, 'card', Type$5.Container, CardRole.Card, Style$4.Card, {}, 'Card');
|
|
1731
|
+
const content = make$2(create, 'content', Type$5.Container, CardRole.Content, Style$4.Box, {}, 'Content');
|
|
1732
1732
|
content.children = [
|
|
1733
1733
|
...(on(CardPart.Eyebrow) ? [PART_BUILDERS[CardPart.Eyebrow](create, words, tone)] : []),
|
|
1734
1734
|
buildTitle(create, words),
|
|
@@ -1759,7 +1759,7 @@ function cardRootOf(node, path) {
|
|
|
1759
1759
|
function cardPartsOf(card) {
|
|
1760
1760
|
return Object.fromEntries(CARD_PARTS.map(part => [part, !!findByRole(card, CARD_PART_ROLE[part])]));
|
|
1761
1761
|
}
|
|
1762
|
-
const imageOf = (media) => media?.children?.find(c => c.type === Type$
|
|
1762
|
+
const imageOf = (media) => media?.children?.find(c => c.type === Type$5.Image);
|
|
1763
1763
|
/** Put the badge where the layout says: the Media's top corner, or the head of the content column
|
|
1764
1764
|
* (Image behind text, Compact, or no Media at all). The corner's insets are logical, in iox-design.css
|
|
1765
1765
|
* (mirrored in RTL); `position` is the node's own, because the editing canvas forces every node's
|
|
@@ -1963,6 +1963,239 @@ function setCardLinked(card, on) {
|
|
|
1963
1963
|
return writeProp(title, LINK_TYPE, next);
|
|
1964
1964
|
}
|
|
1965
1965
|
|
|
1966
|
+
/**
|
|
1967
|
+
* THE MARQUEE (premium components M6, N6 — complex-components CC5 §7e, D5, Emil 180). A linear band that moves on its
|
|
1968
|
+
* own, built from ordinary nodes with roles, so every part is selectable, editable and styled on its own (R2), and both
|
|
1969
|
+
* renderers draw it with no new type:
|
|
1970
|
+
*
|
|
1971
|
+
* Container `marquee` role marquee the band; its settings are its own traits (speed, direction…)
|
|
1972
|
+
* ├─ ButtonBlock `marquee-control` role marquee.pause FIRST focus stop: a real pause control (WCAG 2.2.2), locked
|
|
1973
|
+
* └─ Container role marquee.rail what the band is seen through: clips, fades its edges; locked
|
|
1974
|
+
* └─ Container role marquee.track the author's items, in one row; locked
|
|
1975
|
+
* ├─ Text …
|
|
1976
|
+
* └─ …
|
|
1977
|
+
*
|
|
1978
|
+
* The motion is the browser's: ONE CSS animation on the track and its copy (`translate`, linear, compositor only). The
|
|
1979
|
+
* runtime (`marquee-runtime.ts`) only copies the track once for a seamless loop — the copy `aria-hidden` and `inert`, so a
|
|
1980
|
+
* screen reader reads each item once and Tab never lands in it — sets the duration from the look's speed, and pauses it:
|
|
1981
|
+
* the pause control, hover (hover devices) and focus inside the band, off screen, a hidden tab. Reduced motion and a look
|
|
1982
|
+
* whose motion is Off keep it STILL (D5): no copy, no motion, no control.
|
|
1983
|
+
*/
|
|
1984
|
+
var MarqueeRole;
|
|
1985
|
+
(function (MarqueeRole) {
|
|
1986
|
+
MarqueeRole["Marquee"] = "marquee";
|
|
1987
|
+
MarqueeRole["Pause"] = "marquee.pause";
|
|
1988
|
+
MarqueeRole["Rail"] = "marquee.rail";
|
|
1989
|
+
MarqueeRole["Track"] = "marquee.track";
|
|
1990
|
+
})(MarqueeRole || (MarqueeRole = {}));
|
|
1991
|
+
/** The band's own traits (a Container's, hidden from the generic rows; Bindings ▸ Marquee edits them). */
|
|
1992
|
+
var MarqueeTrait;
|
|
1993
|
+
(function (MarqueeTrait) {
|
|
1994
|
+
MarqueeTrait["Speed"] = "marqueeSpeed";
|
|
1995
|
+
MarqueeTrait["Direction"] = "marqueeDirection";
|
|
1996
|
+
MarqueeTrait["Fade"] = "marqueeFade";
|
|
1997
|
+
MarqueeTrait["PauseOnHover"] = "marqueePauseOnHover";
|
|
1998
|
+
})(MarqueeTrait || (MarqueeTrait = {}));
|
|
1999
|
+
var MarqueeSpeed;
|
|
2000
|
+
(function (MarqueeSpeed) {
|
|
2001
|
+
MarqueeSpeed["Slow"] = "slow";
|
|
2002
|
+
MarqueeSpeed["Normal"] = "normal";
|
|
2003
|
+
MarqueeSpeed["Fast"] = "fast";
|
|
2004
|
+
})(MarqueeSpeed || (MarqueeSpeed = {}));
|
|
2005
|
+
/** Which way the items travel: toward the reading start (the classic ticker) or the end. Logical, so it mirrors in RTL. */
|
|
2006
|
+
var MarqueeDirection;
|
|
2007
|
+
(function (MarqueeDirection) {
|
|
2008
|
+
MarqueeDirection["Start"] = "start";
|
|
2009
|
+
MarqueeDirection["End"] = "end";
|
|
2010
|
+
})(MarqueeDirection || (MarqueeDirection = {}));
|
|
2011
|
+
var MarqueeAttribute;
|
|
2012
|
+
(function (MarqueeAttribute) {
|
|
2013
|
+
/** On the band; its value is the speed. */
|
|
2014
|
+
MarqueeAttribute["Root"] = "data-iox-marquee";
|
|
2015
|
+
MarqueeAttribute["Direction"] = "data-iox-marquee-direction";
|
|
2016
|
+
MarqueeAttribute["Fade"] = "data-iox-marquee-fade";
|
|
2017
|
+
MarqueeAttribute["HoverPause"] = "data-iox-marquee-hover";
|
|
2018
|
+
/** The runtime's: the band moves. */
|
|
2019
|
+
MarqueeAttribute["Running"] = "data-iox-marquee-running";
|
|
2020
|
+
/** The runtime's: the band stands still for good (reduced motion, a look whose motion is Off). */
|
|
2021
|
+
MarqueeAttribute["Still"] = "data-iox-marquee-still";
|
|
2022
|
+
/** The runtime's: the motion is held (the visitor paused it, it is off screen, the tab is hidden). */
|
|
2023
|
+
MarqueeAttribute["Paused"] = "data-iox-marquee-paused";
|
|
2024
|
+
/** The runtime's copy of the track. */
|
|
2025
|
+
MarqueeAttribute["Copy"] = "data-iox-marquee-copy";
|
|
2026
|
+
})(MarqueeAttribute || (MarqueeAttribute = {}));
|
|
2027
|
+
/** Each speed, as a share of the look's `marquee-speed` (px a second). */
|
|
2028
|
+
const MARQUEE_SPEED_FACTOR = {
|
|
2029
|
+
[MarqueeSpeed.Slow]: 0.6,
|
|
2030
|
+
[MarqueeSpeed.Normal]: 1,
|
|
2031
|
+
[MarqueeSpeed.Fast]: 1.6,
|
|
2032
|
+
};
|
|
2033
|
+
/** The look's speed when a page carries no design tokens (a legacy page): the Standard motion's. */
|
|
2034
|
+
const MARQUEE_DEFAULT_SPEED_PX = 40;
|
|
2035
|
+
/** A loop is never shorter than this, however short the band: a fast flicker reads as broken (Emil 161). */
|
|
2036
|
+
const MARQUEE_MIN_LOOP_S = 8;
|
|
2037
|
+
const MARQUEE_DEFAULTS = Object.freeze({
|
|
2038
|
+
speed: MarqueeSpeed.Normal,
|
|
2039
|
+
direction: MarqueeDirection.Start,
|
|
2040
|
+
fade: true,
|
|
2041
|
+
pauseOnHover: true,
|
|
2042
|
+
});
|
|
2043
|
+
const asBool = (value, fallback) => value === undefined || value === null || value === '' ? fallback : value === true || value === 'true';
|
|
2044
|
+
const oneOf = (values, value, fallback) => Object.values(values).includes(String(value)) ? value : fallback;
|
|
2045
|
+
/** A band's settings, from its own traits (either shape), each falling back to the default. */
|
|
2046
|
+
function marqueeSettings(node) {
|
|
2047
|
+
if (!node)
|
|
2048
|
+
return { ...MARQUEE_DEFAULTS };
|
|
2049
|
+
return {
|
|
2050
|
+
speed: oneOf(MarqueeSpeed, readProp(node, MarqueeTrait.Speed), MARQUEE_DEFAULTS.speed),
|
|
2051
|
+
direction: oneOf(MarqueeDirection, readProp(node, MarqueeTrait.Direction), MARQUEE_DEFAULTS.direction),
|
|
2052
|
+
fade: asBool(readProp(node, MarqueeTrait.Fade), MARQUEE_DEFAULTS.fade),
|
|
2053
|
+
pauseOnHover: asBool(readProp(node, MarqueeTrait.PauseOnHover), MARQUEE_DEFAULTS.pauseOnHover),
|
|
2054
|
+
};
|
|
2055
|
+
}
|
|
2056
|
+
/** Write settings onto a band. False when a builder node has no slot for one of them. */
|
|
2057
|
+
function setMarqueeSettings(node, patch) {
|
|
2058
|
+
let ok = true;
|
|
2059
|
+
if (patch.speed !== undefined)
|
|
2060
|
+
ok = writeProp(node, MarqueeTrait.Speed, patch.speed) && ok;
|
|
2061
|
+
if (patch.direction !== undefined)
|
|
2062
|
+
ok = writeProp(node, MarqueeTrait.Direction, patch.direction) && ok;
|
|
2063
|
+
if (patch.fade !== undefined)
|
|
2064
|
+
ok = writeProp(node, MarqueeTrait.Fade, patch.fade) && ok;
|
|
2065
|
+
if (patch.pauseOnHover !== undefined)
|
|
2066
|
+
ok = writeProp(node, MarqueeTrait.PauseOnHover, patch.pauseOnHover) && ok;
|
|
2067
|
+
return ok;
|
|
2068
|
+
}
|
|
2069
|
+
/** True for the band itself. */
|
|
2070
|
+
function isMarqueeRoot(node) {
|
|
2071
|
+
return node?.role === MarqueeRole.Marquee;
|
|
2072
|
+
}
|
|
2073
|
+
/** The marquee a node belongs to (the band itself when it is one), from its ancestors (root first), or null. */
|
|
2074
|
+
function marqueeRootOf(node, path) {
|
|
2075
|
+
if (isMarqueeRoot(node))
|
|
2076
|
+
return node;
|
|
2077
|
+
for (let i = path.length - 1; i >= 0; i--)
|
|
2078
|
+
if (isMarqueeRoot(path[i]))
|
|
2079
|
+
return path[i];
|
|
2080
|
+
return null;
|
|
2081
|
+
}
|
|
2082
|
+
/** The attributes the band's element carries — the same decision in all three render paths. Empty for any other node. */
|
|
2083
|
+
function marqueeRootAttributes(node) {
|
|
2084
|
+
if (!isMarqueeRoot(node))
|
|
2085
|
+
return {};
|
|
2086
|
+
const settings = marqueeSettings(node);
|
|
2087
|
+
return {
|
|
2088
|
+
[MarqueeAttribute.Root]: settings.speed,
|
|
2089
|
+
[MarqueeAttribute.Direction]: settings.direction,
|
|
2090
|
+
...(settings.fade ? { [MarqueeAttribute.Fade]: '' } : {}),
|
|
2091
|
+
...(settings.pauseOnHover ? { [MarqueeAttribute.HoverPause]: '' } : {}),
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
/** Every attribute `marqueeRootAttributes` may write: what a live sync removes when it no longer applies. */
|
|
2095
|
+
const MARQUEE_NODE_ATTRIBUTES = [MarqueeAttribute.Root, MarqueeAttribute.Direction, MarqueeAttribute.Fade, MarqueeAttribute.HoverPause];
|
|
2096
|
+
/**
|
|
2097
|
+
* How long one loop takes: the track's width (its trailing gap included) at the look's speed and the band's share of it.
|
|
2098
|
+
* Null when the band does not move (a speed of 0 — the look's motion is Off — or nothing to move).
|
|
2099
|
+
*/
|
|
2100
|
+
function marqueeLoopSeconds(trackWidthPx, lookSpeedPx, speed = MarqueeSpeed.Normal) {
|
|
2101
|
+
const pxPerSecond = lookSpeedPx * MARQUEE_SPEED_FACTOR[speed];
|
|
2102
|
+
if (!(pxPerSecond > 0) || !(trackWidthPx > 0))
|
|
2103
|
+
return null;
|
|
2104
|
+
return Math.round(Math.max(MARQUEE_MIN_LOOP_S, trackWidthPx / pxPerSecond) * 100) / 100;
|
|
2105
|
+
}
|
|
2106
|
+
/** The most copies a band makes: a single short word on a very wide screen still loops, with a bounded DOM. */
|
|
2107
|
+
const MARQUEE_MAX_COPIES = 12;
|
|
2108
|
+
/**
|
|
2109
|
+
* How many copies of the track a seamless loop needs: when the track has run its own width out of the rail, the copies
|
|
2110
|
+
* behind it must still cover the whole rail — so `copies × track ≥ rail`, and never fewer than one. A short band of words
|
|
2111
|
+
* on a wide screen needs several (one copy left a blank stretch at the end of each loop).
|
|
2112
|
+
*/
|
|
2113
|
+
function marqueeCopyCount(trackWidthPx, railWidthPx) {
|
|
2114
|
+
if (!(trackWidthPx > 0))
|
|
2115
|
+
return 1;
|
|
2116
|
+
const needed = Math.ceil(Math.max(0, railWidthPx) / trackWidthPx);
|
|
2117
|
+
return Math.min(MARQUEE_MAX_COPIES, Math.max(1, needed));
|
|
2118
|
+
}
|
|
2119
|
+
/** The look's speed as a number of px a second, from its token's computed value; the default when it has none. */
|
|
2120
|
+
function lookMarqueeSpeed(raw) {
|
|
2121
|
+
const value = parseFloat(String(raw ?? '').trim());
|
|
2122
|
+
return Number.isFinite(value) && value >= 0 ? value : MARQUEE_DEFAULT_SPEED_PX;
|
|
2123
|
+
}
|
|
2124
|
+
const MARQUEE_WORDS = {
|
|
2125
|
+
en: { pause: 'Pause the moving band', play: 'Play the moving band' },
|
|
2126
|
+
he: { pause: 'עצירת הפס הנע', play: 'הפעלת הפס הנע' },
|
|
2127
|
+
};
|
|
2128
|
+
function marqueeWords(lang) {
|
|
2129
|
+
return (lang ?? '').toLowerCase().startsWith('he') ? MARQUEE_WORDS.he : MARQUEE_WORDS.en;
|
|
2130
|
+
}
|
|
2131
|
+
const MARQUEE_PAUSE_GLYPH = 'ph ph-pause';
|
|
2132
|
+
const MARQUEE_PLAY_GLYPH = 'ph-fill ph-play';
|
|
2133
|
+
/**
|
|
2134
|
+
* The pause control's state (APG, like the carousel's): its NAME says what pressing it will do. An author who named it
|
|
2135
|
+
* keeps the name, and the state is `aria-pressed` instead (pressed = paused).
|
|
2136
|
+
*/
|
|
2137
|
+
function marqueePauseAttributes(paused, words = MARQUEE_WORDS.en, authorName) {
|
|
2138
|
+
const name = (authorName ?? '').trim();
|
|
2139
|
+
return name ? { 'aria-label': name, 'aria-pressed': paused ? 'true' : 'false' } : { 'aria-label': paused ? words.play : words.pause };
|
|
2140
|
+
}
|
|
2141
|
+
function marqueePauseGlyph(paused) {
|
|
2142
|
+
return paused ? MARQUEE_PLAY_GLYPH : MARQUEE_PAUSE_GLYPH;
|
|
2143
|
+
}
|
|
2144
|
+
// ── the recipe ──────────────────────────────────────────────────────────────────────────────────────
|
|
2145
|
+
var Type$4;
|
|
2146
|
+
(function (Type) {
|
|
2147
|
+
Type["Container"] = "Container";
|
|
2148
|
+
Type["ButtonBlock"] = "ButtonBlock";
|
|
2149
|
+
Type["Icon"] = "Icon";
|
|
2150
|
+
Type["Text"] = "Text";
|
|
2151
|
+
})(Type$4 || (Type$4 = {}));
|
|
2152
|
+
var MarqueeStyle;
|
|
2153
|
+
(function (MarqueeStyle) {
|
|
2154
|
+
MarqueeStyle["Band"] = "marquee";
|
|
2155
|
+
MarqueeStyle["Control"] = "marquee-control";
|
|
2156
|
+
MarqueeStyle["Item"] = "lead";
|
|
2157
|
+
MarqueeStyle["Icon"] = "icon";
|
|
2158
|
+
})(MarqueeStyle || (MarqueeStyle = {}));
|
|
2159
|
+
const ZERO$3 = '0px 0px 0px 0px';
|
|
2160
|
+
const GAP = 'var(--iox-marquee-gap, 24px)';
|
|
2161
|
+
/** The band: the control at its reading start, the rail taking the rest. */
|
|
2162
|
+
const BAND_BASE = {
|
|
2163
|
+
display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'center', width: '100%', minHeight: 'auto', padding: ZERO$3,
|
|
2164
|
+
};
|
|
2165
|
+
/** What the band is seen through: it clips the moving row and holds the track and its copy side by side. */
|
|
2166
|
+
const RAIL_BASE = {
|
|
2167
|
+
display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'center', flexGrow: '1', flexShrink: '1', flexBasis: '0%',
|
|
2168
|
+
minWidth: '0px', width: 'auto', minHeight: 'auto', overflow: 'hidden', padding: ZERO$3, margin: ZERO$3,
|
|
2169
|
+
};
|
|
2170
|
+
/** One row of items, as wide as they are; its trailing gap (inline-end padding) is part of its width, so the copy picks
|
|
2171
|
+
* up exactly one gap after the last item and a loop of −100% is seamless. */
|
|
2172
|
+
const TRACK_BASE = {
|
|
2173
|
+
display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'center', gap: GAP, flexGrow: '0', flexShrink: '0',
|
|
2174
|
+
width: 'max-content', minHeight: 'auto', margin: ZERO$3, padding: `0px ${GAP} 0px 0px`,
|
|
2175
|
+
};
|
|
2176
|
+
/** A 44px round control (the slider's), in the flow at the band's start. */
|
|
2177
|
+
const CONTROL_BASE$1 = {
|
|
2178
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: '0', width: '44px', height: '44px', minWidth: '44px',
|
|
2179
|
+
padding: ZERO$3, margin: ZERO$3, borderRadius: '999px',
|
|
2180
|
+
};
|
|
2181
|
+
const ICON_BASE$1 = { fontSize: '18px', color: 'inherit' };
|
|
2182
|
+
const ITEM_BASE = { flexShrink: '0', margin: ZERO$3, width: 'auto' };
|
|
2183
|
+
const MARQUEE_SAMPLE_WORDS = ['Design', 'Branding', 'Photography', 'Websites', 'Motion'];
|
|
2184
|
+
/** A band of words (Components ▸ Interactive ▸ Marquee). The words are ordinary Text nodes: bind, restyle, replace. */
|
|
2185
|
+
function buildMarqueeRecipe(create, options = {}) {
|
|
2186
|
+
const root = makeCompositePart(create, { key: 'marquee', type: Type$4.Container, props: {}, elementStyle: MarqueeStyle.Band }, MarqueeRole.Marquee, 'Marquee', BAND_BASE);
|
|
2187
|
+
setMarqueeSettings(root, MARQUEE_DEFAULTS);
|
|
2188
|
+
const pause = makeCompositePart(create, { key: 'marquee-pause', type: Type$4.ButtonBlock, props: { tag: 'button', type: 'button' }, elementStyle: MarqueeStyle.Control }, MarqueeRole.Pause, 'Pause', CONTROL_BASE$1);
|
|
2189
|
+
const icon = makeCompositePart(create, { key: 'marquee-pause-icon', type: Type$4.Icon, props: { iconClass: MARQUEE_PAUSE_GLYPH }, elementStyle: MarqueeStyle.Icon }, null, 'Icon', ICON_BASE$1);
|
|
2190
|
+
pause.children = [icon];
|
|
2191
|
+
const rail = makeCompositePart(create, { key: 'marquee-rail', type: Type$4.Container, props: {}, elementStyle: NO_ELEMENT_STYLE }, MarqueeRole.Rail, 'Rail', RAIL_BASE);
|
|
2192
|
+
const track = makeCompositePart(create, { key: 'marquee-track', type: Type$4.Container, props: {}, elementStyle: NO_ELEMENT_STYLE }, MarqueeRole.Track, 'Items', TRACK_BASE);
|
|
2193
|
+
track.children = (options.words?.length ? options.words : MARQUEE_SAMPLE_WORDS).map((word, i) => makeCompositePart(create, { key: `marquee-item-${i + 1}`, type: Type$4.Text, props: { content: word }, elementStyle: MarqueeStyle.Item }, null, 'Item', ITEM_BASE));
|
|
2194
|
+
rail.children = [track];
|
|
2195
|
+
root.children = [pause, rail];
|
|
2196
|
+
return root;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
1966
2199
|
/**
|
|
1967
2200
|
* THE ACCESSIBLE CAROUSEL (CC3 — complex-components plan §7c, board 6; board 9 Q13). The Slider's controls are no
|
|
1968
2201
|
* longer drawn by Swiper: Previous, Next, Pause and Pagination are REAL nodes with roles — selectable on the canvas,
|
|
@@ -2093,20 +2326,20 @@ function sliderSlides(children) {
|
|
|
2093
2326
|
return (children ?? []).filter(c => !isSliderPart(c));
|
|
2094
2327
|
}
|
|
2095
2328
|
// ── the parts' recipe ───────────────────────────────────────────────────────────────────────────────
|
|
2096
|
-
var Type$
|
|
2329
|
+
var Type$3;
|
|
2097
2330
|
(function (Type) {
|
|
2098
2331
|
Type["ButtonBlock"] = "ButtonBlock";
|
|
2099
2332
|
Type["Icon"] = "Icon";
|
|
2100
2333
|
Type["Container"] = "Container";
|
|
2101
2334
|
Type["Text"] = "Text";
|
|
2102
|
-
})(Type$
|
|
2103
|
-
var Style$
|
|
2335
|
+
})(Type$3 || (Type$3 = {}));
|
|
2336
|
+
var Style$3;
|
|
2104
2337
|
(function (Style) {
|
|
2105
2338
|
Style["Control"] = "button-secondary";
|
|
2106
2339
|
Style["Icon"] = "icon";
|
|
2107
2340
|
/** The caption and the count read as small print. */
|
|
2108
2341
|
Style["Words"] = "small";
|
|
2109
|
-
})(Style$
|
|
2342
|
+
})(Style$3 || (Style$3 = {}));
|
|
2110
2343
|
/** Each part's glyph (Phosphor) and its default accessible name. */
|
|
2111
2344
|
const SLIDER_PART_GLYPH = {
|
|
2112
2345
|
[SliderRole.Pause]: 'ph ph-pause',
|
|
@@ -2123,37 +2356,37 @@ const PART_LABEL = {
|
|
|
2123
2356
|
[SliderRole.Caption]: 'Caption',
|
|
2124
2357
|
[SliderRole.Count]: 'Count',
|
|
2125
2358
|
};
|
|
2126
|
-
const ZERO$
|
|
2359
|
+
const ZERO$2 = '0px 0px 0px 0px';
|
|
2127
2360
|
/** A control in the bar: in flow, its own size, no offsets (the bar spaces its parts). */
|
|
2128
|
-
const BAR_PART_LAYOUT = { position: 'static', top: 'auto', margin: ZERO$
|
|
2361
|
+
const BAR_PART_LAYOUT = { position: 'static', top: 'auto', margin: ZERO$2 };
|
|
2129
2362
|
/**
|
|
2130
2363
|
* The bar (M1.3): a row under the picture. Its inline padding keeps the PAGE's margin when the slider bleeds to the
|
|
2131
2364
|
* screen's edge — the gutter less however far the slider is already inset from the screen (`100%` is the slider's
|
|
2132
2365
|
* width, the bar's containing block) — so in a padded section it is 0 and at full bleed it is the gutter.
|
|
2133
2366
|
*/
|
|
2134
2367
|
const BAR_INLINE_PAD = 'max(0px, calc(var(--iox-space-gutter, 24px) - (100vw - 100%) / 2))';
|
|
2135
|
-
const BAR_BASE = {
|
|
2368
|
+
const BAR_BASE$1 = {
|
|
2136
2369
|
position: 'relative', display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'center', justifyContent: 'flex-start',
|
|
2137
|
-
gap: '12px', width: '100%', height: 'auto', minHeight: '44px', margin: ZERO$
|
|
2370
|
+
gap: '12px', width: '100%', height: 'auto', minHeight: '44px', margin: ZERO$2, padding: `12px ${BAR_INLINE_PAD} 0px ${BAR_INLINE_PAD}`, zIndex: '10',
|
|
2138
2371
|
};
|
|
2139
2372
|
/** The caption takes the room the controls leave; its words end in an ellipsis rather than push them off. */
|
|
2140
2373
|
const CAPTION_BASE$1 = {
|
|
2141
|
-
flexGrow: '1', flexShrink: '1', flexBasis: '0%', minWidth: '0px', width: 'auto', minHeight: 'auto', margin: ZERO$
|
|
2374
|
+
flexGrow: '1', flexShrink: '1', flexBasis: '0%', minWidth: '0px', width: 'auto', minHeight: 'auto', margin: ZERO$2, padding: ZERO$2,
|
|
2142
2375
|
overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',
|
|
2143
2376
|
};
|
|
2144
|
-
const COUNT_BASE = { flexGrow: '0', flexShrink: '0', width: 'auto', minHeight: 'auto', margin: ZERO$
|
|
2377
|
+
const COUNT_BASE = { flexGrow: '0', flexShrink: '0', width: 'auto', minHeight: 'auto', margin: ZERO$2, padding: ZERO$2 };
|
|
2145
2378
|
/** A round 44px control (board 6 `.st-ctl`), over the slides (z above `.swiper-wrapper`). The PLACE (which edge) is the
|
|
2146
2379
|
* shared CSS's, in logical insets, so a carousel reads the same way in RTL. */
|
|
2147
2380
|
const CONTROL_BASE = {
|
|
2148
2381
|
position: 'absolute', zIndex: '10', display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
2149
|
-
width: '44px', height: '44px', minWidth: '44px', padding: ZERO$
|
|
2382
|
+
width: '44px', height: '44px', minWidth: '44px', padding: ZERO$2, margin: ZERO$2, borderRadius: '999px',
|
|
2150
2383
|
};
|
|
2151
2384
|
const ICON_BASE = { fontSize: '20px', color: 'inherit' };
|
|
2152
2385
|
/** The arrows' vertical middle over the slides: half the 44px control above the centre line. */
|
|
2153
2386
|
const ARROW_TOP = 'calc(50% - 22px)';
|
|
2154
2387
|
const PAGINATION_BASE = {
|
|
2155
2388
|
position: 'absolute', zIndex: '10', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '8px',
|
|
2156
|
-
width: 'auto', minHeight: 'auto', height: 'auto', padding: ZERO$
|
|
2389
|
+
width: 'auto', minHeight: 'auto', height: 'auto', padding: ZERO$2, margin: ZERO$2, color: 'var(--iox-accent)',
|
|
2157
2390
|
};
|
|
2158
2391
|
const SWIPER_THEME_COLOR = '#007aff';
|
|
2159
2392
|
function legacyLookOf(slider) {
|
|
@@ -2169,17 +2402,17 @@ function legacyLookOf(slider) {
|
|
|
2169
2402
|
/** One part, from the recipe (board 6: `button-secondary` controls, token dots) or in a migrated slider's legacy look. */
|
|
2170
2403
|
function buildSliderPart(create, role, legacy) {
|
|
2171
2404
|
if (role === SliderRole.Bar) {
|
|
2172
|
-
const bar = makeCompositePart(create, { key: 'bar', type: Type$
|
|
2405
|
+
const bar = makeCompositePart(create, { key: 'bar', type: Type$3.Container, props: {}, elementStyle: NO_ELEMENT_STYLE }, role, PART_LABEL[role], BAR_BASE$1);
|
|
2173
2406
|
bar.children = [];
|
|
2174
2407
|
return bar;
|
|
2175
2408
|
}
|
|
2176
2409
|
if (role === SliderRole.Caption || role === SliderRole.Count) {
|
|
2177
2410
|
// Their words are the runtime's (the slide in view), drawn as the part's generated content: the node's own
|
|
2178
2411
|
// content stays empty, so no renderer ever fights the runtime over the element's text.
|
|
2179
|
-
return makeCompositePart(create, { key: role.split('.')[1], type: Type$
|
|
2412
|
+
return makeCompositePart(create, { key: role.split('.')[1], type: Type$3.Text, props: { content: '', tag: 'p' }, elementStyle: Style$3.Words }, role, PART_LABEL[role], role === SliderRole.Caption ? CAPTION_BASE$1 : COUNT_BASE);
|
|
2180
2413
|
}
|
|
2181
2414
|
if (role === SliderRole.Pagination) {
|
|
2182
|
-
const dots = makeCompositePart(create, { key: 'pagination', type: Type$
|
|
2415
|
+
const dots = makeCompositePart(create, { key: 'pagination', type: Type$3.Container, props: {}, elementStyle: NO_ELEMENT_STYLE }, role, PART_LABEL[role], legacy?.paginationColor ? { ...PAGINATION_BASE, color: legacy.paginationColor } : PAGINATION_BASE);
|
|
2183
2416
|
dots.children = [];
|
|
2184
2417
|
return dots;
|
|
2185
2418
|
}
|
|
@@ -2188,16 +2421,16 @@ function buildSliderPart(create, role, legacy) {
|
|
|
2188
2421
|
// is the shared CSS's, logical, so the arrows swap sides in RTL.
|
|
2189
2422
|
const placed = role === SliderRole.Pause ? CONTROL_BASE : { ...CONTROL_BASE, top: ARROW_TOP };
|
|
2190
2423
|
const base = legacy
|
|
2191
|
-
? { ...placed, backgroundColor: 'transparent', borderWidth: ZERO$
|
|
2424
|
+
? { ...placed, backgroundColor: 'transparent', borderWidth: ZERO$2, color: legacy.navigationColor ?? SWIPER_THEME_COLOR, boxShadow: 'none' }
|
|
2192
2425
|
: placed;
|
|
2193
2426
|
// Previous / Next carry their accessible name (Swiper's A11y module reads it); the pause control's name is its
|
|
2194
2427
|
// runtime's — it says what pressing it will do.
|
|
2195
2428
|
const props = { tag: 'button', type: 'button' };
|
|
2196
2429
|
if (role !== SliderRole.Pause)
|
|
2197
2430
|
props[SLIDER_NAME_TRAIT] = role === SliderRole.Prev ? SLIDER_WORDS.en.prev : SLIDER_WORDS.en.next;
|
|
2198
|
-
const button = makeCompositePart(create, { key, type: Type$
|
|
2431
|
+
const button = makeCompositePart(create, { key, type: Type$3.ButtonBlock, props, elementStyle: legacy ? NO_ELEMENT_STYLE : Style$3.Control }, role, PART_LABEL[role], base);
|
|
2199
2432
|
const iconBase = legacy ? { ...ICON_BASE, fontSize: `${Math.round((legacy.navigationSize ?? 44) * 0.6)}px` } : ICON_BASE;
|
|
2200
|
-
const icon = makeCompositePart(create, { key: `${key}-icon`, type: Type$
|
|
2433
|
+
const icon = makeCompositePart(create, { key: `${key}-icon`, type: Type$3.Icon, props: { iconClass: SLIDER_PART_GLYPH[role] }, elementStyle: legacy ? NO_ELEMENT_STYLE : Style$3.Icon }, null, 'Icon', iconBase);
|
|
2201
2434
|
button.children = [icon];
|
|
2202
2435
|
return button;
|
|
2203
2436
|
}
|
|
@@ -2290,8 +2523,8 @@ function placeBeforeSlides(kept, part, role) {
|
|
|
2290
2523
|
/** The layout a control has over the picture (its recipe's place: absolute, the arrows at the vertical middle). */
|
|
2291
2524
|
function overLayoutFor(role) {
|
|
2292
2525
|
if (role === SliderRole.Pagination)
|
|
2293
|
-
return { position: 'absolute', margin: ZERO$
|
|
2294
|
-
return role === SliderRole.Pause ? { position: 'absolute', top: 'auto', margin: ZERO$
|
|
2526
|
+
return { position: 'absolute', margin: ZERO$2 };
|
|
2527
|
+
return role === SliderRole.Pause ? { position: 'absolute', top: 'auto', margin: ZERO$2 } : { position: 'absolute', top: ARROW_TOP, margin: ZERO$2 };
|
|
2295
2528
|
}
|
|
2296
2529
|
/**
|
|
2297
2530
|
* Move the controls over the picture or into the bar under it (premium M4, M1.3 — Slider ▸ Controls) — ONE edit and
|
|
@@ -2406,7 +2639,7 @@ const QUOTE_SLIDE_BASE = {
|
|
|
2406
2639
|
* page's direction), the dots under them. */
|
|
2407
2640
|
const ROW_CONTROL_BASE = { position: 'static', display: 'inline-flex', margin: '0px 4px 12px 4px' };
|
|
2408
2641
|
const ROW_DOTS_BASE = { position: 'static', margin: '12px 0px 0px 0px' };
|
|
2409
|
-
const QUOTE_TEXT_BASE = { margin: ZERO$
|
|
2642
|
+
const QUOTE_TEXT_BASE = { margin: ZERO$2, padding: ZERO$2, minHeight: 'auto', width: 'auto' };
|
|
2410
2643
|
/**
|
|
2411
2644
|
* The testimonial carousel (board 6): a named Slider, one quote per slide (each a `card`), rotating every 5s with its
|
|
2412
2645
|
* control parts — the pause control first, Previous · Next, the dots. ONE recipe for the composer and the builder.
|
|
@@ -2494,6 +2727,12 @@ const COMPOSITE_ROLE_SPECS = {
|
|
|
2494
2727
|
[SliderRole.Bar]: { parent: null, parentType: SLIDER_TYPE, pinned: true },
|
|
2495
2728
|
[SliderRole.Caption]: { parent: SliderRole.Bar, pinned: true },
|
|
2496
2729
|
[SliderRole.Count]: { parent: SliderRole.Bar, pinned: true },
|
|
2730
|
+
// M6 — a Marquee always keeps its pause control (WCAG 2.2.2: the band moves on its own), its rail and its track; the
|
|
2731
|
+
// items in the track are the author's.
|
|
2732
|
+
[MarqueeRole.Marquee]: { parent: null },
|
|
2733
|
+
[MarqueeRole.Pause]: { parent: MarqueeRole.Marquee, locked: true },
|
|
2734
|
+
[MarqueeRole.Rail]: { parent: MarqueeRole.Marquee, locked: true },
|
|
2735
|
+
[MarqueeRole.Track]: { parent: MarqueeRole.Rail, locked: true },
|
|
2497
2736
|
};
|
|
2498
2737
|
var StructureEdit;
|
|
2499
2738
|
(function (StructureEdit) {
|
|
@@ -2540,18 +2779,18 @@ function acceptsRefusal(node, parent) {
|
|
|
2540
2779
|
}
|
|
2541
2780
|
|
|
2542
2781
|
const SLIDE_VISIBLE = 'swiper-slide-visible';
|
|
2543
|
-
const RUNTIME_KEY = '__ioxCarousel';
|
|
2782
|
+
const RUNTIME_KEY$1 = '__ioxCarousel';
|
|
2544
2783
|
const ROTATION_EVENTS = 'autoplayStart autoplayStop autoplayPause autoplayResume';
|
|
2545
2784
|
const SLIDE_EVENTS = 'slideChange transitionEnd resize slidesLengthChange';
|
|
2546
|
-
const AUTHOR_NAME_KEY = '__ioxAuthorName';
|
|
2785
|
+
const AUTHOR_NAME_KEY$1 = '__ioxAuthorName';
|
|
2547
2786
|
/** The name the AUTHOR gave the pause control (its rendered `aria-label` before this runtime first relabelled it). */
|
|
2548
2787
|
function authorNameOf(el) {
|
|
2549
2788
|
if (!el)
|
|
2550
2789
|
return null;
|
|
2551
2790
|
const host = el;
|
|
2552
|
-
if (host[AUTHOR_NAME_KEY] === undefined)
|
|
2553
|
-
host[AUTHOR_NAME_KEY] = el.getAttribute('aria-label') ?? '';
|
|
2554
|
-
return host[AUTHOR_NAME_KEY] || null;
|
|
2791
|
+
if (host[AUTHOR_NAME_KEY$1] === undefined)
|
|
2792
|
+
host[AUTHOR_NAME_KEY$1] = el.getAttribute('aria-label') ?? '';
|
|
2793
|
+
return host[AUTHOR_NAME_KEY$1] || null;
|
|
2555
2794
|
}
|
|
2556
2795
|
/** The part of `role` that belongs to THIS slider (never one of a slider nested in a slide). */
|
|
2557
2796
|
function sliderPartElement(sliderEl, role) {
|
|
@@ -2585,7 +2824,7 @@ class CarouselA11y {
|
|
|
2585
2824
|
swiper.on(ROTATION_EVENTS, sync);
|
|
2586
2825
|
swiper.on(SLIDE_EVENTS, sync);
|
|
2587
2826
|
this.cleanups.push(() => { swiper.off(ROTATION_EVENTS, sync); swiper.off(SLIDE_EVENTS, sync); });
|
|
2588
|
-
el[RUNTIME_KEY] = this;
|
|
2827
|
+
el[RUNTIME_KEY$1] = this;
|
|
2589
2828
|
this.sync();
|
|
2590
2829
|
}
|
|
2591
2830
|
/** True while the slides move on their own: autoplay runs and nothing holds it — not focus inside, not the
|
|
@@ -2618,7 +2857,7 @@ class CarouselA11y {
|
|
|
2618
2857
|
}
|
|
2619
2858
|
destroy() {
|
|
2620
2859
|
this.cleanups.splice(0).forEach(fn => fn());
|
|
2621
|
-
delete this.swiper.el[RUNTIME_KEY];
|
|
2860
|
+
delete this.swiper.el[RUNTIME_KEY$1];
|
|
2622
2861
|
}
|
|
2623
2862
|
listen(target, type, fn) {
|
|
2624
2863
|
target.addEventListener(type, fn);
|
|
@@ -2676,7 +2915,7 @@ class CarouselA11y {
|
|
|
2676
2915
|
}
|
|
2677
2916
|
/** The carousel runtime attached to a slider element, if any. */
|
|
2678
2917
|
function carouselOf(el) {
|
|
2679
|
-
return el?.[RUNTIME_KEY] ?? null;
|
|
2918
|
+
return el?.[RUNTIME_KEY$1] ?? null;
|
|
2680
2919
|
}
|
|
2681
2920
|
/** Attach once per Swiper (a re-init gets a fresh runtime). */
|
|
2682
2921
|
function attachCarouselA11y(swiper, options = {}) {
|
|
@@ -2776,7 +3015,7 @@ const DIALOG = 'Dialog';
|
|
|
2776
3015
|
const REPEATER$1 = 'Repeater';
|
|
2777
3016
|
const SOURCE = 'source';
|
|
2778
3017
|
const SOURCE_PATH = 'sourcePath';
|
|
2779
|
-
const ZERO = '0px 0px 0px 0px';
|
|
3018
|
+
const ZERO$1 = '0px 0px 0px 0px';
|
|
2780
3019
|
const DIALOG_BASE = {
|
|
2781
3020
|
width: '100vw', maxWidth: '100vw', height: '100dvh', maxHeight: '100dvh', borderRadius: '0px', padding: '18px 18px 18px 18px',
|
|
2782
3021
|
display: 'flex', flexDirection: 'column', gap: '0px',
|
|
@@ -2785,7 +3024,7 @@ const DIALOG_BASE = {
|
|
|
2785
3024
|
* the row so its counter shares it. */
|
|
2786
3025
|
const CLOSE_BASE = {
|
|
2787
3026
|
display: 'flex', alignItems: 'center', justifyContent: 'center', width: '44px', height: '44px', minWidth: '44px',
|
|
2788
|
-
padding: ZERO, margin: ZERO, borderRadius: '999px', alignSelf: 'flex-end', flexShrink: '0', position: 'relative', zIndex: '20',
|
|
3027
|
+
padding: ZERO$1, margin: ZERO$1, borderRadius: '999px', alignSelf: 'flex-end', flexShrink: '0', position: 'relative', zIndex: '20',
|
|
2789
3028
|
};
|
|
2790
3029
|
const SLIDER_BASE = { width: '100%', height: '100%', minHeight: '0px', flexGrow: '1', margin: '-44px 0px 0px 0px' };
|
|
2791
3030
|
const SLIDE_BASE = {
|
|
@@ -2793,9 +3032,9 @@ const SLIDE_BASE = {
|
|
|
2793
3032
|
justifyContent: 'center', gap: '12px', padding: '56px 64px 16px 64px',
|
|
2794
3033
|
};
|
|
2795
3034
|
const IMAGE_BASE$1 = { width: '100%', height: 'auto', maxHeight: '72dvh', minHeight: '0px', objectFit: 'contain', aspectRatio: '4 / 3', flexShrink: '1' };
|
|
2796
|
-
const CAPTION_BASE = { textAlign: 'center', margin: ZERO, padding: ZERO, minHeight: 'auto', width: 'auto' };
|
|
3035
|
+
const CAPTION_BASE = { textAlign: 'center', margin: ZERO$1, padding: ZERO$1, minHeight: 'auto', width: 'auto' };
|
|
2797
3036
|
/** The counter "3 / 6" sits at the START of the top row, Close at its end (board 6). */
|
|
2798
|
-
const COUNTER_BASE = { color: 'var(--iox-text-muted)', top: '12px', alignItems: 'flex-start', justifyContent: 'flex-start' };
|
|
3037
|
+
const COUNTER_BASE$1 = { color: 'var(--iox-text-muted)', top: '12px', alignItems: 'flex-start', justifyContent: 'flex-start' };
|
|
2799
3038
|
/** On a phone the arrows give way to a swipe (board 6, "the arrows hide on touch-only widths"). */
|
|
2800
3039
|
const LIGHTBOX_ARROWS_HIDE_AT = 'mobile';
|
|
2801
3040
|
/** A click on `node` runs one instant action on `target`. */
|
|
@@ -2857,7 +3096,7 @@ function buildLightboxRecipe(create, options = {}) {
|
|
|
2857
3096
|
}
|
|
2858
3097
|
const counter = buildSliderPart(create, SliderRole.Pagination);
|
|
2859
3098
|
counter.label = 'Counter';
|
|
2860
|
-
writeStyles(counter, COUNTER_BASE);
|
|
3099
|
+
writeStyles(counter, COUNTER_BASE$1);
|
|
2861
3100
|
const slides = rowAlias ? [buildSlide(create, 'slide', options, rowAlias)] : [1, 2, 3].map(n => buildSlide(create, `slide-${n}`, options, null));
|
|
2862
3101
|
slider.children = [prev, next, ...slides, counter];
|
|
2863
3102
|
dialog.children = [close, slider];
|
|
@@ -2965,15 +3204,15 @@ const TABS_WORDS = [
|
|
|
2965
3204
|
{ label: 'Third tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },
|
|
2966
3205
|
];
|
|
2967
3206
|
const TABS_NEW_TAB_WORDS = { label: 'New tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' };
|
|
2968
|
-
var Type$
|
|
3207
|
+
var Type$2;
|
|
2969
3208
|
(function (Type) {
|
|
2970
3209
|
Type["Container"] = "Container";
|
|
2971
3210
|
Type["ButtonBlock"] = "ButtonBlock";
|
|
2972
3211
|
Type["Text"] = "Text";
|
|
2973
3212
|
Type["Image"] = "Image";
|
|
2974
3213
|
Type["Repeater"] = "Repeater";
|
|
2975
|
-
})(Type$
|
|
2976
|
-
var Style$
|
|
3214
|
+
})(Type$2 || (Type$2 = {}));
|
|
3215
|
+
var Style$2;
|
|
2977
3216
|
(function (Style) {
|
|
2978
3217
|
Style["Root"] = "box";
|
|
2979
3218
|
Style["List"] = "tab-list";
|
|
@@ -2983,10 +3222,10 @@ var Style$1;
|
|
|
2983
3222
|
Style["Panel"] = "box";
|
|
2984
3223
|
Style["Media"] = "media";
|
|
2985
3224
|
Style["Body"] = "body";
|
|
2986
|
-
})(Style$
|
|
3225
|
+
})(Style$2 || (Style$2 = {}));
|
|
2987
3226
|
const ZERO_BOX$1 = '0px 0px 0px 0px';
|
|
2988
3227
|
/** The list's hairline, as its element style writes it — read from the contract, never retyped. */
|
|
2989
|
-
const LIST_EDGE = String(elementStyleById(Style$
|
|
3228
|
+
const LIST_EDGE = String(elementStyleById(Style$2.List)?.base['borderWidth'] ?? ZERO_BOX$1);
|
|
2990
3229
|
/** What each part holds — layout only; its LOOK is its element style. The list WRAPS at narrow widths (board 3). */
|
|
2991
3230
|
const PART_BASE$1 = {
|
|
2992
3231
|
[TabsRole.Tabs]: { display: 'flex', width: '100%', minHeight: 'auto', height: 'auto' },
|
|
@@ -3020,30 +3259,30 @@ function make$1(create, key, type, role, style, props = {}, label) {
|
|
|
3020
3259
|
}
|
|
3021
3260
|
/** One tab and its panel, sharing `itemKey`. */
|
|
3022
3261
|
function buildTabPair(create, words, itemKey) {
|
|
3023
|
-
const tab = make$1(create, `${itemKey}-tab`, Type$
|
|
3262
|
+
const tab = make$1(create, `${itemKey}-tab`, Type$2.ButtonBlock, TabsRole.Trigger, Style$2.Tab, {}, 'Tab');
|
|
3024
3263
|
tab.itemKey = itemKey;
|
|
3025
|
-
const label = make$1(create, `${itemKey}-label`, Type$
|
|
3264
|
+
const label = make$1(create, `${itemKey}-label`, Type$2.Text, null, Style$2.Label, { content: words.label, tag: 'span' }, 'Text');
|
|
3026
3265
|
writeStyles(label, LABEL_BASE$1);
|
|
3027
3266
|
tab.children = [label];
|
|
3028
|
-
const panel = make$1(create, `${itemKey}-panel`, Type$
|
|
3267
|
+
const panel = make$1(create, `${itemKey}-panel`, Type$2.Container, TabsRole.Panel, Style$2.Panel, {}, 'Panel');
|
|
3029
3268
|
panel.itemKey = itemKey;
|
|
3030
3269
|
writeLayerStyles(panel, TABS_STACK_BREAKPOINT, PANEL_STACK);
|
|
3031
|
-
const image = make$1(create, `${itemKey}-image`, Type$
|
|
3270
|
+
const image = make$1(create, `${itemKey}-image`, Type$2.Image, null, Style$2.Media, { src: '', alt: '' }, 'Image');
|
|
3032
3271
|
writeStyles(image, IMAGE_BASE);
|
|
3033
|
-
const text = make$1(create, `${itemKey}-text`, Type$
|
|
3272
|
+
const text = make$1(create, `${itemKey}-text`, Type$2.Text, null, Style$2.Body, { content: words.text, tag: 'p' }, 'Text');
|
|
3034
3273
|
writeStyles(text, BODY_BASE);
|
|
3035
3274
|
panel.children = [image, text];
|
|
3036
3275
|
return { tab, panel };
|
|
3037
3276
|
}
|
|
3038
3277
|
/** A fresh Tabs: three tabs, the first on, activated by a click, the list across the top (board 3). */
|
|
3039
3278
|
function buildTabsRecipe(create, options = {}) {
|
|
3040
|
-
const root = make$1(create, 'tabs', Type$
|
|
3279
|
+
const root = make$1(create, 'tabs', Type$2.Container, TabsRole.Tabs, Style$2.Root, {}, 'Tabs');
|
|
3041
3280
|
writeProp(root, TabsBehaviourTrait.ActivateOn, options.activateOn ?? TabsActivateOn.Click);
|
|
3042
3281
|
writeProp(root, TabsBehaviourTrait.Orientation, options.orientation ?? TabsOrientation.Horizontal);
|
|
3043
3282
|
if (options.label)
|
|
3044
3283
|
writeProp(root, TabsBehaviourTrait.Label, options.label);
|
|
3045
|
-
const list = make$1(create, 'list', Type$
|
|
3046
|
-
const panels = make$1(create, 'panels', Type$
|
|
3284
|
+
const list = make$1(create, 'list', Type$2.Container, TabsRole.List, Style$2.List, {}, 'Tab list');
|
|
3285
|
+
const panels = make$1(create, 'panels', Type$2.Container, TabsRole.Panels, Style$2.Panels, {}, 'Panels');
|
|
3047
3286
|
const pairs = (options.tabs ?? TABS_WORDS).map((w, i) => buildTabPair(create, w, `k${i + 1}`));
|
|
3048
3287
|
list.children = pairs.map(p => p.tab);
|
|
3049
3288
|
panels.children = pairs.map(p => p.panel);
|
|
@@ -3073,7 +3312,7 @@ function tabsPanels(root) {
|
|
|
3073
3312
|
}
|
|
3074
3313
|
/** True when the Tabs takes its tabs from content (its list is a Repeater, R3). */
|
|
3075
3314
|
function isTabsFromContent(root) {
|
|
3076
|
-
return !!root && tabsListOf(root)?.type === Type$
|
|
3315
|
+
return !!root && tabsListOf(root)?.type === Type$2.Repeater;
|
|
3077
3316
|
}
|
|
3078
3317
|
/** The panel paired with `tab` (the same key), or undefined. From content the one template panel pairs the template tab. */
|
|
3079
3318
|
function tabPanelOf(root, tab) {
|
|
@@ -3098,7 +3337,7 @@ function tabsPartnerOf(root, node) {
|
|
|
3098
3337
|
/** The words a tab shows: its first Text's. */
|
|
3099
3338
|
function tabLabelNodeOf(tab) {
|
|
3100
3339
|
let hit;
|
|
3101
|
-
walkComposite(tab, n => { if (!hit && n !== tab && n.type === Type$
|
|
3340
|
+
walkComposite(tab, n => { if (!hit && n !== tab && n.type === Type$2.Text)
|
|
3102
3341
|
hit = n; });
|
|
3103
3342
|
return hit;
|
|
3104
3343
|
}
|
|
@@ -3116,14 +3355,14 @@ function renameTab(tab, words) {
|
|
|
3116
3355
|
/** The first Text inside a panel (the words From content binds to). */
|
|
3117
3356
|
function tabPanelTextOf(panel) {
|
|
3118
3357
|
let hit;
|
|
3119
|
-
walkComposite(panel, n => { if (!hit && n !== panel && n.type === Type$
|
|
3358
|
+
walkComposite(panel, n => { if (!hit && n !== panel && n.type === Type$2.Text)
|
|
3120
3359
|
hit = n; });
|
|
3121
3360
|
return hit;
|
|
3122
3361
|
}
|
|
3123
3362
|
/** The first Image inside a panel. */
|
|
3124
3363
|
function tabPanelImageOf(panel) {
|
|
3125
3364
|
let hit;
|
|
3126
|
-
walkComposite(panel, n => { if (!hit && n.type === Type$
|
|
3365
|
+
walkComposite(panel, n => { if (!hit && n.type === Type$2.Image)
|
|
3127
3366
|
hit = n; });
|
|
3128
3367
|
return hit;
|
|
3129
3368
|
}
|
|
@@ -3477,18 +3716,18 @@ const SEGMENTED_NAME = 'Billing period';
|
|
|
3477
3716
|
/** Q33: the saving badge's words start as a PLACEHOLDER — a saving is a price claim, never invented. */
|
|
3478
3717
|
const SEGMENTED_BADGE_WORDS = 'Yearly saving';
|
|
3479
3718
|
const SEGMENTED_BADGE_TONE = BadgeTone.Success;
|
|
3480
|
-
var Type;
|
|
3719
|
+
var Type$1;
|
|
3481
3720
|
(function (Type) {
|
|
3482
3721
|
Type["Container"] = "Container";
|
|
3483
3722
|
Type["ButtonBlock"] = "ButtonBlock";
|
|
3484
3723
|
Type["Text"] = "Text";
|
|
3485
|
-
})(Type || (Type = {}));
|
|
3486
|
-
var Style;
|
|
3724
|
+
})(Type$1 || (Type$1 = {}));
|
|
3725
|
+
var Style$1;
|
|
3487
3726
|
(function (Style) {
|
|
3488
3727
|
Style["Root"] = "segmented";
|
|
3489
3728
|
Style["Option"] = "segmented-option";
|
|
3490
3729
|
Style["Label"] = "button-label";
|
|
3491
|
-
})(Style || (Style = {}));
|
|
3730
|
+
})(Style$1 || (Style$1 = {}));
|
|
3492
3731
|
const ZERO_BOX = '0px 0px 0px 0px';
|
|
3493
3732
|
/** What each part holds — layout only; its LOOK is its element style (the track's fill, border, radius and pad; the
|
|
3494
3733
|
* option's ink, pad, radius and 44px target). The options sit in a flex row a gap token apart (board 10); each GROWS,
|
|
@@ -3506,9 +3745,9 @@ function make(create, key, type, role, style, props = {}, label) {
|
|
|
3506
3745
|
}
|
|
3507
3746
|
/** One option: a ButtonBlock carrying its key, holding its words. */
|
|
3508
3747
|
function buildSegmentedOption(create, words) {
|
|
3509
|
-
const option = make(create, `${words.key}-option`, Type.ButtonBlock, SegmentedRole.Option, Style.Option, {}, 'Option');
|
|
3748
|
+
const option = make(create, `${words.key}-option`, Type$1.ButtonBlock, SegmentedRole.Option, Style$1.Option, {}, 'Option');
|
|
3510
3749
|
option.itemKey = words.key;
|
|
3511
|
-
const label = make(create, `${words.key}-label`, Type.Text, null, Style.Label, { content: words.label, tag: 'span' }, 'Text');
|
|
3750
|
+
const label = make(create, `${words.key}-label`, Type$1.Text, null, Style$1.Label, { content: words.label, tag: 'span' }, 'Text');
|
|
3512
3751
|
writeStyles(label, LABEL_BASE);
|
|
3513
3752
|
option.children = [label];
|
|
3514
3753
|
return option;
|
|
@@ -3516,7 +3755,7 @@ function buildSegmentedOption(create, words) {
|
|
|
3516
3755
|
/** A fresh Segmented control: Monthly · Yearly, Monthly on, named "Billing period" (board 10 ▸ Palette). */
|
|
3517
3756
|
function buildSegmentedRecipe(create, options = {}) {
|
|
3518
3757
|
const words = options.options ?? SEGMENTED_WORDS;
|
|
3519
|
-
const root = make(create, 'segmented', Type.Container, SegmentedRole.Segmented, Style.Root, {}, 'Segmented');
|
|
3758
|
+
const root = make(create, 'segmented', Type$1.Container, SegmentedRole.Segmented, Style$1.Root, {}, 'Segmented');
|
|
3520
3759
|
root.children = words.map(w => buildSegmentedOption(create, w));
|
|
3521
3760
|
writeProp(root, SegmentedTrait.DefaultOn, options.defaultOn && words.some(w => w.key === options.defaultOn) ? options.defaultOn : words[0]?.key ?? '');
|
|
3522
3761
|
writeProp(root, SegmentedTrait.Label, options.label ?? SEGMENTED_NAME);
|
|
@@ -3543,10 +3782,10 @@ function segmentedOptionLabelNodeOf(option) {
|
|
|
3543
3782
|
for (const child of option.children ?? []) {
|
|
3544
3783
|
if (child.role === SegmentedRole.Badge)
|
|
3545
3784
|
continue;
|
|
3546
|
-
if (child.type === Type.Text)
|
|
3785
|
+
if (child.type === Type$1.Text)
|
|
3547
3786
|
return child;
|
|
3548
3787
|
let hit;
|
|
3549
|
-
walkComposite(child, n => { if (!hit && n.type === Type.Text)
|
|
3788
|
+
walkComposite(child, n => { if (!hit && n.type === Type$1.Text)
|
|
3550
3789
|
hit = n; });
|
|
3551
3790
|
if (hit)
|
|
3552
3791
|
return hit;
|
|
@@ -3787,7 +4026,7 @@ function exclusiveItemLabel(part) {
|
|
|
3787
4026
|
const KIND_ROOT = (kind) => `[${COMPOSITE_ATTRIBUTE}="${kind}"]`;
|
|
3788
4027
|
const EXCLUSIVE_KINDS = Object.keys(EXCLUSIVE_KIND_ROLES);
|
|
3789
4028
|
const ROOT_SELECTOR = EXCLUSIVE_KINDS.map(KIND_ROOT).join(', ');
|
|
3790
|
-
const roleSelector = (pick) => EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r) => !!r).map(r => `.${roleClass(r)}`).join(', ');
|
|
4029
|
+
const roleSelector = (pick) => EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r) => !!r).map(r => `.${roleClass$1(r)}`).join(', ');
|
|
3791
4030
|
const LIST_SELECTOR = roleSelector('list');
|
|
3792
4031
|
const TRIGGER_SELECTOR = roleSelector('trigger');
|
|
3793
4032
|
const PANEL_SELECTOR = roleSelector('panel');
|
|
@@ -4199,6 +4438,307 @@ function headerBehaviourOfNode(node) {
|
|
|
4199
4438
|
};
|
|
4200
4439
|
}
|
|
4201
4440
|
|
|
4441
|
+
/**
|
|
4442
|
+
* The Marquee's RUNTIME (premium components M6, N6) — DOM only, ONE copy for the live site (both paths) and the canvas's
|
|
4443
|
+
* "Showing on canvas ▸ Moving". The motion itself is CSS (iox-design.css: one `translate` keyframe, linear, on the
|
|
4444
|
+
* track and its copy, started together by `MarqueeAttribute.Running`); this:
|
|
4445
|
+
* - copies the track right after it — as many times as the rail needs (`marqueeCopyCount`), again when a size changes —
|
|
4446
|
+
* each copy `aria-hidden` and `inert` (ids dropped), so the loop is seamless and a screen reader and the Tab key meet
|
|
4447
|
+
* each item once;
|
|
4448
|
+
* - sets one loop's duration from the track's own width and the look's speed (`--iox-marquee-speed`, px a second, on the
|
|
4449
|
+
* motion axis), again when the track's size changes;
|
|
4450
|
+
* - runs the pause control: its name says what pressing it will do, its glyph swaps;
|
|
4451
|
+
* - holds the motion while the band is off screen or the tab is hidden (one attribute);
|
|
4452
|
+
* - keeps the band STILL under reduced motion or a look whose motion is Off: no copy, no motion, no control — and
|
|
4453
|
+
* follows the visitor's setting live (switched on with the page open, the band stops and its copies go).
|
|
4454
|
+
* Hover (hover devices) and focus inside the rail pause it in CSS.
|
|
4455
|
+
*/
|
|
4456
|
+
const SPEED_TOKEN = '--iox-marquee-speed';
|
|
4457
|
+
/** The loop's keyframes (iox-design.css): the band runs toward its reading start, so a right-to-left one runs the other way. */
|
|
4458
|
+
const MARQUEE_KEYFRAMES = { ltr: 'iox-marquee', rtl: 'iox-marquee-rtl' };
|
|
4459
|
+
const REDUCED_MOTION = '(prefers-reduced-motion: reduce)';
|
|
4460
|
+
const RUNTIME_KEY = '__ioxMarquee';
|
|
4461
|
+
const AUTHOR_NAME_KEY = '__ioxMarqueeName';
|
|
4462
|
+
function roleClass(role) {
|
|
4463
|
+
return `iox-role-${role.replace(/\./g, '-')}`;
|
|
4464
|
+
}
|
|
4465
|
+
/** The part of `role` that belongs to THIS band (never one of a band nested inside it). */
|
|
4466
|
+
function marqueePartElement(root, role) {
|
|
4467
|
+
for (const el of Array.from(root.querySelectorAll(`.${roleClass(role)}`))) {
|
|
4468
|
+
if (el.closest(`[${MarqueeAttribute.Root}]`) === root)
|
|
4469
|
+
return el;
|
|
4470
|
+
}
|
|
4471
|
+
return null;
|
|
4472
|
+
}
|
|
4473
|
+
/** The rail's own child that holds the track: the track itself, or a host a renderer drew around it. */
|
|
4474
|
+
function trackHostOf(rail, track) {
|
|
4475
|
+
let el = track;
|
|
4476
|
+
while (el && el.parentElement !== rail)
|
|
4477
|
+
el = el.parentElement;
|
|
4478
|
+
return el;
|
|
4479
|
+
}
|
|
4480
|
+
class MarqueeRuntime {
|
|
4481
|
+
constructor(root, options = {}) {
|
|
4482
|
+
this.copies = [];
|
|
4483
|
+
this.still = false;
|
|
4484
|
+
this.pausedByVisitor = false;
|
|
4485
|
+
this.offscreen = false;
|
|
4486
|
+
this.tabHidden = false;
|
|
4487
|
+
this.cleanups = [];
|
|
4488
|
+
this.unwatch = null;
|
|
4489
|
+
this.root = root;
|
|
4490
|
+
this.host = options.host ?? root.ownerDocument.defaultView ?? window;
|
|
4491
|
+
this.words = options.words ?? marqueeWords(root.ownerDocument?.documentElement?.getAttribute('lang'));
|
|
4492
|
+
this.track = marqueePartElement(root, MarqueeRole.Track);
|
|
4493
|
+
this.rail = marqueePartElement(root, MarqueeRole.Rail);
|
|
4494
|
+
this.pause = marqueePartElement(root, MarqueeRole.Pause);
|
|
4495
|
+
root[RUNTIME_KEY] = this;
|
|
4496
|
+
this.start();
|
|
4497
|
+
this.watchReducedMotion();
|
|
4498
|
+
}
|
|
4499
|
+
/** The runtime a band already runs, if any. */
|
|
4500
|
+
static of(root) {
|
|
4501
|
+
return root[RUNTIME_KEY] ?? null;
|
|
4502
|
+
}
|
|
4503
|
+
get isStill() {
|
|
4504
|
+
return this.still;
|
|
4505
|
+
}
|
|
4506
|
+
get isPaused() {
|
|
4507
|
+
return this.pausedByVisitor;
|
|
4508
|
+
}
|
|
4509
|
+
/** Press the pause control. */
|
|
4510
|
+
togglePause() {
|
|
4511
|
+
if (this.still)
|
|
4512
|
+
return;
|
|
4513
|
+
this.pausedByVisitor = !this.pausedByVisitor;
|
|
4514
|
+
this.sync();
|
|
4515
|
+
}
|
|
4516
|
+
destroy() {
|
|
4517
|
+
this.unwatch?.();
|
|
4518
|
+
this.unwatch = null;
|
|
4519
|
+
this.stop();
|
|
4520
|
+
if (this.root[RUNTIME_KEY] === this)
|
|
4521
|
+
delete this.root[RUNTIME_KEY];
|
|
4522
|
+
}
|
|
4523
|
+
/** The visitor's reduced-motion setting, followed live: the band stops (or starts again) where it stands. */
|
|
4524
|
+
watchReducedMotion() {
|
|
4525
|
+
const query = this.host.matchMedia?.(REDUCED_MOTION);
|
|
4526
|
+
if (!query?.addEventListener)
|
|
4527
|
+
return;
|
|
4528
|
+
const onChange = () => {
|
|
4529
|
+
this.stop();
|
|
4530
|
+
this.start();
|
|
4531
|
+
};
|
|
4532
|
+
query.addEventListener('change', onChange);
|
|
4533
|
+
this.unwatch = () => query.removeEventListener('change', onChange);
|
|
4534
|
+
}
|
|
4535
|
+
stop() {
|
|
4536
|
+
for (const cleanup of this.cleanups.splice(0))
|
|
4537
|
+
cleanup();
|
|
4538
|
+
for (const copy of this.copies.splice(0))
|
|
4539
|
+
copy.remove();
|
|
4540
|
+
this.track?.style.removeProperty('animation-duration');
|
|
4541
|
+
this.track?.style.removeProperty('animation-name');
|
|
4542
|
+
this.still = false;
|
|
4543
|
+
this.pausedByVisitor = false;
|
|
4544
|
+
this.offscreen = false;
|
|
4545
|
+
for (const name of [MarqueeAttribute.Running, MarqueeAttribute.Still, MarqueeAttribute.Paused])
|
|
4546
|
+
this.root.removeAttribute(name);
|
|
4547
|
+
}
|
|
4548
|
+
start() {
|
|
4549
|
+
const lookSpeed = lookMarqueeSpeed(this.host.getComputedStyle?.(this.root).getPropertyValue(SPEED_TOKEN));
|
|
4550
|
+
const reduced = !!this.host.matchMedia?.(REDUCED_MOTION).matches;
|
|
4551
|
+
if (!this.track || !this.rail || reduced || lookSpeed <= 0) {
|
|
4552
|
+
this.still = true;
|
|
4553
|
+
this.root.setAttribute(MarqueeAttribute.Still, '');
|
|
4554
|
+
return;
|
|
4555
|
+
}
|
|
4556
|
+
this.measure(lookSpeed);
|
|
4557
|
+
this.listen(lookSpeed);
|
|
4558
|
+
this.sync();
|
|
4559
|
+
this.root.setAttribute(MarqueeAttribute.Running, '');
|
|
4560
|
+
}
|
|
4561
|
+
/** As many copies as the rail needs, right after the track (the last one last). */
|
|
4562
|
+
fillCopies(count) {
|
|
4563
|
+
const holder = trackHostOf(this.rail, this.track);
|
|
4564
|
+
if (!holder)
|
|
4565
|
+
return;
|
|
4566
|
+
while (this.copies.length > count)
|
|
4567
|
+
this.copies.pop().remove();
|
|
4568
|
+
while (this.copies.length < count) {
|
|
4569
|
+
const copy = holder.cloneNode(true);
|
|
4570
|
+
copy.setAttribute(MarqueeAttribute.Copy, '');
|
|
4571
|
+
copy.setAttribute('aria-hidden', 'true');
|
|
4572
|
+
copy.setAttribute('inert', '');
|
|
4573
|
+
copy.removeAttribute('id');
|
|
4574
|
+
copy.querySelectorAll('[id]').forEach(el => el.removeAttribute('id'));
|
|
4575
|
+
(this.copies[this.copies.length - 1] ?? holder).after(copy);
|
|
4576
|
+
this.copies.push(copy);
|
|
4577
|
+
}
|
|
4578
|
+
}
|
|
4579
|
+
/** The copies and the loop's duration on every track: written on each, never through a variable on the band (Emil 51).
|
|
4580
|
+
* A new copy starts its loop where the others stand: every track's animation is restarted together. */
|
|
4581
|
+
measure(lookSpeed) {
|
|
4582
|
+
const before = this.copies.length;
|
|
4583
|
+
this.fillCopies(marqueeCopyCount(this.track.offsetWidth, this.rail.clientWidth));
|
|
4584
|
+
const speed = this.root.getAttribute(MarqueeAttribute.Root) || MarqueeSpeed.Normal;
|
|
4585
|
+
const seconds = marqueeLoopSeconds(this.track.offsetWidth, lookSpeed, speed);
|
|
4586
|
+
const value = seconds ? `${seconds}s` : '';
|
|
4587
|
+
// A live page's right-to-left is CSS `direction` (never a `dir` attribute `:dir()` could see): read it.
|
|
4588
|
+
const rtl = this.host.getComputedStyle?.(this.rail).direction === 'rtl';
|
|
4589
|
+
const moving = this.moving();
|
|
4590
|
+
for (const el of moving) {
|
|
4591
|
+
if (value)
|
|
4592
|
+
el.style.setProperty('animation-duration', value);
|
|
4593
|
+
else
|
|
4594
|
+
el.style.removeProperty('animation-duration');
|
|
4595
|
+
if (rtl)
|
|
4596
|
+
el.style.setProperty('animation-name', MARQUEE_KEYFRAMES.rtl);
|
|
4597
|
+
else
|
|
4598
|
+
el.style.removeProperty('animation-name');
|
|
4599
|
+
}
|
|
4600
|
+
if (this.copies.length !== before)
|
|
4601
|
+
for (const el of moving)
|
|
4602
|
+
el.getAnimations?.().forEach(a => { a.currentTime = 0; });
|
|
4603
|
+
}
|
|
4604
|
+
moving() {
|
|
4605
|
+
const trackClass = roleClass(MarqueeRole.Track);
|
|
4606
|
+
const copyTracks = this.copies.map(copy => (copy.classList.contains(trackClass) ? copy : copy.querySelector(`.${trackClass}`)))
|
|
4607
|
+
.filter((el) => !!el);
|
|
4608
|
+
return [this.track, ...copyTracks];
|
|
4609
|
+
}
|
|
4610
|
+
listen(lookSpeed) {
|
|
4611
|
+
const onPress = (e) => {
|
|
4612
|
+
e.preventDefault();
|
|
4613
|
+
this.togglePause();
|
|
4614
|
+
};
|
|
4615
|
+
this.pause?.addEventListener('click', onPress);
|
|
4616
|
+
this.cleanups.push(() => this.pause?.removeEventListener('click', onPress));
|
|
4617
|
+
const doc = this.root.ownerDocument;
|
|
4618
|
+
const onVisibility = () => {
|
|
4619
|
+
this.tabHidden = doc.visibilityState === 'hidden';
|
|
4620
|
+
this.sync();
|
|
4621
|
+
};
|
|
4622
|
+
doc.addEventListener('visibilitychange', onVisibility);
|
|
4623
|
+
this.cleanups.push(() => doc.removeEventListener('visibilitychange', onVisibility));
|
|
4624
|
+
const IO = this.host.IntersectionObserver;
|
|
4625
|
+
if (IO) {
|
|
4626
|
+
const observer = new IO(entries => {
|
|
4627
|
+
for (const entry of entries)
|
|
4628
|
+
this.offscreen = !entry.isIntersecting;
|
|
4629
|
+
this.sync();
|
|
4630
|
+
});
|
|
4631
|
+
observer.observe(this.root);
|
|
4632
|
+
this.cleanups.push(() => observer.disconnect());
|
|
4633
|
+
}
|
|
4634
|
+
const RO = this.host.ResizeObserver;
|
|
4635
|
+
if (RO && this.track) {
|
|
4636
|
+
const resize = new RO(() => this.measure(lookSpeed));
|
|
4637
|
+
resize.observe(this.track);
|
|
4638
|
+
if (this.rail)
|
|
4639
|
+
resize.observe(this.rail);
|
|
4640
|
+
this.cleanups.push(() => resize.disconnect());
|
|
4641
|
+
}
|
|
4642
|
+
}
|
|
4643
|
+
sync() {
|
|
4644
|
+
const held = this.pausedByVisitor || this.offscreen || this.tabHidden;
|
|
4645
|
+
if (held)
|
|
4646
|
+
this.root.setAttribute(MarqueeAttribute.Paused, '');
|
|
4647
|
+
else
|
|
4648
|
+
this.root.removeAttribute(MarqueeAttribute.Paused);
|
|
4649
|
+
if (!this.pause)
|
|
4650
|
+
return;
|
|
4651
|
+
const host = this.pause;
|
|
4652
|
+
if (host[AUTHOR_NAME_KEY] === undefined)
|
|
4653
|
+
host[AUTHOR_NAME_KEY] = this.pause.getAttribute('aria-label') ?? '';
|
|
4654
|
+
const attrs = marqueePauseAttributes(this.pausedByVisitor, this.words, host[AUTHOR_NAME_KEY]);
|
|
4655
|
+
for (const [name, value] of Object.entries(attrs))
|
|
4656
|
+
this.pause.setAttribute(name, value);
|
|
4657
|
+
if (!('aria-pressed' in attrs))
|
|
4658
|
+
this.pause.removeAttribute('aria-pressed');
|
|
4659
|
+
const icon = this.pause.querySelector('i');
|
|
4660
|
+
if (icon) {
|
|
4661
|
+
const own = Array.from(icon.classList).filter(c => c !== 'ph' && !c.startsWith('ph-'));
|
|
4662
|
+
icon.className = [marqueePauseGlyph(this.pausedByVisitor), ...own].join(' ');
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
/** Every band in `container` (and the container itself when it is one), each run once. */
|
|
4667
|
+
function attachMarquees(container, options = {}) {
|
|
4668
|
+
const roots = [];
|
|
4669
|
+
if (container.hasAttribute?.(MarqueeAttribute.Root))
|
|
4670
|
+
roots.push(container);
|
|
4671
|
+
container.querySelectorAll?.(`[${MarqueeAttribute.Root}]`).forEach(el => roots.push(el));
|
|
4672
|
+
return roots.filter(root => !MarqueeRuntime.of(root) && !root.closest(`[${MarqueeAttribute.Copy}]`))
|
|
4673
|
+
.map(root => new MarqueeRuntime(root, options));
|
|
4674
|
+
}
|
|
4675
|
+
/**
|
|
4676
|
+
* For a visitor with no script: the band stands still in its one row and its pause control, which could do nothing, is
|
|
4677
|
+
* not shown. Served by the engine inside `<noscript>`, beside the entrance and Scene rules.
|
|
4678
|
+
*/
|
|
4679
|
+
const MARQUEE_NOSCRIPT_CSS = `.${roleClass(MarqueeRole.Pause)}{display:none!important}`;
|
|
4680
|
+
|
|
4681
|
+
/**
|
|
4682
|
+
* Two recipes of premium components M6 that are ordinary nodes carrying interactions — so the builder's palette and
|
|
4683
|
+
* generation-core's composer (M8) stamp the same thing:
|
|
4684
|
+
* - the COUNTER (N5): a number that counts up once when it comes into view, with its few words under it. Its entrance
|
|
4685
|
+
* hides it until it plays, so it counts in the first screen too (a number already read is never taken away).
|
|
4686
|
+
* - the READING BAR (N7): a thin bar that fills as the page — or its section — is read, sticky at the top of what holds it.
|
|
4687
|
+
*/
|
|
4688
|
+
var Type;
|
|
4689
|
+
(function (Type) {
|
|
4690
|
+
Type["Container"] = "Container";
|
|
4691
|
+
Type["Text"] = "Text";
|
|
4692
|
+
})(Type || (Type = {}));
|
|
4693
|
+
var Style;
|
|
4694
|
+
(function (Style) {
|
|
4695
|
+
Style["Box"] = "box";
|
|
4696
|
+
Style["Number"] = "price";
|
|
4697
|
+
Style["Words"] = "small";
|
|
4698
|
+
Style["Bar"] = "progress-bar";
|
|
4699
|
+
})(Style || (Style = {}));
|
|
4700
|
+
const ZERO = '0px 0px 0px 0px';
|
|
4701
|
+
const COUNTER_BASE = { display: 'flex', flexDirection: 'column', gap: '6px', minHeight: 'auto', width: 'auto', padding: ZERO };
|
|
4702
|
+
const NUMBER_BASE = { margin: ZERO, width: 'auto' };
|
|
4703
|
+
const WORDS_BASE = { margin: ZERO, width: 'auto' };
|
|
4704
|
+
/** Sticky at the top of what holds it, over its neighbours (a low layer — never past the app's scale), full width. */
|
|
4705
|
+
const BAR_BASE = {
|
|
4706
|
+
display: 'block', position: 'sticky', top: '0px', zIndex: '2', width: '100%', minHeight: '0px', margin: ZERO, padding: ZERO,
|
|
4707
|
+
};
|
|
4708
|
+
/** The entrance that hides a counter's number until it plays: lead content rises a little as it fades (Emil 46). */
|
|
4709
|
+
const COUNTER_ENTRANCE = Object.freeze({ type: 'moveUp', duration: 500, distance: 12, easing: 'ease-enter' });
|
|
4710
|
+
/** The count itself: well inside WCAG 2.2.2, decelerating into the value. */
|
|
4711
|
+
const COUNTER_COUNT = Object.freeze({ type: 'countUp', duration: 1200, easing: 'ease-out' });
|
|
4712
|
+
const COUNTER_SAMPLE_WORDS = Object.freeze({ number: '1,250+', label: 'projects delivered' });
|
|
4713
|
+
/** A number that counts up once, and its words (Components ▸ Interactive ▸ Counter). */
|
|
4714
|
+
function buildCounterRecipe(create, words = {}) {
|
|
4715
|
+
const text = { ...COUNTER_SAMPLE_WORDS, ...words };
|
|
4716
|
+
const root = makeCompositePart(create, { key: 'counter', type: Type.Container, props: {}, elementStyle: Style.Box }, null, 'Counter', COUNTER_BASE);
|
|
4717
|
+
const number = makeCompositePart(create, { key: 'counter-number', type: Type.Text, props: { content: text.number }, elementStyle: Style.Number }, null, 'Number', NUMBER_BASE);
|
|
4718
|
+
const label = makeCompositePart(create, { key: 'counter-label', type: Type.Text, props: { content: text.label }, elementStyle: Style.Words }, null, 'Words', WORDS_BASE);
|
|
4719
|
+
const { distance, ...entrance } = COUNTER_ENTRANCE;
|
|
4720
|
+
number.interactions = [{
|
|
4721
|
+
id: `${number.id ?? 'counter'}-count`, trigger: 'viewportEnter',
|
|
4722
|
+
actions: [
|
|
4723
|
+
{ ...entrance, target: 'self', delay: 0, once: true, params: { distance } },
|
|
4724
|
+
{ ...COUNTER_COUNT, target: 'self', delay: 0, once: true },
|
|
4725
|
+
],
|
|
4726
|
+
}];
|
|
4727
|
+
root.children = [number, label];
|
|
4728
|
+
return root;
|
|
4729
|
+
}
|
|
4730
|
+
/** A bar that fills as the page is read (Components ▸ Interactive ▸ Reading bar). Its range may be changed to "This
|
|
4731
|
+
* section" in the Interactions panel. */
|
|
4732
|
+
function buildReadingBarRecipe(create) {
|
|
4733
|
+
const bar = makeCompositePart(create, { key: 'reading-bar', type: Type.Container, props: {}, elementStyle: Style.Bar }, null, 'Reading bar', BAR_BASE);
|
|
4734
|
+
bar.interactions = [{
|
|
4735
|
+
id: `${bar.id ?? 'bar'}-read`, trigger: 'scrollProgress', range: 'page',
|
|
4736
|
+
actions: [{ type: 'progressBar', target: 'self', duration: 1000, delay: 0, easing: 'linear' }],
|
|
4737
|
+
}];
|
|
4738
|
+
bar.children = [];
|
|
4739
|
+
return bar;
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4202
4742
|
/**
|
|
4203
4743
|
* @vectoriox/iox-ui/composite-core — composites built from the builder's own parts (composite-components
|
|
4204
4744
|
* plan §3a). FRAMEWORK-FREE: the builder, the SSR engine and iox-cms (generation-core's composer, the site
|
|
@@ -4214,5 +4754,5 @@ function headerBehaviourOfNode(node) {
|
|
|
4214
4754
|
* Generated bundle index. Do not edit.
|
|
4215
4755
|
*/
|
|
4216
4756
|
|
|
4217
|
-
export { ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, ACCORDION_DEFAULT_ONS, ACCORDION_ICONS, ACCORDION_ICON_GLYPH, ACCORDION_NEW_ITEM_WORDS, ACCORDION_WORDS, ACTIVATE_ON_ATTRIBUTE, AccordionClass, AccordionDefaultOn, AccordionEditRefusal, AccordionIcon, AccordionKeyAction, AccordionRole, AccordionRuntime, BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CAROUSEL_QUOTES, CHIP_ICON, CHIP_STYLE, COMPOSITE_ATTRIBUTE, COMPOSITE_KIND_ROLES, COMPOSITE_ROLE_SPECS, CardLayout, CardPart, CardRole, CarouselA11y, CompositeBehaviourTrait, CompositeItemAction, CompositeKind, DEFAULT_ON_ATTRIBUTE, DISCLOSURE_ITEM_KEY, DISCLOSURE_WORDS, DisclosureRole, EXCLUSIVE_KIND_ROLES, ExclusiveRuntime, ITEM_KEY_ATTRIBUTE, ITEM_OFF_EVENT, ITEM_ON_EVENT, ITEM_OPEN_STATE, LIGHTBOX_ARROWS_HIDE_AT, LIGHTBOX_LABEL, MULTIPLE_ATTRIBUTE, NO_ELEMENT_STYLE, ON_ATTRIBUTE, ON_STATE, ORIENTATION_ATTRIBUTE, PILL_LABEL_STYLE, SCOPE_ATTRIBUTE, SEGMENTED_BADGE_TONE, SEGMENTED_BADGE_WORDS, SEGMENTED_BEHAVIOUR, SEGMENTED_MAX_OPTIONS, SEGMENTED_MIN_OPTIONS, SEGMENTED_NAME, SEGMENTED_NEW_OPTION_WORDS, SEGMENTED_WORDS, SLIDER_BAR_ORDER, SLIDER_NAME_TRAIT, SLIDER_PART_GLYPH, SLIDER_PART_ROLES, SLIDER_PLACEMENT_TRAIT, SLIDER_PLAY_GLYPH, SLIDER_SCROLL_PLAYS_TRAIT, SLIDER_SWAPPING_ATTRIBUTE, SLIDER_TEXT_ATTRIBUTE, SLIDER_TYPE, SLIDER_WORDS, SLIDE_CAPTION_TRAIT, SLIDE_TO_ROW, SLIDE_TYPE, SWIPER_THEME_COLOR, SceneRole, SegmentedEditRefusal, SegmentedRole, SegmentedTrait, SliderFlag, SliderPlacement, SliderRole, StructureEdit, StructureRefusal, TABS_ACTIVATE_ONS, TABS_CONTENT_LIMIT, TABS_IMAGE_BIND_PROP, TABS_LABEL_BIND_PROP, TABS_NEW_TAB_WORDS, TABS_ORIENTATIONS, TABS_STACK_BREAKPOINT, TABS_TEXT_BIND_PROP, TABS_WORDS, TabsActivateOn, TabsBehaviourTrait, TabsEditRefusal, TabsOrientation, TabsRole, UNTIL_FOUND, acceptsRefusal, accordionAnswerOf, accordionBehaviour, accordionDomIds, accordionFocusIndex, accordionHeadingLevel, accordionItemAttributes, accordionItemLabel, accordionItemOf, accordionItemState, accordionItems, accordionKeyAction, accordionPanelAttributes, accordionPanelOf, accordionPartStyle, accordionQuestionOf, accordionRegionAttributes, accordionRemovalRefusal, accordionRootAttributes, accordionRootOf, accordionRootOfItem, accordionRuntimeOf, accordionScope, accordionToContent, accordionToManual, accordionTrackAttributes, accordionTriggerAttributes, accordionTriggerOf, addAccordionItem, addSegmentedOption, addTabPair, applyCardLayout, attachAccordionAt, attachAccordions, attachCarouselA11y, attachCompositeAt, attachExclusiveAt, attachSliderBar, badgeStyleId, badgeToneOf, buildAccordionItem, buildAccordionRecipe, buildBadge, buildCardRecipe, buildCarouselRecipe, buildChip, buildCompositeIcon, buildDisclosureRecipe, buildLightboxRecipe, buildSegmentedOption, buildSegmentedRecipe, buildSliderPart, buildTabPair, buildTabsRecipe, canOpenAtClickedItem, cardPartsOf, cardRootOf, cardTitleOf, carouselOf, clearLayerStyles, closeAccordionItem, closestAccordion, closestAccordionItem, closestExclusive, closestExclusiveItemPart, compositeItemOf, compositeItems, compositeKindOfRole, compositeRootOf, compositeRowKeys, compositeScopeId, detachAccordion, detectAccordionIcon, detectCardLayout, disclosureOpenByDefault, domSafeKey, exclusiveBehaviourOf, exclusiveDefaultOf, exclusiveItemLabel, exclusiveItemPartOf, exclusiveKindHasPanels, exclusiveKindOf, exclusiveLabelOf, exclusivePartAttributes, exclusiveRootAttributesOf, exclusiveRootHoldsTriggers, exclusiveRootOf, exclusiveRuntimeOf, exclusiveScopeFor, findByRole, hasLabelledRegion, hasSliderParts, headerBehaviourOfNode, initialAccordionOpen, isAccordionFromContent, isAccordionItemOn, isAccordionPart, isAccordionRoot, isAnyCompositeRoot, isCardLinked, isCardRoot, isCompositeItem, isCompositeItemOn, isCompositePanel, isCompositeRoot, isCompositeTrigger, isDisclosurePart, isDisclosureRoot, isExclusiveItemOn, isExclusiveItemPart, isExclusiveKind, isExclusiveList, isExclusivePanel, isExclusivePanels, isExclusiveRoot, isExclusiveTrigger, isLockedPart, isPartOfExclusiveScope, isPillNode, isSegmentedPart, isSegmentedRoot, isSlider, isSliderPart, isTabsFromContent, isTabsPart, isTabsRoot, isToggleKind, itemOpenTriggerIds, lightboxSliderOf, makeCompositePart, manualTabKeys, migrateSliderControls, moveAccordionItem, moveSegmentedOption, moveTabPair, needsSliderMigration, nextAccordionState, nextItemKey, nextSegmentedKey, nextTabKey, onAccordionItemState, onCompositeItemState, onExclusiveItemState, openAccordionItem, parentInComposite, pickAccordionAutoBinds, pickTabsAutoBinds, readLayerStyle, readProp, readStyle, removeFromComposite, removeSegmentedOption, removeTabPair, renameAccordionItem, renameSegmentedOption, renameTab, repeatSourceOf, rowIndexOf, rowItemKey, rowSourceOf, runCompositeItemAction, sameRepeatSource, segmentedAddRefusal, segmentedBadgeOf, segmentedDefaultOn, segmentedItemTriggerIds, segmentedKeyAction, segmentedKeys, segmentedLabel, segmentedOptionAttributes, segmentedOptionKey, segmentedOptionLabel, segmentedOptionLabelNodeOf, segmentedOptions, segmentedPartAttributes, segmentedRemovalRefusal, segmentedRootAttributes, segmentedRootAttributesOf, segmentedScopeFor, serializeDomAttributes, setAccordionBehaviour, setAccordionIcon, setBadgeTone, setCardLinked, setCardPart, setHeaderBehaviour, setSegmentedBadge, setSegmentedBehaviour, setSliderFlag, setSliderPlacement, setTabsBehaviour, shouldScrollToItem, slideIndexForRow, sliderCaptionOf, sliderCountText, sliderLiveRegion, sliderPart, sliderPartElement, sliderPauseAttributes, sliderPauseGlyph, sliderPlacementOf, sliderSlides, sliderWords, splitSliderChildren, structureRefusal, syncSliderParts, tabLabel, tabLabelNodeOf, tabListAttributes, tabPanelAttributes, tabPanelImageOf, tabPanelOf, tabPanelTextOf, tabPartKey, tabTriggerAttributes, tabTriggerOf, tabsBehaviour, tabsItemState, tabsItemTriggerIds, tabsKeyAction, tabsLabel, tabsListOf, tabsPanels, tabsPanelsOf, tabsPartAttributes, tabsPartnerOf, tabsRemovalRefusal, tabsRootAttributes, tabsScope, tabsScopeFor, tabsToContent, tabsToManual, tabsTriggers, walkComposite, wantedSliderParts, writeLayerStyles, writeProp, writeStyles };
|
|
4757
|
+
export { ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, ACCORDION_DEFAULT_ONS, ACCORDION_ICONS, ACCORDION_ICON_GLYPH, ACCORDION_NEW_ITEM_WORDS, ACCORDION_WORDS, ACTIVATE_ON_ATTRIBUTE, AccordionClass, AccordionDefaultOn, AccordionEditRefusal, AccordionIcon, AccordionKeyAction, AccordionRole, AccordionRuntime, BADGE_TONES, BADGE_TONE_ICONS, BadgeTone, CARD_LAYOUTS, CARD_LAYOUT_CUSTOM, CARD_PARTS, CARD_PART_ROLE, CARD_STACK_BREAKPOINT, CARD_WORDS, CAROUSEL_QUOTES, CHIP_ICON, CHIP_STYLE, COMPOSITE_ATTRIBUTE, COMPOSITE_KIND_ROLES, COMPOSITE_ROLE_SPECS, COUNTER_COUNT, COUNTER_ENTRANCE, COUNTER_SAMPLE_WORDS, CardLayout, CardPart, CardRole, CarouselA11y, CompositeBehaviourTrait, CompositeItemAction, CompositeKind, DEFAULT_ON_ATTRIBUTE, DISCLOSURE_ITEM_KEY, DISCLOSURE_WORDS, DisclosureRole, EXCLUSIVE_KIND_ROLES, ExclusiveRuntime, ITEM_KEY_ATTRIBUTE, ITEM_OFF_EVENT, ITEM_ON_EVENT, ITEM_OPEN_STATE, LIGHTBOX_ARROWS_HIDE_AT, LIGHTBOX_LABEL, MARQUEE_DEFAULTS, MARQUEE_DEFAULT_SPEED_PX, MARQUEE_KEYFRAMES, MARQUEE_MAX_COPIES, MARQUEE_MIN_LOOP_S, MARQUEE_NODE_ATTRIBUTES, MARQUEE_NOSCRIPT_CSS, MARQUEE_PAUSE_GLYPH, MARQUEE_PLAY_GLYPH, MARQUEE_SAMPLE_WORDS, MARQUEE_SPEED_FACTOR, MARQUEE_WORDS, MULTIPLE_ATTRIBUTE, MarqueeAttribute, MarqueeDirection, MarqueeRole, MarqueeRuntime, MarqueeSpeed, MarqueeStyle, MarqueeTrait, NO_ELEMENT_STYLE, ON_ATTRIBUTE, ON_STATE, ORIENTATION_ATTRIBUTE, PILL_LABEL_STYLE, SCOPE_ATTRIBUTE, SEGMENTED_BADGE_TONE, SEGMENTED_BADGE_WORDS, SEGMENTED_BEHAVIOUR, SEGMENTED_MAX_OPTIONS, SEGMENTED_MIN_OPTIONS, SEGMENTED_NAME, SEGMENTED_NEW_OPTION_WORDS, SEGMENTED_WORDS, SLIDER_BAR_ORDER, SLIDER_NAME_TRAIT, SLIDER_PART_GLYPH, SLIDER_PART_ROLES, SLIDER_PLACEMENT_TRAIT, SLIDER_PLAY_GLYPH, SLIDER_SCROLL_PLAYS_TRAIT, SLIDER_SWAPPING_ATTRIBUTE, SLIDER_TEXT_ATTRIBUTE, SLIDER_TYPE, SLIDER_WORDS, SLIDE_CAPTION_TRAIT, SLIDE_TO_ROW, SLIDE_TYPE, SWIPER_THEME_COLOR, SceneRole, SegmentedEditRefusal, SegmentedRole, SegmentedTrait, SliderFlag, SliderPlacement, SliderRole, StructureEdit, StructureRefusal, TABS_ACTIVATE_ONS, TABS_CONTENT_LIMIT, TABS_IMAGE_BIND_PROP, TABS_LABEL_BIND_PROP, TABS_NEW_TAB_WORDS, TABS_ORIENTATIONS, TABS_STACK_BREAKPOINT, TABS_TEXT_BIND_PROP, TABS_WORDS, TabsActivateOn, TabsBehaviourTrait, TabsEditRefusal, TabsOrientation, TabsRole, UNTIL_FOUND, acceptsRefusal, accordionAnswerOf, accordionBehaviour, accordionDomIds, accordionFocusIndex, accordionHeadingLevel, accordionItemAttributes, accordionItemLabel, accordionItemOf, accordionItemState, accordionItems, accordionKeyAction, accordionPanelAttributes, accordionPanelOf, accordionPartStyle, accordionQuestionOf, accordionRegionAttributes, accordionRemovalRefusal, accordionRootAttributes, accordionRootOf, accordionRootOfItem, accordionRuntimeOf, accordionScope, accordionToContent, accordionToManual, accordionTrackAttributes, accordionTriggerAttributes, accordionTriggerOf, addAccordionItem, addSegmentedOption, addTabPair, applyCardLayout, attachAccordionAt, attachAccordions, attachCarouselA11y, attachCompositeAt, attachExclusiveAt, attachMarquees, attachSliderBar, badgeStyleId, badgeToneOf, buildAccordionItem, buildAccordionRecipe, buildBadge, buildCardRecipe, buildCarouselRecipe, buildChip, buildCompositeIcon, buildCounterRecipe, buildDisclosureRecipe, buildLightboxRecipe, buildMarqueeRecipe, buildReadingBarRecipe, buildSegmentedOption, buildSegmentedRecipe, buildSliderPart, buildTabPair, buildTabsRecipe, canOpenAtClickedItem, cardPartsOf, cardRootOf, cardTitleOf, carouselOf, clearLayerStyles, closeAccordionItem, closestAccordion, closestAccordionItem, closestExclusive, closestExclusiveItemPart, compositeItemOf, compositeItems, compositeKindOfRole, compositeRootOf, compositeRowKeys, compositeScopeId, detachAccordion, detectAccordionIcon, detectCardLayout, disclosureOpenByDefault, domSafeKey, exclusiveBehaviourOf, exclusiveDefaultOf, exclusiveItemLabel, exclusiveItemPartOf, exclusiveKindHasPanels, exclusiveKindOf, exclusiveLabelOf, exclusivePartAttributes, exclusiveRootAttributesOf, exclusiveRootHoldsTriggers, exclusiveRootOf, exclusiveRuntimeOf, exclusiveScopeFor, findByRole, hasLabelledRegion, hasSliderParts, headerBehaviourOfNode, initialAccordionOpen, isAccordionFromContent, isAccordionItemOn, isAccordionPart, isAccordionRoot, isAnyCompositeRoot, isCardLinked, isCardRoot, isCompositeItem, isCompositeItemOn, isCompositePanel, isCompositeRoot, isCompositeTrigger, isDisclosurePart, isDisclosureRoot, isExclusiveItemOn, isExclusiveItemPart, isExclusiveKind, isExclusiveList, isExclusivePanel, isExclusivePanels, isExclusiveRoot, isExclusiveTrigger, isLockedPart, isMarqueeRoot, isPartOfExclusiveScope, isPillNode, isSegmentedPart, isSegmentedRoot, isSlider, isSliderPart, isTabsFromContent, isTabsPart, isTabsRoot, isToggleKind, itemOpenTriggerIds, lightboxSliderOf, lookMarqueeSpeed, makeCompositePart, manualTabKeys, marqueeCopyCount, marqueeLoopSeconds, marqueePartElement, marqueePauseAttributes, marqueePauseGlyph, marqueeRootAttributes, marqueeRootOf, marqueeSettings, marqueeWords, migrateSliderControls, moveAccordionItem, moveSegmentedOption, moveTabPair, needsSliderMigration, nextAccordionState, nextItemKey, nextSegmentedKey, nextTabKey, onAccordionItemState, onCompositeItemState, onExclusiveItemState, openAccordionItem, parentInComposite, pickAccordionAutoBinds, pickTabsAutoBinds, readLayerStyle, readProp, readStyle, removeFromComposite, removeSegmentedOption, removeTabPair, renameAccordionItem, renameSegmentedOption, renameTab, repeatSourceOf, rowIndexOf, rowItemKey, rowSourceOf, runCompositeItemAction, sameRepeatSource, segmentedAddRefusal, segmentedBadgeOf, segmentedDefaultOn, segmentedItemTriggerIds, segmentedKeyAction, segmentedKeys, segmentedLabel, segmentedOptionAttributes, segmentedOptionKey, segmentedOptionLabel, segmentedOptionLabelNodeOf, segmentedOptions, segmentedPartAttributes, segmentedRemovalRefusal, segmentedRootAttributes, segmentedRootAttributesOf, segmentedScopeFor, serializeDomAttributes, setAccordionBehaviour, setAccordionIcon, setBadgeTone, setCardLinked, setCardPart, setHeaderBehaviour, setMarqueeSettings, setSegmentedBadge, setSegmentedBehaviour, setSliderFlag, setSliderPlacement, setTabsBehaviour, shouldScrollToItem, slideIndexForRow, sliderCaptionOf, sliderCountText, sliderLiveRegion, sliderPart, sliderPartElement, sliderPauseAttributes, sliderPauseGlyph, sliderPlacementOf, sliderSlides, sliderWords, splitSliderChildren, structureRefusal, syncSliderParts, tabLabel, tabLabelNodeOf, tabListAttributes, tabPanelAttributes, tabPanelImageOf, tabPanelOf, tabPanelTextOf, tabPartKey, tabTriggerAttributes, tabTriggerOf, tabsBehaviour, tabsItemState, tabsItemTriggerIds, tabsKeyAction, tabsLabel, tabsListOf, tabsPanels, tabsPanelsOf, tabsPartAttributes, tabsPartnerOf, tabsRemovalRefusal, tabsRootAttributes, tabsScope, tabsScopeFor, tabsToContent, tabsToManual, tabsTriggers, walkComposite, wantedSliderParts, writeLayerStyles, writeProp, writeStyles };
|
|
4218
4758
|
//# sourceMappingURL=vectoriox-iox-ui-composite-core.mjs.map
|