@lmvz-ds/components 0.35.0 → 0.35.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/CHANGELOG.md +12 -0
- package/README.md +10 -0
- package/cjs/{async.util-BQ60l-WC.js → async.util-Dnl6c82X.js} +1 -0
- package/cjs/{list-keyboard-controller-Dm5S_l0D.js → directional-focus-controller-DBat-oF7.js} +13 -1
- package/cjs/element-activation-controller-BHqCUgQv.js +57 -0
- package/cjs/{element.util-Dbyc8yUG.js → element.util-CRS_YJ59.js} +10 -2
- package/cjs/lmvz-action-list.cjs.entry.js +9 -6
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +1 -1
- package/cjs/lmvz-button_2.cjs.entry.js +5 -6
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +1 -1
- package/cjs/lmvz-chip.cjs.entry.js +1 -1
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +9 -6
- package/cjs/lmvz-input.cjs.entry.js +4 -4
- package/cjs/lmvz-menuitem.cjs.entry.js +3 -2
- package/cjs/lmvz-message.cjs.entry.js +42 -9
- package/cjs/lmvz-modal.cjs.entry.js +3 -3
- package/cjs/lmvz-popover.cjs.entry.js +48 -28
- package/cjs/lmvz-radio.cjs.entry.js +1 -1
- package/cjs/lmvz-select.cjs.entry.js +1 -1
- package/cjs/lmvz-tabs.cjs.entry.js +9 -6
- package/cjs/lmvz-toggle.cjs.entry.js +3 -3
- package/cjs/loader.cjs.js +1 -1
- package/{esm/reactive-controller-host-FBuCCcFC.js → cjs/reactive-controller-host-Bc6B_T45.js} +19 -1
- package/cjs/{stencil.util-DxdYjVoH.js → stencil.util-CBrPLd-F.js} +1 -1
- package/collection/components/lmvz-action/lmvz-action.js +1 -1
- package/collection/components/lmvz-action-list/lmvz-action-list.css +1 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.js +26 -2
- package/collection/components/lmvz-button/lmvz-button.css +1 -0
- package/collection/components/lmvz-button/lmvz-button.js +1 -2
- package/collection/components/lmvz-card/lmvz-card.css +1 -0
- package/collection/components/lmvz-header/lmvz-header.js +26 -2
- package/collection/components/lmvz-input/lmvz-input.css +2 -1
- package/collection/components/lmvz-message/lmvz-message.js +42 -9
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-modal/test/testing.js +36 -0
- package/collection/components/lmvz-popover/lmvz-popover.js +55 -28
- package/collection/components/lmvz-tabs/lmvz-tabs.js +22 -2
- package/collection/utils/aria/{list-keyboard-controller.js → directional-focus-controller.js} +11 -0
- package/collection/utils/aria/element-activation-controller.js +27 -11
- package/collection/utils/data/{event.utilt.js → event.util.js} +8 -0
- package/collection/utils/element/element.util.js +9 -2
- package/collection/utils/stencil/reactive-controller-host.js +14 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/p-B_rnXUwq.js +1 -0
- package/components/p-CgK6-SEe.js +1 -0
- package/components/{p-DbIm98qX.js → p-Chj7BuUZ.js} +1 -1
- package/components/p-CxLd309t.js +1 -0
- package/components/{p-D7S1WiEC.js → p-D5FL8n1q.js} +1 -1
- package/components/p-DLUsBYJH.js +1 -0
- package/components/p-DZj20TV1.js +1 -0
- package/components/p-bh9cItsP.js +1 -0
- package/components/p-zMWemcoB.js +1 -0
- package/esm/{async.util-D9nUtvTm.js → async.util-DZj20TV1.js} +1 -1
- package/esm/{list-keyboard-controller-tle6IRkv.js → directional-focus-controller-DgAdCZrG.js} +13 -2
- package/esm/element-activation-controller-7PNSl6io.js +54 -0
- package/esm/{element.util-B0eCxdyI.js → element.util-BFcYfHYq.js} +10 -3
- package/esm/lmvz-action-list.entry.js +8 -5
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +1 -1
- package/esm/lmvz-button_2.entry.js +5 -6
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +1 -1
- package/esm/lmvz-chip.entry.js +1 -1
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +8 -5
- package/esm/lmvz-input.entry.js +4 -4
- package/esm/lmvz-menuitem.entry.js +3 -2
- package/esm/lmvz-message.entry.js +42 -9
- package/esm/lmvz-modal.entry.js +3 -3
- package/esm/lmvz-popover.entry.js +48 -28
- package/esm/lmvz-radio.entry.js +1 -1
- package/esm/lmvz-select.entry.js +1 -1
- package/esm/lmvz-tabs.entry.js +7 -4
- package/esm/lmvz-toggle.entry.js +3 -3
- package/esm/loader.js +1 -1
- package/{cjs/reactive-controller-host-B_lZtcA6.js → esm/reactive-controller-host-CICeIanv.js} +15 -3
- package/esm/{stencil.util-wGFRYLwZ.js → stencil.util-D2-5rsN3.js} +1 -1
- package/hydrate/index.js +216 -101
- package/hydrate/index.mjs +216 -101
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-c87e2281.entry.js → p-194a3af5.entry.js} +1 -1
- package/lmvz-components/{p-e0432f54.entry.js → p-24d13be6.entry.js} +1 -1
- package/lmvz-components/{p-c082390b.entry.js → p-46edf36f.entry.js} +1 -1
- package/lmvz-components/p-5ff55ba9.entry.js +1 -0
- package/lmvz-components/{p-c494bf8f.entry.js → p-888e04d7.entry.js} +1 -1
- package/lmvz-components/p-9dc420e2.entry.js +1 -0
- package/lmvz-components/p-BFcYfHYq.js +1 -0
- package/lmvz-components/p-BuEA0MWd.js +1 -0
- package/lmvz-components/p-CICeIanv.js +1 -0
- package/lmvz-components/p-DZj20TV1.js +1 -0
- package/lmvz-components/p-a887018d.entry.js +1 -0
- package/lmvz-components/p-aaa7691c.entry.js +1 -0
- package/lmvz-components/p-b6dd045b.entry.js +1 -0
- package/lmvz-components/p-bh9cItsP.js +1 -0
- package/lmvz-components/{p-4c68d21a.entry.js → p-c3e62aba.entry.js} +1 -1
- package/lmvz-components/{p-1d2c11ea.entry.js → p-d4154a65.entry.js} +1 -1
- package/lmvz-components/p-d45164a8.entry.js +1 -0
- package/lmvz-components/p-e4ce63b3.entry.js +1 -0
- package/lmvz-components/{p-cb75c951.entry.js → p-eb4c5a6f.entry.js} +1 -1
- package/lmvz-components/{p-8fb4c347.entry.js → p-eb62d4af.entry.js} +1 -1
- package/lmvz-components/{p-a4ef8e55.entry.js → p-f42b16e6.entry.js} +1 -1
- package/lmvz-components/p-fbf066d9.entry.js +1 -0
- package/lmvz-components/p-wlMjNjuv.js +1 -0
- package/manifest.json +79 -5
- package/package.json +1 -1
- package/types/api/ds.constants.d.ts +1 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +1 -0
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +3 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +2 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +1 -0
- package/types/components/lmvz-card/lmvz-card.d.ts +1 -0
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +1 -0
- package/types/components/lmvz-chip/lmvz-chip.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +4 -2
- package/types/components/lmvz-icon/lmvz-icon.d.ts +1 -0
- package/types/components/lmvz-input/lmvz-input.d.ts +1 -0
- package/types/components/lmvz-link/lmvz-link.d.ts +1 -0
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +1 -0
- package/types/components/lmvz-message/lmvz-message.d.ts +1 -0
- package/types/components/lmvz-message/public.d.ts +1 -0
- package/types/components/lmvz-modal/lmvz-modal.d.ts +1 -0
- package/types/components/lmvz-modal/test/testing.d.ts +10 -0
- package/types/components/lmvz-popover/lmvz-popover.d.ts +6 -3
- package/types/components/lmvz-radio/lmvz-radio.d.ts +1 -0
- package/types/components/lmvz-select/lmvz-select.d.ts +1 -0
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +1 -0
- package/types/components/lmvz-snackbar/public.d.ts +1 -0
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +1 -0
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +1 -0
- package/types/components/lmvz-tab/lmvz-tab.d.ts +1 -0
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +3 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +1 -0
- package/types/components.d.ts +18 -0
- package/types/index.d.ts +1 -0
- package/types/utils/aria/aria-validation-controller.d.ts +1 -0
- package/types/utils/aria/aria.constants.d.ts +1 -0
- package/types/utils/aria/{list-keyboard-controller.d.ts → directional-focus-controller.d.ts} +13 -2
- package/types/utils/aria/element-activation-controller.d.ts +11 -2
- package/types/utils/async/async.util.d.ts +1 -0
- package/types/utils/data/event.util.d.ts +6 -0
- package/types/utils/data/number.util.d.ts +1 -0
- package/types/utils/data/object.util.d.ts +1 -0
- package/types/utils/data/time.util.d.ts +1 -0
- package/types/utils/element/element.util.d.ts +2 -0
- package/types/utils/environment.d.ts +1 -0
- package/types/utils/icons/icons-registry.d.ts +1 -0
- package/types/utils/icons/icons.d.ts +1 -0
- package/types/utils/icons/icons.unit.d.ts +1 -0
- package/types/utils/icons/public.d.ts +1 -0
- package/types/utils/public.d.ts +1 -0
- package/types/utils/radio/radio-group-controller.d.ts +1 -0
- package/types/utils/stencil/assets.d.ts +1 -0
- package/types/utils/stencil/reactive-controller-host.d.ts +8 -1
- package/types/utils/stencil/stencil.util.d.ts +1 -0
- package/cjs/element-activation-controller-DC_6T0Rt.js +0 -31
- package/components/p-BhSTYZC6.js +0 -1
- package/components/p-CK3Ixl1K.js +0 -1
- package/components/p-CN0JX9-m.js +0 -1
- package/components/p-D-2gj6LP.js +0 -1
- package/components/p-D9nUtvTm.js +0 -1
- package/components/p-DAMVH-31.js +0 -1
- package/components/p-JtkmlmeY.js +0 -1
- package/esm/element-activation-controller-CN0JX9-m.js +0 -29
- package/lmvz-components/p-45c3ccb6.entry.js +0 -1
- package/lmvz-components/p-49e98627.entry.js +0 -1
- package/lmvz-components/p-50063516.entry.js +0 -1
- package/lmvz-components/p-76be3fc9.entry.js +0 -1
- package/lmvz-components/p-854f1c72.entry.js +0 -1
- package/lmvz-components/p-886e42c7.entry.js +0 -1
- package/lmvz-components/p-9f8fd077.entry.js +0 -1
- package/lmvz-components/p-B0eCxdyI.js +0 -1
- package/lmvz-components/p-BhSTYZC6.js +0 -1
- package/lmvz-components/p-CN0JX9-m.js +0 -1
- package/lmvz-components/p-D9nUtvTm.js +0 -1
- package/lmvz-components/p-DuLiExhX.js +0 -1
- package/lmvz-components/p-FBuCCcFC.js +0 -1
- package/lmvz-components/p-bc237ab7.entry.js +0 -1
- package/types/utils/data/event.utilt.d.ts +0 -4
|
@@ -12,14 +12,47 @@ const TYPE_SVG = {
|
|
|
12
12
|
warning: WARNING_SVG,
|
|
13
13
|
};
|
|
14
14
|
const BLOCK_TAGS = new Set([
|
|
15
|
-
'ADDRESS',
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
15
|
+
'ADDRESS',
|
|
16
|
+
'ARTICLE',
|
|
17
|
+
'ASIDE',
|
|
18
|
+
'BLOCKQUOTE',
|
|
19
|
+
'CAPTION',
|
|
20
|
+
'COLGROUP',
|
|
21
|
+
'DD',
|
|
22
|
+
'DETAILS',
|
|
23
|
+
'DIALOG',
|
|
24
|
+
'DIV',
|
|
25
|
+
'DL',
|
|
26
|
+
'DT',
|
|
27
|
+
'FIELDSET',
|
|
28
|
+
'FIGCAPTION',
|
|
29
|
+
'FIGURE',
|
|
30
|
+
'FOOTER',
|
|
31
|
+
'FORM',
|
|
32
|
+
'H1',
|
|
33
|
+
'H2',
|
|
34
|
+
'H3',
|
|
35
|
+
'H4',
|
|
36
|
+
'H5',
|
|
37
|
+
'H6',
|
|
38
|
+
'HEADER',
|
|
39
|
+
'HGROUP',
|
|
40
|
+
'HR',
|
|
41
|
+
'LI',
|
|
42
|
+
'MAIN',
|
|
43
|
+
'MENU',
|
|
44
|
+
'NAV',
|
|
45
|
+
'OL',
|
|
46
|
+
'P',
|
|
47
|
+
'PRE',
|
|
48
|
+
'SECTION',
|
|
49
|
+
'TABLE',
|
|
50
|
+
'TBODY',
|
|
51
|
+
'TD',
|
|
52
|
+
'TH',
|
|
53
|
+
'THEAD',
|
|
54
|
+
'TFOOT',
|
|
55
|
+
'TR',
|
|
23
56
|
'UL',
|
|
24
57
|
]);
|
|
25
58
|
export class LmvzMessage {
|
|
@@ -60,7 +93,7 @@ export class LmvzMessage {
|
|
|
60
93
|
}
|
|
61
94
|
render() {
|
|
62
95
|
const role = this.live === 'assertive' ? 'alert' : this.live === 'polite' ? 'status' : 'note';
|
|
63
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '99dad82a6300fb8d089f1ea688186d4b4316a058', role: role }, this.leadingIcon && h("span", { key: '2adf33102f7075a83ebf29d9b6e0d433a17beb68', class: "leading-icon", "aria-hidden": "true", innerHTML: TYPE_SVG[this.type] }), h("span", { key: '286d3d0ea065534b84be18c927b2fcd7f30f34bd', class: "message" }, h("slot", { key: '261e865980515a816382b2c7c6b3a52b500308bf', ref: (el) => (this.messageSlot = el), onSlotchange: this.handleSlotChange })), this.actionLabel && (h("lmvz-button", { key: '46d964c0490bbdd47426fc228db0e3ccb108b416', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel)), this.dismissible && (h("lmvz-button", { key: 'ce1ec8beb756c2e11c948e227f94f81bd5568c88', variant: "tertiary", scale: "small", "aria-label": this.closeLabel, onClick: this.handleDismissClick }, h("lmvz-icon", { key: '5361c424e77ffea7984c2fd42357666cd86ba1d6', "aria-hidden": "true", icon: CLOSE_SM_SVG })))));
|
|
64
97
|
}
|
|
65
98
|
static get is() { return "lmvz-message"; }
|
|
66
99
|
static get encapsulation() { return "shadow"; }
|
|
@@ -223,7 +223,7 @@ export class LmvzModal extends ReactiveControllerHost {
|
|
|
223
223
|
this.hasHeader = this.hasAssignedContent(this.headerSlot);
|
|
224
224
|
};
|
|
225
225
|
render() {
|
|
226
|
-
return (h(Host, { key: '8b5f506cdac223a440309d472639fe965b94f8c2' }, h("dialog", { key: '0b70ac4d9590266271052c4d7fdef03c684d9b72', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, h("div", { key: '25b529bec1905408c2041b7370ab37586eade47d', class: "modal-shell" }, h("header", { key: 'd86ae4a6f4ac7f6efd38385f1407d1f6bfbb1abb', class: { header: true, 'has-title': this.hasHeader } }, h("div", { key: '7fd7059bfb0b90834895a87c2f2598e2e8c2ba80', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, h("slot", { key: 'b6eb7885e220e5def4c3c8420d5b83f4a7e30907', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), h("lmvz-button", { key: '
|
|
226
|
+
return (h(Host, { key: '8b5f506cdac223a440309d472639fe965b94f8c2' }, h("dialog", { key: '0b70ac4d9590266271052c4d7fdef03c684d9b72', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, h("div", { key: '25b529bec1905408c2041b7370ab37586eade47d', class: "modal-shell" }, h("header", { key: 'd86ae4a6f4ac7f6efd38385f1407d1f6bfbb1abb', class: { header: true, 'has-title': this.hasHeader } }, h("div", { key: '7fd7059bfb0b90834895a87c2f2598e2e8c2ba80', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, h("slot", { key: 'b6eb7885e220e5def4c3c8420d5b83f4a7e30907', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), h("lmvz-button", { key: '72e17391097dfa756e572764f40080b6eec222b2', ref: (element) => (this.closeButtonEl = element), type: "button", class: "close-button", "aria-label": this.closeLabel, onLmvzActivation: this.handleCloseButtonClick, variant: "tertiary" }, h("lmvz-icon", { key: '7bbae1aefa9ccc6646d5861683e3476339a545e4', icon: closeIconSvg }))), h("div", { key: '9f22628448e9af527eb10ef2602c498afc55c029', class: "body" }, h("slot", { key: '413e72707749b3abc987ef47a81cccda4b874c84' })), h("footer", { key: 'a1a8f648e88d1f9045e9cf866d332aac69e033df', class: "actions", hidden: !this.buttonGroupEl?.hasActions }, h("lmvz-button-group", { key: '7d7eeee7a2551a09bfb4fc513bde48828be5ee8b', ref: (element) => (this.buttonGroupEl = element) }, h("slot", { key: '76b00523167c5fa08f11fc351a37638227401711', name: "actions" })))))));
|
|
227
227
|
}
|
|
228
228
|
static get is() { return "lmvz-modal"; }
|
|
229
229
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { vi } from "vitest";
|
|
2
|
+
export const mockDialogMethods = (dialog) => {
|
|
3
|
+
const showModal = vi.fn(() => {
|
|
4
|
+
dialog.open = true;
|
|
5
|
+
const closeButton = dialog.querySelector('.close-button');
|
|
6
|
+
closeButton?.focus();
|
|
7
|
+
});
|
|
8
|
+
const close = vi.fn((returnValue) => {
|
|
9
|
+
dialog.returnValue = returnValue ?? '';
|
|
10
|
+
dialog.open = false;
|
|
11
|
+
const closeEvent = dialog.ownerDocument.createEvent('Event');
|
|
12
|
+
closeEvent.initEvent('close', true, true);
|
|
13
|
+
dialog.dispatchEvent(closeEvent);
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(dialog, 'showModal', {
|
|
16
|
+
configurable: true,
|
|
17
|
+
value: showModal,
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(dialog, 'close', {
|
|
20
|
+
configurable: true,
|
|
21
|
+
value: close,
|
|
22
|
+
});
|
|
23
|
+
const requestClose = vi.fn((returnValue) => {
|
|
24
|
+
const cancelEvent = dialog.ownerDocument.createEvent('Event');
|
|
25
|
+
cancelEvent.initEvent('cancel', false, true);
|
|
26
|
+
dialog.dispatchEvent(cancelEvent);
|
|
27
|
+
if (!cancelEvent.defaultPrevented) {
|
|
28
|
+
close(returnValue);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(dialog, 'requestClose', {
|
|
32
|
+
configurable: true,
|
|
33
|
+
value: requestClose,
|
|
34
|
+
});
|
|
35
|
+
return { showModal, close, requestClose };
|
|
36
|
+
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
3
3
|
import { isAriaValidationEnabled } from "../../utils/aria/aria-validation-controller";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { isFocusControllerHost } from "../../utils/aria/directional-focus-controller";
|
|
5
|
+
import { addElementActivationListener } from "../../utils/aria/element-activation-controller";
|
|
6
|
+
import { wait, waitFrame } from "../../utils/async/async.util";
|
|
7
|
+
import { canReceiveFocus, getDeepActiveElement, isActionButton, isHtmlElement, isInteractiveElement, walkShadowDOMUntil } from "../../utils/element/element.util";
|
|
6
8
|
export class LmvzPopover {
|
|
7
9
|
el;
|
|
8
|
-
|
|
10
|
+
extEventController = new AbortController();
|
|
11
|
+
closureController;
|
|
9
12
|
containerEl;
|
|
10
13
|
slotEl;
|
|
11
14
|
previouslyFocusedElement = null;
|
|
15
|
+
anchorEl;
|
|
12
16
|
open = false;
|
|
13
17
|
anchor;
|
|
14
18
|
placement = 'bottom-start';
|
|
@@ -34,7 +38,6 @@ export class LmvzPopover {
|
|
|
34
38
|
}
|
|
35
39
|
componentDidLoad() {
|
|
36
40
|
autoAssignId(this.el);
|
|
37
|
-
validatePopoverAria(this.el, this.label, this.anchor, this.resolveAnchor());
|
|
38
41
|
}
|
|
39
42
|
handleOpenChange(isOpen) {
|
|
40
43
|
if (isOpen) {
|
|
@@ -44,24 +47,40 @@ export class LmvzPopover {
|
|
|
44
47
|
this.onClose();
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
|
-
handleAnchorChange() {
|
|
48
|
-
if (
|
|
49
|
-
this.
|
|
50
|
+
async handleAnchorChange(anchor) {
|
|
51
|
+
if (!anchor) {
|
|
52
|
+
console.warn('anchor property missing for popover', this.el?.id);
|
|
53
|
+
this.anchor = undefined;
|
|
54
|
+
return;
|
|
50
55
|
}
|
|
56
|
+
await wait();
|
|
57
|
+
this.anchorEl = typeof anchor === 'string' ? document.getElementById(anchor) : anchor;
|
|
58
|
+
this.setupAnchorEl();
|
|
59
|
+
if (!this.open)
|
|
60
|
+
return;
|
|
61
|
+
this.updatePosition();
|
|
51
62
|
}
|
|
52
63
|
disconnectedCallback() {
|
|
53
64
|
this.removeCloseHandlers();
|
|
65
|
+
this.extEventController.abort();
|
|
54
66
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return
|
|
67
|
+
setupAnchorEl() {
|
|
68
|
+
const { anchorEl } = this;
|
|
69
|
+
if (!anchorEl) {
|
|
70
|
+
console.warn('no anchor element set for', this);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!anchorEl.hasAttribute('aria-haspopup')) {
|
|
74
|
+
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
60
75
|
}
|
|
61
|
-
|
|
76
|
+
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
77
|
+
if (isActionButton(anchorEl)) {
|
|
78
|
+
addElementActivationListener(anchorEl, this.toggle.bind(this), this.extEventController.signal);
|
|
79
|
+
}
|
|
80
|
+
validatePopoverAria(this.el, this.label, this.anchor, anchorEl);
|
|
62
81
|
}
|
|
63
82
|
async updatePosition() {
|
|
64
|
-
const anchorEl = this
|
|
83
|
+
const { anchorEl } = this;
|
|
65
84
|
const container = this.containerEl;
|
|
66
85
|
if (!anchorEl || !container)
|
|
67
86
|
return;
|
|
@@ -76,7 +95,6 @@ export class LmvzPopover {
|
|
|
76
95
|
async onOpen() {
|
|
77
96
|
this.previouslyFocusedElement = getDeepActiveElement(document);
|
|
78
97
|
this.setupCloseHandlers();
|
|
79
|
-
console.log('onOpen');
|
|
80
98
|
await waitFrame();
|
|
81
99
|
await this.updatePosition();
|
|
82
100
|
autoAssignId(this.el);
|
|
@@ -94,20 +112,14 @@ export class LmvzPopover {
|
|
|
94
112
|
this.lmvzClose.emit();
|
|
95
113
|
}
|
|
96
114
|
applyAnchorAriaOpen() {
|
|
97
|
-
|
|
98
|
-
if (!anchorEl)
|
|
115
|
+
if (!this.anchorEl)
|
|
99
116
|
return;
|
|
100
|
-
|
|
101
|
-
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
102
|
-
}
|
|
103
|
-
anchorEl.setAttribute('aria-expanded', 'true');
|
|
104
|
-
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
117
|
+
this.anchorEl.setAttribute('aria-expanded', 'true');
|
|
105
118
|
}
|
|
106
119
|
applyAnchorAriaClose() {
|
|
107
|
-
|
|
108
|
-
if (!anchorEl)
|
|
120
|
+
if (!this.anchorEl)
|
|
109
121
|
return;
|
|
110
|
-
anchorEl.setAttribute('aria-expanded', 'false');
|
|
122
|
+
this.anchorEl.setAttribute('aria-expanded', 'false');
|
|
111
123
|
}
|
|
112
124
|
focusFirst() {
|
|
113
125
|
const { slotEl } = this;
|
|
@@ -115,6 +127,12 @@ export class LmvzPopover {
|
|
|
115
127
|
return;
|
|
116
128
|
const assigned = slotEl.assignedElements({ flatten: true });
|
|
117
129
|
for (const el of assigned) {
|
|
130
|
+
if (!isHtmlElement(el))
|
|
131
|
+
continue;
|
|
132
|
+
if (isFocusControllerHost(el)) {
|
|
133
|
+
el.initFocus();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
118
136
|
const focusable = walkShadowDOMUntil(el, canReceiveFocus);
|
|
119
137
|
if (focusable) {
|
|
120
138
|
focusable.focus();
|
|
@@ -136,6 +154,7 @@ export class LmvzPopover {
|
|
|
136
154
|
}
|
|
137
155
|
}
|
|
138
156
|
setupCloseHandlers() {
|
|
157
|
+
this.closureController = new AbortController();
|
|
139
158
|
const options = { signal: this.closureController.signal };
|
|
140
159
|
document.addEventListener('mousedown', (event) => {
|
|
141
160
|
if (!this.open)
|
|
@@ -153,10 +172,10 @@ export class LmvzPopover {
|
|
|
153
172
|
}, options);
|
|
154
173
|
}
|
|
155
174
|
removeCloseHandlers() {
|
|
156
|
-
this.closureController
|
|
175
|
+
this.closureController?.abort();
|
|
157
176
|
}
|
|
158
177
|
render() {
|
|
159
|
-
return (h(Host, { key: '
|
|
178
|
+
return (h(Host, { key: '744dae23d80c1e81a0b8bd2e9fcb02c6669d54cd' }, h("div", { key: '7f40e25f1e05738b2bbf900b90613004eb188395', role: "dialog", part: "container", class: `container lmvz-wrapper-card-${this.size}`, "aria-label": this.label || undefined, ref: (el) => (this.containerEl = el) }, h("slot", { key: '5a400fd9e697254007973f2dce172588fe3760ee', ref: (el) => (this.slotEl = el) }))));
|
|
160
179
|
}
|
|
161
180
|
static get is() { return "lmvz-popover"; }
|
|
162
181
|
static get encapsulation() { return "shadow"; }
|
|
@@ -323,6 +342,11 @@ export class LmvzPopover {
|
|
|
323
342
|
}
|
|
324
343
|
};
|
|
325
344
|
}
|
|
345
|
+
static get states() {
|
|
346
|
+
return {
|
|
347
|
+
"anchorEl": {}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
326
350
|
static get events() {
|
|
327
351
|
return [{
|
|
328
352
|
"method": "lmvzOpen",
|
|
@@ -433,7 +457,10 @@ export class LmvzPopover {
|
|
|
433
457
|
"methodName": "handleOpenChange"
|
|
434
458
|
}, {
|
|
435
459
|
"propName": "anchor",
|
|
436
|
-
"methodName": "handleAnchorChange"
|
|
460
|
+
"methodName": "handleAnchorChange",
|
|
461
|
+
"handlerOptions": {
|
|
462
|
+
"immediate": true
|
|
463
|
+
}
|
|
437
464
|
}];
|
|
438
465
|
}
|
|
439
466
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { DirectionalFocusController } from "../../utils/aria/
|
|
2
|
+
import { DirectionalFocusController } from "../../utils/aria/directional-focus-controller";
|
|
3
3
|
import { ReactiveControllerHost } from "../../utils/stencil/reactive-controller-host";
|
|
4
4
|
let tabsIdCounter = 0;
|
|
5
5
|
export class LmvzTabs extends ReactiveControllerHost {
|
|
@@ -43,6 +43,9 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
43
43
|
this.syncFocusTargets();
|
|
44
44
|
this.syncTabOrientation();
|
|
45
45
|
}
|
|
46
|
+
async initFocus() {
|
|
47
|
+
this.focusController.initFocus();
|
|
48
|
+
}
|
|
46
49
|
async activateTab(value) {
|
|
47
50
|
const tab = this.findTabByValue(value);
|
|
48
51
|
if (!tab || this.isTabDisabled(tab))
|
|
@@ -232,7 +235,7 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
232
235
|
this.selectTab(value);
|
|
233
236
|
};
|
|
234
237
|
render() {
|
|
235
|
-
return (h(Host, { key: '
|
|
238
|
+
return (h(Host, { key: '98df29f336a3ea47efa6c76a773de28c5174c718', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, h("div", { key: '7e35ae180c4ebf2f5a82e0fad0977cd3c38ac659', role: "tablist", "aria-orientation": this.orientation, class: "tablist" }, h("slot", { key: '2520bc8b8988a60b37a067828ad237bf8dcfcc59', ref: (el) => (this.tabSlotEl = el) })), h("div", { key: 'bd4a954b6caca2d9f2eb588f58590821ec4af888', part: "panels-container", class: "panels-container" }, h("slot", { key: 'b4dffff530328e6e4c8d305895ef4dd2d5952757', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
|
|
236
239
|
}
|
|
237
240
|
static get is() { return "lmvz-tabs"; }
|
|
238
241
|
static get encapsulation() { return "shadow"; }
|
|
@@ -317,6 +320,23 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
317
320
|
}
|
|
318
321
|
static get methods() {
|
|
319
322
|
return {
|
|
323
|
+
"initFocus": {
|
|
324
|
+
"complexType": {
|
|
325
|
+
"signature": "() => Promise<void>",
|
|
326
|
+
"parameters": [],
|
|
327
|
+
"references": {
|
|
328
|
+
"Promise": {
|
|
329
|
+
"location": "global",
|
|
330
|
+
"id": "global::Promise"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"return": "Promise<void>"
|
|
334
|
+
},
|
|
335
|
+
"docs": {
|
|
336
|
+
"text": "Programmatically set focus to the first managed element.",
|
|
337
|
+
"tags": []
|
|
338
|
+
}
|
|
339
|
+
},
|
|
320
340
|
"activateTab": {
|
|
321
341
|
"complexType": {
|
|
322
342
|
"signature": "(value: string) => Promise<void>",
|
package/collection/utils/aria/{list-keyboard-controller.js → directional-focus-controller.js}
RENAMED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { getDeepActiveElement } from "../element/element.util";
|
|
2
|
+
import { getLmvzComponentMetaInfo, registerLmvzComponentMetaInfo } from "../stencil/reactive-controller-host";
|
|
3
|
+
export function isFocusControllerHost(el) {
|
|
4
|
+
return Boolean(getLmvzComponentMetaInfo(el, 'isFocusControllerHost'));
|
|
5
|
+
}
|
|
2
6
|
const defaultConfig = {
|
|
3
7
|
orientation: 'both',
|
|
4
8
|
enableHomeAndEnd: false,
|
|
@@ -17,6 +21,7 @@ export class DirectionalFocusController {
|
|
|
17
21
|
};
|
|
18
22
|
}
|
|
19
23
|
hostConnected() {
|
|
24
|
+
registerLmvzComponentMetaInfo(this.host.el, 'isFocusControllerHost', true);
|
|
20
25
|
this.host.el.addEventListener('keydown', this.handleKeydown);
|
|
21
26
|
this.syncManagedFocusTarget();
|
|
22
27
|
}
|
|
@@ -33,6 +38,12 @@ export class DirectionalFocusController {
|
|
|
33
38
|
this.currentElement = element !== null && element !== undefined && 'focus' in element && element.nodeType === 1 ? element : undefined;
|
|
34
39
|
this.syncManagedFocusTarget(previousElement);
|
|
35
40
|
}
|
|
41
|
+
async initFocus() {
|
|
42
|
+
const element = this.selectManagedElement();
|
|
43
|
+
if (!element)
|
|
44
|
+
return;
|
|
45
|
+
this.applyFocusTarget(element, true);
|
|
46
|
+
}
|
|
36
47
|
handleKeydown = (event) => {
|
|
37
48
|
const intent = this.getFocusIntent(event.key);
|
|
38
49
|
if (!intent)
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
+
import { filterKeysAndCallback } from "../data/event.util";
|
|
2
|
+
import { isInteractiveElement } from "../element/element.util";
|
|
3
|
+
import { getLmvzComponentMetaInfo, registerLmvzComponentMetaInfo } from "../stencil/reactive-controller-host";
|
|
1
4
|
export class ElementActivationController {
|
|
2
5
|
host;
|
|
3
6
|
config;
|
|
7
|
+
handlers = new AbortController();
|
|
4
8
|
constructor(host, config) {
|
|
5
9
|
this.host = host;
|
|
6
10
|
this.config = config;
|
|
11
|
+
registerLmvzComponentMetaInfo(host.el, 'isLmvzElementActivationHost', true);
|
|
7
12
|
}
|
|
8
13
|
hostDidLoad() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.
|
|
13
|
-
this.host.el.addEventListener('click', this.handleActivation.bind(this));
|
|
14
|
+
bindHandlers(this.host.el, this.handleActivation.bind(this), this.handlers.signal, this.config?.keys ?? ['Enter', ' ']);
|
|
15
|
+
}
|
|
16
|
+
hostDisconnected() {
|
|
17
|
+
this.handlers.abort();
|
|
14
18
|
}
|
|
15
|
-
handleKeyDown = (event) => {
|
|
16
|
-
if ((this.config?.keys ?? ['Enter', ' ']).includes(event.key)) {
|
|
17
|
-
event.preventDefault();
|
|
18
|
-
this.handleActivation(event);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
19
|
handleActivation = (event) => {
|
|
22
20
|
this.host.lmvzActivation.emit();
|
|
23
21
|
if (this.config?.localHandler) {
|
|
@@ -25,3 +23,21 @@ export class ElementActivationController {
|
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
25
|
}
|
|
26
|
+
function bindHandlers(target, handler, abortSignal, keys = [' ']) {
|
|
27
|
+
target.addEventListener('keydown', filterKeysAndCallback(handler, keys), { signal: abortSignal });
|
|
28
|
+
target.addEventListener('click', handler, { signal: abortSignal });
|
|
29
|
+
}
|
|
30
|
+
function isLmvzElementActivationHost(el) {
|
|
31
|
+
return getLmvzComponentMetaInfo(el, 'isLmvzElementActivationHost');
|
|
32
|
+
}
|
|
33
|
+
export function addElementActivationListener(...[target, handler, abortSignal, keys]) {
|
|
34
|
+
if (isLmvzElementActivationHost(target)) {
|
|
35
|
+
target.addEventListener('lmvzActivation', handler, { signal: abortSignal });
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!isInteractiveElement(target)) {
|
|
39
|
+
console.error('addElementActivationListener called with non-interactive element');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
bindHandlers(target, handler, abortSignal, keys);
|
|
43
|
+
}
|
|
@@ -17,3 +17,11 @@ function hasChangedTouches(ev) {
|
|
|
17
17
|
function isMouseEvent(ev) {
|
|
18
18
|
return Boolean(ev.pageX);
|
|
19
19
|
}
|
|
20
|
+
export function filterKeysAndCallback(callback, keys = [' ']) {
|
|
21
|
+
return (event) => {
|
|
22
|
+
if (!keys.includes(event.key))
|
|
23
|
+
return;
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
callback(event);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -130,13 +130,17 @@ export function findFormByRef(form, el) {
|
|
|
130
130
|
}
|
|
131
131
|
export function isInteractiveElement(el) {
|
|
132
132
|
const tagName = el.tagName.toLowerCase();
|
|
133
|
-
if (['button', 'input', 'select', 'textarea'].includes(tagName)) {
|
|
133
|
+
if (['button', 'lmvz-button', 'input', 'lmvz-input', 'select', 'lmvz-select', 'textarea'].includes(tagName)) {
|
|
134
134
|
return true;
|
|
135
135
|
}
|
|
136
|
-
if (
|
|
136
|
+
if (['a', 'lmvz-link'].includes(tagName) && el.hasAttribute('href')) {
|
|
137
137
|
return true;
|
|
138
138
|
}
|
|
139
139
|
if (el.hasAttribute('tabindex')) {
|
|
140
|
+
const tabindex = parseInt(el.getAttribute('tabindex') ?? '-1');
|
|
141
|
+
if (isNaN(tabindex) || tabindex < 0) {
|
|
142
|
+
console.warn('Interactive element is not keyboard accessible due to negative tabindex!', el);
|
|
143
|
+
}
|
|
140
144
|
return true;
|
|
141
145
|
}
|
|
142
146
|
const role = el.getAttribute('role');
|
|
@@ -148,3 +152,6 @@ export function isInteractiveElement(el) {
|
|
|
148
152
|
}
|
|
149
153
|
return false;
|
|
150
154
|
}
|
|
155
|
+
export function isHtmlElement(element) {
|
|
156
|
+
return element instanceof HTMLElement;
|
|
157
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const META_BASE = '__LMVZ__';
|
|
1
2
|
export class ReactiveControllerHost {
|
|
2
3
|
controllers = new Set();
|
|
3
4
|
addController(controller) {
|
|
@@ -37,3 +38,16 @@ export class ReactiveControllerHost {
|
|
|
37
38
|
this.activeControllers.forEach((controller) => controller.hostDidUpdate?.());
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
export function registerLmvzComponentMetaInfo(el, key, info) {
|
|
42
|
+
if (!el) {
|
|
43
|
+
console.warn('component is undefined');
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const cmp = el;
|
|
47
|
+
if (!cmp[META_BASE])
|
|
48
|
+
cmp[META_BASE] = {};
|
|
49
|
+
cmp[META_BASE][key] = info;
|
|
50
|
+
}
|
|
51
|
+
export function getLmvzComponentMetaInfo(el, key) {
|
|
52
|
+
return el?.[META_BASE]?.[key];
|
|
53
|
+
}
|
package/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DGg7OzDl.js";export{A as ARIA_VALIDATION_RUNTIME_CHANGED_EVENT,d as disableAriaValidation,e as enableAriaValidation,i as isAriaValidationEnabled,q as queueValidation,u as useVerboseLogging}from"./p-BDonpCG8.js";export{g as chipSizes,f as chipTypes,d as iconSizes,e as iconWeights,b as inputSizes,i as inputTypes,l as linkTypes,m as messageTypes,p as popoverPlacements,n as popoverSizes,s as scaleValues,c as selectSizes,a as sizes,k as snackbarDismissReasons,j as snackbarPriorities,h as snackbarStatuses,t as textSizes,v as variants}from"./p-0ctLESas.js";export{g as getRegisteredIconProvider,r as registerIconProvider,t as typedIconFromSet}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DGg7OzDl.js";export{A as ARIA_VALIDATION_RUNTIME_CHANGED_EVENT,d as disableAriaValidation,e as enableAriaValidation,i as isAriaValidationEnabled,q as queueValidation,u as useVerboseLogging}from"./p-BDonpCG8.js";export{g as chipSizes,f as chipTypes,d as iconSizes,e as iconWeights,b as inputSizes,i as inputTypes,l as linkTypes,m as messageTypes,p as popoverPlacements,n as popoverSizes,s as scaleValues,c as selectSizes,a as sizes,k as snackbarDismissReasons,j as snackbarPriorities,h as snackbarStatuses,t as textSizes,v as variants}from"./p-0ctLESas.js";export{g as getRegisteredIconProvider,r as registerIconProvider,t as typedIconFromSet}from"./p-Chj7BuUZ.js";export{LmvzAction,defineCustomElement as defineCustomElementLmvzAction}from"./lmvz-action.js";export{LmvzActionList,defineCustomElement as defineCustomElementLmvzActionList}from"./lmvz-action-list.js";export{LmvzButton,defineCustomElement as defineCustomElementLmvzButton}from"./lmvz-button.js";export{LmvzButtonGroup,defineCustomElement as defineCustomElementLmvzButtonGroup}from"./lmvz-button-group.js";export{LmvzCard,defineCustomElement as defineCustomElementLmvzCard}from"./lmvz-card.js";export{LmvzCheckbox,defineCustomElement as defineCustomElementLmvzCheckbox}from"./lmvz-checkbox.js";export{LmvzChip,defineCustomElement as defineCustomElementLmvzChip}from"./lmvz-chip.js";export{LmvzHeader,defineCustomElement as defineCustomElementLmvzHeader}from"./lmvz-header.js";export{LmvzIcon,defineCustomElement as defineCustomElementLmvzIcon}from"./lmvz-icon.js";export{LmvzInput,defineCustomElement as defineCustomElementLmvzInput}from"./lmvz-input.js";export{LmvzLink,defineCustomElement as defineCustomElementLmvzLink}from"./lmvz-link.js";export{LmvzMenuitem,defineCustomElement as defineCustomElementLmvzMenuitem}from"./lmvz-menuitem.js";export{LmvzMessage,defineCustomElement as defineCustomElementLmvzMessage}from"./lmvz-message.js";export{LmvzModal,defineCustomElement as defineCustomElementLmvzModal}from"./lmvz-modal.js";export{LmvzPopover,defineCustomElement as defineCustomElementLmvzPopover}from"./lmvz-popover.js";export{LmvzRadio,defineCustomElement as defineCustomElementLmvzRadio}from"./lmvz-radio.js";export{LmvzSelect,defineCustomElement as defineCustomElementLmvzSelect}from"./lmvz-select.js";export{LmvzSnackbar,defineCustomElement as defineCustomElementLmvzSnackbar}from"./lmvz-snackbar.js";export{LmvzSpinner,defineCustomElement as defineCustomElementLmvzSpinner}from"./lmvz-spinner.js";export{LmvzTab,defineCustomElement as defineCustomElementLmvzTab}from"./lmvz-tab.js";export{LmvzTabs,defineCustomElement as defineCustomElementLmvzTabs}from"./lmvz-tabs.js";export{LmvzToggle,defineCustomElement as defineCustomElementLmvzToggle}from"./lmvz-toggle.js";const o={low:0,normal:1,high:2},z={success:5e3,warning:5e3,error:8e3};let C=0;function E(){return C+=1,"snackbar-"+C}class L{hostEl=void 0;active=void 0;getHost(){return void 0===this.hostEl||this.hostEl.isConnected||(this.hostEl=void 0),void 0===this.hostEl&&(this.hostEl=function(){if("undefined"==typeof document)return;const e=document.querySelector("[data-snackbar-host]");if(e)return e;const s=document.createElement("lmvz-snackbar");return s.setAttribute("data-snackbar-host",""),document.body.appendChild(s),s}()),this.hostEl}clearTimer(e){void 0!==e.timerId&&(clearTimeout(e.timerId),e.timerId=void 0)}scheduleTimer(e,s){s<=0||(e.timerStartedAt=Date.now(),e.timerId=setTimeout((()=>{void 0!==this.active&&this.active.id===e.id&&this.dismissActive(e,"timeout")}),s))}dismissActive(e,s){this.clearTimer(e);const t=e.hostEl;t.removeEventListener("pointerenter",e.onPointerEnter),t.removeEventListener("pointerleave",e.onPointerLeave),t.removeEventListener("focusin",e.onFocusIn),t.removeEventListener("focusout",e.onFocusOut),e.onActionListener&&t.removeEventListener("lmvzAction",e.onActionListener),t.hide?.(),this.active?.id===e.id&&(this.active=void 0),"action"!==s&&t.dispatchEvent(new CustomEvent("lmvzClose",{detail:{reason:s},bubbles:!0,composed:!0})),e.resolve({reason:s})}pauseTimer(e){if(e.pauseCount+=1,e.pauseCount>1||void 0===e.timerId)return;const s=void 0!==e.timerStartedAt?Date.now()-e.timerStartedAt:0;e.remaining=Math.max(0,e.remaining-s),e.timerStartedAt=void 0,this.clearTimer(e)}resumeTimer(e){e.pauseCount>0&&(e.pauseCount-=1),e.pauseCount>0||e.remaining>0&&this.scheduleTimer(e,e.remaining)}applyToHost(e,s){e.setAttribute("status",s.status??"success"),void 0!==s.actionLabel?e.setAttribute("action-label",s.actionLabel):e.removeAttribute("action-label")}open(e){const s=o[e.priority??"normal"];if(void 0!==this.active&&s<this.active.priority){let e;const s=new Promise((s=>{e=s}));return e({reason:"swallowed"}),{id:E(),closed:s,dismiss(){}}}void 0!==this.active&&this.dismissActive(this.active,"overridden");const t=this.getHost();if(void 0===t){const e=E();let s;const t=new Promise((e=>{s=e}));return s({reason:"swallowed"}),{id:e,closed:t,dismiss(){}}}const i=E(),m=0===e.duration?0:e.duration??z[e.status??"success"];let n;const a=new Promise((e=>{n=e})),r={id:i,priority:s,resolve:n,timerId:void 0,remaining:m,timerStartedAt:void 0,pauseCount:0,hostEl:t,onPointerEnter:()=>this.pauseTimer(r),onPointerLeave:()=>this.resumeTimer(r),onFocusIn:()=>this.pauseTimer(r),onFocusOut:()=>this.resumeTimer(r)};this.active=r,t.addEventListener("pointerenter",r.onPointerEnter),t.addEventListener("pointerleave",r.onPointerLeave),t.addEventListener("focusin",r.onFocusIn),t.addEventListener("focusout",r.onFocusOut),this.applyToHost(t,e);const l=()=>{void 0!==this.active&&this.active.id===i&&(e.onAction?.(),this.dismissActive(r,"action"))};return r.onActionListener=l,t.addEventListener("lmvzAction",l,{once:!0}),t.show?.(),queueMicrotask((()=>t.setAttribute("message",e.message))),m>0&&this.scheduleTimer(r,m),{id:i,closed:a,dismiss:()=>{this.active?.id===i&&this.dismissActive(r,"manual")}}}dismiss(e){this.active&&(e&&this.active.id!==e||this.dismissActive(this.active,"manual"))}}export{L as SnackbarController}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,h as r,d as o,t as n}from"./p-DGg7OzDl.js";import{A as e}from"./p-CFTmV4XZ.js";import{D as a}from"./p-D-2gj6LP.js";import{i as v}from"./p-CK3Ixl1K.js";import{R as l}from"./p-DAMVH-31.js";const m=t(class extends l{get el(){return this}slotEl;get validationEl(){return this.el}get validationSlot(){return this.slotEl}focusController=new a(this,{orientation:"vertical",manageTabIndex:!0,enableHomeAndEnd:!0});label;constructor(t){super(!1),!1!==t&&this.__registerHost(),this.addController(this.focusController),this.addController(new e(this,{validationTiming:"slot"}))}componentDidLoad(){this.handleSlotChange(),super.componentDidLoad()}handleSlotChange=()=>{const t=this.slotEl;if(!t)return;const r=t.assignedElements(),o=[];for(const t of r)i(t,o);for(const t of o)v(t)&&(t.variant||(t.variant="tertiary"));this.focusController.updateElements(o)};render(){return r(o,{key:"1180ac5cb2ad83db0279a5cd2ce15d9ab75d03ca",role:"menu","aria-label":this.label||void 0},r("slot",{key:"479179e7ec42780e73936d50703ff46d48a89efb",onSlotchange:this.handleSlotChange,ref:t=>this.slotEl=t}))}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }"}},[774,"lmvz-action-list",{label:[1]}]);function i(t,r){const o=t.tagName.toLowerCase();return"lmvz-button"===o?(t.buttonRole="menuitem",void r.push(t)):"button"===o?(t.setAttribute("role","menuitem"),void r.push(t)):void("hr"!==o&&("group"!==t.getAttribute("role")?console.warn("Unexpected element encountered in ActionList:",o):t.querySelectorAll("lmvz-button, button").forEach((t=>i(t,r)))))}const d=m,b=function(){"undefined"!=typeof customElements&&["lmvz-action-list"].forEach((t=>{"lmvz-action-list"===t&&(customElements.get(n(t))||customElements.define(n(t),m))}))};export{d as LmvzActionList,b as defineCustomElement}
|
|
1
|
+
import{p as t,h as o,d as r,t as n}from"./p-DGg7OzDl.js";import{A as e}from"./p-CFTmV4XZ.js";import{D as a}from"./p-DLUsBYJH.js";import{i as v}from"./p-zMWemcoB.js";import{R as l}from"./p-CgK6-SEe.js";const m=t(class extends l{get el(){return this}slotEl;get validationEl(){return this.el}get validationSlot(){return this.slotEl}focusController=new a(this,{orientation:"vertical",manageTabIndex:!0,enableHomeAndEnd:!0});label;constructor(t){super(!1),!1!==t&&this.__registerHost(),this.addController(this.focusController),this.addController(new e(this,{validationTiming:"slot"}))}componentDidLoad(){this.handleSlotChange(),super.componentDidLoad()}async initFocus(){this.focusController.initFocus()}handleSlotChange=()=>{const t=this.slotEl;if(!t)return;const o=t.assignedElements(),r=[];for(const t of o)i(t,r);for(const t of r)v(t)&&(t.variant||(t.variant="tertiary"));this.focusController.updateElements(r)};render(){return o(r,{key:"9dee495856e733cb17f30d0d8588362a8dcb28ce",role:"menu","aria-label":this.label||void 0},o("slot",{key:"c6454dbbe63eed5be01f3247934245d1cc1ad6e2",onSlotchange:this.handleSlotChange,ref:t=>this.slotEl=t}))}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }"}},[774,"lmvz-action-list",{label:[1],initFocus:[64]}]);function i(t,o){const r=t.tagName.toLowerCase();return"lmvz-button"===r?(t.buttonRole="menuitem",void o.push(t)):"button"===r?(t.setAttribute("role","menuitem"),void o.push(t)):void("hr"!==r&&("group"!==t.getAttribute("role")?console.warn("Unexpected element encountered in ActionList:",r):t.querySelectorAll("lmvz-button, button").forEach((t=>i(t,o)))))}const d=m,b=function(){"undefined"!=typeof customElements&&["lmvz-action-list"].forEach((t=>{"lmvz-action-list"===t&&(customElements.get(n(t))||customElements.define(n(t),m))}))};export{d as LmvzActionList,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c,h as e,d as i,t as o}from"./p-DGg7OzDl.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.actionClick=c(this,"actionClick",7)}actionClick;_onClick(t){this.actionClick.emit(t)}render(){return e(i,{key:"
|
|
1
|
+
import{p as t,H as s,c,h as e,d as i,t as o}from"./p-DGg7OzDl.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.actionClick=c(this,"actionClick",7)}actionClick;_onClick(t){this.actionClick.emit(t)}render(){return e(i,{key:"4d83f95393704400034fef7313ac52bcc100be95",onClick:this._onClick.bind(this)},e("slot",{key:"ffbdeca0877eb9a76bc4ac1b8b77b37b60fdabd5"}))}static get style(){return":host{display:block}"}},[257,"lmvz-action"]),a=n,l=function(){"undefined"!=typeof customElements&&["lmvz-action"].forEach((t=>{"lmvz-action"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))};export{a as LmvzAction,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-D5FL8n1q.js";const p=o,r=s;export{p as LmvzButtonGroup,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as o,d as r}from"./p-B_rnXUwq.js";const s=o,p=r;export{s as LmvzButton,p as defineCustomElement}
|