@lmvz-ds/components 0.32.0 → 0.34.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/CHANGELOG.md +13 -0
- package/cjs/{aria-loader-BRo2FTGh.js → aria-loader-DWUVcapD.js} +1 -1
- package/cjs/{aria-validation-controller-Z4TtOp2l.js → aria-validation-controller-BC0Eaiv4.js} +1 -1
- package/cjs/async.util-BQ60l-WC.js +20 -0
- package/cjs/{ds.constants-CKeXfK-s.js → ds.constants-C6eKRAEu.js} +5 -1
- package/cjs/{element.util-Cq4y-_iX.js → element.util-Dbyc8yUG.js} +35 -0
- package/cjs/{icons-BQASWgk-.js → icons-snv0hyf1.js} +1 -1
- package/cjs/{index-3g9Z9sfF.js → index-Bn3k5SiE.js} +1044 -508
- package/cjs/index.cjs.js +7 -5
- package/cjs/{list-keyboard-controller-StN6Yn8W.js → list-keyboard-controller-Dm5S_l0D.js} +1 -1
- package/cjs/lmvz-action-list.cjs.entry.js +13 -6
- package/cjs/lmvz-button-group.cjs.entry.js +4 -4
- package/cjs/lmvz-button_2.cjs.entry.js +7 -7
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +5 -5
- package/cjs/lmvz-chip.cjs.entry.js +3 -3
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +4 -4
- package/cjs/lmvz-input.cjs.entry.js +4 -3
- package/cjs/lmvz-link.cjs.entry.js +4 -4
- package/cjs/lmvz-menuitem.cjs.entry.js +3 -3
- package/cjs/lmvz-message.cjs.entry.js +3 -3
- package/cjs/lmvz-modal.cjs.entry.js +6 -6
- package/cjs/lmvz-popover.cjs.entry.js +1570 -0
- package/cjs/lmvz-radio.cjs.entry.js +4 -4
- package/cjs/lmvz-select.cjs.entry.js +3 -3
- package/cjs/lmvz-snackbar.cjs.entry.js +1 -1
- package/cjs/lmvz-spinner.cjs.entry.js +1 -1
- package/cjs/lmvz-tab.cjs.entry.js +1 -1
- package/cjs/lmvz-tabs.cjs.entry.js +3 -3
- package/cjs/lmvz-toggle.cjs.entry.js +6 -5
- package/cjs/loader.cjs.js +1 -1
- package/cjs/{logger-DsM6xg6V.js → logger-NBdKPSou.js} +1 -1
- package/cjs/{stencil.util-DzvzXSwk.js → stencil.util-DxdYjVoH.js} +2 -10
- package/cjs/{svg-BMBduILB.js → svg-CysxzZw7.js} +1 -1
- package/collection/api/ds.constants.js +3 -1
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.css +150 -38
- package/collection/components/lmvz-action-list/lmvz-action-list.js +9 -1
- package/collection/components/lmvz-button/lmvz-button.css +14 -18
- package/collection/components/lmvz-button/lmvz-button.js +1 -1
- package/collection/components/lmvz-button-group/lmvz-button-group.css +1 -2
- package/collection/components/lmvz-card/lmvz-card.css +16 -19
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +3 -6
- package/collection/components/lmvz-link/lmvz-link.css +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -2
- package/collection/components/lmvz-modal/lmvz-modal.css +1 -2
- package/collection/components/lmvz-popover/lmvz-popover.css +46 -0
- package/collection/components/lmvz-popover/lmvz-popover.js +470 -0
- package/collection/components/lmvz-radio/lmvz-radio.css +2 -4
- package/collection/components/lmvz-radio/lmvz-radio.js +1 -1
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +1 -1
- package/collection/components/lmvz-spinner/lmvz-spinner.js +1 -1
- package/collection/components/lmvz-tab/lmvz-tab.js +1 -1
- package/collection/components/lmvz-tabs/lmvz-tabs.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.css +1 -2
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/utils/async/async.util.js +6 -0
- package/collection/utils/element/element.util.js +33 -0
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.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.d.ts +11 -0
- package/components/lmvz-popover.d.ts.bak +11 -0
- package/components/lmvz-popover.js +1 -0
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/p-0ctLESas.js +1 -0
- package/components/{p-CdDO7mQa.js → p-BDonpCG8.js} +1 -1
- package/components/p-BhSTYZC6.js +1 -0
- package/components/p-CE-QR3Tp.js +1 -0
- package/components/{p-C8znmF2h.js → p-CFTmV4XZ.js} +1 -1
- package/components/{p-CxfT9IA1.js → p-CK3Ixl1K.js} +1 -1
- package/components/p-Cghfdblf.js +12 -0
- package/components/{p-B4m1n4et.js → p-D-2gj6LP.js} +1 -1
- package/components/{p-CGmJG63p.js → p-D06Ds9Dh.js} +1 -1
- package/components/{p-DeO5Vbxh.js → p-D7S1WiEC.js} +1 -1
- package/components/p-D9nUtvTm.js +1 -0
- package/components/{p-DJ90327O.js → p-De-xQqdU.js} +1 -1
- package/components/{p-CcxjkCOx.js → p-DjvtQE7c.js} +1 -1
- package/esm/{aria-loader-GfsGHZHY.js → aria-loader-BfH06m7H.js} +1 -1
- package/esm/{aria-validation-controller-BnyUKeJ6.js → aria-validation-controller-BvOU1BO8.js} +1 -1
- package/esm/async.util-D9nUtvTm.js +17 -0
- package/esm/{ds.constants-DuEtnKRj.js → ds.constants-0ctLESas.js} +4 -2
- package/esm/{element.util-CxfT9IA1.js → element.util-B0eCxdyI.js} +34 -1
- package/esm/{icons-CmuFKDRz.js → icons-DQOFaux5.js} +1 -1
- package/esm/{index-Dh_9sN0q.js → index-7ULiPTL_.js} +1044 -508
- package/esm/index.js +5 -5
- package/esm/{list-keyboard-controller-BKa9Kd2t.js → list-keyboard-controller-tle6IRkv.js} +1 -1
- package/esm/lmvz-action-list.entry.js +13 -6
- package/esm/lmvz-button-group.entry.js +4 -4
- package/esm/lmvz-button_2.entry.js +7 -7
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +5 -5
- package/esm/lmvz-chip.entry.js +3 -3
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +4 -4
- package/esm/lmvz-input.entry.js +4 -3
- package/esm/lmvz-link.entry.js +4 -4
- package/esm/lmvz-menuitem.entry.js +3 -3
- package/esm/lmvz-message.entry.js +3 -3
- package/esm/lmvz-modal.entry.js +6 -6
- package/esm/lmvz-popover.entry.js +1568 -0
- package/esm/lmvz-radio.entry.js +4 -4
- package/esm/lmvz-select.entry.js +3 -3
- package/esm/lmvz-snackbar.entry.js +1 -1
- package/esm/lmvz-spinner.entry.js +1 -1
- package/esm/lmvz-tab.entry.js +1 -1
- package/esm/lmvz-tabs.entry.js +3 -3
- package/esm/lmvz-toggle.entry.js +6 -5
- package/esm/loader.js +1 -1
- package/esm/{logger-CGmJG63p.js → logger-D06Ds9Dh.js} +1 -1
- package/esm/{stencil.util-CJRqhXjK.js → stencil.util-wGFRYLwZ.js} +1 -9
- package/esm/{svg-B2YoIRuh.js → svg-Dz3GD0LB.js} +1 -1
- package/hydrate/index.js +1652 -25
- package/hydrate/index.mjs +1652 -25
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-03c38ff2.entry.js +1 -0
- package/lmvz-components/{p-582f44ff.entry.js → p-08613ba2.entry.js} +1 -1
- package/lmvz-components/p-0ctLESas.js +1 -0
- package/lmvz-components/{p-ed3c2b13.entry.js → p-11de5905.entry.js} +1 -1
- package/lmvz-components/{p-b79af711.entry.js → p-2036044c.entry.js} +1 -1
- package/lmvz-components/{p-c0d05a97.entry.js → p-4254aa38.entry.js} +1 -1
- package/lmvz-components/{p-8e1f66dd.entry.js → p-49e98627.entry.js} +1 -1
- package/lmvz-components/p-4f005b23.entry.js +1 -0
- package/lmvz-components/p-50063516.entry.js +1 -0
- package/lmvz-components/{p-48109e1d.entry.js → p-585470ef.entry.js} +1 -1
- package/lmvz-components/{p-24125bcf.entry.js → p-5bbbcfc0.entry.js} +1 -1
- package/lmvz-components/{p-c3e8092e.entry.js → p-6140866f.entry.js} +1 -1
- package/lmvz-components/p-9b7ce515.entry.js +1 -0
- package/lmvz-components/p-9f8fd077.entry.js +1 -0
- package/lmvz-components/{p-CxfT9IA1.js → p-B0eCxdyI.js} +1 -1
- package/lmvz-components/{p-CdDO7mQa.js → p-BDonpCG8.js} +1 -1
- package/lmvz-components/p-BhSTYZC6.js +1 -0
- package/lmvz-components/p-Cghfdblf.js +12 -0
- package/lmvz-components/p-CyDgnpOB.js +1 -0
- package/lmvz-components/{p-CGmJG63p.js → p-D06Ds9Dh.js} +1 -1
- package/lmvz-components/{p-CPOia2kT.js → p-D9PQIBzA.js} +1 -1
- package/lmvz-components/p-D9nUtvTm.js +1 -0
- package/lmvz-components/{p-CcxjkCOx.js → p-DjvtQE7c.js} +1 -1
- package/lmvz-components/{p-B4m1n4et.js → p-DuLiExhX.js} +1 -1
- package/lmvz-components/{p-1ce90ea7.entry.js → p-b0626234.entry.js} +1 -1
- package/lmvz-components/{p-fa2cd315.entry.js → p-b67ff2d1.entry.js} +1 -1
- package/lmvz-components/p-bfde444e.entry.js +1 -0
- package/lmvz-components/{p-703b10b5.entry.js → p-cc2734e9.entry.js} +1 -1
- package/lmvz-components/{p-25a78ead.entry.js → p-ce1a9f39.entry.js} +1 -1
- package/lmvz-components/{p-80a26307.entry.js → p-ddc28256.entry.js} +1 -1
- package/lmvz-components/p-fd455288.entry.js +1 -0
- package/manifest.json +386 -3
- package/package.json +7 -3
- package/types/api/ds.constants.d.ts +3 -1
- package/types/api/ds.types.d.ts +7 -0
- package/types/components/lmvz-popover/lmvz-popover.d.ts +37 -0
- package/types/components.d.ts +108 -1
- package/types/utils/async/async.util.d.ts +3 -0
- package/types/utils/element/element.util.d.ts +2 -0
- package/components/p-0s99QfRy.js +0 -12
- package/components/p-B0H9qIwE.js +0 -1
- package/components/p-CJRqhXjK.js +0 -1
- package/components/p-DuEtnKRj.js +0 -1
- package/lmvz-components/p-0s99QfRy.js +0 -12
- package/lmvz-components/p-4072b2fb.entry.js +0 -1
- package/lmvz-components/p-592d509b.entry.js +0 -1
- package/lmvz-components/p-6f61c24d.entry.js +0 -1
- package/lmvz-components/p-74c7521c.entry.js +0 -1
- package/lmvz-components/p-947e1fe6.entry.js +0 -1
- package/lmvz-components/p-CFsC37ww.js +0 -1
- package/lmvz-components/p-CJRqhXjK.js +0 -1
- package/lmvz-components/p-DuEtnKRj.js +0 -1
- package/lmvz-components/p-c00f0d96.entry.js +0 -1
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
3
|
+
import { isAriaValidationEnabled } from "../../utils/aria/aria-validation-controller";
|
|
4
|
+
import { waitFrame } from "../../utils/async/async.util";
|
|
5
|
+
import { canReceiveFocus, getDeepActiveElement, isInteractiveElement, walkShadowDOMUntil } from "../../utils/element/element.util";
|
|
6
|
+
export class LmvzPopover {
|
|
7
|
+
el;
|
|
8
|
+
closureController = new AbortController();
|
|
9
|
+
containerEl;
|
|
10
|
+
slotEl;
|
|
11
|
+
previouslyFocusedElement = null;
|
|
12
|
+
open = false;
|
|
13
|
+
anchor;
|
|
14
|
+
placement = 'bottom-start';
|
|
15
|
+
size = 'sm';
|
|
16
|
+
autoFocus = true;
|
|
17
|
+
label;
|
|
18
|
+
lmvzOpen;
|
|
19
|
+
lmvzClose;
|
|
20
|
+
lmvzCancel;
|
|
21
|
+
async show() {
|
|
22
|
+
this.open = true;
|
|
23
|
+
}
|
|
24
|
+
async hide() {
|
|
25
|
+
this.triggerClose();
|
|
26
|
+
}
|
|
27
|
+
async toggle() {
|
|
28
|
+
if (this.open) {
|
|
29
|
+
await this.hide();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
await this.show();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
autoAssignId(this.el);
|
|
37
|
+
validatePopoverAria(this.el, this.label, this.anchor, this.resolveAnchor());
|
|
38
|
+
}
|
|
39
|
+
handleOpenChange(isOpen) {
|
|
40
|
+
if (isOpen) {
|
|
41
|
+
this.onOpen();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.onClose();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
handleAnchorChange() {
|
|
48
|
+
if (this.open) {
|
|
49
|
+
this.updatePosition();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.removeCloseHandlers();
|
|
54
|
+
}
|
|
55
|
+
resolveAnchor() {
|
|
56
|
+
if (!this.anchor)
|
|
57
|
+
return null;
|
|
58
|
+
if (typeof this.anchor === 'string') {
|
|
59
|
+
return document.getElementById(this.anchor);
|
|
60
|
+
}
|
|
61
|
+
return this.anchor;
|
|
62
|
+
}
|
|
63
|
+
async updatePosition() {
|
|
64
|
+
const anchorEl = this.resolveAnchor();
|
|
65
|
+
const container = this.containerEl;
|
|
66
|
+
if (!anchorEl || !container)
|
|
67
|
+
return;
|
|
68
|
+
const placement = toFloatingUiPlacement(this.placement);
|
|
69
|
+
const { x, y } = await computePosition(anchorEl, container, {
|
|
70
|
+
placement,
|
|
71
|
+
middleware: [offset(4), flip(), shift({ padding: 8 })],
|
|
72
|
+
});
|
|
73
|
+
container.style.left = `${x}px`;
|
|
74
|
+
container.style.top = `${y}px`;
|
|
75
|
+
}
|
|
76
|
+
async onOpen() {
|
|
77
|
+
this.previouslyFocusedElement = getDeepActiveElement(document);
|
|
78
|
+
this.setupCloseHandlers();
|
|
79
|
+
console.log('onOpen');
|
|
80
|
+
await waitFrame();
|
|
81
|
+
await this.updatePosition();
|
|
82
|
+
autoAssignId(this.el);
|
|
83
|
+
this.applyAnchorAriaOpen();
|
|
84
|
+
this.lmvzOpen.emit();
|
|
85
|
+
await waitFrame();
|
|
86
|
+
if (this.autoFocus) {
|
|
87
|
+
this.focusFirst();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
onClose() {
|
|
91
|
+
this.removeCloseHandlers();
|
|
92
|
+
this.applyAnchorAriaClose();
|
|
93
|
+
this.restoreFocus();
|
|
94
|
+
this.lmvzClose.emit();
|
|
95
|
+
}
|
|
96
|
+
applyAnchorAriaOpen() {
|
|
97
|
+
const anchorEl = this.resolveAnchor();
|
|
98
|
+
if (!anchorEl)
|
|
99
|
+
return;
|
|
100
|
+
if (!anchorEl.hasAttribute('aria-haspopup')) {
|
|
101
|
+
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
102
|
+
}
|
|
103
|
+
anchorEl.setAttribute('aria-expanded', 'true');
|
|
104
|
+
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
105
|
+
}
|
|
106
|
+
applyAnchorAriaClose() {
|
|
107
|
+
const anchorEl = this.resolveAnchor();
|
|
108
|
+
if (!anchorEl)
|
|
109
|
+
return;
|
|
110
|
+
anchorEl.setAttribute('aria-expanded', 'false');
|
|
111
|
+
}
|
|
112
|
+
focusFirst() {
|
|
113
|
+
const { slotEl } = this;
|
|
114
|
+
if (!slotEl)
|
|
115
|
+
return;
|
|
116
|
+
const assigned = slotEl.assignedElements({ flatten: true });
|
|
117
|
+
for (const el of assigned) {
|
|
118
|
+
const focusable = walkShadowDOMUntil(el, canReceiveFocus);
|
|
119
|
+
if (focusable) {
|
|
120
|
+
focusable.focus();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
restoreFocus() {
|
|
126
|
+
const el = this.previouslyFocusedElement;
|
|
127
|
+
if (el?.isConnected) {
|
|
128
|
+
el.focus();
|
|
129
|
+
}
|
|
130
|
+
this.previouslyFocusedElement = null;
|
|
131
|
+
}
|
|
132
|
+
triggerClose() {
|
|
133
|
+
const event = this.lmvzCancel.emit();
|
|
134
|
+
if (!event.defaultPrevented) {
|
|
135
|
+
this.open = false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
setupCloseHandlers() {
|
|
139
|
+
const options = { signal: this.closureController.signal };
|
|
140
|
+
document.addEventListener('mousedown', (event) => {
|
|
141
|
+
if (!this.open)
|
|
142
|
+
return;
|
|
143
|
+
if (this.el.contains(event.target))
|
|
144
|
+
return;
|
|
145
|
+
this.triggerClose();
|
|
146
|
+
}, options);
|
|
147
|
+
document.addEventListener('keydown', (event) => {
|
|
148
|
+
if (!this.open)
|
|
149
|
+
return;
|
|
150
|
+
if (event.key !== 'Escape')
|
|
151
|
+
return;
|
|
152
|
+
this.triggerClose();
|
|
153
|
+
}, options);
|
|
154
|
+
}
|
|
155
|
+
removeCloseHandlers() {
|
|
156
|
+
this.closureController.abort();
|
|
157
|
+
}
|
|
158
|
+
render() {
|
|
159
|
+
return (h(Host, { key: '3dd462a66f17c1617e44787107379d9e4d8ca321' }, h("div", { key: '27106bc8f3169eb07e0d671635074ddb53feb652', role: "dialog", part: "container", class: `container lmvz-wrapper-card-${this.size}`, "aria-label": this.label || undefined, ref: (el) => (this.containerEl = el) }, h("slot", { key: '3401e621d999a225aeb7cb23fa4f5412544a6dab', ref: (el) => (this.slotEl = el) }))));
|
|
160
|
+
}
|
|
161
|
+
static get is() { return "lmvz-popover"; }
|
|
162
|
+
static get encapsulation() { return "shadow"; }
|
|
163
|
+
static get originalStyleUrls() {
|
|
164
|
+
return {
|
|
165
|
+
"$": ["lmvz-popover.css"]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get styleUrls() {
|
|
169
|
+
return {
|
|
170
|
+
"$": ["lmvz-popover.css"]
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
static get properties() {
|
|
174
|
+
return {
|
|
175
|
+
"open": {
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"mutable": true,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "boolean",
|
|
180
|
+
"resolved": "boolean",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [{
|
|
187
|
+
"name": "default",
|
|
188
|
+
"text": "false"
|
|
189
|
+
}],
|
|
190
|
+
"text": "Whether the popover is open."
|
|
191
|
+
},
|
|
192
|
+
"getter": false,
|
|
193
|
+
"setter": false,
|
|
194
|
+
"reflect": true,
|
|
195
|
+
"attribute": "open",
|
|
196
|
+
"defaultValue": "false"
|
|
197
|
+
},
|
|
198
|
+
"anchor": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "string | HTMLElement",
|
|
203
|
+
"resolved": "HTMLElement | string | undefined",
|
|
204
|
+
"references": {
|
|
205
|
+
"HTMLElement": {
|
|
206
|
+
"location": "global",
|
|
207
|
+
"id": "global::HTMLElement"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": true,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": "The anchor element or its id. Used for positioning."
|
|
216
|
+
},
|
|
217
|
+
"getter": false,
|
|
218
|
+
"setter": false,
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"attribute": "anchor"
|
|
221
|
+
},
|
|
222
|
+
"placement": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "Popover.Placement",
|
|
227
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"end\" | \"start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
228
|
+
"references": {
|
|
229
|
+
"Popover": {
|
|
230
|
+
"location": "import",
|
|
231
|
+
"path": "../../api",
|
|
232
|
+
"id": "src/api/index.d.ts::Popover",
|
|
233
|
+
"referenceLocation": "Popover"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [{
|
|
241
|
+
"name": "default",
|
|
242
|
+
"text": "'bottom-start'"
|
|
243
|
+
}],
|
|
244
|
+
"text": "Preferred placement relative to the anchor."
|
|
245
|
+
},
|
|
246
|
+
"getter": false,
|
|
247
|
+
"setter": false,
|
|
248
|
+
"reflect": false,
|
|
249
|
+
"attribute": "placement",
|
|
250
|
+
"defaultValue": "'bottom-start'"
|
|
251
|
+
},
|
|
252
|
+
"size": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"mutable": false,
|
|
255
|
+
"complexType": {
|
|
256
|
+
"original": "Popover.Size",
|
|
257
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
258
|
+
"references": {
|
|
259
|
+
"Popover": {
|
|
260
|
+
"location": "import",
|
|
261
|
+
"path": "../../api",
|
|
262
|
+
"id": "src/api/index.d.ts::Popover",
|
|
263
|
+
"referenceLocation": "Popover"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [{
|
|
271
|
+
"name": "default",
|
|
272
|
+
"text": "'sm'"
|
|
273
|
+
}],
|
|
274
|
+
"text": "Controls the size variant of the card surface."
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"reflect": false,
|
|
279
|
+
"attribute": "size",
|
|
280
|
+
"defaultValue": "'sm'"
|
|
281
|
+
},
|
|
282
|
+
"autoFocus": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "boolean",
|
|
287
|
+
"resolved": "boolean",
|
|
288
|
+
"references": {}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": false,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [{
|
|
294
|
+
"name": "default",
|
|
295
|
+
"text": "true"
|
|
296
|
+
}],
|
|
297
|
+
"text": "Whether to move focus to the first focusable element on open."
|
|
298
|
+
},
|
|
299
|
+
"getter": false,
|
|
300
|
+
"setter": false,
|
|
301
|
+
"reflect": false,
|
|
302
|
+
"attribute": "auto-focus",
|
|
303
|
+
"defaultValue": "true"
|
|
304
|
+
},
|
|
305
|
+
"label": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string | undefined",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": true,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "Accessible label for the popover container."
|
|
318
|
+
},
|
|
319
|
+
"getter": false,
|
|
320
|
+
"setter": false,
|
|
321
|
+
"reflect": false,
|
|
322
|
+
"attribute": "label"
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
static get events() {
|
|
327
|
+
return [{
|
|
328
|
+
"method": "lmvzOpen",
|
|
329
|
+
"name": "lmvzOpen",
|
|
330
|
+
"bubbles": true,
|
|
331
|
+
"cancelable": true,
|
|
332
|
+
"composed": true,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Fired after the popover opens."
|
|
336
|
+
},
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "void",
|
|
339
|
+
"resolved": "void",
|
|
340
|
+
"references": {}
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
"method": "lmvzClose",
|
|
344
|
+
"name": "lmvzClose",
|
|
345
|
+
"bubbles": true,
|
|
346
|
+
"cancelable": true,
|
|
347
|
+
"composed": true,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": "Fired after the popover closes."
|
|
351
|
+
},
|
|
352
|
+
"complexType": {
|
|
353
|
+
"original": "void",
|
|
354
|
+
"resolved": "void",
|
|
355
|
+
"references": {}
|
|
356
|
+
}
|
|
357
|
+
}, {
|
|
358
|
+
"method": "lmvzCancel",
|
|
359
|
+
"name": "lmvzCancel",
|
|
360
|
+
"bubbles": true,
|
|
361
|
+
"cancelable": true,
|
|
362
|
+
"composed": true,
|
|
363
|
+
"docs": {
|
|
364
|
+
"tags": [],
|
|
365
|
+
"text": "Fired before light-dismiss or Escape close.\nCall `event.preventDefault()` to veto the close."
|
|
366
|
+
},
|
|
367
|
+
"complexType": {
|
|
368
|
+
"original": "void",
|
|
369
|
+
"resolved": "void",
|
|
370
|
+
"references": {}
|
|
371
|
+
}
|
|
372
|
+
}];
|
|
373
|
+
}
|
|
374
|
+
static get methods() {
|
|
375
|
+
return {
|
|
376
|
+
"show": {
|
|
377
|
+
"complexType": {
|
|
378
|
+
"signature": "() => Promise<void>",
|
|
379
|
+
"parameters": [],
|
|
380
|
+
"references": {
|
|
381
|
+
"Promise": {
|
|
382
|
+
"location": "global",
|
|
383
|
+
"id": "global::Promise"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"return": "Promise<void>"
|
|
387
|
+
},
|
|
388
|
+
"docs": {
|
|
389
|
+
"text": "Opens the popover.",
|
|
390
|
+
"tags": []
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"hide": {
|
|
394
|
+
"complexType": {
|
|
395
|
+
"signature": "() => Promise<void>",
|
|
396
|
+
"parameters": [],
|
|
397
|
+
"references": {
|
|
398
|
+
"Promise": {
|
|
399
|
+
"location": "global",
|
|
400
|
+
"id": "global::Promise"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"return": "Promise<void>"
|
|
404
|
+
},
|
|
405
|
+
"docs": {
|
|
406
|
+
"text": "Closes the popover, firing lmvzCancel first. If cancelled, the popover stays open.",
|
|
407
|
+
"tags": []
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"toggle": {
|
|
411
|
+
"complexType": {
|
|
412
|
+
"signature": "() => Promise<void>",
|
|
413
|
+
"parameters": [],
|
|
414
|
+
"references": {
|
|
415
|
+
"Promise": {
|
|
416
|
+
"location": "global",
|
|
417
|
+
"id": "global::Promise"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"return": "Promise<void>"
|
|
421
|
+
},
|
|
422
|
+
"docs": {
|
|
423
|
+
"text": "Toggles the popover open state.",
|
|
424
|
+
"tags": []
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
static get elementRef() { return "el"; }
|
|
430
|
+
static get watchers() {
|
|
431
|
+
return [{
|
|
432
|
+
"propName": "open",
|
|
433
|
+
"methodName": "handleOpenChange"
|
|
434
|
+
}, {
|
|
435
|
+
"propName": "anchor",
|
|
436
|
+
"methodName": "handleAnchorChange"
|
|
437
|
+
}];
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
let popoverIdCounter = 0;
|
|
441
|
+
function autoAssignId(hostEl) {
|
|
442
|
+
if (!hostEl.getAttribute('id')) {
|
|
443
|
+
hostEl.setAttribute('id', `lmvz-popover-${popoverIdCounter++}`);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
function toFloatingUiPlacement(placement) {
|
|
447
|
+
if (placement === 'start')
|
|
448
|
+
return 'left';
|
|
449
|
+
if (placement === 'end')
|
|
450
|
+
return 'right';
|
|
451
|
+
return placement;
|
|
452
|
+
}
|
|
453
|
+
function validatePopoverAria(hostEl, label, anchorProp, anchorEl) {
|
|
454
|
+
if (!isAriaValidationEnabled())
|
|
455
|
+
return;
|
|
456
|
+
const hasAriaLabel = !!label;
|
|
457
|
+
const hasAriaLabelledBy = hostEl.hasAttribute('aria-labelledby');
|
|
458
|
+
if (!hasAriaLabel && !hasAriaLabelledBy) {
|
|
459
|
+
console.warn('[lmvz-popover] Host element has no accessible label. Provide a `label` prop or an `aria-labelledby` attribute pointing to a valid element.');
|
|
460
|
+
}
|
|
461
|
+
if (!anchorProp)
|
|
462
|
+
return;
|
|
463
|
+
if (!anchorEl) {
|
|
464
|
+
console.warn('[lmvz-popover] Anchor prop is set but resolved to null. Ensure the anchor element exists in the DOM when the component loads.');
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
if (!isInteractiveElement(anchorEl)) {
|
|
468
|
+
console.warn('[lmvz-popover] Anchor element is not interactive. Ensure the anchor is a button, link, input, select, textarea, has a `tabindex` attribute, or has an ARIA role that implies interactivity (button, link, menuitem, option, combobox, listbox, checkbox, radio, switch, tab).');
|
|
469
|
+
}
|
|
470
|
+
}
|
|
@@ -110,16 +110,14 @@ input {
|
|
|
110
110
|
min-width: 0;
|
|
111
111
|
}
|
|
112
112
|
label {
|
|
113
|
-
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5
|
|
114
|
-
Router);
|
|
113
|
+
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);
|
|
115
114
|
color: var(--radio-label-color);
|
|
116
115
|
cursor: pointer;
|
|
117
116
|
transition: color var(--radio-duration) var(--radio-easing);
|
|
118
117
|
}
|
|
119
118
|
.helper-text {
|
|
120
119
|
display: block;
|
|
121
|
-
font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.5
|
|
122
|
-
Router);
|
|
120
|
+
font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.5 Router);
|
|
123
121
|
color: var(--radio-helper-color);
|
|
124
122
|
margin-block-start: 2px;
|
|
125
123
|
}
|
|
@@ -137,7 +137,7 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
137
137
|
this.radioGroupController.setFocused(target);
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: 'c233b8f8e67016dd9a8622359bd91d3193735438' }, h("input", { key: '6a0a028f4ae346b60f86109d33058f7a04f0f2f8', type: "radio", id: this.radioId, name: this.name ?? undefined, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, autoFocus: this.autofocus, "aria-invalid": this.error ? 'true' : undefined, "aria-describedby": this.helperId, ref: (el) => (this.nativeInput = el), onChange: this.handleChange }), h("span", { key: 'f86096dd776236e07292dab77a37aeedffb8d8d4', class: "circle", "aria-hidden": "true" }, this.checked && h("span", { key: '8e93beefee742af62775d4d5945df8d13adb739f', class: "dot" })), h("span", { key: '19df96e6d015d0f74c96781ae49191a542a4f41d', class: "content" }, h("label", { key: 'b678b54ca139191ff78d5f503b73ea407eeb0708', htmlFor: this.radioId }, this.label), h("span", { key: '4a1e8a60594e959cb5549dd20b3d35a715ce1d99', "aria-live": "polite", class: "helper-text", id: this.helperId }, this.helperText))));
|
|
141
141
|
}
|
|
142
142
|
static get is() { return "lmvz-radio"; }
|
|
143
143
|
static get encapsulation() { return "scoped"; }
|
|
@@ -51,7 +51,7 @@ export class LmvzSelect extends ReactiveControllerHost {
|
|
|
51
51
|
render() {
|
|
52
52
|
const hasValue = this.hasValue;
|
|
53
53
|
const shouldShowLabel = hasValue;
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'f1180d4a5f1c30414b06c19314eb75630aa181f7', "data-highlighted": String(this.highlighted) }, h("div", { key: '01088c7f3315faab1fb23c99cf8b30f7d59abfc6', class: hasValue ? 'select-wrapper has-value' : 'select-wrapper' }, h("label", { key: '34d23292b6b65fac000f822e1e2839e28b1bfee9', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && h("span", { key: 'ba171cdd9b53f8fa7b7fcb2c39a0b4aa69940b95', "aria-hidden": "true" }, " *")), h("div", { key: '798a6ef187b4aaaa45ecb3d6f94c30e7facb7a38', "aria-hidden": "true" }, h("span", { key: '33ea2169d94f4f8cf6263ed0c3bd6a9e593207a4' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: '0ea2d4987587a1a42dfd037dcefeed3f1b3356ef', "aria-hidden": "true" }, " *")), h("span", { key: '7bd24b3921cc5cd261f563476a79d61a288d60bb' }, h("svg", { key: '9887853724abada1fe36f7225db7903ee6e4040d', width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { key: 'b55a82230d46944ca3bd46f00f8c59b1a75ab8b8', d: "M20.3334 8.66663L12.0001 17L3.66675 8.66663", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("select", { key: 'd786f49b4522baf4c803ed3046b3606f29d6dae1', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && h("option", { key: '5ffa7ffb7cd79c28a8bd212cc4d123dceb77aad4', value: "", disabled: true, selected: true, hidden: true }), h("slot", { key: '8a4141ead35cfd07c14d869715397d12ea8b64d7' }))), this.helperText && h("div", { key: 'dc5ccd28b0a903f6ed674d994e302caed1d9e9bb', role: "status" }, this.helperText)));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "lmvz-select"; }
|
|
57
57
|
static get encapsulation() { return "scoped"; }
|
|
@@ -58,7 +58,7 @@ export class LmvzSnackbar {
|
|
|
58
58
|
this.el.dispatchEvent(new CustomEvent('lmvzAction', { bubbles: false, composed: false }));
|
|
59
59
|
};
|
|
60
60
|
render() {
|
|
61
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '6c2898f187ed9b456dd0c13294eb466270b116cb', class: this.animationClass }, h("lmvz-icon", { key: '9b4903f0e2099d44f0ed1773ed23f948b894f603', icon: STATUS_SVG[this.status], size: "md", weight: "bold" }), h("span", { key: '38163523ce0bba29dbe387e5c808ae9f5f2c2c55', class: "message" }, this.message), this.actionLabel && (h("lmvz-button", { key: 'bf5eb3e5075dec7c10f95a46db207ccb3181c88b', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "lmvz-snackbar"; }
|
|
64
64
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ export class LmvzSpinner {
|
|
|
4
4
|
ariaLabel;
|
|
5
5
|
render() {
|
|
6
6
|
const hasLabel = !!this.ariaLabel?.trim();
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '75f8aabfe2eae72d29c5f0aa0663d0c37286ab78', role: hasLabel ? 'status' : undefined, "aria-label": hasLabel ? this.ariaLabel : undefined, "aria-hidden": hasLabel ? undefined : 'true' }, h("svg", { key: 'aadf9daaa1f363752e08eed3136fc8a8f15d3bdf', part: "indicator", viewBox: "0 0 16 16", "aria-hidden": "true" }, h("circle", { key: 'e658f4be70b5bd03b3828071cbce977576afa3c8', pathLength: "100", cx: "8", cy: "8", r: "6" }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "lmvz-spinner"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,7 +14,7 @@ export class LmvzTab {
|
|
|
14
14
|
this.el.dispatchEvent(new CustomEvent('lmvzTabReady', { bubbles: true, composed: false }));
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '6bb908c4956e84cd344fc8e81b400d33bb2dce98' }, h("button", { key: 'fbc5b650c9bfb5653d17f9a66a14ffbf0fe87f83', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, h("slot", { key: 'a16da4d11ecca9db3d03da3b0076b698295ead1f', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), h("span", { key: 'e9e83fd4aa556716af3c7b7e52e1e1d8a5a33061', class: "label" }, h("slot", { key: 'a4c0378e62d67d7bcc772ff6a77ae1a86f41208c' })), h("span", { key: 'de03b763d99f55b8773334df3d18c2d3855de4de', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "lmvz-tab"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -232,7 +232,7 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
232
232
|
this.selectTab(value);
|
|
233
233
|
};
|
|
234
234
|
render() {
|
|
235
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: '2f681e7bfc21bd513bcb994f92c893bbc03ff713', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, h("div", { key: '456ce3d11ccacd3e79995ffa643bb164127344b3', role: "tablist", "aria-orientation": this.orientation, class: "tablist" }, h("slot", { key: 'e4e4c698dde6416e0ba4d319e64d9ba3a2f79a19', ref: (el) => (this.tabSlotEl = el) })), h("div", { key: '3b90c8e7006dbf75e22b8377a18ac47488b1184f', part: "panels-container", class: "panels-container" }, h("slot", { key: '4cb4a9b04ab529a1bc7744a1893acf9a71c5c65e', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
|
|
236
236
|
}
|
|
237
237
|
static get is() { return "lmvz-tabs"; }
|
|
238
238
|
static get encapsulation() { return "shadow"; }
|
|
@@ -110,8 +110,7 @@ input {
|
|
|
110
110
|
background-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4);
|
|
111
111
|
}
|
|
112
112
|
label {
|
|
113
|
-
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5
|
|
114
|
-
Router);
|
|
113
|
+
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);
|
|
115
114
|
color: var(--lmvz-semantic-color-on-surface-primary, #000000);
|
|
116
115
|
cursor: pointer;
|
|
117
116
|
}
|
|
@@ -65,7 +65,7 @@ export class LmvzToggle extends ReactiveControllerHost {
|
|
|
65
65
|
this.lmvzChange.emit(newChecked);
|
|
66
66
|
};
|
|
67
67
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '901f821ddae696fe877435bf20d08e4032cd61ee' }, h("span", { key: 'bbac0ab3e40e426be511cc49a0dcb2497edd7a9a', class: "track" }, h("input", { key: '1df7a78df28517189f690c6d453193e30d97d9ea', type: "checkbox", role: "switch", id: this.toggleId, checked: this.checked, disabled: this.disabled, required: this.required, name: this.name, value: this.value, form: this.form, ref: (el) => (this.nativeInputElement = el), onChange: this.handleChange }), h("span", { key: 'e975c1c280983355f2504fba15553a9f19e4216f', class: "thumb", "aria-hidden": "true" })), h("label", { key: '09b3305a1d0d6c116310cf88d1f8a92f6856f57e', htmlFor: this.toggleId }, this.label)));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "lmvz-toggle"; }
|
|
71
71
|
static get encapsulation() { return "scoped"; }
|
|
@@ -20,7 +20,7 @@ export class HeaderIntegration {
|
|
|
20
20
|
this.activeNav = navId;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '0f1fa3c964fddcf63eb73be55916d8c2f4a630e5' }, h("lmvz-header", { key: '89d4a59c997a1ff05e536fdde5898a3763f86653', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: 'fa781e3736311d06fab93203736bac84a3900450', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '7dd41dd42c216fb13f0702db2365c8445ddd99a3', href: "#" }, "Lehrmittel")), h("lmvz-menuitem", { key: 'd3b5ea3523c3cb908d543b9a37dd6e6e00f1b034', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '18dc59245cc938959ac693a910687eaa7be5d657', href: "#" }, "Verwaltung")), h("lmvz-menuitem", { key: '149f5349580f0934b41c86bc77cc8a86659fc89f', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'd71d55a21fee01b1f8041e7bb60f5848374dd133', ...typedIconFromSet('lmvz', 'edit') }), "Deutsch 7"), h("lmvz-menuitem", { key: '2821335ea576bff31d06c684544ec049985dc054', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '8f1779694542aa3f28b15deaa4c0690b34280984', ...typedIconFromSet('lmvz', 'edit') }), "Mathe 2"), h("lmvz-menuitem", { key: '993dd7117c561c3428e27623e290a782997ca638', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: 'a95c11de062609b7d88d369872c8521472decaac', ...typedIconFromSet('lmvz', 'settings') }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: '6fd78c92f39adf2eeba6e562cd7eb1a5a9fc0660', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: '579ec3fc78d316e2746b7bd9744f05eb7fc7989b', ...typedIconFromSet('lmvz', 'settings') })), h("lmvz-button", { key: '836beb07c150f02095431d29f4b7945cb2b6e55d', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: 'e47cca91742bf91fca8bbb20e47073deb6e7463a', ...typedIconFromSet('lmvz', 'user'), size: "lg" })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "header-integration"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,6 +34,12 @@ const transitionEnd = (el, expectedDuration = 0, callback) => {
|
|
|
34
34
|
}
|
|
35
35
|
return unregister;
|
|
36
36
|
};
|
|
37
|
+
export const nextFrame = () => new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
38
|
+
export const wait = () => new Promise((resolve) => setTimeout(() => resolve()));
|
|
39
|
+
export const waitFrame = async () => {
|
|
40
|
+
await wait();
|
|
41
|
+
await nextFrame();
|
|
42
|
+
};
|
|
37
43
|
export const raf = (h) => {
|
|
38
44
|
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
39
45
|
return __zone_symbol__requestAnimationFrame(h);
|