@lmvz-ds/components 0.21.0 → 0.22.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 +6 -0
- package/assets/icons/close-sm.svg +3 -0
- package/cjs/{component-Csg9MtNK.js → component-C7cavwmZ.js} +3 -0
- package/cjs/{index-C2yDXRqP.js → index-lW-SEvL7.js} +67 -3
- package/cjs/lmvz-action.cjs.entry.js +2 -2
- package/cjs/{lmvz-button.cjs.entry.js → lmvz-button_2.cjs.entry.js} +139 -14
- package/cjs/lmvz-card.cjs.entry.js +2 -2
- package/cjs/lmvz-checkbox.cjs.entry.js +3 -3
- package/cjs/lmvz-chip.cjs.entry.js +4 -4
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-header_2.cjs.entry.js +3 -3
- package/cjs/lmvz-input.cjs.entry.js +4 -4
- package/cjs/lmvz-menuitem.cjs.entry.js +3 -3
- package/cjs/lmvz-modal.cjs.entry.js +349 -0
- package/cjs/lmvz-select.cjs.entry.js +4 -4
- package/cjs/lmvz-toggle.cjs.entry.js +5 -5
- package/cjs/loader.cjs.js +2 -2
- package/cjs/{reactive-controller-host-BA4ZhjKA.js → reactive-controller-host-DnSTWHCF.js} +1 -1
- package/collection/assets/icons/close-sm.svg +3 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-button/lmvz-button.js +98 -10
- package/collection/components/lmvz-chip/lmvz-chip.js +2 -2
- package/collection/components/lmvz-modal/lmvz-modal.css +120 -0
- package/collection/components/lmvz-modal/lmvz-modal.js +448 -0
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- 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.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-menuitem.js +1 -1
- package/components/lmvz-modal.d.ts +11 -0
- package/components/lmvz-modal.d.ts.bak +11 -0
- package/components/lmvz-modal.js +1 -0
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/p-Boj0PCdB.js +1 -0
- package/components/p-CK8cAKcB.js +1 -0
- package/components/p-Cc6dOWwS.js +1 -0
- package/components/{p-BuFx0tTm.js → p-DBc1BzQb.js} +1 -1
- package/components/p-DOTK1OW3.js +1 -0
- package/esm/{component-DIrAQ4IB.js → component-DOTK1OW3.js} +3 -0
- package/esm/{index-saW7O-EW.js → index-Aa_425iY.js} +67 -3
- package/esm/lmvz-action.entry.js +2 -2
- package/esm/{lmvz-button.entry.js → lmvz-button_2.entry.js} +139 -15
- package/esm/lmvz-card.entry.js +2 -2
- package/esm/lmvz-checkbox.entry.js +3 -3
- package/esm/lmvz-chip.entry.js +4 -4
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-header_2.entry.js +3 -3
- package/esm/lmvz-input.entry.js +4 -4
- package/esm/lmvz-menuitem.entry.js +3 -3
- package/esm/lmvz-modal.entry.js +347 -0
- package/esm/lmvz-select.entry.js +4 -4
- package/esm/lmvz-toggle.entry.js +5 -5
- package/esm/loader.js +3 -3
- package/esm/{reactive-controller-host-DHcPpJW7.js → reactive-controller-host-lF2kXM1x.js} +1 -1
- package/hydrate/index.js +451 -26
- package/hydrate/index.mjs +451 -26
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-08a08b63.entry.js +1 -0
- package/lmvz-components/p-1b181e90.entry.js +1 -0
- package/lmvz-components/p-23fb2476.entry.js +1 -0
- package/lmvz-components/p-3846ba08.entry.js +1 -0
- package/lmvz-components/p-6bb145e4.entry.js +1 -0
- package/lmvz-components/{p-2f83d7a2.entry.js → p-7a310b1e.entry.js} +1 -1
- package/lmvz-components/p-Aa_425iY.js +2 -0
- package/lmvz-components/{p-GdMr6Qlp.js → p-DCTzMRMQ.js} +1 -1
- package/lmvz-components/p-DOTK1OW3.js +1 -0
- package/lmvz-components/p-b7940687.entry.js +1 -0
- package/lmvz-components/p-d984e118.entry.js +1 -0
- package/lmvz-components/p-db8306a5.entry.js +1 -0
- package/lmvz-components/p-ea335543.entry.js +1 -0
- package/lmvz-components/p-f8ea0eb2.entry.js +1 -0
- package/manifest.json +252 -5
- package/package.json +5 -1
- package/types/api/index.d.ts +6 -0
- package/types/components/lmvz-button/lmvz-button.d.ts +4 -0
- package/types/components/lmvz-modal/lmvz-modal.d.ts +58 -0
- package/types/components.d.ts +77 -0
- package/cjs/lmvz-icon.cjs.entry.js +0 -100
- package/components/p-C_bScbrd.js +0 -1
- package/components/p-DIrAQ4IB.js +0 -1
- package/esm/lmvz-icon.entry.js +0 -98
- package/lmvz-components/p-0f7a4236.entry.js +0 -1
- package/lmvz-components/p-32171f4f.entry.js +0 -1
- package/lmvz-components/p-400b2318.entry.js +0 -1
- package/lmvz-components/p-43e295ba.entry.js +0 -1
- package/lmvz-components/p-851969bd.entry.js +0 -1
- package/lmvz-components/p-9f9d845d.entry.js +0 -1
- package/lmvz-components/p-DIrAQ4IB.js +0 -1
- package/lmvz-components/p-a12f95da.entry.js +0 -1
- package/lmvz-components/p-ab4437dc.entry.js +0 -1
- package/lmvz-components/p-c3b7890d.entry.js +0 -1
- package/lmvz-components/p-d0a0e206.entry.js +0 -1
- package/lmvz-components/p-saW7O-EW.js +0 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides;
|
|
3
|
+
/**
|
|
4
|
+
* This defines the order of our lmvz-ds' CSS layers. See readme.md for details.
|
|
5
|
+
* Important: Always import this file _before_ layering your own styles!
|
|
6
|
+
*/
|
|
7
|
+
@layer lmvz-ds.theme {
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: Router;
|
|
10
|
+
src:
|
|
11
|
+
local('Router-Book'),
|
|
12
|
+
url('/assets/fonts/Router-Book.woff') format('woff'),
|
|
13
|
+
local('Router');
|
|
14
|
+
font-weight: 400 normal;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: Router;
|
|
19
|
+
src:
|
|
20
|
+
local('Router-Medium'),
|
|
21
|
+
url('/assets/fonts/Router-Medium.woff') format('woff'),
|
|
22
|
+
local('Router');
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: Router;
|
|
28
|
+
src:
|
|
29
|
+
local('Router-Bold'),
|
|
30
|
+
url('/assets/fonts/Router-Bold.woff') format('woff'),
|
|
31
|
+
local('Router');
|
|
32
|
+
font-weight: 700 bold;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
@layer lmvz-ds.reset {
|
|
37
|
+
body {
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h1,
|
|
42
|
+
h2,
|
|
43
|
+
h3,
|
|
44
|
+
h4,
|
|
45
|
+
h5,
|
|
46
|
+
h6 {
|
|
47
|
+
margin: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
:host {
|
|
52
|
+
display: contents;
|
|
53
|
+
color: var(--lmvz-semantic-color-on-surface-primary, #000000);
|
|
54
|
+
|
|
55
|
+
--lmvz-modal-shell-padding: var(--lmvz-dimension-16-24, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));
|
|
56
|
+
--lmvz-modal-shell-gap: var(--lmvz-dimension-16-24, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));
|
|
57
|
+
--lmvz-modal-actions-gap: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));
|
|
58
|
+
--lmvz-modal-viewport-padding: var(--lmvz-dimension-16-24, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));
|
|
59
|
+
|
|
60
|
+
/* TODO(LDHCID-135): Assumption until a modal container token/value is available. */
|
|
61
|
+
--lmvz-modal-shell-max-width: 40rem;
|
|
62
|
+
}
|
|
63
|
+
dialog {
|
|
64
|
+
border: none;
|
|
65
|
+
padding: 0;
|
|
66
|
+
background: transparent;
|
|
67
|
+
color: var(--lmvz-semantic-color-on-surface-primary, #000000);
|
|
68
|
+
}
|
|
69
|
+
dialog::backdrop {
|
|
70
|
+
/* TODO(LDHCID-135): Missing token for the modal backdrop color */
|
|
71
|
+
/* Fallback for browsers without CSS Color Level 4 relative-color syntax (Chrome < 119, FF < 128, Safari < 16.4) */
|
|
72
|
+
background: rgba(0, 0, 0, 0.19);
|
|
73
|
+
background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.19);
|
|
74
|
+
}
|
|
75
|
+
.modal-shell {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
gap: var(--lmvz-modal-shell-gap);
|
|
79
|
+
inline-size: min(calc(100vw - (2 * var(--lmvz-modal-viewport-padding))), var(--lmvz-modal-shell-max-width));
|
|
80
|
+
max-inline-size: 100%;
|
|
81
|
+
padding: var(--lmvz-modal-shell-padding);
|
|
82
|
+
border-radius: var(--lmvz-semantic-border-radius-lg, 14px);
|
|
83
|
+
background: var(--lmvz-semantic-color-surface-primary, #ffffff);
|
|
84
|
+
/* TODO(LDHCID-135): clarify overflow behaviour */
|
|
85
|
+
overflow: auto;
|
|
86
|
+
}
|
|
87
|
+
.header {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: flex-start;
|
|
90
|
+
justify-content: flex-end;
|
|
91
|
+
gap: var(--lmvz-modal-shell-gap);
|
|
92
|
+
}
|
|
93
|
+
.title {
|
|
94
|
+
min-inline-size: 0;
|
|
95
|
+
font: var(--lmvz-typography-heading-lg, 500 clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem) / 1.4
|
|
96
|
+
Router);
|
|
97
|
+
}
|
|
98
|
+
.has-title .title {
|
|
99
|
+
flex: 1 1 auto;
|
|
100
|
+
}
|
|
101
|
+
.body {
|
|
102
|
+
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4
|
|
103
|
+
Router);
|
|
104
|
+
}
|
|
105
|
+
.actions {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-wrap: wrap;
|
|
108
|
+
justify-content: flex-end;
|
|
109
|
+
gap: var(--lmvz-modal-actions-gap);
|
|
110
|
+
font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4
|
|
111
|
+
Router);
|
|
112
|
+
/* TODO(LDHCID-135): Action wrapping threshold remains an assumption and currently follows intrinsic content width */
|
|
113
|
+
}
|
|
114
|
+
.close-button {
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
flex: none;
|
|
117
|
+
}
|
|
118
|
+
::slotted([slot='actions'][hidden]) {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { toValidSvgStringWithFallback } from "@lmvz-ds/lib-ts/validation/svg.js";
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
import closeIcon from "../../assets/icons/close-sm.svg";
|
|
4
|
+
import { AriaValidationController, isAriaValidationEnabled } from "../../utils/aria/aria-validation-controller";
|
|
5
|
+
import { getDeepActiveElement, inheritAriaAttributes } from "../../utils/component";
|
|
6
|
+
import { ReactiveControllerHost } from "../../utils/reactive-controller-host";
|
|
7
|
+
const closeIconSvg = toValidSvgStringWithFallback(closeIcon);
|
|
8
|
+
let modalIdCounter = 0;
|
|
9
|
+
export class LmvzModal extends ReactiveControllerHost {
|
|
10
|
+
el;
|
|
11
|
+
inheritedAriaAttributes = {};
|
|
12
|
+
dialogEl;
|
|
13
|
+
dialogStateObserver;
|
|
14
|
+
actionsStateObserver;
|
|
15
|
+
headerSlot;
|
|
16
|
+
actionsSlot;
|
|
17
|
+
closeButtonEl;
|
|
18
|
+
previouslyFocusedElement = null;
|
|
19
|
+
wrappedDialogShowModal;
|
|
20
|
+
lastActionValidationMessage;
|
|
21
|
+
pendingCloseReturnValue;
|
|
22
|
+
dialogTitleId = `lmvz-modal-title-${modalIdCounter++}`;
|
|
23
|
+
hasActions = false;
|
|
24
|
+
hasHeader = false;
|
|
25
|
+
open = false;
|
|
26
|
+
closeLabel = 'Schliessen';
|
|
27
|
+
dialogClose;
|
|
28
|
+
dialogCancel;
|
|
29
|
+
get dialog() {
|
|
30
|
+
return this.dialogEl;
|
|
31
|
+
}
|
|
32
|
+
get validationEl() {
|
|
33
|
+
return this.dialogEl ?? this.el;
|
|
34
|
+
}
|
|
35
|
+
get validationSlot() {
|
|
36
|
+
return this.actionsSlot;
|
|
37
|
+
}
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
this.addController(new AriaValidationController(this, { validationTiming: 'slot' }));
|
|
41
|
+
}
|
|
42
|
+
handleFormDialogSubmit(event) {
|
|
43
|
+
const form = event.target;
|
|
44
|
+
const submitter = event.submitter;
|
|
45
|
+
const isDialogForm = form.method === 'dialog' || submitter?.getAttribute('formmethod') === 'dialog';
|
|
46
|
+
if (!isDialogForm)
|
|
47
|
+
return;
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
this.dialogEl?.close(submitter?.value ?? '');
|
|
50
|
+
}
|
|
51
|
+
connectedCallback() {
|
|
52
|
+
this.inheritedAriaAttributes = inheritAriaAttributes(this.el, ['role']);
|
|
53
|
+
Object.defineProperty(this.el, 'dialog', {
|
|
54
|
+
configurable: true,
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: () => {
|
|
57
|
+
this.ensureDialogShowModalCapture();
|
|
58
|
+
return this.dialogEl;
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
super.connectedCallback();
|
|
62
|
+
}
|
|
63
|
+
componentDidLoad() {
|
|
64
|
+
this.handleHeaderSlotChange();
|
|
65
|
+
this.handleActionsSlotChange();
|
|
66
|
+
this.observeDialogState();
|
|
67
|
+
this.syncDialogVisibility();
|
|
68
|
+
super.componentDidLoad();
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.actionsStateObserver?.disconnect();
|
|
72
|
+
this.dialogStateObserver?.disconnect();
|
|
73
|
+
super.disconnectedCallback();
|
|
74
|
+
}
|
|
75
|
+
componentDidRender() {
|
|
76
|
+
if (this.open) {
|
|
77
|
+
this.focusPrimaryAction();
|
|
78
|
+
}
|
|
79
|
+
super.componentDidRender();
|
|
80
|
+
}
|
|
81
|
+
handleOpenChange() {
|
|
82
|
+
this.syncDialogVisibility();
|
|
83
|
+
}
|
|
84
|
+
get dialogAccessibilityAttributes() {
|
|
85
|
+
const attributes = { ...this.inheritedAriaAttributes };
|
|
86
|
+
delete attributes['aria-label'];
|
|
87
|
+
delete attributes['aria-labelledby'];
|
|
88
|
+
if (this.hasHeader) {
|
|
89
|
+
attributes['aria-labelledby'] = this.dialogTitleId;
|
|
90
|
+
return attributes;
|
|
91
|
+
}
|
|
92
|
+
const inheritedLabelledBy = this.inheritedAriaAttributes['aria-labelledby'];
|
|
93
|
+
if (typeof inheritedLabelledBy === 'string') {
|
|
94
|
+
attributes['aria-labelledby'] = inheritedLabelledBy;
|
|
95
|
+
return attributes;
|
|
96
|
+
}
|
|
97
|
+
const inheritedLabel = this.inheritedAriaAttributes['aria-label'];
|
|
98
|
+
if (typeof inheritedLabel === 'string') {
|
|
99
|
+
attributes['aria-label'] = inheritedLabel;
|
|
100
|
+
}
|
|
101
|
+
return attributes;
|
|
102
|
+
}
|
|
103
|
+
get actionButtons() {
|
|
104
|
+
return (this.actionsSlot?.assignedElements({ flatten: true }) ?? []).filter((element) => {
|
|
105
|
+
return this.isVisibleActionButton(element);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
get enabledActionButtons() {
|
|
109
|
+
return this.actionButtons.filter((element) => {
|
|
110
|
+
return !this.isDisabledActionButton(element);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
get assignedActionElements() {
|
|
114
|
+
return this.actionsSlot?.assignedElements({ flatten: true }) ?? [];
|
|
115
|
+
}
|
|
116
|
+
isDisabledActionButton(element) {
|
|
117
|
+
return element.hasAttribute('disabled') || element.disabled === true;
|
|
118
|
+
}
|
|
119
|
+
getActionVariant(element) {
|
|
120
|
+
const variant = element.getAttribute('variant') ?? element.variant;
|
|
121
|
+
return variant === 'primary' || variant === 'secondary' || variant === 'tertiary' ? variant : 'secondary';
|
|
122
|
+
}
|
|
123
|
+
getActionValidationResult() {
|
|
124
|
+
if (!this.actionButtons.length) {
|
|
125
|
+
return {};
|
|
126
|
+
}
|
|
127
|
+
const primaryActions = this.actionButtons.filter((element) => this.getActionVariant(element) === 'primary');
|
|
128
|
+
const secondaryActions = this.actionButtons.filter((element) => this.getActionVariant(element) === 'secondary');
|
|
129
|
+
const issues = [
|
|
130
|
+
primaryActions.length !== 1 ? `${primaryActions.length} primary action${primaryActions.length === 1 ? '' : 's'}` : undefined,
|
|
131
|
+
secondaryActions.length > 1 ? `${secondaryActions.length} secondary actions` : undefined,
|
|
132
|
+
].filter((issue) => Boolean(issue));
|
|
133
|
+
return {
|
|
134
|
+
errorMessage: issues.length
|
|
135
|
+
? `LmvzModal actions slot must contain exactly one primary action, at most one secondary action, and optional tertiary actions. Received ${issues.join(' and ')}.`
|
|
136
|
+
: undefined,
|
|
137
|
+
primaryAction: primaryActions[0],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
hasAssignedContent(slot) {
|
|
141
|
+
return Boolean(slot?.assignedNodes({ flatten: true }).some((node) => {
|
|
142
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
143
|
+
return Boolean(node.textContent?.trim());
|
|
144
|
+
}
|
|
145
|
+
return node.nodeType === Node.ELEMENT_NODE;
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
observeDialogState() {
|
|
149
|
+
if (!this.dialogEl || typeof MutationObserver === 'undefined')
|
|
150
|
+
return;
|
|
151
|
+
this.dialogStateObserver?.disconnect();
|
|
152
|
+
this.dialogStateObserver = new MutationObserver(() => {
|
|
153
|
+
if (!this.dialogEl || this.dialogEl.open === this.open)
|
|
154
|
+
return;
|
|
155
|
+
if (this.dialogEl.open) {
|
|
156
|
+
this.open = true;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.open = false;
|
|
160
|
+
});
|
|
161
|
+
this.dialogStateObserver.observe(this.dialogEl, {
|
|
162
|
+
attributes: true,
|
|
163
|
+
attributeFilter: ['open'],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
isVisibleActionButton(element) {
|
|
167
|
+
return element.tagName === 'LMVZ-BUTTON' && !element.hasAttribute('hidden');
|
|
168
|
+
}
|
|
169
|
+
capturePreviouslyFocusedElement() {
|
|
170
|
+
const dialog = this.dialogEl;
|
|
171
|
+
const activeElement = getDeepActiveElement(document);
|
|
172
|
+
if (!dialog || !activeElement || dialog.contains(activeElement))
|
|
173
|
+
return;
|
|
174
|
+
this.previouslyFocusedElement = activeElement;
|
|
175
|
+
}
|
|
176
|
+
ensureDialogShowModalCapture() {
|
|
177
|
+
const dialog = this.dialogEl;
|
|
178
|
+
if (!dialog || typeof dialog.showModal !== 'function')
|
|
179
|
+
return;
|
|
180
|
+
const showModal = dialog.showModal;
|
|
181
|
+
if (showModal === this.wrappedDialogShowModal)
|
|
182
|
+
return;
|
|
183
|
+
const wrappedShowModal = () => {
|
|
184
|
+
this.capturePreviouslyFocusedElement();
|
|
185
|
+
return showModal.call(dialog);
|
|
186
|
+
};
|
|
187
|
+
Object.defineProperty(dialog, 'showModal', {
|
|
188
|
+
configurable: true,
|
|
189
|
+
value: wrappedShowModal,
|
|
190
|
+
});
|
|
191
|
+
this.wrappedDialogShowModal = wrappedShowModal;
|
|
192
|
+
}
|
|
193
|
+
syncDialogVisibility() {
|
|
194
|
+
const dialog = this.dialogEl;
|
|
195
|
+
if (!dialog)
|
|
196
|
+
return;
|
|
197
|
+
if (this.open) {
|
|
198
|
+
if (!dialog.open) {
|
|
199
|
+
this.capturePreviouslyFocusedElement();
|
|
200
|
+
if (typeof dialog.showModal === 'function') {
|
|
201
|
+
dialog.showModal();
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
dialog.setAttribute('open', '');
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
this.focusPrimaryAction();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (!dialog.open)
|
|
211
|
+
return;
|
|
212
|
+
if (typeof dialog.close === 'function') {
|
|
213
|
+
dialog.close();
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
dialog.removeAttribute('open');
|
|
217
|
+
this.handleDialogClose();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
focusPrimaryAction() {
|
|
221
|
+
const primaryAction = this.enabledActionButtons.find((element) => {
|
|
222
|
+
return this.getActionVariant(element) === 'primary';
|
|
223
|
+
}) ?? this.enabledActionButtons[0];
|
|
224
|
+
const focusTarget = primaryAction ?? this.closeButtonEl;
|
|
225
|
+
if (!focusTarget || typeof window === 'undefined')
|
|
226
|
+
return;
|
|
227
|
+
window.requestAnimationFrame(() => {
|
|
228
|
+
if (this.open) {
|
|
229
|
+
focusTarget.focus();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
restoreFocus() {
|
|
234
|
+
if (!this.previouslyFocusedElement?.isConnected)
|
|
235
|
+
return;
|
|
236
|
+
this.previouslyFocusedElement.focus();
|
|
237
|
+
this.previouslyFocusedElement = null;
|
|
238
|
+
}
|
|
239
|
+
handleCloseButtonClick = () => {
|
|
240
|
+
if (!this.dialogEl)
|
|
241
|
+
return;
|
|
242
|
+
const dialogWithRequestClose = this.dialogEl;
|
|
243
|
+
if (typeof dialogWithRequestClose.requestClose === 'function') {
|
|
244
|
+
this.pendingCloseReturnValue = 'close';
|
|
245
|
+
dialogWithRequestClose.requestClose('close');
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (typeof this.dialogEl.close === 'function') {
|
|
249
|
+
this.dialogEl.close('close');
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.handleDialogClose();
|
|
253
|
+
};
|
|
254
|
+
handleDialogCancel = (event) => {
|
|
255
|
+
event.preventDefault();
|
|
256
|
+
const emitted = this.dialogCancel.emit();
|
|
257
|
+
if (emitted.defaultPrevented) {
|
|
258
|
+
this.pendingCloseReturnValue = undefined;
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const returnValue = this.pendingCloseReturnValue;
|
|
262
|
+
this.pendingCloseReturnValue = undefined;
|
|
263
|
+
this.dialogEl?.close(returnValue);
|
|
264
|
+
};
|
|
265
|
+
handleDialogClose = () => {
|
|
266
|
+
console.log('Dialog close handler called');
|
|
267
|
+
if (this.open) {
|
|
268
|
+
this.open = false;
|
|
269
|
+
}
|
|
270
|
+
this.restoreFocus();
|
|
271
|
+
this.dialogClose.emit();
|
|
272
|
+
};
|
|
273
|
+
handleHeaderSlotChange = () => {
|
|
274
|
+
this.hasHeader = this.hasAssignedContent(this.headerSlot);
|
|
275
|
+
};
|
|
276
|
+
observeActionState() {
|
|
277
|
+
if (typeof MutationObserver === 'undefined')
|
|
278
|
+
return;
|
|
279
|
+
this.actionsStateObserver?.disconnect();
|
|
280
|
+
if (!this.assignedActionElements.length)
|
|
281
|
+
return;
|
|
282
|
+
this.actionsStateObserver = new MutationObserver(() => {
|
|
283
|
+
this.syncActionsState();
|
|
284
|
+
});
|
|
285
|
+
this.assignedActionElements.forEach((element) => {
|
|
286
|
+
this.actionsStateObserver?.observe(element, {
|
|
287
|
+
attributes: true,
|
|
288
|
+
attributeFilter: ['disabled', 'hidden', 'variant'],
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
syncActionsState() {
|
|
293
|
+
const assignedElements = this.assignedActionElements;
|
|
294
|
+
assignedElements.forEach((element) => {
|
|
295
|
+
const isAllowedAction = ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
|
|
296
|
+
if (isAllowedAction)
|
|
297
|
+
return;
|
|
298
|
+
if (!element.hasAttribute('hidden')) {
|
|
299
|
+
element.setAttribute('hidden', '');
|
|
300
|
+
}
|
|
301
|
+
if (element.getAttribute('aria-hidden') !== 'true') {
|
|
302
|
+
element.setAttribute('aria-hidden', 'true');
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
this.hasActions = assignedElements.some((element) => this.isVisibleActionButton(element));
|
|
306
|
+
this.checkActions();
|
|
307
|
+
if (this.open) {
|
|
308
|
+
this.focusPrimaryAction();
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
handleActionsSlotChange = () => {
|
|
312
|
+
this.syncActionsState();
|
|
313
|
+
this.observeActionState();
|
|
314
|
+
};
|
|
315
|
+
checkActions() {
|
|
316
|
+
if (!isAriaValidationEnabled())
|
|
317
|
+
return;
|
|
318
|
+
const { errorMessage } = this.getActionValidationResult();
|
|
319
|
+
if (!errorMessage) {
|
|
320
|
+
this.lastActionValidationMessage = undefined;
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (this.lastActionValidationMessage === errorMessage)
|
|
324
|
+
return;
|
|
325
|
+
console.error(errorMessage);
|
|
326
|
+
this.lastActionValidationMessage = errorMessage;
|
|
327
|
+
}
|
|
328
|
+
render() {
|
|
329
|
+
return (h(Host, { key: 'f319dcb33aaa6426e568fba1bfb6c8c3927432cb' }, h("dialog", { key: '1c5b1659b243a2af19ec5b41d19a2096b522671c', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, h("div", { key: '2d0260f11a75e28688a14b0263df0d00f8ba54b9', class: "modal-shell" }, h("header", { key: 'd96739e3b0a7f2c04e46585ddf4e431c91a698ce', class: { header: true, 'has-title': this.hasHeader } }, h("div", { key: 'f5202ac26195a3571e3767e0d3683c2bc960c2ec', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, h("slot", { key: '2568ee3465bc070e353e647c58735a34005907d7', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), h("lmvz-button", { key: '7978e838dc84ce83ee674aa111523b260d1861da', ref: (element) => (this.closeButtonEl = element), type: "button", class: "close-button", "aria-label": this.closeLabel, onClick: this.handleCloseButtonClick, variant: "tertiary" }, h("lmvz-icon", { key: '9f235507acbf2ee42747bfc44302fcae47d9ba0e', icon: closeIconSvg }))), h("div", { key: '7eeab9b2f0fd5d41c0218380436e2f092481813a', class: "body" }, h("slot", { key: '8904e87fa438caf2b7f34c4025ff688d94f4dea2' })), h("footer", { key: '0610abd150de228da893092e9f38721087144564', class: "actions", hidden: !this.hasActions }, h("slot", { key: '0f5457cb2544602a3b980f90e7297ed700d62fee', name: "actions", ref: (element) => (this.actionsSlot = element), onSlotchange: this.handleActionsSlotChange }))))));
|
|
330
|
+
}
|
|
331
|
+
static get is() { return "lmvz-modal"; }
|
|
332
|
+
static get encapsulation() { return "shadow"; }
|
|
333
|
+
static get originalStyleUrls() {
|
|
334
|
+
return {
|
|
335
|
+
"$": ["lmvz-modal.css"]
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
static get styleUrls() {
|
|
339
|
+
return {
|
|
340
|
+
"$": ["lmvz-modal.css"]
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
static get properties() {
|
|
344
|
+
return {
|
|
345
|
+
"open": {
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"mutable": true,
|
|
348
|
+
"complexType": {
|
|
349
|
+
"original": "boolean",
|
|
350
|
+
"resolved": "boolean",
|
|
351
|
+
"references": {}
|
|
352
|
+
},
|
|
353
|
+
"required": false,
|
|
354
|
+
"optional": false,
|
|
355
|
+
"docs": {
|
|
356
|
+
"tags": [{
|
|
357
|
+
"name": "default",
|
|
358
|
+
"text": "false"
|
|
359
|
+
}],
|
|
360
|
+
"text": "Controls the native dialog visibility."
|
|
361
|
+
},
|
|
362
|
+
"getter": false,
|
|
363
|
+
"setter": false,
|
|
364
|
+
"reflect": true,
|
|
365
|
+
"attribute": "open",
|
|
366
|
+
"defaultValue": "false"
|
|
367
|
+
},
|
|
368
|
+
"closeLabel": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"mutable": false,
|
|
371
|
+
"complexType": {
|
|
372
|
+
"original": "string",
|
|
373
|
+
"resolved": "string",
|
|
374
|
+
"references": {}
|
|
375
|
+
},
|
|
376
|
+
"required": false,
|
|
377
|
+
"optional": false,
|
|
378
|
+
"docs": {
|
|
379
|
+
"tags": [{
|
|
380
|
+
"name": "default",
|
|
381
|
+
"text": "'Schliessen'"
|
|
382
|
+
}],
|
|
383
|
+
"text": "Accessible label for the internal close button."
|
|
384
|
+
},
|
|
385
|
+
"getter": false,
|
|
386
|
+
"setter": false,
|
|
387
|
+
"reflect": false,
|
|
388
|
+
"attribute": "close-label",
|
|
389
|
+
"defaultValue": "'Schliessen'"
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
static get states() {
|
|
394
|
+
return {
|
|
395
|
+
"hasActions": {},
|
|
396
|
+
"hasHeader": {}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
static get events() {
|
|
400
|
+
return [{
|
|
401
|
+
"method": "dialogClose",
|
|
402
|
+
"name": "close",
|
|
403
|
+
"bubbles": true,
|
|
404
|
+
"cancelable": false,
|
|
405
|
+
"composed": true,
|
|
406
|
+
"docs": {
|
|
407
|
+
"tags": [],
|
|
408
|
+
"text": "Re-emitted from the host whenever the native dialog closes so framework wrappers can synchronize bound state."
|
|
409
|
+
},
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "void",
|
|
412
|
+
"resolved": "void",
|
|
413
|
+
"references": {}
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
"method": "dialogCancel",
|
|
417
|
+
"name": "cancel",
|
|
418
|
+
"bubbles": false,
|
|
419
|
+
"cancelable": true,
|
|
420
|
+
"composed": false,
|
|
421
|
+
"docs": {
|
|
422
|
+
"tags": [],
|
|
423
|
+
"text": "Re-emitted from the host whenever the native dialog receives a `cancel` event (e.g. Escape key).\nCall `event.preventDefault()` to keep the dialog open."
|
|
424
|
+
},
|
|
425
|
+
"complexType": {
|
|
426
|
+
"original": "void",
|
|
427
|
+
"resolved": "void",
|
|
428
|
+
"references": {}
|
|
429
|
+
}
|
|
430
|
+
}];
|
|
431
|
+
}
|
|
432
|
+
static get elementRef() { return "el"; }
|
|
433
|
+
static get watchers() {
|
|
434
|
+
return [{
|
|
435
|
+
"propName": "open",
|
|
436
|
+
"methodName": "handleOpenChange"
|
|
437
|
+
}];
|
|
438
|
+
}
|
|
439
|
+
static get listeners() {
|
|
440
|
+
return [{
|
|
441
|
+
"name": "submit",
|
|
442
|
+
"method": "handleFormDialogSubmit",
|
|
443
|
+
"target": undefined,
|
|
444
|
+
"capture": false,
|
|
445
|
+
"passive": false
|
|
446
|
+
}];
|
|
447
|
+
}
|
|
448
|
+
}
|
|
@@ -50,7 +50,7 @@ export class LmvzSelect extends ReactiveControllerHost {
|
|
|
50
50
|
render() {
|
|
51
51
|
const hasValue = this.hasValue;
|
|
52
52
|
const shouldShowLabel = hasValue;
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '4a78608686bd771615d1bd6f5c5df243b813f0a3' }, h("div", { key: 'fc526485d7c1718c0044a8076151954fb0db680d', class: "select-wrapper" }, h("label", { key: '16c68d944b626f06b36c458daa351b05f0d6de92', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && h("span", { key: '06ea7ab990b1119c726d39620cda2f2f53d6342a', "aria-hidden": "true" }, " *")), h("div", { key: '46e77a996cd17db6e882fdc0f5ac65fb90f71df5', "aria-hidden": "true" }, h("span", { key: '6b1e9f849e7e876f704816de6f55128e3d462587' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: 'd90c6b965c594a45f6699aaca3bc85de38bf5584', "aria-hidden": "true" }, " *")), h("span", { key: 'd91ce778422521a0b414aceb7161a871023730d9' }, h("img", { key: '3e405cebf0c02d91448c9db412837f4af554c4b2', src: chevronDownSvg, alt: "" }))), h("select", { key: 'b443a08e1436f75af572e102e8d43a9c3d031810', 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: '7125eccebfb3541522d0461adcf1e203514d8af6', value: "", disabled: true, selected: true, hidden: true }), h("slot", { key: '80f7edf9e20b19ec8041d23b84752f2cd7c1a72e' }))), this.helperText && h("div", { key: '49cdd7ce54b5bc9031db2ef9826891d6a4f666b1', role: "status" }, this.helperText)));
|
|
54
54
|
}
|
|
55
55
|
static get is() { return "lmvz-select"; }
|
|
56
56
|
static get encapsulation() { return "scoped"; }
|
|
@@ -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: '49a543437a842709b6a3bfb00c828a40b227bb57' }, h("span", { key: '746292d49c58656336037f7b07a9aaee9dbc6ed1', class: "track" }, h("input", { key: 'ae329571344b05d9af814fdc1cc792e1c600d807', 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: 'e5742029679333fcd66a25aeb3f8826dbb3a8956', class: "thumb", "aria-hidden": "true" })), h("label", { key: '4cb92eb975b8c337162986011497afdeb188ed4f', 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: '2e5c30345293206fcffe512e1b315fa5b8be6dbd' }, h("lmvz-header", { key: 'dbe611d59dffcfdf06d203e31e0d646cde923927', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: 'fd421b9c161ef0f57842bcb07900c8da6ba14e4f', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '0b4200c42ae74463446cd8098c4827bfc849fca2', href: "#" }, "Lehrmittel")), h("lmvz-menuitem", { key: '761cdf8431f0ad98d8d28958f92eae465687ca64', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '7d43d800c5771cfc670159be3265fbbcc17f0571', href: "#" }, "Verwaltung")), h("lmvz-menuitem", { key: '22b6623ee071b51601fde8dfe4e6b2b26b2d7166', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'e67b0cd54221453941fba9942b2877b25261d266', ...typedIconFromSet('lmvz', 'edit') }), "Deutsch 7"), h("lmvz-menuitem", { key: '5e512685f9d6aad712300ba4d9583c6030de39d5', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'f92949499f0c7e024616dd20474c1d1da7f6e0a4', ...typedIconFromSet('lmvz', 'edit') }), "Mathe 2"), h("lmvz-menuitem", { key: '96b87b3029a305d33b7705b62b517973368f9679', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: 'aa69a9c13c715492073d2724716ef0051dce164b', ...typedIconFromSet('lmvz', 'settings') }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: '44484ab0f795ba76b81d8e5b00cf409d2a8cc465', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: '511b7c91639eb9833928c9fdb14b881f5cca6b42', ...typedIconFromSet('lmvz', 'settings') })), h("lmvz-button", { key: 'c628abdea87efaa5ef57f309298004b6919501ce', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: '056de955f62486ad30b71f13934c7b527f8c5a56', ...typedIconFromSet('lmvz', 'user'), size: "lg" })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "header-integration"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
package/components/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export { LmvzInput as LmvzInput } from '../../types/components/lmvz-input/lmvz-i
|
|
|
17
17
|
export { defineCustomElement as defineCustomElementLmvzInput } from './lmvz-input';
|
|
18
18
|
export { LmvzMenuItem as LmvzMenuitem } from '../../types/components/lmvz-menuitem/lmvz-menuitem';
|
|
19
19
|
export { defineCustomElement as defineCustomElementLmvzMenuitem } from './lmvz-menuitem';
|
|
20
|
+
export { LmvzModal as LmvzModal } from '../../types/components/lmvz-modal/lmvz-modal';
|
|
21
|
+
export { defineCustomElement as defineCustomElementLmvzModal } from './lmvz-modal';
|
|
20
22
|
export { LmvzSelect as LmvzSelect } from '../../types/components/lmvz-select/lmvz-select';
|
|
21
23
|
export { defineCustomElement as defineCustomElementLmvzSelect } from './lmvz-select';
|
|
22
24
|
export { LmvzToggle as LmvzToggle } from '../../types/components/lmvz-toggle/lmvz-toggle';
|
|
@@ -17,6 +17,8 @@ export { LmvzInput as LmvzInput } from '../../types/components/lmvz-input/lmvz-i
|
|
|
17
17
|
export { defineCustomElement as defineCustomElementLmvzInput } from './lmvz-input';
|
|
18
18
|
export { LmvzMenuItem as LmvzMenuitem } from '../../types/components/lmvz-menuitem/lmvz-menuitem';
|
|
19
19
|
export { defineCustomElement as defineCustomElementLmvzMenuitem } from './lmvz-menuitem';
|
|
20
|
+
export { LmvzModal as LmvzModal } from '../../types/components/lmvz-modal/lmvz-modal';
|
|
21
|
+
export { defineCustomElement as defineCustomElementLmvzModal } from './lmvz-modal';
|
|
20
22
|
export { LmvzSelect as LmvzSelect } from '../../types/components/lmvz-select/lmvz-select';
|
|
21
23
|
export { defineCustomElement as defineCustomElementLmvzSelect } from './lmvz-select';
|
|
22
24
|
export { LmvzToggle as LmvzToggle } from '../../types/components/lmvz-toggle/lmvz-toggle';
|
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-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CK8cAKcB.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-DBc1BzQb.js";export{LmvzChip,c as chipSizes,a as chipTypes,defineCustomElement as defineCustomElementLmvzChip,i as iconSizes,b as iconWeights,d as inputTypes,t as textSizes}from"./lmvz-chip.js";export{g as getRegisteredIconProvider,r as registerIconProvider,t as typedIconFromSet}from"./p-Boj0PCdB.js";export{LmvzAction,defineCustomElement as defineCustomElementLmvzAction}from"./lmvz-action.js";export{LmvzButton,defineCustomElement as defineCustomElementLmvzButton}from"./lmvz-button.js";export{LmvzCard,defineCustomElement as defineCustomElementLmvzCard}from"./lmvz-card.js";export{LmvzCheckbox,defineCustomElement as defineCustomElementLmvzCheckbox}from"./lmvz-checkbox.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{LmvzMenuitem,defineCustomElement as defineCustomElementLmvzMenuitem}from"./lmvz-menuitem.js";export{LmvzModal,defineCustomElement as defineCustomElementLmvzModal}from"./lmvz-modal.js";export{LmvzSelect,defineCustomElement as defineCustomElementLmvzSelect}from"./lmvz-select.js";export{LmvzToggle,defineCustomElement as defineCustomElementLmvzToggle}from"./lmvz-toggle.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,
|
|
1
|
+
import{p as t,d as s,c,h as e,H as i,t as o}from"./p-CK8cAKcB.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:"15c0f20e08cd5019abfd3bb71ec69d175dc5ba48",onClick:this._onClick.bind(this)},e("slot",{key:"f71a7853168d1b66b0a50b0f971d140385530ac3"}))}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}
|