@vonage/vivid 4.14.0 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +152 -197
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/radio/radio.form-associated.d.ts +2 -0
- package/lib/tabs/tabs.d.ts +0 -5
- package/lib/text-anchor/text-anchor.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +2 -2
- package/shared/anchor.cjs +10 -10
- package/shared/anchor.js +1 -1
- package/shared/anchored.cjs +6 -6
- package/shared/anchored.js +1 -1
- package/shared/apply-mixins.cjs +3 -3
- package/shared/apply-mixins.js +1 -1
- package/shared/apply-mixins2.cjs +3 -3
- package/shared/apply-mixins2.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +3 -3
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/aria-global.cjs +20 -20
- package/shared/aria-global.js +1 -1
- package/shared/base-progress.cjs +7 -8
- package/shared/base-progress.js +2 -3
- package/shared/breadcrumb-item.cjs +2 -3
- package/shared/breadcrumb-item.js +1 -2
- package/shared/button.cjs +10 -11
- package/shared/button.js +1 -2
- package/shared/calendar-event.cjs +7 -8
- package/shared/calendar-event.js +1 -2
- package/shared/children.cjs +2 -2
- package/shared/children.js +1 -1
- package/shared/definition.cjs +14 -15
- package/shared/definition.js +2 -3
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +2 -2
- package/shared/definition12.cjs +6 -6
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +13 -14
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +23 -24
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +15 -16
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +21 -21
- package/shared/definition16.js +5 -5
- package/shared/definition17.cjs +62 -61
- package/shared/definition17.js +10 -9
- package/shared/definition18.cjs +4 -4
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +12 -12
- package/shared/definition19.js +1 -1
- package/shared/definition2.cjs +6 -7
- package/shared/definition2.js +1 -2
- package/shared/definition20.cjs +20 -21
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +27 -28
- package/shared/definition21.js +3 -4
- package/shared/definition22.cjs +7 -7
- package/shared/definition22.js +3 -3
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +3 -3
- package/shared/definition25.cjs +13 -14
- package/shared/definition25.js +1 -2
- package/shared/definition26.cjs +5 -6
- package/shared/definition26.js +1 -2
- package/shared/definition27.cjs +12 -13
- package/shared/definition27.js +2 -3
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +3 -4
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +2 -3
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +2 -2
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +2 -3
- package/shared/definition34.cjs +112 -45
- package/shared/definition34.js +73 -6
- package/shared/definition35.cjs +9 -209
- package/shared/definition35.js +4 -202
- package/shared/definition36.cjs +15 -16
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +9 -9
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +10 -10
- package/shared/definition38.js +1 -1
- package/shared/definition39.cjs +12 -13
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +19 -20
- package/shared/definition4.js +2 -3
- package/shared/definition40.cjs +61 -13
- package/shared/definition40.js +52 -4
- package/shared/definition41.cjs +29 -30
- package/shared/definition41.js +1 -2
- package/shared/definition42.cjs +52 -53
- package/shared/definition42.js +3 -4
- package/shared/definition43.cjs +40 -40
- package/shared/definition43.js +6 -6
- package/shared/definition44.cjs +14 -15
- package/shared/definition44.js +1 -2
- package/shared/definition45.cjs +9 -10
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +26 -27
- package/shared/definition46.js +1 -2
- package/shared/definition47.cjs +17 -18
- package/shared/definition47.js +2 -3
- package/shared/definition48.cjs +9 -10
- package/shared/definition48.js +1 -2
- package/shared/definition49.cjs +3 -4
- package/shared/definition49.js +1 -2
- package/shared/definition5.cjs +30 -31
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +12 -13
- package/shared/definition50.js +2 -3
- package/shared/definition51.cjs +109 -72
- package/shared/definition51.js +78 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +2 -3
- package/shared/definition54.cjs +20 -21
- package/shared/definition54.js +1 -2
- package/shared/definition55.cjs +5 -5
- package/shared/definition55.js +1 -1
- package/shared/definition56.cjs +18 -19
- package/shared/definition56.js +1 -2
- package/shared/definition57.cjs +10 -11
- package/shared/definition57.js +1 -2
- package/shared/definition58.cjs +7 -8
- package/shared/definition58.js +1 -2
- package/shared/definition59.cjs +16 -17
- package/shared/definition59.js +3 -4
- package/shared/definition6.cjs +11 -12
- package/shared/definition6.js +1 -2
- package/shared/definition60.cjs +9 -10
- package/shared/definition60.js +2 -3
- package/shared/definition61.cjs +27 -30
- package/shared/definition61.js +17 -20
- package/shared/definition62.cjs +12 -9
- package/shared/definition62.js +8 -5
- package/shared/definition63.cjs +13 -14
- package/shared/definition63.js +1 -2
- package/shared/definition7.cjs +9 -10
- package/shared/definition7.js +2 -3
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +2 -3
- package/shared/definition9.cjs +7 -7
- package/shared/definition9.js +1 -1
- package/shared/form-associated.cjs +14 -14
- package/shared/form-associated.js +1 -1
- package/shared/form-associated2.cjs +10 -10
- package/shared/form-associated2.js +1 -1
- package/shared/form-elements.cjs +13 -13
- package/shared/form-elements.js +1 -1
- package/shared/foundation/progress/base-progress.d.ts +2 -2
- package/shared/foundation-element.cjs +11 -11
- package/shared/foundation-element.js +1 -1
- package/shared/key-codes2.cjs +0 -56
- package/shared/key-codes2.js +1 -53
- package/shared/listbox.cjs +15 -16
- package/shared/listbox.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/presentationDate.cjs +42 -43
- package/shared/presentationDate.js +1 -2
- package/shared/ref.cjs +2 -2
- package/shared/ref.js +1 -1
- package/shared/repeat.cjs +15 -15
- package/shared/repeat.js +1 -1
- package/shared/slider.template.cjs +4 -4
- package/shared/slider.template.js +1 -1
- package/shared/slotted.cjs +4 -4
- package/shared/slotted.js +1 -1
- package/shared/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +3 -4
- package/shared/text-anchor.template.cjs +2 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/text-field2.cjs +23 -24
- package/shared/text-field2.js +2 -3
- package/shared/vivid-element.cjs +2610 -2
- package/shared/vivid-element.js +2591 -2
- package/styles/core/all.css +40 -1
- package/styles/core/theme.css +40 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +25 -4
- package/styles/tokens/theme-light.css +25 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/text-anchor/index.cjs +3 -3
- package/text-anchor/index.js +1 -1
- package/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/listbox2.cjs +0 -1268
- package/shared/listbox2.js +0 -1265
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/shared/definition29.cjs
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const definition$1 = require('./definition63.cjs');
|
|
4
4
|
const definition = require('./definition27.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const keyCodes = require('./key-codes.cjs');
|
|
7
7
|
const affix = require('./affix.cjs');
|
|
8
|
-
const vividElement = require('./vivid-element.cjs');
|
|
9
8
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
10
9
|
const direction = require('./direction.cjs');
|
|
11
10
|
const anchored = require('./anchored.cjs');
|
|
@@ -158,7 +157,7 @@ exports.Menu = class Menu extends vividElement.VividElement {
|
|
|
158
157
|
return;
|
|
159
158
|
}
|
|
160
159
|
const newValue = !this.open;
|
|
161
|
-
|
|
160
|
+
vividElement.DOM.queueUpdate(() => this.open = newValue);
|
|
162
161
|
});
|
|
163
162
|
this._onFocusout = (e) => {
|
|
164
163
|
const focusTarget = e.relatedTarget;
|
|
@@ -181,7 +180,7 @@ exports.Menu = class Menu extends vividElement.VividElement {
|
|
|
181
180
|
*/
|
|
182
181
|
connectedCallback() {
|
|
183
182
|
super.connectedCallback();
|
|
184
|
-
|
|
183
|
+
vividElement.DOM.queueUpdate(() => {
|
|
185
184
|
this.setItems();
|
|
186
185
|
});
|
|
187
186
|
}
|
|
@@ -346,31 +345,31 @@ cleanupAnchor_fn = function(a) {
|
|
|
346
345
|
_onAnchorClick = new WeakMap();
|
|
347
346
|
exports.Menu.focusableElementRoles = roleForMenuItem;
|
|
348
347
|
__decorateClass$1([
|
|
349
|
-
|
|
348
|
+
vividElement.observable
|
|
350
349
|
], exports.Menu.prototype, "items", 2);
|
|
351
350
|
__decorateClass$1([
|
|
352
|
-
|
|
351
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
353
352
|
], exports.Menu.prototype, "ariaLabel", 2);
|
|
354
353
|
__decorateClass$1([
|
|
355
|
-
|
|
354
|
+
vividElement.attr({ mode: "fromView" })
|
|
356
355
|
], exports.Menu.prototype, "placement", 2);
|
|
357
356
|
__decorateClass$1([
|
|
358
|
-
|
|
357
|
+
vividElement.attr
|
|
359
358
|
], exports.Menu.prototype, "trigger", 2);
|
|
360
359
|
__decorateClass$1([
|
|
361
|
-
|
|
360
|
+
vividElement.attr({ mode: "boolean", attribute: "auto-dismiss" })
|
|
362
361
|
], exports.Menu.prototype, "autoDismiss", 2);
|
|
363
362
|
__decorateClass$1([
|
|
364
|
-
|
|
363
|
+
vividElement.attr({ mode: "fromView", attribute: "position-strategy" })
|
|
365
364
|
], exports.Menu.prototype, "positionStrategy", 2);
|
|
366
365
|
__decorateClass$1([
|
|
367
|
-
|
|
366
|
+
vividElement.attr({ mode: "boolean" })
|
|
368
367
|
], exports.Menu.prototype, "open", 2);
|
|
369
368
|
__decorateClass$1([
|
|
370
|
-
|
|
369
|
+
vividElement.observable
|
|
371
370
|
], exports.Menu.prototype, "headerSlottedContent", 2);
|
|
372
371
|
__decorateClass$1([
|
|
373
|
-
|
|
372
|
+
vividElement.observable
|
|
374
373
|
], exports.Menu.prototype, "actionItemsSlottedContent", 2);
|
|
375
374
|
exports.Menu = __decorateClass$1([
|
|
376
375
|
anchored.anchored
|
|
@@ -519,7 +518,7 @@ class MenuItem extends vividElement.VividElement {
|
|
|
519
518
|
*/
|
|
520
519
|
connectedCallback() {
|
|
521
520
|
super.connectedCallback();
|
|
522
|
-
|
|
521
|
+
vividElement.DOM.queueUpdate(() => {
|
|
523
522
|
this.updateSubmenu();
|
|
524
523
|
});
|
|
525
524
|
this.observer = new MutationObserver(this.updateSubmenu);
|
|
@@ -578,52 +577,52 @@ class MenuItem extends vividElement.VividElement {
|
|
|
578
577
|
}
|
|
579
578
|
}
|
|
580
579
|
__decorateClass([
|
|
581
|
-
|
|
580
|
+
vividElement.attr({ mode: "boolean" })
|
|
582
581
|
], MenuItem.prototype, "disabled");
|
|
583
582
|
__decorateClass([
|
|
584
|
-
|
|
583
|
+
vividElement.attr({ mode: "boolean" })
|
|
585
584
|
], MenuItem.prototype, "expanded");
|
|
586
585
|
__decorateClass([
|
|
587
|
-
|
|
586
|
+
vividElement.attr
|
|
588
587
|
], MenuItem.prototype, "role");
|
|
589
588
|
__decorateClass([
|
|
590
|
-
|
|
589
|
+
vividElement.attr({ mode: "boolean" })
|
|
591
590
|
], MenuItem.prototype, "checked");
|
|
592
591
|
__decorateClass([
|
|
593
|
-
|
|
592
|
+
vividElement.observable
|
|
594
593
|
], MenuItem.prototype, "submenuRegion");
|
|
595
594
|
__decorateClass([
|
|
596
|
-
|
|
595
|
+
vividElement.observable
|
|
597
596
|
], MenuItem.prototype, "hasSubmenu");
|
|
598
597
|
__decorateClass([
|
|
599
|
-
|
|
598
|
+
vividElement.observable
|
|
600
599
|
], MenuItem.prototype, "currentDirection");
|
|
601
600
|
__decorateClass([
|
|
602
|
-
|
|
601
|
+
vividElement.observable
|
|
603
602
|
], MenuItem.prototype, "submenu");
|
|
604
603
|
__decorateClass([
|
|
605
|
-
|
|
604
|
+
vividElement.attr
|
|
606
605
|
], MenuItem.prototype, "text");
|
|
607
606
|
__decorateClass([
|
|
608
|
-
|
|
607
|
+
vividElement.attr({ attribute: "text-secondary" })
|
|
609
608
|
], MenuItem.prototype, "textSecondary");
|
|
610
609
|
__decorateClass([
|
|
611
|
-
|
|
610
|
+
vividElement.attr
|
|
612
611
|
], MenuItem.prototype, "connotation");
|
|
613
612
|
__decorateClass([
|
|
614
|
-
|
|
613
|
+
vividElement.attr({ mode: "boolean", attribute: "check-trailing" })
|
|
615
614
|
], MenuItem.prototype, "checkTrailing");
|
|
616
615
|
__decorateClass([
|
|
617
|
-
|
|
616
|
+
vividElement.attr({ attribute: "check-appearance" })
|
|
618
617
|
], MenuItem.prototype, "checkedAppearance");
|
|
619
618
|
__decorateClass([
|
|
620
|
-
|
|
619
|
+
vividElement.observable
|
|
621
620
|
], MenuItem.prototype, "metaSlottedContent");
|
|
622
621
|
__decorateClass([
|
|
623
|
-
|
|
622
|
+
vividElement.observable
|
|
624
623
|
], MenuItem.prototype, "trailingMetaSlottedContent");
|
|
625
624
|
__decorateClass([
|
|
626
|
-
|
|
625
|
+
vividElement.observable
|
|
627
626
|
], MenuItem.prototype, "slottedSubmenu");
|
|
628
627
|
applyMixins.applyMixins(MenuItem, affix.AffixIcon);
|
|
629
628
|
|
|
@@ -668,22 +667,22 @@ function handleClick(x, { event }) {
|
|
|
668
667
|
}
|
|
669
668
|
function checkIndicator(context) {
|
|
670
669
|
const iconTag = context.tagFor(definition.Icon);
|
|
671
|
-
return
|
|
670
|
+
return vividElement.html`${when.when(
|
|
672
671
|
(x) => x.role === MenuItemRole.menuitemcheckbox || x.role === MenuItemRole.menuitemradio,
|
|
673
|
-
|
|
672
|
+
vividElement.html`<span class="action"><${iconTag} class="icon" name="${(x) => getIndicatorIcon(x)}"></${iconTag}></span>`
|
|
674
673
|
)}`;
|
|
675
674
|
}
|
|
676
675
|
function text() {
|
|
677
|
-
return
|
|
676
|
+
return vividElement.html`${when.when(
|
|
678
677
|
(x) => x.text || x.textSecondary,
|
|
679
|
-
|
|
678
|
+
vividElement.html`<span class="text">
|
|
680
679
|
${when.when(
|
|
681
680
|
(x) => x.text,
|
|
682
|
-
|
|
681
|
+
vividElement.html`<span class="text-primary">${(x) => x.text}</span>`
|
|
683
682
|
)}
|
|
684
683
|
${when.when(
|
|
685
684
|
(x) => x.textSecondary,
|
|
686
|
-
|
|
685
|
+
vividElement.html`<span class="text-secondary">${(x) => x.textSecondary}</span>`
|
|
687
686
|
)}
|
|
688
687
|
</span>`
|
|
689
688
|
)}`;
|
|
@@ -691,7 +690,7 @@ function text() {
|
|
|
691
690
|
const MenuItemTemplate = (context) => {
|
|
692
691
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
693
692
|
const iconTag = context.tagFor(definition.Icon);
|
|
694
|
-
return
|
|
693
|
+
return vividElement.html`
|
|
695
694
|
<template
|
|
696
695
|
role="${(x) => x.role ? x.role : MenuItemRole.menuitem}"
|
|
697
696
|
aria-haspopup="${(x) => x.hasSubmenu ? "menu" : void 0}"
|
|
@@ -708,7 +707,7 @@ const MenuItemTemplate = (context) => {
|
|
|
708
707
|
${checkIndicator(context)}
|
|
709
708
|
${when.when(
|
|
710
709
|
(x) => x.icon,
|
|
711
|
-
|
|
710
|
+
vividElement.html`<span class="decorative"
|
|
712
711
|
>${(x) => affixIconTemplate(x.icon)}</span
|
|
713
712
|
>`
|
|
714
713
|
)}
|
|
@@ -719,7 +718,7 @@ const MenuItemTemplate = (context) => {
|
|
|
719
718
|
></slot>
|
|
720
719
|
${when.when(
|
|
721
720
|
(x) => x.hasSubmenu,
|
|
722
|
-
|
|
721
|
+
vividElement.html`<${iconTag} class="chevron" name="chevron-right-line"></${iconTag}>`
|
|
723
722
|
)}
|
|
724
723
|
</div>
|
|
725
724
|
<slot
|
|
@@ -733,7 +732,7 @@ const MenuItemTemplate = (context) => {
|
|
|
733
732
|
`;
|
|
734
733
|
};
|
|
735
734
|
|
|
736
|
-
const menuItemDefinition =
|
|
735
|
+
const menuItemDefinition = vividElement.defineVividComponent(
|
|
737
736
|
"menu-item",
|
|
738
737
|
MenuItem,
|
|
739
738
|
MenuItemTemplate,
|
|
@@ -742,9 +741,9 @@ const menuItemDefinition = defineVividComponent.defineVividComponent(
|
|
|
742
741
|
styles: styles$1
|
|
743
742
|
}
|
|
744
743
|
);
|
|
745
|
-
const registerMenuItem =
|
|
744
|
+
const registerMenuItem = vividElement.createRegisterFunction(menuItemDefinition);
|
|
746
745
|
|
|
747
|
-
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;overflow:hidden auto;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);
|
|
746
|
+
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;overflow:hidden auto;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);min-inline-size:var(--menu-min-inline-size);padding-block:8px}@media not all and (width >= 600px){.base{max-inline-size:var(--menu-max-inline-size, 300px)}}@media (width >= 600px){.base{max-inline-size:var(--menu-max-inline-size)}}::slotted(a){color:var(--vvd-color-canvas-text);text-decoration:none}::slotted(a[role=menuitem]:focus-visible){box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;display:block}.header{padding-block-start:4px;padding-inline:12px}.hide-header .header{display:none}.body{display:flex;flex-direction:column;row-gap:1px}.hide-body .body{display:none}.action-items{display:flex;justify-content:flex-end;gap:8px;padding-block-end:4px;padding-inline:12px}.hide-actions .action-items{display:none}";
|
|
748
747
|
|
|
749
748
|
const getClasses = ({
|
|
750
749
|
headerSlottedContent,
|
|
@@ -769,7 +768,7 @@ const MenuTemplate = (context) => {
|
|
|
769
768
|
e.stopPropagation();
|
|
770
769
|
x.open = state;
|
|
771
770
|
}
|
|
772
|
-
return
|
|
771
|
+
return vividElement.html`
|
|
773
772
|
<template role="presentation"
|
|
774
773
|
@change="${(x, c) => x._onChange(c.event)}"
|
|
775
774
|
@focusout="${(x, c) => x._onFocusout(c.event)}">
|
|
@@ -806,7 +805,7 @@ const MenuTemplate = (context) => {
|
|
|
806
805
|
};
|
|
807
806
|
|
|
808
807
|
const menuName = "menu";
|
|
809
|
-
const menuDefinition =
|
|
808
|
+
const menuDefinition = vividElement.defineVividComponent(
|
|
810
809
|
menuName,
|
|
811
810
|
exports.Menu,
|
|
812
811
|
MenuTemplate,
|
|
@@ -815,7 +814,7 @@ const menuDefinition = defineVividComponent.defineVividComponent(
|
|
|
815
814
|
styles
|
|
816
815
|
}
|
|
817
816
|
);
|
|
818
|
-
const registerMenu =
|
|
817
|
+
const registerMenu = vividElement.createRegisterFunction(menuDefinition);
|
|
819
818
|
|
|
820
819
|
exports.MenuItem = MenuItem;
|
|
821
820
|
exports.MenuItemRole = MenuItemRole;
|
package/shared/definition29.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { P as Popup, p as popupDefinition } from './definition63.js';
|
|
2
2
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
3
|
-
import { D as DOM, o as observable, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
+
import { V as VividElement, D as DOM, o as observable, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { g as keyHome, d as keyEnd, e as keyArrowUp, f as keyArrowDown, h as keyArrowLeft, i as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
5
|
-
import {
|
|
6
|
-
import { V as VividElement } from './vivid-element.js';
|
|
5
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
7
6
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
8
7
|
import { D as Direction, g as getDirection } from './direction.js';
|
|
9
8
|
import { a as anchored, b as anchorSlotTemplateFactory } from './anchored.js';
|
|
@@ -742,7 +741,7 @@ const menuItemDefinition = defineVividComponent(
|
|
|
742
741
|
);
|
|
743
742
|
const registerMenuItem = createRegisterFunction(menuItemDefinition);
|
|
744
743
|
|
|
745
|
-
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;overflow:hidden auto;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);
|
|
744
|
+
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;overflow:hidden auto;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);min-inline-size:var(--menu-min-inline-size);padding-block:8px}@media not all and (width >= 600px){.base{max-inline-size:var(--menu-max-inline-size, 300px)}}@media (width >= 600px){.base{max-inline-size:var(--menu-max-inline-size)}}::slotted(a){color:var(--vvd-color-canvas-text);text-decoration:none}::slotted(a[role=menuitem]:focus-visible){box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;display:block}.header{padding-block-start:4px;padding-inline:12px}.hide-header .header{display:none}.body{display:flex;flex-direction:column;row-gap:1px}.hide-body .body{display:none}.action-items{display:flex;justify-content:flex-end;gap:8px;padding-block-end:4px;padding-inline:12px}.hide-actions .action-items{display:none}";
|
|
746
745
|
|
|
747
746
|
const getClasses = ({
|
|
748
747
|
headerSlottedContent,
|
package/shared/definition3.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
const classNames = require('./class-names.cjs');
|
|
6
5
|
|
|
@@ -24,21 +23,21 @@ class ActionGroup extends vividElement.VividElement {
|
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
__decorateClass([
|
|
27
|
-
|
|
26
|
+
vividElement.attr
|
|
28
27
|
], ActionGroup.prototype, "shape");
|
|
29
28
|
__decorateClass([
|
|
30
|
-
|
|
29
|
+
vividElement.attr
|
|
31
30
|
], ActionGroup.prototype, "appearance");
|
|
32
31
|
__decorateClass([
|
|
33
|
-
|
|
32
|
+
vividElement.attr({
|
|
34
33
|
mode: "boolean"
|
|
35
34
|
})
|
|
36
35
|
], ActionGroup.prototype, "tight");
|
|
37
36
|
__decorateClass([
|
|
38
|
-
|
|
37
|
+
vividElement.attr()
|
|
39
38
|
], ActionGroup.prototype, "role");
|
|
40
39
|
__decorateClass([
|
|
41
|
-
|
|
40
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
42
41
|
], ActionGroup.prototype, "ariaLabel");
|
|
43
42
|
|
|
44
43
|
const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
@@ -47,7 +46,7 @@ const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
|
47
46
|
[`shape-${shape}`, Boolean(shape)],
|
|
48
47
|
["tight", tight]
|
|
49
48
|
);
|
|
50
|
-
const ActionGroupTemplate =
|
|
49
|
+
const ActionGroupTemplate = vividElement.html`<div
|
|
51
50
|
class="${getClasses}"
|
|
52
51
|
role="${(x) => x.role ? x.role : "group"}"
|
|
53
52
|
aria-label="${(x) => x.ariaLabel}"
|
|
@@ -55,7 +54,7 @@ const ActionGroupTemplate = defineVividComponent.html`<div
|
|
|
55
54
|
<slot></slot>
|
|
56
55
|
</div>`;
|
|
57
56
|
|
|
58
|
-
const actionGroupDefinition =
|
|
57
|
+
const actionGroupDefinition = vividElement.defineVividComponent(
|
|
59
58
|
"action-group",
|
|
60
59
|
ActionGroup,
|
|
61
60
|
ActionGroupTemplate,
|
|
@@ -64,7 +63,7 @@ const actionGroupDefinition = defineVividComponent.defineVividComponent(
|
|
|
64
63
|
styles
|
|
65
64
|
}
|
|
66
65
|
);
|
|
67
|
-
const registerActionGroup =
|
|
66
|
+
const registerActionGroup = vividElement.createRegisterFunction(
|
|
68
67
|
actionGroupDefinition
|
|
69
68
|
);
|
|
70
69
|
|
package/shared/definition3.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
1
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
2
|
import { c as classNames } from './class-names.js';
|
|
4
3
|
|
|
5
4
|
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{position:relative;display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);inline-size:inherit;vertical-align:middle}.base:before{position:absolute;z-index:1;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inset:0;pointer-events:none}.base:not(.tight){padding:4px;column-gap:4px}.base:not(.shape-pill){border-radius:8px}.base.shape-pill{border-radius:24px}::slotted([role=separator]){align-self:stretch;margin-block:4px}";
|
package/shared/definition30.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixins = require('./apply-mixins.cjs');
|
|
6
6
|
const affix = require('./affix.cjs');
|
|
7
|
-
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
const ref = require('./ref.cjs');
|
|
9
8
|
const classNames = require('./class-names.cjs');
|
|
10
9
|
|
|
@@ -47,19 +46,19 @@ class NavDisclosure extends vividElement.VividElement {
|
|
|
47
46
|
#onToggle;
|
|
48
47
|
}
|
|
49
48
|
__decorateClass([
|
|
50
|
-
|
|
49
|
+
vividElement.attr
|
|
51
50
|
], NavDisclosure.prototype, "label");
|
|
52
51
|
__decorateClass([
|
|
53
|
-
|
|
52
|
+
vividElement.attr
|
|
54
53
|
], NavDisclosure.prototype, "appearance");
|
|
55
54
|
__decorateClass([
|
|
56
|
-
|
|
55
|
+
vividElement.attr
|
|
57
56
|
], NavDisclosure.prototype, "connotation");
|
|
58
57
|
__decorateClass([
|
|
59
|
-
|
|
58
|
+
vividElement.attr({ mode: "boolean" })
|
|
60
59
|
], NavDisclosure.prototype, "open");
|
|
61
60
|
__decorateClass([
|
|
62
|
-
|
|
61
|
+
vividElement.attr({ attribute: "aria-current" })
|
|
63
62
|
], NavDisclosure.prototype, "ariaCurrent");
|
|
64
63
|
applyMixins.applyMixins(NavDisclosure, affix.AffixIcon);
|
|
65
64
|
|
|
@@ -74,7 +73,7 @@ const getClasses = ({ appearance, connotation }) => classNames.classNames(
|
|
|
74
73
|
const NavDisclosureTemplate = (context) => {
|
|
75
74
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
76
75
|
const iconTag = context.tagFor(definition.Icon);
|
|
77
|
-
return
|
|
76
|
+
return vividElement.html`<details class="base" ${ref.ref("details")} ?open=${(x) => x.open}>
|
|
78
77
|
<summary class="${getClasses}"
|
|
79
78
|
role="button"
|
|
80
79
|
aria-controls="disclosure-content"
|
|
@@ -93,7 +92,7 @@ const NavDisclosureTemplate = (context) => {
|
|
|
93
92
|
`;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
|
-
const navDisclosureDefinition =
|
|
95
|
+
const navDisclosureDefinition = vividElement.defineVividComponent(
|
|
97
96
|
"nav-disclosure",
|
|
98
97
|
NavDisclosure,
|
|
99
98
|
NavDisclosureTemplate,
|
|
@@ -102,7 +101,7 @@ const navDisclosureDefinition = defineVividComponent.defineVividComponent(
|
|
|
102
101
|
styles
|
|
103
102
|
}
|
|
104
103
|
);
|
|
105
|
-
const registerNavDisclosure =
|
|
104
|
+
const registerNavDisclosure = vividElement.createRegisterFunction(
|
|
106
105
|
navDisclosureDefinition
|
|
107
106
|
);
|
|
108
107
|
|
package/shared/definition30.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
5
|
import { r as ref } from './ref.js';
|
|
7
6
|
import { c as classNames } from './class-names.js';
|
|
8
7
|
|
package/shared/definition31.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const affix = require('./affix.cjs');
|
|
6
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
7
7
|
const textAnchor = require('./text-anchor.cjs');
|
|
@@ -11,14 +11,14 @@ const styles = ".control{display:inline-flex;box-sizing:border-box;align-items:c
|
|
|
11
11
|
|
|
12
12
|
class NavItem extends textAnchor.TextAnchor {
|
|
13
13
|
getBodyTemplate() {
|
|
14
|
-
return
|
|
14
|
+
return vividElement.html`<slot name="meta"></slot>`;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
applyMixins.applyMixins(NavItem, affix.AffixIcon);
|
|
18
18
|
|
|
19
|
-
const NavItemTemplate = (context) =>
|
|
19
|
+
const NavItemTemplate = (context) => vividElement.html` ${textAnchor_template.textAnchorTemplate(context)} `;
|
|
20
20
|
|
|
21
|
-
const navItemDefinition =
|
|
21
|
+
const navItemDefinition = vividElement.defineVividComponent(
|
|
22
22
|
"nav-item",
|
|
23
23
|
NavItem,
|
|
24
24
|
NavItemTemplate,
|
|
@@ -30,7 +30,7 @@ const navItemDefinition = defineVividComponent.defineVividComponent(
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
const registerNavItem =
|
|
33
|
+
const registerNavItem = vividElement.createRegisterFunction(navItemDefinition);
|
|
34
34
|
|
|
35
35
|
exports.navItemDefinition = navItemDefinition;
|
|
36
36
|
exports.registerNavItem = registerNavItem;
|
package/shared/definition31.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
-
import {
|
|
2
|
+
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
|
+
import { b as AffixIcon } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { T as TextAnchor } from './text-anchor.js';
|
|
6
6
|
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
package/shared/definition32.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
|
|
6
5
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
@@ -8,12 +7,12 @@ const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
|
8
7
|
class Nav extends vividElement.VividElement {
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
const NavTemplate =
|
|
10
|
+
const NavTemplate = vividElement.html` <nav><slot></slot></nav> `;
|
|
12
11
|
|
|
13
|
-
const navDefinition =
|
|
12
|
+
const navDefinition = vividElement.defineVividComponent("nav", Nav, NavTemplate, [], {
|
|
14
13
|
styles
|
|
15
14
|
});
|
|
16
|
-
const registerNav =
|
|
15
|
+
const registerNav = vividElement.createRegisterFunction(navDefinition);
|
|
17
16
|
|
|
18
17
|
exports.navDefinition = navDefinition;
|
|
19
18
|
exports.registerNav = registerNav;
|
package/shared/definition32.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
1
|
+
import { V as VividElement, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
2
|
|
|
4
3
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
5
4
|
|
package/shared/definition33.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
5
4
|
const vividElement = require('./vivid-element.cjs');
|
|
6
5
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
7
6
|
const affix = require('./affix.cjs');
|
|
@@ -22,20 +21,20 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
22
21
|
class Note extends vividElement.VividElement {
|
|
23
22
|
}
|
|
24
23
|
__decorateClass([
|
|
25
|
-
|
|
24
|
+
vividElement.attr
|
|
26
25
|
], Note.prototype, "headline");
|
|
27
26
|
__decorateClass([
|
|
28
|
-
|
|
27
|
+
vividElement.attr
|
|
29
28
|
], Note.prototype, "connotation");
|
|
30
29
|
applyMixins.applyMixins(Note, affix.AffixIcon);
|
|
31
30
|
|
|
32
31
|
const getClasses = ({ connotation }) => classNames.classNames("base", `connotation-${connotation}`);
|
|
33
32
|
function getHeaderTemplate() {
|
|
34
|
-
return
|
|
33
|
+
return vividElement.html`<div class="headline">${(x) => x.headline}</div>`;
|
|
35
34
|
}
|
|
36
35
|
const NoteTemplate = (context) => {
|
|
37
36
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
38
|
-
return
|
|
37
|
+
return vividElement.html`
|
|
39
38
|
<div class="${getClasses}">
|
|
40
39
|
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
41
40
|
<div class="text">
|
|
@@ -46,7 +45,7 @@ const NoteTemplate = (context) => {
|
|
|
46
45
|
`;
|
|
47
46
|
};
|
|
48
47
|
|
|
49
|
-
const noteDefinition =
|
|
48
|
+
const noteDefinition = vividElement.defineVividComponent(
|
|
50
49
|
"note",
|
|
51
50
|
Note,
|
|
52
51
|
NoteTemplate,
|
|
@@ -55,7 +54,7 @@ const noteDefinition = defineVividComponent.defineVividComponent(
|
|
|
55
54
|
styles
|
|
56
55
|
}
|
|
57
56
|
);
|
|
58
|
-
const registerNote =
|
|
57
|
+
const registerNote = vividElement.createRegisterFunction(noteDefinition);
|
|
59
58
|
|
|
60
59
|
exports.noteDefinition = noteDefinition;
|
|
61
60
|
exports.registerNote = registerNote;
|
package/shared/definition33.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
-
import { V as VividElement } from './vivid-element.js';
|
|
2
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
3
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
5
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
5
|
import { w as when } from './when.js';
|
|
7
6
|
import { c as classNames } from './class-names.js';
|
|
8
7
|
|