@vonage/vivid 3.51.0 → 3.52.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/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/appearance-ui/index.cjs +19 -11
- package/appearance-ui/index.js +19 -11
- package/audio-player/index.cjs +2 -1
- package/audio-player/index.js +2 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/combobox/index.cjs +2 -5
- package/combobox/index.js +2 -5
- package/custom-elements.json +1357 -529
- package/date-picker/index.cjs +3 -6
- package/date-picker/index.js +3 -6
- package/date-range-picker/index.cjs +2 -5
- package/date-range-picker/index.js +2 -5
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/file-picker/index.cjs +0 -2
- package/file-picker/index.js +0 -2
- package/header/index.cjs +1 -1
- package/header/index.js +1 -1
- package/index.cjs +60 -58
- package/index.js +22 -23
- package/lib/avatar/definition.d.ts +1 -1
- package/lib/button/button.d.ts +1 -0
- package/lib/button/definition.d.ts +1 -1
- package/lib/calendar-event/definition.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/layout/definition.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +3 -0
- package/lib/range-slider/definition.d.ts +3 -0
- package/lib/range-slider/locale.d.ts +4 -0
- package/lib/range-slider/range-slider.d.ts +32 -0
- package/lib/range-slider/range-slider.form-associated.d.ts +10 -0
- package/lib/range-slider/range-slider.template.d.ts +4 -0
- package/lib/range-slider/utils/lerp.d.ts +2 -0
- package/lib/range-slider/utils/roundToStepValue.d.ts +1 -0
- package/lib/slider/slider.template.d.ts +1 -0
- package/lib/split-button/definition.d.ts +1 -1
- package/listbox/index.cjs +23 -22
- package/listbox/index.js +23 -22
- package/locales/en-GB.cjs +4 -0
- package/locales/en-GB.js +4 -0
- package/locales/en-US.cjs +4 -0
- package/locales/en-US.js +4 -0
- package/locales/ja-JP.cjs +5 -1
- package/locales/ja-JP.js +5 -1
- package/locales/zh-CN.cjs +4 -0
- package/locales/zh-CN.js +4 -0
- package/menu/index.cjs +3 -3
- package/menu/index.js +3 -3
- package/menu-item/index.cjs +2 -2
- package/menu-item/index.js +2 -2
- package/number-field/index.cjs +0 -2
- package/number-field/index.js +0 -2
- package/package.json +34 -34
- package/popup/index.cjs +2 -2
- package/popup/index.js +2 -2
- package/range-slider/index.cjs +22 -0
- package/range-slider/index.js +20 -0
- package/select/index.cjs +3 -3
- package/select/index.js +3 -3
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/Reflector.cjs +5 -1
- package/shared/Reflector.js +5 -1
- package/shared/affix.cjs +11 -4
- package/shared/affix.js +12 -4
- package/shared/anchored.cjs +8 -2
- package/shared/anchored.js +8 -2
- package/shared/definition.cjs +8 -3
- package/shared/definition.js +8 -3
- package/shared/definition10.cjs +5 -5
- package/shared/definition10.js +5 -5
- package/shared/definition11.cjs +75 -47
- package/shared/definition11.js +76 -48
- package/shared/definition12.cjs +12 -14
- package/shared/definition12.js +12 -14
- package/shared/definition13.cjs +118 -75
- package/shared/definition13.js +118 -75
- package/shared/definition14.cjs +33 -32
- package/shared/definition14.js +33 -32
- package/shared/definition15.cjs +20 -7
- package/shared/definition15.js +20 -7
- package/shared/definition16.cjs +37 -42
- package/shared/definition16.js +36 -41
- package/shared/definition17.cjs +125 -65
- package/shared/definition17.js +126 -66
- package/shared/definition18.cjs +30 -14
- package/shared/definition18.js +30 -14
- package/shared/definition19.cjs +116 -80
- package/shared/definition19.js +116 -80
- package/shared/definition2.cjs +10 -5
- package/shared/definition2.js +10 -5
- package/shared/definition20.cjs +16 -15
- package/shared/definition20.js +16 -15
- package/shared/definition21.cjs +6 -10
- package/shared/definition21.js +6 -10
- package/shared/definition22.cjs +14 -18
- package/shared/definition22.js +14 -18
- package/shared/definition23.cjs +34 -35
- package/shared/definition23.js +34 -35
- package/shared/definition24.cjs +116 -69
- package/shared/definition24.js +116 -69
- package/shared/definition25.cjs +2 -4
- package/shared/definition25.js +2 -4
- package/shared/definition26.cjs +9 -8
- package/shared/definition26.js +9 -8
- package/shared/definition27.cjs +7 -5
- package/shared/definition27.js +7 -5
- package/shared/definition28.cjs +209 -143
- package/shared/definition28.js +209 -143
- package/shared/definition29.cjs +10 -4
- package/shared/definition29.js +10 -4
- package/shared/definition3.cjs +7 -10
- package/shared/definition3.js +7 -10
- package/shared/definition30.cjs +7 -5
- package/shared/definition30.js +7 -5
- package/shared/definition31.cjs +2 -4
- package/shared/definition31.js +2 -4
- package/shared/definition32.cjs +1 -3
- package/shared/definition32.js +1 -3
- package/shared/definition33.cjs +7 -10
- package/shared/definition33.js +7 -10
- package/shared/definition34.cjs +76 -59
- package/shared/definition34.js +76 -59
- package/shared/definition35.cjs +19 -20
- package/shared/definition35.js +19 -20
- package/shared/definition36.cjs +30 -14
- package/shared/definition36.js +30 -14
- package/shared/definition37.cjs +33 -46
- package/shared/definition37.js +33 -46
- package/shared/definition38.cjs +31 -33
- package/shared/definition38.js +31 -33
- package/shared/definition39.cjs +13 -4
- package/shared/definition39.js +13 -4
- package/shared/definition4.cjs +23 -11
- package/shared/definition4.js +23 -11
- package/shared/definition40.cjs +19 -14
- package/shared/definition40.js +19 -14
- package/shared/definition41.cjs +534 -635
- package/shared/definition41.js +534 -635
- package/shared/definition42.cjs +674 -106
- package/shared/definition42.js +673 -105
- package/shared/definition43.cjs +122 -79
- package/shared/definition43.js +120 -77
- package/shared/definition44.cjs +72 -567
- package/shared/definition44.js +71 -565
- package/shared/definition45.cjs +520 -118
- package/shared/definition45.js +518 -117
- package/shared/definition46.cjs +117 -130
- package/shared/definition46.js +116 -129
- package/shared/definition47.cjs +152 -18
- package/shared/definition47.js +151 -17
- package/shared/definition48.cjs +20 -77
- package/shared/definition48.js +19 -76
- package/shared/definition49.cjs +52 -495
- package/shared/definition49.js +51 -494
- package/shared/definition5.cjs +20 -17
- package/shared/definition5.js +20 -17
- package/shared/definition50.cjs +525 -24
- package/shared/definition50.js +524 -23
- package/shared/definition51.cjs +28 -119
- package/shared/definition51.js +26 -118
- package/shared/definition52.cjs +113 -266
- package/shared/definition52.js +113 -265
- package/shared/definition53.cjs +285 -245
- package/shared/definition53.js +285 -245
- package/shared/definition54.cjs +285 -751
- package/shared/definition54.js +284 -750
- package/shared/definition55.cjs +828 -99
- package/shared/definition55.js +827 -98
- package/shared/definition56.cjs +126 -77
- package/shared/definition56.js +125 -76
- package/shared/definition57.cjs +125 -71
- package/shared/definition57.js +124 -70
- package/shared/definition58.cjs +73 -287
- package/shared/definition58.js +74 -288
- package/shared/definition59.cjs +298 -40
- package/shared/definition59.js +297 -39
- package/shared/definition6.cjs +3 -4
- package/shared/definition6.js +3 -4
- package/shared/definition60.cjs +24 -1784
- package/shared/definition60.js +23 -1783
- package/shared/definition61.cjs +1819 -11
- package/shared/definition61.js +1818 -11
- package/shared/definition7.cjs +6 -4
- package/shared/definition7.js +6 -4
- package/shared/definition8.cjs +25 -18
- package/shared/definition8.js +25 -18
- package/shared/definition9.cjs +6 -9
- package/shared/definition9.js +6 -9
- package/shared/icon.cjs +7 -2
- package/shared/icon.js +7 -2
- package/shared/index2.cjs +1 -1
- package/shared/index2.js +1 -1
- package/shared/key-codes2.cjs +8 -0
- package/shared/key-codes2.js +5 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/index.d.ts +0 -1
- package/shared/presentationDate.cjs +126 -78
- package/shared/presentationDate.js +126 -78
- package/shared/slider.template.cjs +71 -0
- package/shared/slider.template.js +67 -0
- package/shared/text-anchor.template.cjs +30 -35
- package/shared/text-anchor.template.js +30 -35
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +2 -1
- package/slider/index.js +2 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/fonts/spezia-variable.css +39 -13
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +4 -2
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +3 -3
- package/tabs/index.js +3 -3
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -4
- package/text-field/index.js +1 -4
- package/time-picker/index.cjs +4 -7
- package/time-picker/index.js +4 -7
- package/toggletip/index.cjs +3 -3
- package/toggletip/index.js +3 -3
- package/tooltip/index.cjs +3 -3
- package/tooltip/index.js +3 -3
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/vivid.api.json +117 -1
- package/focus/index.cjs +0 -7
- package/focus/index.js +0 -5
- package/lib/focus/definition.d.ts +0 -3
- package/lib/focus/focus.d.ts +0 -3
- package/lib/focus/focus.template.d.ts +0 -4
- package/lib/popup/popup.d.ts +0 -21
- package/shared/focus.cjs +0 -8
- package/shared/focus.js +0 -6
- package/shared/focus2.cjs +0 -11
- package/shared/focus2.js +0 -9
- package/shared/patterns/focus.d.ts +0 -3
package/shared/definition28.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, o as observable, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { a as iconRegistries } from './definition26.js';
|
|
3
3
|
import { A as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as anchored } from './anchored.js';
|
|
5
5
|
import { S as StartEnd } from './start-end.js';
|
|
6
6
|
import { D as Direction, g as getDirection } from './direction.js';
|
|
7
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
7
8
|
import { i as keyArrowLeft, h as keyArrowRight, a as keySpace, k as keyEnter, g as keyHome, d as keyEnd, e as keyArrowUp, f as keyArrowDown } from './key-codes.js';
|
|
8
|
-
import { I as Icon } from './icon.js';
|
|
9
|
-
import { b as anchored } from './anchored.js';
|
|
10
9
|
import { i as isHTMLElement } from './dom.js';
|
|
10
|
+
import { I as Icon } from './icon.js';
|
|
11
11
|
import { s as slotted, e as elements } from './slotted.js';
|
|
12
12
|
import { w as when } from './when.js';
|
|
13
13
|
import { c as classNames } from './class-names.js';
|
|
@@ -568,7 +568,7 @@ __decorate([
|
|
|
568
568
|
observable
|
|
569
569
|
], Menu$1.prototype, "items", void 0);
|
|
570
570
|
|
|
571
|
-
const styles = ":host(:focus-visible){outline:none}:host([disabled]){pointer-events:none}.base{display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);
|
|
571
|
+
const styles = ":host(:focus-visible){outline:none}:host([disabled]){pointer-events:none}.base{display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);inline-size:100%}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base.connotation-cta{--_connotation-color-primary: var(--vvd-menu-item-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-menu-item-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-menu-item-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-firm: var(--vvd-menu-item-cta-firm, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-menu-item-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-menu-item-cta-soft, var(--vvd-color-cta-100));--_connotation-color-pale: var(--vvd-menu-item-cta-pale, var(--vvd-color-cta-300));--_connotation-color-dim: var(--vvd-menu-item-cta-dim, var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-menu-item-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-menu-item-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-menu-item-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-menu-item-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-menu-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-menu-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-menu-item-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-menu-item-accent-dim, var(--vvd-color-neutral-200))}.base:not(.two-lines){gap:12px;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-block:8px;padding-inline:12px}.base.two-lines{padding:12px;gap:16px;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)) + 1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}:host(:not([role=presentation]):focus-visible) .base{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;border-radius:8px}.icon{flex-shrink:0;font-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2);line-height:1}.action,.decorative{display:flex;place-content:center}.action{color:var(--_appearance-color-text)}:host(:not([check-appearance],[aria-checked=true])) .action{color:var(--vvd-color-neutral-500)}.base.trailing .action,.base.has-meta .action{order:2}.base:not(.disabled) .decorative{color:var(--vvd-color-neutral-600)}.base.disabled .decorative{color:var(--vvd-color-neutral-200)}.base.has-meta .decorative{order:1}.chevron{order:3}.text{display:flex;overflow:hidden;flex-direction:column;gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base);-webkit-line-clamp:var(--text-primary-line-clamp, 1)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{font:var(--vvd-typography-base-condensed);-webkit-line-clamp:var(--text-secondary-line-clamp, 1)}.base.two-lines:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-600)}.base.two-lines:not(.disabled).selected .text-secondary{color:var(--vvd-color-neutral-800)}\n";
|
|
572
572
|
|
|
573
573
|
var __defProp$1 = Object.defineProperty;
|
|
574
574
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
@@ -581,109 +581,61 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
581
581
|
__defProp$1(target, key, result);
|
|
582
582
|
return result;
|
|
583
583
|
};
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
584
|
+
var __accessCheck = (obj, member, msg) => {
|
|
585
|
+
if (!member.has(obj))
|
|
586
|
+
throw TypeError("Cannot " + msg);
|
|
587
587
|
};
|
|
588
|
-
var
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
return CheckAppearance2;
|
|
592
|
-
})(CheckAppearance || {});
|
|
593
|
-
class MenuItem extends MenuItem$1 {
|
|
594
|
-
constructor() {
|
|
595
|
-
super();
|
|
596
|
-
this.checkTrailing = false;
|
|
597
|
-
this.#submenuArray = [];
|
|
598
|
-
this.updateSubmenu = () => this.#updateSubmenu();
|
|
599
|
-
this.addEventListener("expanded-change", this.#expandedChange);
|
|
600
|
-
}
|
|
601
|
-
#submenuArray;
|
|
602
|
-
/**
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
* @internal
|
|
606
|
-
*/
|
|
607
|
-
slottedSubmenuChanged(_oldValue, newValue) {
|
|
608
|
-
this.#submenuArray = newValue;
|
|
609
|
-
}
|
|
610
|
-
#updateSubmenu() {
|
|
611
|
-
for (const submenu of this.#submenuArray) {
|
|
612
|
-
this.submenu = submenu;
|
|
613
|
-
this.submenu.anchor = this;
|
|
614
|
-
this.submenu.placement = "right-start";
|
|
615
|
-
this.submenu.collapseExpandedItem = () => this.#collapseExpandedItem();
|
|
616
|
-
}
|
|
617
|
-
this.hasSubmenu = this.submenu === void 0 ? false : true;
|
|
618
|
-
}
|
|
619
|
-
#collapseExpandedItem() {
|
|
620
|
-
this.expanded = false;
|
|
621
|
-
}
|
|
622
|
-
#expandedChange() {
|
|
623
|
-
if (this.hasSubmenu) {
|
|
624
|
-
this.submenu.open = this.expanded;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
__decorateClass$1([
|
|
629
|
-
attr
|
|
630
|
-
], MenuItem.prototype, "text", 2);
|
|
631
|
-
__decorateClass$1([
|
|
632
|
-
attr({ attribute: "text-secondary" })
|
|
633
|
-
], MenuItem.prototype, "textSecondary", 2);
|
|
634
|
-
__decorateClass$1([
|
|
635
|
-
attr({ mode: "boolean", attribute: "check-trailing" })
|
|
636
|
-
], MenuItem.prototype, "checkTrailing", 2);
|
|
637
|
-
__decorateClass$1([
|
|
638
|
-
attr({ attribute: "check-appearance" })
|
|
639
|
-
], MenuItem.prototype, "checkedAppearance", 2);
|
|
640
|
-
__decorateClass$1([
|
|
641
|
-
observable
|
|
642
|
-
], MenuItem.prototype, "metaSlottedContent", 2);
|
|
643
|
-
__decorateClass$1([
|
|
644
|
-
observable
|
|
645
|
-
], MenuItem.prototype, "trailingMetaSlottedContent", 2);
|
|
646
|
-
__decorateClass$1([
|
|
647
|
-
observable
|
|
648
|
-
], MenuItem.prototype, "slottedSubmenu", 2);
|
|
649
|
-
applyMixins(MenuItem, AffixIcon);
|
|
650
|
-
|
|
651
|
-
var __defProp = Object.defineProperty;
|
|
652
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
653
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
654
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
655
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
656
|
-
if (decorator = decorators[i])
|
|
657
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
658
|
-
if (kind && result)
|
|
659
|
-
__defProp(target, key, result);
|
|
660
|
-
return result;
|
|
588
|
+
var __privateGet = (obj, member, getter) => {
|
|
589
|
+
__accessCheck(obj, member, "read from private field");
|
|
590
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
661
591
|
};
|
|
592
|
+
var __privateAdd = (obj, member, value) => {
|
|
593
|
+
if (member.has(obj))
|
|
594
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
595
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
596
|
+
};
|
|
597
|
+
var __privateMethod = (obj, member, method) => {
|
|
598
|
+
__accessCheck(obj, member, "access private method");
|
|
599
|
+
return method;
|
|
600
|
+
};
|
|
601
|
+
var _setupAnchor, setupAnchor_fn, _updateAnchor, updateAnchor_fn, _cleanupAnchor, cleanupAnchor_fn, _openIfClosed, _updateClickOutsideListeners, _wasOpenBeforeClick, _onClickOutsideCapture, _onClickOutside;
|
|
662
602
|
let Menu = class extends Menu$1 {
|
|
663
603
|
constructor() {
|
|
664
604
|
super();
|
|
605
|
+
__privateAdd(this, _setupAnchor);
|
|
606
|
+
__privateAdd(this, _updateAnchor);
|
|
607
|
+
__privateAdd(this, _cleanupAnchor);
|
|
665
608
|
this.ariaLabel = null;
|
|
666
609
|
this.placement = "bottom";
|
|
667
610
|
this.autoDismiss = false;
|
|
668
611
|
this.open = false;
|
|
669
|
-
this
|
|
612
|
+
__privateAdd(this, _openIfClosed, () => {
|
|
670
613
|
if (!this.open)
|
|
671
614
|
DOM.queueUpdate(() => this.open = true);
|
|
672
|
-
};
|
|
673
|
-
this
|
|
674
|
-
document.removeEventListener("click", this
|
|
615
|
+
});
|
|
616
|
+
__privateAdd(this, _updateClickOutsideListeners, () => {
|
|
617
|
+
document.removeEventListener("click", __privateGet(this, _onClickOutsideCapture), true);
|
|
618
|
+
document.removeEventListener("click", __privateGet(this, _onClickOutside));
|
|
675
619
|
if (this.autoDismiss && this.isConnected) {
|
|
676
|
-
document.addEventListener("click", this
|
|
620
|
+
document.addEventListener("click", __privateGet(this, _onClickOutsideCapture), true);
|
|
621
|
+
document.addEventListener("click", __privateGet(this, _onClickOutside));
|
|
677
622
|
}
|
|
678
|
-
};
|
|
679
|
-
this
|
|
680
|
-
|
|
623
|
+
});
|
|
624
|
+
__privateAdd(this, _wasOpenBeforeClick, /* @__PURE__ */ new WeakMap());
|
|
625
|
+
__privateAdd(this, _onClickOutsideCapture, (e) => {
|
|
626
|
+
__privateGet(this, _wasOpenBeforeClick).set(e, this.open);
|
|
627
|
+
});
|
|
628
|
+
__privateAdd(this, _onClickOutside, (e) => {
|
|
629
|
+
if (!this.contains(e.target) && __privateGet(this, _wasOpenBeforeClick).get(e)) {
|
|
681
630
|
this.open = false;
|
|
682
|
-
|
|
631
|
+
}
|
|
632
|
+
});
|
|
683
633
|
const handleFocusOut = this.handleFocusOut;
|
|
684
634
|
this.handleFocusOut = (e) => {
|
|
685
635
|
const privates = this;
|
|
686
|
-
const isSafeToCallSuper = privates.menuItems.some(
|
|
636
|
+
const isSafeToCallSuper = privates.menuItems.some(
|
|
637
|
+
privates.isFocusableElement
|
|
638
|
+
);
|
|
687
639
|
if (!isSafeToCallSuper) {
|
|
688
640
|
return;
|
|
689
641
|
}
|
|
@@ -693,70 +645,156 @@ let Menu = class extends Menu$1 {
|
|
|
693
645
|
autoDismissChanged(oldValue) {
|
|
694
646
|
if (oldValue === void 0)
|
|
695
647
|
return;
|
|
696
|
-
this
|
|
648
|
+
__privateGet(this, _updateClickOutsideListeners).call(this);
|
|
697
649
|
}
|
|
698
650
|
openChanged(_, newValue) {
|
|
699
651
|
newValue ? this.$emit("open", void 0, { bubbles: false }) : this.$emit("close", void 0, { bubbles: false });
|
|
700
652
|
if (this._anchorEl) {
|
|
701
|
-
this
|
|
653
|
+
__privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, this._anchorEl);
|
|
702
654
|
}
|
|
703
655
|
}
|
|
704
656
|
connectedCallback() {
|
|
705
657
|
super.connectedCallback();
|
|
706
|
-
this
|
|
658
|
+
__privateGet(this, _updateClickOutsideListeners).call(this);
|
|
707
659
|
}
|
|
708
660
|
disconnectedCallback() {
|
|
709
661
|
super.disconnectedCallback();
|
|
710
|
-
this
|
|
662
|
+
__privateGet(this, _updateClickOutsideListeners).call(this);
|
|
711
663
|
}
|
|
712
664
|
/**
|
|
713
665
|
* @internal
|
|
714
666
|
*/
|
|
715
667
|
_anchorElChanged(oldValue, newValue) {
|
|
716
668
|
if (oldValue)
|
|
717
|
-
this
|
|
669
|
+
__privateMethod(this, _cleanupAnchor, cleanupAnchor_fn).call(this, oldValue);
|
|
718
670
|
if (newValue)
|
|
719
|
-
this
|
|
671
|
+
__privateMethod(this, _setupAnchor, setupAnchor_fn).call(this, newValue);
|
|
720
672
|
}
|
|
721
|
-
#setupAnchor(a) {
|
|
722
|
-
a.addEventListener("click", this.#openIfClosed, true);
|
|
723
|
-
a.setAttribute("aria-haspopup", "menu");
|
|
724
|
-
this.#updateAnchor(a);
|
|
725
|
-
}
|
|
726
|
-
#updateAnchor(a) {
|
|
727
|
-
a.setAttribute("aria-expanded", this.open.toString());
|
|
728
|
-
}
|
|
729
|
-
#cleanupAnchor(a) {
|
|
730
|
-
a.removeEventListener("click", this.#openIfClosed, true);
|
|
731
|
-
a.removeAttribute("aria-hasPopup");
|
|
732
|
-
a.removeAttribute("aria-expanded");
|
|
733
|
-
}
|
|
734
|
-
#openIfClosed;
|
|
735
|
-
#updateClickOutsideListener;
|
|
736
|
-
#closeOnClickOutside;
|
|
737
673
|
};
|
|
738
|
-
|
|
674
|
+
_setupAnchor = new WeakSet();
|
|
675
|
+
setupAnchor_fn = function(a) {
|
|
676
|
+
a.addEventListener("click", __privateGet(this, _openIfClosed), true);
|
|
677
|
+
a.setAttribute("aria-haspopup", "menu");
|
|
678
|
+
__privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, a);
|
|
679
|
+
};
|
|
680
|
+
_updateAnchor = new WeakSet();
|
|
681
|
+
updateAnchor_fn = function(a) {
|
|
682
|
+
a.setAttribute("aria-expanded", this.open.toString());
|
|
683
|
+
};
|
|
684
|
+
_cleanupAnchor = new WeakSet();
|
|
685
|
+
cleanupAnchor_fn = function(a) {
|
|
686
|
+
a.removeEventListener("click", __privateGet(this, _openIfClosed), true);
|
|
687
|
+
a.removeAttribute("aria-hasPopup");
|
|
688
|
+
a.removeAttribute("aria-expanded");
|
|
689
|
+
};
|
|
690
|
+
_openIfClosed = new WeakMap();
|
|
691
|
+
_updateClickOutsideListeners = new WeakMap();
|
|
692
|
+
_wasOpenBeforeClick = new WeakMap();
|
|
693
|
+
_onClickOutsideCapture = new WeakMap();
|
|
694
|
+
_onClickOutside = new WeakMap();
|
|
695
|
+
__decorateClass$1([
|
|
739
696
|
attr({ attribute: "aria-label" })
|
|
740
697
|
], Menu.prototype, "ariaLabel", 2);
|
|
741
|
-
__decorateClass([
|
|
698
|
+
__decorateClass$1([
|
|
742
699
|
attr({ mode: "fromView" })
|
|
743
700
|
], Menu.prototype, "placement", 2);
|
|
744
|
-
__decorateClass([
|
|
701
|
+
__decorateClass$1([
|
|
745
702
|
attr({ mode: "boolean", attribute: "auto-dismiss" })
|
|
746
703
|
], Menu.prototype, "autoDismiss", 2);
|
|
747
|
-
__decorateClass([
|
|
704
|
+
__decorateClass$1([
|
|
748
705
|
attr({ mode: "boolean" })
|
|
749
706
|
], Menu.prototype, "open", 2);
|
|
750
|
-
__decorateClass([
|
|
707
|
+
__decorateClass$1([
|
|
751
708
|
observable
|
|
752
709
|
], Menu.prototype, "headerSlottedContent", 2);
|
|
753
|
-
__decorateClass([
|
|
710
|
+
__decorateClass$1([
|
|
754
711
|
observable
|
|
755
712
|
], Menu.prototype, "actionItemsSlottedContent", 2);
|
|
756
|
-
Menu = __decorateClass([
|
|
713
|
+
Menu = __decorateClass$1([
|
|
757
714
|
anchored
|
|
758
715
|
], Menu);
|
|
759
716
|
|
|
717
|
+
var __defProp = Object.defineProperty;
|
|
718
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
719
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
720
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
721
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
722
|
+
if (decorator = decorators[i])
|
|
723
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
724
|
+
if (kind && result)
|
|
725
|
+
__defProp(target, key, result);
|
|
726
|
+
return result;
|
|
727
|
+
};
|
|
728
|
+
const MenuItemRole = {
|
|
729
|
+
...MenuItemRole$1,
|
|
730
|
+
presentation: "presentation"
|
|
731
|
+
};
|
|
732
|
+
var CheckAppearance = /* @__PURE__ */ ((CheckAppearance2) => {
|
|
733
|
+
CheckAppearance2["Normal"] = "normal";
|
|
734
|
+
CheckAppearance2["TickOnly"] = "tick-only";
|
|
735
|
+
return CheckAppearance2;
|
|
736
|
+
})(CheckAppearance || {});
|
|
737
|
+
class MenuItem extends MenuItem$1 {
|
|
738
|
+
constructor() {
|
|
739
|
+
super();
|
|
740
|
+
this.checkTrailing = false;
|
|
741
|
+
this.#submenuArray = [];
|
|
742
|
+
this.updateSubmenu = () => this.#updateSubmenu();
|
|
743
|
+
this.addEventListener("expanded-change", this.#expandedChange);
|
|
744
|
+
}
|
|
745
|
+
#submenuArray;
|
|
746
|
+
/**
|
|
747
|
+
*
|
|
748
|
+
*
|
|
749
|
+
* @internal
|
|
750
|
+
*/
|
|
751
|
+
slottedSubmenuChanged(_oldValue, newValue) {
|
|
752
|
+
this.#submenuArray = newValue;
|
|
753
|
+
}
|
|
754
|
+
#updateSubmenu() {
|
|
755
|
+
for (const submenu of this.#submenuArray) {
|
|
756
|
+
this.submenu = submenu;
|
|
757
|
+
this.submenu.anchor = this;
|
|
758
|
+
this.submenu.placement = "right-start";
|
|
759
|
+
this.submenu.collapseExpandedItem = () => this.#collapseExpandedItem();
|
|
760
|
+
}
|
|
761
|
+
this.hasSubmenu = this.submenu === void 0 ? false : true;
|
|
762
|
+
}
|
|
763
|
+
#collapseExpandedItem() {
|
|
764
|
+
this.expanded = false;
|
|
765
|
+
}
|
|
766
|
+
#expandedChange() {
|
|
767
|
+
if (this.hasSubmenu) {
|
|
768
|
+
this.submenu.open = this.expanded;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
__decorateClass([
|
|
773
|
+
attr
|
|
774
|
+
], MenuItem.prototype, "text", 2);
|
|
775
|
+
__decorateClass([
|
|
776
|
+
attr({ attribute: "text-secondary" })
|
|
777
|
+
], MenuItem.prototype, "textSecondary", 2);
|
|
778
|
+
__decorateClass([
|
|
779
|
+
attr
|
|
780
|
+
], MenuItem.prototype, "connotation", 2);
|
|
781
|
+
__decorateClass([
|
|
782
|
+
attr({ mode: "boolean", attribute: "check-trailing" })
|
|
783
|
+
], MenuItem.prototype, "checkTrailing", 2);
|
|
784
|
+
__decorateClass([
|
|
785
|
+
attr({ attribute: "check-appearance" })
|
|
786
|
+
], MenuItem.prototype, "checkedAppearance", 2);
|
|
787
|
+
__decorateClass([
|
|
788
|
+
observable
|
|
789
|
+
], MenuItem.prototype, "metaSlottedContent", 2);
|
|
790
|
+
__decorateClass([
|
|
791
|
+
observable
|
|
792
|
+
], MenuItem.prototype, "trailingMetaSlottedContent", 2);
|
|
793
|
+
__decorateClass([
|
|
794
|
+
observable
|
|
795
|
+
], MenuItem.prototype, "slottedSubmenu", 2);
|
|
796
|
+
applyMixins(MenuItem, AffixIcon);
|
|
797
|
+
|
|
760
798
|
const getIndicatorIcon = (x) => {
|
|
761
799
|
if (x.checkedAppearance === CheckAppearance.TickOnly) {
|
|
762
800
|
return x.checked ? "check-line" : "";
|
|
@@ -766,6 +804,7 @@ const getIndicatorIcon = (x) => {
|
|
|
766
804
|
return `${iconType}-${iconStatus}-2-line`;
|
|
767
805
|
};
|
|
768
806
|
const getClasses = ({
|
|
807
|
+
connotation,
|
|
769
808
|
disabled,
|
|
770
809
|
checked,
|
|
771
810
|
role,
|
|
@@ -776,9 +815,13 @@ const getClasses = ({
|
|
|
776
815
|
checkTrailing
|
|
777
816
|
}) => classNames(
|
|
778
817
|
"base",
|
|
818
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
779
819
|
["disabled", Boolean(disabled)],
|
|
780
820
|
["selected", role !== MenuItemRole.menuitem && Boolean(checked)],
|
|
781
|
-
[
|
|
821
|
+
[
|
|
822
|
+
"trailing",
|
|
823
|
+
role !== MenuItemRole.menuitem && (checkTrailing || Boolean(icon))
|
|
824
|
+
],
|
|
782
825
|
["item-checkbox", role === MenuItemRole.menuitemcheckbox],
|
|
783
826
|
["item-radio", role === MenuItemRole.menuitemradio],
|
|
784
827
|
["two-lines", Boolean(text2?.length) && Boolean(textSecondary?.length)],
|
|
@@ -799,8 +842,14 @@ function text() {
|
|
|
799
842
|
return html`${when(
|
|
800
843
|
(x) => x.text || x.textSecondary,
|
|
801
844
|
html`<span class="text">
|
|
802
|
-
${when(
|
|
803
|
-
|
|
845
|
+
${when(
|
|
846
|
+
(x) => x.text,
|
|
847
|
+
html`<span class="text-primary">${(x) => x.text}</span>`
|
|
848
|
+
)}
|
|
849
|
+
${when(
|
|
850
|
+
(x) => x.textSecondary,
|
|
851
|
+
html`<span class="text-secondary">${(x) => x.textSecondary}</span>`
|
|
852
|
+
)}
|
|
804
853
|
</span>`
|
|
805
854
|
)}`;
|
|
806
855
|
}
|
|
@@ -808,27 +857,44 @@ const MenuItemTemplate = (context) => {
|
|
|
808
857
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
809
858
|
const iconTag = context.tagFor(Icon);
|
|
810
859
|
return html`
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
860
|
+
<template
|
|
861
|
+
role="${(x) => x.role ? x.role : MenuItemRole.menuitem}"
|
|
862
|
+
aria-haspopup="${(x) => x.hasSubmenu ? "menu" : void 0}"
|
|
863
|
+
aria-checked="${(x) => x.role !== MenuItemRole.menuitem ? x.checked : void 0}"
|
|
864
|
+
aria-disabled="${(x) => x.disabled}"
|
|
865
|
+
aria-expanded="${(x) => x.expanded}"
|
|
866
|
+
@keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}"
|
|
867
|
+
@click="${handleClick}"
|
|
868
|
+
@mouseover="${(x, c) => x.handleMouseOver(c.event)}"
|
|
869
|
+
@mouseout="${(x, c) => x.handleMouseOut(c.event)}"
|
|
870
|
+
>
|
|
871
|
+
<div class="${getClasses}">
|
|
872
|
+
<slot name="meta" ${slotted("metaSlottedContent")}></slot>
|
|
873
|
+
${checkIndicator(context)}
|
|
874
|
+
${when(
|
|
875
|
+
(x) => x.icon,
|
|
876
|
+
html`<span class="decorative"
|
|
877
|
+
>${(x) => affixIconTemplate(x.icon)}</span
|
|
878
|
+
>`
|
|
879
|
+
)}
|
|
880
|
+
${text()}
|
|
881
|
+
<slot
|
|
882
|
+
name="trailing-meta"
|
|
883
|
+
${slotted("trailingMetaSlottedContent")}
|
|
884
|
+
></slot>
|
|
885
|
+
${when(
|
|
886
|
+
(x) => x.hasSubmenu,
|
|
887
|
+
html`<${iconTag} class="chevron" name="chevron-right-line"></${iconTag}>`
|
|
888
|
+
)}
|
|
889
|
+
</div>
|
|
890
|
+
<slot
|
|
891
|
+
name="submenu"
|
|
892
|
+
${slotted({
|
|
893
|
+
property: "slottedSubmenu",
|
|
894
|
+
filter: elements(context.tagFor(Menu))
|
|
895
|
+
})}
|
|
896
|
+
></slot>
|
|
897
|
+
</template>
|
|
832
898
|
`;
|
|
833
899
|
};
|
|
834
900
|
|
package/shared/definition29.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const definition = require('./
|
|
4
|
+
const definition = require('./definition61.cjs');
|
|
5
5
|
const definition$1 = require('./definition28.cjs');
|
|
6
6
|
const anchored = require('./anchored.cjs');
|
|
7
7
|
const slotted = require('./slotted.cjs');
|
|
8
8
|
const classNames = require('./class-names.cjs');
|
|
9
9
|
|
|
10
|
-
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);max-inline-size:var(--menu-max-inline-size);min-inline-size:var(--menu-min-inline-size);
|
|
10
|
+
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);max-inline-size:var(--menu-max-inline-size);min-inline-size:var(--menu-min-inline-size);padding-block:8px}::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;border-radius:8px}.header{padding-block-start:8px;padding-inline:16px}.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-inline:8px}.hide-actions .action-items{display:none}\n";
|
|
11
11
|
|
|
12
12
|
const getClasses = ({
|
|
13
13
|
headerSlottedContent,
|
|
@@ -56,7 +56,9 @@ const MenuTemplate = (context) => {
|
|
|
56
56
|
>
|
|
57
57
|
<slot ${slotted.slotted("items")}></slot>
|
|
58
58
|
</div>
|
|
59
|
-
<footer class="action-items"><slot name="action-items" ${slotted.slotted(
|
|
59
|
+
<footer class="action-items"><slot name="action-items" ${slotted.slotted(
|
|
60
|
+
"actionItemsSlottedContent"
|
|
61
|
+
)}></slot></footer>
|
|
60
62
|
</div>
|
|
61
63
|
</${popupTag}>
|
|
62
64
|
</template>`;
|
|
@@ -67,7 +69,11 @@ const menuDefinition = definition$1.Menu.compose({
|
|
|
67
69
|
template: MenuTemplate,
|
|
68
70
|
styles
|
|
69
71
|
});
|
|
70
|
-
const menuRegistries = [
|
|
72
|
+
const menuRegistries = [
|
|
73
|
+
menuDefinition(),
|
|
74
|
+
...definition.popupRegistries,
|
|
75
|
+
...definition$1.menuItemRegistries
|
|
76
|
+
];
|
|
71
77
|
const registerMenu = index.registerFactory(menuRegistries);
|
|
72
78
|
|
|
73
79
|
exports.menuDefinition = menuDefinition;
|
package/shared/definition29.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { h as html, r as registerFactory } from './index.js';
|
|
2
|
-
import { P as Popup, p as popupRegistries } from './
|
|
2
|
+
import { P as Popup, p as popupRegistries } from './definition61.js';
|
|
3
3
|
import { b as Menu, a as menuItemRegistries } from './definition28.js';
|
|
4
4
|
import { a as anchorSlotTemplateFactory } from './anchored.js';
|
|
5
5
|
import { s as slotted } from './slotted.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
|
8
|
-
const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-anchor]){--_popup-display: contents}.base{display:flex;box-sizing:border-box;flex-direction:column;gap:8px;inline-size:max-content;max-block-size:var(--menu-block-size, 408px);max-inline-size:var(--menu-max-inline-size);min-inline-size:var(--menu-min-inline-size);
|
|
8
|
+
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);max-inline-size:var(--menu-max-inline-size);min-inline-size:var(--menu-min-inline-size);padding-block:8px}::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;border-radius:8px}.header{padding-block-start:8px;padding-inline:16px}.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-inline:8px}.hide-actions .action-items{display:none}\n";
|
|
9
9
|
|
|
10
10
|
const getClasses = ({
|
|
11
11
|
headerSlottedContent,
|
|
@@ -54,7 +54,9 @@ const MenuTemplate = (context) => {
|
|
|
54
54
|
>
|
|
55
55
|
<slot ${slotted("items")}></slot>
|
|
56
56
|
</div>
|
|
57
|
-
<footer class="action-items"><slot name="action-items" ${slotted(
|
|
57
|
+
<footer class="action-items"><slot name="action-items" ${slotted(
|
|
58
|
+
"actionItemsSlottedContent"
|
|
59
|
+
)}></slot></footer>
|
|
58
60
|
</div>
|
|
59
61
|
</${popupTag}>
|
|
60
62
|
</template>`;
|
|
@@ -65,7 +67,11 @@ const menuDefinition = Menu.compose({
|
|
|
65
67
|
template: MenuTemplate,
|
|
66
68
|
styles
|
|
67
69
|
});
|
|
68
|
-
const menuRegistries = [
|
|
70
|
+
const menuRegistries = [
|
|
71
|
+
menuDefinition(),
|
|
72
|
+
...popupRegistries,
|
|
73
|
+
...menuItemRegistries
|
|
74
|
+
];
|
|
69
75
|
const registerMenu = registerFactory(menuRegistries);
|
|
70
76
|
|
|
71
77
|
export { menuRegistries as a, menuDefinition as m, registerMenu as r };
|
package/shared/definition3.cjs
CHANGED
|
@@ -42,21 +42,18 @@ __decorateClass([
|
|
|
42
42
|
index.attr({ attribute: "aria-label" })
|
|
43
43
|
], ActionGroup.prototype, "ariaLabel", 2);
|
|
44
44
|
|
|
45
|
-
const getClasses = ({
|
|
46
|
-
appearance,
|
|
47
|
-
shape,
|
|
48
|
-
tight
|
|
49
|
-
}) => classNames.classNames(
|
|
45
|
+
const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
50
46
|
"base",
|
|
51
47
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
52
48
|
[`shape-${shape}`, Boolean(shape)],
|
|
53
49
|
["tight", tight]
|
|
54
50
|
);
|
|
55
|
-
const ActionGroupTemplate = () => index.html`
|
|
56
|
-
|
|
57
|
-
role="${(x) => x.role ? x.role : "group"}"
|
|
58
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
59
|
-
|
|
51
|
+
const ActionGroupTemplate = () => index.html` <div
|
|
52
|
+
class="${getClasses}"
|
|
53
|
+
role="${(x) => x.role ? x.role : "group"}"
|
|
54
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
55
|
+
>
|
|
56
|
+
<slot></slot>
|
|
60
57
|
</div>`;
|
|
61
58
|
|
|
62
59
|
const actionGroupDefinition = ActionGroup.compose({
|
package/shared/definition3.js
CHANGED
|
@@ -40,21 +40,18 @@ __decorateClass([
|
|
|
40
40
|
attr({ attribute: "aria-label" })
|
|
41
41
|
], ActionGroup.prototype, "ariaLabel", 2);
|
|
42
42
|
|
|
43
|
-
const getClasses = ({
|
|
44
|
-
appearance,
|
|
45
|
-
shape,
|
|
46
|
-
tight
|
|
47
|
-
}) => classNames(
|
|
43
|
+
const getClasses = ({ appearance, shape, tight }) => classNames(
|
|
48
44
|
"base",
|
|
49
45
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
50
46
|
[`shape-${shape}`, Boolean(shape)],
|
|
51
47
|
["tight", tight]
|
|
52
48
|
);
|
|
53
|
-
const ActionGroupTemplate = () => html`
|
|
54
|
-
|
|
55
|
-
role="${(x) => x.role ? x.role : "group"}"
|
|
56
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
57
|
-
|
|
49
|
+
const ActionGroupTemplate = () => html` <div
|
|
50
|
+
class="${getClasses}"
|
|
51
|
+
role="${(x) => x.role ? x.role : "group"}"
|
|
52
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
53
|
+
>
|
|
54
|
+
<slot></slot>
|
|
58
55
|
</div>`;
|
|
59
56
|
|
|
60
57
|
const actionGroupDefinition = ActionGroup.compose({
|