@lmvz-ds/components 0.39.0 → 0.41.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 +12 -0
- package/cjs/{ds.constants-C6eKRAEu.js → ds.constants-pI-qkOYv.js} +2 -0
- package/cjs/index.cjs.js +2 -1
- package/cjs/lmvz-button-group.cjs.entry.js +1 -1
- package/cjs/lmvz-button_2.cjs.entry.js +1 -1
- package/cjs/lmvz-card.cjs.entry.js +58 -14
- package/cjs/lmvz-checkbox.cjs.entry.js +1 -1
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-datepicker.cjs.entry.js +2 -2
- package/cjs/lmvz-header_2.cjs.entry.js +1 -1
- package/cjs/lmvz-input.cjs.entry.js +2 -2
- package/cjs/lmvz-link.cjs.entry.js +2 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +1 -1
- package/cjs/lmvz-message.cjs.entry.js +1 -1
- package/cjs/lmvz-modal.cjs.entry.js +1 -1
- package/cjs/lmvz-popover.cjs.entry.js +1 -1
- package/cjs/lmvz-radio.cjs.entry.js +1 -1
- package/cjs/lmvz-select.cjs.entry.js +1 -1
- 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 +3 -3
- package/cjs/lmvz-tabs.cjs.entry.js +37 -44
- package/cjs/lmvz-toggle.cjs.entry.js +1 -1
- package/cjs/loader.cjs.js +1 -1
- package/collection/api/ds.constants.js +1 -0
- package/collection/components/lmvz-card/lmvz-card.css +82 -194
- package/collection/components/lmvz-card/lmvz-card.js +131 -38
- package/collection/components/lmvz-checkbox/lmvz-checkbox.js +1 -1
- package/collection/components/lmvz-chip/lmvz-chip.js +1 -1
- package/collection/components/lmvz-datepicker/lmvz-datepicker.js +2 -2
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-input/lmvz-input.js +2 -2
- package/collection/components/lmvz-link/lmvz-link.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-message/lmvz-message.js +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +1 -1
- 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.css +0 -13
- package/collection/components/lmvz-tab/lmvz-tab.js +10 -14
- package/collection/components/lmvz-tabs/lmvz-tabs.css +0 -5
- package/collection/components/lmvz-tabs/lmvz-tabs.js +45 -66
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/components/index.js +1 -1
- package/components/lmvz-button-group.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-datepicker.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-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-Buw_s-9k.js +1 -0
- package/components/{p-DSDBThqb.js → p-ChNEjbnY.js} +1 -1
- package/components/{p-niXjuPxe.js → p-DMdV-cnt.js} +1 -1
- package/components/{p-Bc5MM0zh.js → p-D_sr5Z0Q.js} +1 -1
- package/components/{p-D_mff3n7.js → p-qLAod5PR.js} +1 -1
- package/components/{p-DXhP6UeF.js → p-sJgTdXHR.js} +1 -1
- package/esm/{ds.constants-0ctLESas.js → ds.constants-Buw_s-9k.js} +2 -1
- package/esm/index.js +1 -1
- package/esm/lmvz-button-group.entry.js +1 -1
- package/esm/lmvz-button_2.entry.js +1 -1
- package/esm/lmvz-card.entry.js +59 -15
- package/esm/lmvz-checkbox.entry.js +1 -1
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-datepicker.entry.js +2 -2
- package/esm/lmvz-header_2.entry.js +1 -1
- package/esm/lmvz-input.entry.js +2 -2
- package/esm/lmvz-link.entry.js +2 -2
- package/esm/lmvz-menuitem.entry.js +1 -1
- package/esm/lmvz-message.entry.js +1 -1
- package/esm/lmvz-modal.entry.js +1 -1
- package/esm/lmvz-popover.entry.js +1 -1
- package/esm/lmvz-radio.entry.js +1 -1
- package/esm/lmvz-select.entry.js +1 -1
- package/esm/lmvz-snackbar.entry.js +1 -1
- package/esm/lmvz-spinner.entry.js +1 -1
- package/esm/lmvz-tab.entry.js +3 -3
- package/esm/lmvz-tabs.entry.js +37 -44
- package/esm/lmvz-toggle.entry.js +1 -1
- package/esm/loader.js +1 -1
- package/hydrate/index.js +125 -88
- package/hydrate/index.mjs +125 -88
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-f24f5207.entry.js → p-170dea97.entry.js} +1 -1
- package/lmvz-components/{p-efd9d50e.entry.js → p-18a894e4.entry.js} +1 -1
- package/lmvz-components/{p-f911691c.entry.js → p-19c9f747.entry.js} +1 -1
- package/lmvz-components/{p-87f21ac9.entry.js → p-377c45a7.entry.js} +1 -1
- package/lmvz-components/{p-773e9d95.entry.js → p-6292da52.entry.js} +1 -1
- package/lmvz-components/{p-ebad823c.entry.js → p-65efa76e.entry.js} +1 -1
- package/lmvz-components/{p-27e8b4fa.entry.js → p-67b86084.entry.js} +1 -1
- package/lmvz-components/{p-7cbfbc88.entry.js → p-6ffd9391.entry.js} +1 -1
- package/lmvz-components/{p-304c7554.entry.js → p-77fd3ce2.entry.js} +1 -1
- package/lmvz-components/{p-e35f49a1.entry.js → p-96764fa9.entry.js} +1 -1
- package/lmvz-components/p-Buw_s-9k.js +1 -0
- package/lmvz-components/{p-6aae1df9.entry.js → p-a70079b6.entry.js} +1 -1
- package/lmvz-components/p-aa643b58.entry.js +1 -0
- package/lmvz-components/{p-335b3867.entry.js → p-b14966a6.entry.js} +1 -1
- package/lmvz-components/{p-8ba6ec19.entry.js → p-b9d29e90.entry.js} +1 -1
- package/lmvz-components/{p-41286514.entry.js → p-bf728ef8.entry.js} +1 -1
- package/lmvz-components/p-c6309d6c.entry.js +1 -0
- package/lmvz-components/p-d466fe8f.entry.js +1 -0
- package/lmvz-components/{p-edec4d09.entry.js → p-dd4a62e1.entry.js} +1 -1
- package/lmvz-components/{p-d73bb7fd.entry.js → p-e1c75def.entry.js} +1 -1
- package/lmvz-components/{p-93b781ca.entry.js → p-fd29789f.entry.js} +1 -1
- package/manifest.json +169 -102
- package/package.json +1 -1
- package/types/api/ds.constants.d.ts +1 -0
- package/types/api/ds.types.d.ts +4 -0
- package/types/components/lmvz-card/lmvz-card.d.ts +17 -6
- package/types/components/lmvz-tab/lmvz-tab.d.ts +1 -1
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +7 -8
- package/types/components.d.ts +68 -47
- package/components/p-0ctLESas.js +0 -1
- package/lmvz-components/p-0ctLESas.js +0 -1
- package/lmvz-components/p-1ba1af8d.entry.js +0 -1
- package/lmvz-components/p-3b7203a3.entry.js +0 -1
- package/lmvz-components/p-c884c76e.entry.js +0 -1
|
@@ -15,7 +15,6 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
15
15
|
listenerTarget: this.tablistEl,
|
|
16
16
|
});
|
|
17
17
|
value;
|
|
18
|
-
orientation = 'horizontal';
|
|
19
18
|
lmvzChange;
|
|
20
19
|
resolvedValue;
|
|
21
20
|
constructor() {
|
|
@@ -24,12 +23,11 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
24
23
|
}
|
|
25
24
|
componentWillLoad() {
|
|
26
25
|
super.componentWillLoad();
|
|
27
|
-
this.syncOrientation();
|
|
28
26
|
}
|
|
29
27
|
componentDidLoad() {
|
|
30
|
-
this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange);
|
|
31
|
-
this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange);
|
|
32
|
-
this.el.addEventListener('lmvzTabReady', this.handleTabReady);
|
|
28
|
+
this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange.bind(this));
|
|
29
|
+
this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange.bind(this));
|
|
30
|
+
this.el.addEventListener('lmvzTabReady', this.handleTabReady.bind(this));
|
|
33
31
|
this.handleTabSlotChange();
|
|
34
32
|
if (this.tablistEl) {
|
|
35
33
|
this.focusController.updateListenerTarget(this.tablistEl);
|
|
@@ -37,17 +35,16 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
37
35
|
super.componentDidLoad();
|
|
38
36
|
}
|
|
39
37
|
disconnectedCallback() {
|
|
40
|
-
this.el.removeEventListener('lmvzTabReady', this.handleTabReady);
|
|
38
|
+
this.el.removeEventListener('lmvzTabReady', this.handleTabReady.bind(this));
|
|
41
39
|
super.disconnectedCallback();
|
|
42
40
|
}
|
|
41
|
+
handleSlotChangeEvent() {
|
|
42
|
+
this.wireAriaIds();
|
|
43
|
+
this.applySelection(this.resolvedValue ?? this.value);
|
|
44
|
+
}
|
|
43
45
|
handleValueChange(newValue) {
|
|
44
46
|
this.applySelection(newValue);
|
|
45
47
|
}
|
|
46
|
-
handleOrientationChange() {
|
|
47
|
-
this.syncOrientation();
|
|
48
|
-
this.syncFocusTargets();
|
|
49
|
-
this.syncTabOrientation();
|
|
50
|
-
}
|
|
51
48
|
async initFocus() {
|
|
52
49
|
this.focusController.initFocus();
|
|
53
50
|
}
|
|
@@ -87,23 +84,22 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
87
84
|
get slottedPanels() {
|
|
88
85
|
return (this.panelSlotEl?.assignedElements({ flatten: false }) ?? []);
|
|
89
86
|
}
|
|
90
|
-
handleTabSlotChange
|
|
87
|
+
handleTabSlotChange() {
|
|
91
88
|
this.syncFocusTargets();
|
|
92
|
-
this.syncTabOrientation();
|
|
93
89
|
this.wireAriaIds();
|
|
94
90
|
this.applySelection(this.value);
|
|
95
91
|
this.updateIconTabsAttr();
|
|
96
|
-
}
|
|
97
|
-
handlePanelSlotChange
|
|
92
|
+
}
|
|
93
|
+
handlePanelSlotChange() {
|
|
98
94
|
this.wireAriaIds();
|
|
99
95
|
this.applySelection(this.resolvedValue ?? this.value);
|
|
100
|
-
}
|
|
101
|
-
handleTabReady
|
|
96
|
+
}
|
|
97
|
+
handleTabReady() {
|
|
102
98
|
this.syncFocusTargets();
|
|
103
99
|
this.wireAriaIds();
|
|
104
100
|
this.applySelection(this.resolvedValue ?? this.value);
|
|
105
101
|
this.updateIconTabsAttr();
|
|
106
|
-
}
|
|
102
|
+
}
|
|
107
103
|
updateIconTabsAttr() {
|
|
108
104
|
this.el.toggleAttribute('has-icon-tabs', this.slottedTabs.some((t) => t.hasAttribute('has-media')));
|
|
109
105
|
}
|
|
@@ -111,34 +107,31 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
111
107
|
const buttons = this.slottedTabs.map((tab) => tab.shadowRoot?.querySelector('button')).filter((b) => !!b);
|
|
112
108
|
this.focusController.updateElements(buttons);
|
|
113
109
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
enableHomeAndEnd: true,
|
|
121
|
-
listenerTarget: this.tablistEl,
|
|
122
|
-
});
|
|
123
|
-
this.addController(this.focusController);
|
|
124
|
-
if (this.el.isConnected) {
|
|
125
|
-
this.focusController.hostConnected?.();
|
|
110
|
+
resolvePanelForTab(tab, index, panels) {
|
|
111
|
+
const panelId = tab.getAttribute('panel');
|
|
112
|
+
if (panelId) {
|
|
113
|
+
const matched = panels.find((panel) => panel.id === panelId);
|
|
114
|
+
if (matched)
|
|
115
|
+
return matched;
|
|
126
116
|
}
|
|
117
|
+
return panels[index];
|
|
127
118
|
}
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
119
|
+
warnIfMixedPanelLinking(tabs) {
|
|
120
|
+
const hasPanelAttr = tabs.some((tab) => tab.hasAttribute('panel'));
|
|
121
|
+
const missingPanelAttr = tabs.some((tab) => !tab.hasAttribute('panel'));
|
|
122
|
+
if (hasPanelAttr && missingPanelAttr) {
|
|
123
|
+
console.warn("[lmvz-tabs] Mixed panel linking: some lmvz-tab elements have a 'panel' attribute and some do not. Use either id-based or positional linking consistently.");
|
|
124
|
+
}
|
|
133
125
|
}
|
|
134
126
|
wireAriaIds() {
|
|
135
127
|
const tabs = this.slottedTabs;
|
|
136
128
|
const panels = this.slottedPanels;
|
|
137
129
|
const prefix = `lmvz-tabs-${this.instanceId}`;
|
|
130
|
+
this.warnIfMixedPanelLinking(tabs);
|
|
138
131
|
tabs.forEach((tab, index) => {
|
|
139
132
|
const tabId = tab.id || `${prefix}-tab-${index}`;
|
|
140
133
|
tab.id = tabId;
|
|
141
|
-
const panel = panels
|
|
134
|
+
const panel = this.resolvePanelForTab(tab, index, panels);
|
|
142
135
|
if (!panel)
|
|
143
136
|
return;
|
|
144
137
|
const panelId = panel.id || `${prefix}-panel-${index}`;
|
|
@@ -174,9 +167,12 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
174
167
|
if (btn)
|
|
175
168
|
btn.setAttribute('aria-selected', String(isSelected));
|
|
176
169
|
});
|
|
177
|
-
this.slottedPanels
|
|
178
|
-
|
|
179
|
-
const
|
|
170
|
+
const panels = this.slottedPanels;
|
|
171
|
+
tabs.forEach((tab, index) => {
|
|
172
|
+
const panel = this.resolvePanelForTab(tab, index, panels);
|
|
173
|
+
if (!panel)
|
|
174
|
+
return;
|
|
175
|
+
const isActive = tab.getAttribute('value') === effectiveValue;
|
|
180
176
|
panel.toggleAttribute('hidden', !isActive);
|
|
181
177
|
});
|
|
182
178
|
const selectedBtn = target.shadowRoot?.querySelector('button');
|
|
@@ -241,7 +237,7 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
241
237
|
this.selectTab(value);
|
|
242
238
|
};
|
|
243
239
|
render() {
|
|
244
|
-
return (h(Host, { key: '
|
|
240
|
+
return (h(Host, { key: 'd6308c13b7e185fa4d1ff8a33c03f2e0e54f55b0', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, h("div", { key: '319741b6ce2276d9092b22b67dabc2f1f28366c4', role: "tablist", "aria-orientation": "horizontal", class: "tablist", ref: (el) => (this.tablistEl = el) }, h("slot", { key: 'bf76b7b1bdce93f47ddbf45309408b1e33a086f6', ref: (el) => (this.tabSlotEl = el) })), h("div", { key: '6793f685d90ea8cb4b9862db6a93d7067fcb1d53', part: "panels-container", class: "panels-container" }, h("slot", { key: '2af78356ab2727bcd044e827238b0f5a8a30f1b0', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
|
|
245
241
|
}
|
|
246
242
|
static get is() { return "lmvz-tabs"; }
|
|
247
243
|
static get encapsulation() { return "shadow"; }
|
|
@@ -275,29 +271,6 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
275
271
|
"setter": false,
|
|
276
272
|
"reflect": true,
|
|
277
273
|
"attribute": "value"
|
|
278
|
-
},
|
|
279
|
-
"orientation": {
|
|
280
|
-
"type": "string",
|
|
281
|
-
"mutable": true,
|
|
282
|
-
"complexType": {
|
|
283
|
-
"original": "'horizontal' | 'vertical'",
|
|
284
|
-
"resolved": "\"horizontal\" | \"vertical\"",
|
|
285
|
-
"references": {}
|
|
286
|
-
},
|
|
287
|
-
"required": false,
|
|
288
|
-
"optional": false,
|
|
289
|
-
"docs": {
|
|
290
|
-
"tags": [{
|
|
291
|
-
"name": "default",
|
|
292
|
-
"text": "'horizontal'"
|
|
293
|
-
}],
|
|
294
|
-
"text": "Layout and keyboard-navigation orientation."
|
|
295
|
-
},
|
|
296
|
-
"getter": false,
|
|
297
|
-
"setter": false,
|
|
298
|
-
"reflect": true,
|
|
299
|
-
"attribute": "orientation",
|
|
300
|
-
"defaultValue": "'horizontal'"
|
|
301
274
|
}
|
|
302
275
|
};
|
|
303
276
|
}
|
|
@@ -417,9 +390,15 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
417
390
|
return [{
|
|
418
391
|
"propName": "value",
|
|
419
392
|
"methodName": "handleValueChange"
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
393
|
+
}];
|
|
394
|
+
}
|
|
395
|
+
static get listeners() {
|
|
396
|
+
return [{
|
|
397
|
+
"name": "slotchange",
|
|
398
|
+
"method": "handleSlotChangeEvent",
|
|
399
|
+
"target": undefined,
|
|
400
|
+
"capture": false,
|
|
401
|
+
"passive": false
|
|
423
402
|
}];
|
|
424
403
|
}
|
|
425
404
|
}
|
|
@@ -68,7 +68,7 @@ export class LmvzToggle extends ReactiveControllerHost {
|
|
|
68
68
|
this.lmvzChange.emit(newChecked);
|
|
69
69
|
};
|
|
70
70
|
render() {
|
|
71
|
-
return (h(Host, { key: '
|
|
71
|
+
return (h(Host, { key: '897eea43e268eca68b5955ba823caa49508789be' }, h("span", { key: '731c08e74242b06458fdfeba69d4e4aa4ae76cd1', class: "track" }, h("input", { key: '3e8ee9f23bc78f2c8110c5057854d199e13755cf', 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: '8d3ec0a9bc6af91b2536865f54a1616ef8753db6', class: "thumb", "aria-hidden": "true" })), h("label", { key: '121837baf11f9d086e5750b6249264888a3ced7a', htmlFor: this.toggleId }, this.label)));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "lmvz-toggle"; }
|
|
74
74
|
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: '4042c09d7a2ce679040c0298514d4a3ca49333de' }, h("lmvz-header", { key: 'ffd864f1d5994076339b4a41f390298a2bf8b86a', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: 'faaad157f4cda1cb0e793982865c6f9551eaa85e', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '0792b489a9a3a4860cc5be834ecc552681969255', href: "#" }, "Lehrmittel")), h("lmvz-menuitem", { key: 'a51a8c0de257bc199b842688e74e56beda9e98d7', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, h("a", { key: 'd29538c9a816f26f8cdd1d4ccc4afa064e84021c', href: "#" }, "Verwaltung")), h("lmvz-menuitem", { key: '98d25a993d5bba082473c922f2d542f70717b8eb', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '8aa63f66edf689d51bf0fe6b7ee5b3f94da6aaa2', ...typedIconFromSet('lmvz', 'edit') }), "Deutsch 7"), h("lmvz-menuitem", { key: '95ce5d789af96d68278f28d7b7c83646af559c21', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '10a607040304178dab731e8583e2a4625903eb70', ...typedIconFromSet('lmvz', 'edit') }), "Mathe 2"), h("lmvz-menuitem", { key: '94c5abadd65ef2a81beaa517957922a731d66e65', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: '7a5241d26d15e6c28718967a85c94bffe58fc6a3', ...typedIconFromSet('lmvz', 'settings') }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: '759675c797a5f062d51218f12b66c441a2734dd9', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: 'b99dd803c6af0ada2349b47935bf1d944c7738d1', ...typedIconFromSet('lmvz', 'settings') })), h("lmvz-button", { key: '629dff2784f890b73790122b58c2ecd6ee06a890', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: '0389a3fd78865a2971280dc20d56b443e963fa15', ...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.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DbBJxuBm.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,
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DbBJxuBm.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{h as cardSizes,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,o as popoverSizes,s as scaleValues,c as selectSizes,a as sizes,n as snackbarDismissReasons,k as snackbarPriorities,j as snackbarStatuses,t as textSizes,v as variants}from"./p-Buw_s-9k.js";export{S as SnackbarController}from"./p-BPa0FHVO.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{LmvzDatepicker,defineCustomElement as defineCustomElementLmvzDatepicker}from"./lmvz-datepicker.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";export{g as getRegisteredIconProvider,r as registerIconProvider,t as typedIconFromSet}from"./p-CyDgnpOB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-DMdV-cnt.js";const t=o,p=s;export{t as LmvzButtonGroup,p as defineCustomElement}
|
package/components/lmvz-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r,p as e,H as t,c as o,h as a,d as n,t as m}from"./p-DbBJxuBm.js";const l=e(class extends t{constructor(r){super(),!1!==r&&this.__registerHost(),this.primaryAction=o(this,"primaryAction",7)}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return((e,t)=>{const o=function(...r){return r.filter(Boolean).join("/").replace("//","/").replace("/./","/")}("../../assets",t,e);try{return r(o)}catch{return console.warn(`Failed to create URL for asset "${e}" in path "${t}".\n Please provide an absolute URL in your app's 'setAssetPath(...)' configuration! Falling back to a relative URL, which may work in some environments but is not guaranteed to be correct.`),new URL(o,import.meta?.url??window?.location?.origin??"")}})("card-placeholder.svg")}_onPrimaryClick(){this.primaryAction.emit()}_onOverflowClick(r){console.log(r)}render(){return a(n,{key:"1dd819fd7c752af8d15001c08f7f60c6ea7278b9",role:"article"},a("div",{key:"e0cc822e627b6bbe665e4faa705cc46a09bac7c6",class:"top"},a("div",{key:"db79cb5a67ebdd6097f985e4b4bd27665b6329ef",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},a("div",{key:"90facc8595ddbbf31e3768faa8254a82ab8d3e65",class:"chip-slot"},a("slot",{key:"cb2e6a1053aae2b2ca90c52c175e3c4174c89d23",name:"chip"})))),a("div",{key:"cb11069a329385178677e92d08044e0fe8e5b982",class:"bottom"},a("header",{key:"1e6076352124ca03de2fb13c17a565b4f492567e"},a("h2",{key:"73f11099fb751bd4f967dbe49b79763b6a8268f3",class:"title"},this.cardTitle)),a("p",{key:"36cf87b4c2004bff1e65feedd13e137d67115de3",class:"description"},this.description),a("div",{key:"6c1d82f4968ce8252307858e6ad0681274f06397",class:"actions"},a("button",{key:"0366e0caaf9235a3eaf7bfcab116e6a828fb248d",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),a("button",{key:"4f435e79d75a621d6fe065471a915b55308ad15d",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},a("span",{key:"7dec97e0b0ca58c40fc5308cc7863acafa8c5147",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } .sc-lmvz-card-h { & { & { --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, center); gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); box-sizing: border-box; padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent); border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px)); 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; } & > * { font: inherit; color: inherit; } &: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; } &:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } &:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } &:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } &.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); } &.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } &.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } &.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)); } &.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)); } &.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)); } &.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)); } &.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)); } &.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)); } &.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)); } &.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)); } } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.82rem + 0.78vw, 2.75rem) / 1.4 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }"}},[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]),i=l,v=function(){"undefined"!=typeof customElements&&["lmvz-card"].forEach((r=>{"lmvz-card"===r&&(customElements.get(m(r))||customElements.define(m(r),l))}))};export{i as LmvzCard,v as defineCustomElement}
|
|
1
|
+
import{g as e,p as t,H as a,c as r,h as o,d as l,t as s}from"./p-DbBJxuBm.js";import{h as i}from"./p-Buw_s-9k.js";import{i as m}from"./p-BDonpCG8.js";import{d as n}from"./p-DsTgD0_a.js";const c=new Set(["HEADER","H1","H2","H3","H4","H5","H6"]),d=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.lmvzCardAction=r(this,"lmvzCardAction",7)}get el(){return this}titleSlotElement;warnedCases=new Set;size="large";cardTitle;description;imageUrl;imageAlt="";actionLabel;lmvzCardAction;normalizeSize(e){const t=i.includes(e)?e:"large";t!==this.size&&(this.size=t)}componentWillLoad(){this.normalizeSize(this.size)}componentDidLoad(){const e=this.el.shadowRoot?.querySelector('slot[name="card-title"]');e?.addEventListener("slotchange",(()=>this.checkTitleContent())),this.checkTitleContent()}get fallbackImage(){return((t,a)=>{const r=function(...e){return e.filter(Boolean).join("/").replace("//","/").replace("/./","/")}("../../assets",a,t);try{return e(r)}catch{return console.warn(`Failed to create URL for asset "${t}" in path "${a}".\n Please provide an absolute URL in your app's 'setAssetPath(...)' configuration! Falling back to a relative URL, which may work in some environments but is not guaranteed to be correct.`),new URL(r,import.meta?.url??window?.location?.origin??"")}})("card-placeholder.svg")+""}handleActionClick=()=>{this.lmvzCardAction.emit()};get slottedTitleElement(){return this.titleSlotElement?.assignedElements()?.at(0)}checkTitleContent(){if(!m())return;const e=this.slottedTitleElement;if(e){const t=e.tagName;c.has(t)||this.warnOnce("non-heading:"+t,`[lmvz-card] Element <${t.toLowerCase()}> slotted into "card-title" is not a heading. Slot a heading element (h2-h5) instead.`)}else this.cardTitle||this.warnOnce("missing-title",'[lmvz-card] Neither a "card-title" slotted heading nor a non-empty "cardTitle" prop was supplied.')}warnOnce(e,t){this.warnedCases.has(e)||(this.warnedCases.add(e),console.warn(t))}render(){return o(l,{key:"21ac0a567bb88d05d247cc3150bf2e7ce26972c5",role:"article"},o("img",{key:"6cea11ee015059d5537ab64c7cbb1655ac984cb1",class:"image",src:this.imageUrl??this.fallbackImage,alt:this.imageAlt,loading:"lazy",decoding:"async"}),o("div",{key:"cd29132d8268fb5a025cde5c33a858982c8eaaed",class:"content"},o("div",{key:"0d353a46cae60d81417e5280b39020b2234ad304",class:"title-block"},o("slot",{key:"4f2734a257ef877d258a717e23855f521c5132a6",name:"card-title",ref:e=>this.titleSlotElement=e},this.cardTitle&&o("header",{key:"7d526caba45dde6b13bee023e60943711347258a",role:"heading",class:"card-default-title"},this.cardTitle)),this.description&&o("p",{key:"18c3eac26562a592baa29d75674737d11f57beac",class:"description"},this.description)),o("slot",{key:"d0d9c40ca8501b0fdfa9d589eeb05692892316a2",name:"chip"}),this.actionLabel&&o("div",{key:"4bd5d9233c0ba1dcda6bebdeff89adbbfe37e4b1",class:"actions"},o("lmvz-button",{key:"6cefc7ad2859d457ad11b3f4edb1300ba664ef63",class:"action",variant:"secondary",scale:"small"===this.size?"small":"default",onLmvzActivation:this.handleActionClick},this.actionLabel))))}static get assetsDirs(){return["../../assets"]}static get watchers(){return{size:[{normalizeSize:0}]}}static get style(){return" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { --lmvz-card-local-min-width: 320px; --lmvz-card-local-max-width: 360px; --lmvz-card-local-sm-width: 232px; display: flex; flex-direction: column; align-items: flex-start; min-width: var(--lmvz-card-local-min-width); max-width: var(--lmvz-card-local-max-width); border-radius: var(--lmvz-component-wrapper-md-border-radius, 18px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); box-shadow: 0 var(--lmvz-semantic-shadow-l1-1-position-y, 2px) var(--lmvz-semantic-shadow-l1-1-blur, 4px) 0 var(--lmvz-semantic-color-shadow-l1-default, rgba(120, 120, 128, 0.08)); margin-bottom: var(--lmvz-component-card-lg-margin-bottom, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); } :host([size='small']) { width: var(--lmvz-card-local-sm-width); min-width: 0; max-width: none; border-radius: var(--lmvz-component-wrapper-sm-border-radius, 14px); margin-bottom: var(--lmvz-component-card-sm-margin-bottom, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } * { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; align-self: stretch; border-top-left-radius: var(--lmvz-component-wrapper-md-border-radius, 18px); border-top-right-radius: var(--lmvz-component-wrapper-md-border-radius, 18px); } :host([size='small']) .image { border-top-left-radius: var(--lmvz-component-wrapper-sm-border-radius, 14px); border-top-right-radius: var(--lmvz-component-wrapper-sm-border-radius, 14px); } .content { display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; gap: var(--lmvz-component-spacing-xs, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); padding: var(--lmvz-component-wrapper-md-padding-y, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)) var(--lmvz-component-wrapper-md-padding-x, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); } :host([size='small']) .content { gap: var(--lmvz-component-spacing-2xs, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); padding: var(--lmvz-component-wrapper-sm-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-wrapper-sm-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } .title-block { display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; gap: var(--lmvz-component-spacing-2xs, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); } .card-default-title { margin: 0; overflow-wrap: break-word; font: var(--lmvz-typography-heading-lg, 500 clamp(1.13rem, 1.03rem + 0.39vw, 1.5rem) / 1.5 Router); } :host([size='small']) .card-default-title { font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router); } ::slotted([slot='card-title']) { margin: 0; overflow-wrap: break-word; } :host([size='small']) ::slotted([slot='card-title']) { font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router); } .description { margin: 0; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router); } :host([size='small']) .description { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); } slot[name='chip'] { display: contents; } .actions { display: flex; align-items: center; align-self: stretch; padding-top: var(--lmvz-component-spacing-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } lmvz-button.action { flex: 1 0 0; } "}},[769,"lmvz-card",{size:[1537],cardTitle:[1,"card-title"],description:[1],imageUrl:[1,"image-url"],imageAlt:[1,"image-alt"],actionLabel:[1,"action-label"]},void 0,{size:[{normalizeSize:0}]}]),p=d,v=function(){"undefined"!=typeof customElements&&["lmvz-card","lmvz-button"].forEach((e=>{switch(e){case"lmvz-card":customElements.get(s(e))||customElements.define(s(e),d);break;case"lmvz-button":customElements.get(s(e))||n()}}))};export{p as LmvzCard,v as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,c as o,h as r,d as c,t}from"./p-DbBJxuBm.js";import{c as a}from"./p-DAikapVO.js";import{t as s}from"./p-DjvtQE7c.js";import{A as l}from"./p-sACbyedu.js";import{R as i}from"./p-DXFoXTse.js";const h=s(a);let n=0;const d=e(class extends i{get el(){return this}get validationEl(){return this.el}internals;nativeInput;checkboxId="lmvz-checkbox-"+n++;initialChecked=!1;get helperId(){return this.helperText?this.checkboxId+"-helper":void 0}get errorId(){return this.errorMessage?this.checkboxId+"-error":void 0}get ariaDescribedBy(){const e=[this.errorId,this.helperId].filter(Boolean);return e.length>0?e.join(" "):void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}errorMessage;helperText;form;autofocus=!1;checkedState=!1;handleCheckedChange(e){this.checkedState=e,this.internals.setFormValue?.(e?this.value??"on":null),this.updateValidity()}handleRequiredChange(){this.updateValidity()}lmvzChange;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}async getValidationMessage(){return this.internals?.validationMessage??""}constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzChange=o(this,"lmvzChange",7),this.internals=this.attachInternals(),this.addController(new l(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialChecked=this.checked,this.checkedState=this.checked,this.internals.setFormValue?.(this.checked?this.value??"on":null),this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.updateValidity(),super.componentDidLoad()}componentWillRender(){this.errorFromProp&&!this.errorMessage&&console.warn("lmvz-checkbox: error=true set without errorMessage — no visual-only error state is rendered. Provide errorMessage to communicate the error to users."),super.componentWillRender()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value??"on":null)}formResetCallback(){this.checked=this.initialChecked,this.updateValidity()}formStateRestoreCallback(e){this.checked=e===(this.value??"on")}handleChange=e=>{this.checked=e.target.checked,this.lmvzChange.emit(this.checked)};retargetInnerClicks(){this.nativeInput?.click()}updateValidity(){!this.required||this.checked?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please check this box.",this.nativeInput)}handleInvalid(){this.nativeError=!0}render(){return r(c,{key:"089b23f8034fa089f358cc37923182c34f528cd2"},r("div",{key:"0af011ebf062332c330b49fa3076828204433ac4",class:"pill"},r("input",{key:"a483a8c5bbe1d6da3cfab63ce32ad2e6392911ff",type:"checkbox",id:this.checkboxId,checked:this.checkedState,disabled:this.disabled,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":"false","aria-describedby":this.ariaDescribedBy,"aria-errormessage":this.error&&this.errorId?this.errorId:void 0,ref:e=>this.nativeInput=e,onChange:this.handleChange,autoFocus:this.autofocus}),r("span",{key:"f21d34ab625c7eef23bd2761b399e8770cd62275",class:"box","aria-hidden":"true"},this.checkedState&&r("span",{key:"de2680ea17f34ab0124c529d88d4191c97d0a4c5",class:"indicator",innerHTML:h})),r("span",{key:"1b2d24e43603033a5a77340164e002de326db11a",class:"content"},r("label",{key:"b18f17abb4459b3783dc41d0031f4b26795fdcf5",htmlFor:this.checkboxId},this.label),this.helperText&&r("span",{key:"f32591c55fcc88d130815780a9999fcb235afd88",onClick:this.retargetInnerClicks.bind(this),class:"helper-text",id:this.helperId,role:"status"},this.helperText))),this.errorMessage&&r("span",{key:"076489f5baadab07d95fc787e9ac71bae0a6ab68",onClick:this.retargetInnerClicks.bind(this),class:"error-text",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-checkbox-h { display: inline-block; --checkbox-box-size: var(--lmvz-global-s18, 18px); --checkbox-border-radius: var(--lmvz-global-s4, 4px); --checkbox-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --checkbox-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --checkbox-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --checkbox-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --checkbox-wrapper-bg-checked: var(--lmvz-semantic-color-status-active, #f6fbfe); --checkbox-ripple-bg: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --checkbox-checkmark-color: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --checkbox-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --checkbox-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-easing: var(--lmvz-global-easing-default, ease); --checkbox-duration: 0.2s; } .pill.sc-lmvz-checkbox { display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); padding-block: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); text-decoration: none; background-color: transparent; transition: background-color var(--checkbox-duration) var(--checkbox-easing); } input.sc-lmvz-checkbox { position: absolute; opacity: 0; width: var(--checkbox-box-size); height: var(--checkbox-box-size); margin: 0; cursor: pointer; z-index: 1; appearance: none; } .box.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; width: var(--checkbox-box-size); height: var(--checkbox-box-size); background-color: var(--checkbox-bg); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--checkbox-border-color); border-radius: var(--checkbox-border-radius); color: var(--checkbox-checkmark-color); cursor: pointer; transition: border-color var(--checkbox-duration) var(--checkbox-easing), background-color var(--checkbox-duration) var(--checkbox-easing); pointer-events: none; flex-shrink: 0; } .indicator.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; line-height: 0; } .content.sc-lmvz-checkbox { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; cursor: pointer; } label.sc-lmvz-checkbox { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--checkbox-label-color); transition: color var(--checkbox-duration) var(--checkbox-easing); cursor: pointer; } .helper-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-helper-color); margin-block-start: 2px; } .error-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-error-color); display: block; margin-block-start: 4px; padding-inline: 10px; } @media (hover: hover) { .pill.sc-lmvz-checkbox:hover { background-color: var(--checkbox-wrapper-bg-hover); } .pill.sc-lmvz-checkbox:hover .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-hover); } } [checked].sc-lmvz-checkbox-h .pill.sc-lmvz-checkbox { background-color: var(--checkbox-wrapper-bg-checked); } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-checked); } [checked].sc-lmvz-checkbox-h label.sc-lmvz-checkbox { color: var(--checkbox-label-color-checked); } [error].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-error); } [error].sc-lmvz-checkbox-h .helper-text.sc-lmvz-checkbox { color: var(--checkbox-error-color); } [disabled].sc-lmvz-checkbox-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; input, label, .box, .content { cursor: not-allowed; } } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } @media (forced-colors: active) { .box.sc-lmvz-checkbox { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: Highlight; background-color: Field; } .indicator.sc-lmvz-checkbox { color: ButtonText; } [checked].sc-lmvz-checkbox-h .indicator.sc-lmvz-checkbox { color: HighlightText; } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline-color: Highlight; box-shadow: none; } }"}},[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]),b=d,m=function(){"undefined"!=typeof customElements&&["lmvz-checkbox"].forEach((e=>{"lmvz-checkbox"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))};export{b as LmvzCheckbox,m as defineCustomElement}
|
|
1
|
+
import{p as e,c as o,h as r,d as c,t}from"./p-DbBJxuBm.js";import{c as a}from"./p-DAikapVO.js";import{t as s}from"./p-DjvtQE7c.js";import{A as l}from"./p-sACbyedu.js";import{R as i}from"./p-DXFoXTse.js";const h=s(a);let n=0;const d=e(class extends i{get el(){return this}get validationEl(){return this.el}internals;nativeInput;checkboxId="lmvz-checkbox-"+n++;initialChecked=!1;get helperId(){return this.helperText?this.checkboxId+"-helper":void 0}get errorId(){return this.errorMessage?this.checkboxId+"-error":void 0}get ariaDescribedBy(){const e=[this.errorId,this.helperId].filter(Boolean);return e.length>0?e.join(" "):void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}errorMessage;helperText;form;autofocus=!1;checkedState=!1;handleCheckedChange(e){this.checkedState=e,this.internals.setFormValue?.(e?this.value??"on":null),this.updateValidity()}handleRequiredChange(){this.updateValidity()}lmvzChange;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}async getValidationMessage(){return this.internals?.validationMessage??""}constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzChange=o(this,"lmvzChange",7),this.internals=this.attachInternals(),this.addController(new l(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialChecked=this.checked,this.checkedState=this.checked,this.internals.setFormValue?.(this.checked?this.value??"on":null),this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.updateValidity(),super.componentDidLoad()}componentWillRender(){this.errorFromProp&&!this.errorMessage&&console.warn("lmvz-checkbox: error=true set without errorMessage — no visual-only error state is rendered. Provide errorMessage to communicate the error to users."),super.componentWillRender()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value??"on":null)}formResetCallback(){this.checked=this.initialChecked,this.updateValidity()}formStateRestoreCallback(e){this.checked=e===(this.value??"on")}handleChange=e=>{this.checked=e.target.checked,this.lmvzChange.emit(this.checked)};retargetInnerClicks(){this.nativeInput?.click()}updateValidity(){!this.required||this.checked?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please check this box.",this.nativeInput)}handleInvalid(){this.nativeError=!0}render(){return r(c,{key:"df48e8af0b992d4f2c564aae67dbd42b6454f2c1"},r("div",{key:"fe1256e373ee98cc26ca9031654d4d01f10b96e7",class:"pill"},r("input",{key:"580af189cb0069dd057464efd8c876c1a2dd3826",type:"checkbox",id:this.checkboxId,checked:this.checkedState,disabled:this.disabled,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":"false","aria-describedby":this.ariaDescribedBy,"aria-errormessage":this.error&&this.errorId?this.errorId:void 0,ref:e=>this.nativeInput=e,onChange:this.handleChange,autoFocus:this.autofocus}),r("span",{key:"4a6b3522aa1a43f3c0a7ff203fb5791876555954",class:"box","aria-hidden":"true"},this.checkedState&&r("span",{key:"3a857015118d911832cdaa1287cee4c63f84afb2",class:"indicator",innerHTML:h})),r("span",{key:"aa543c4c37cf220084b3cce423e1d0e48b5c344f",class:"content"},r("label",{key:"26c8551de719bdd99cce39b9129b59643f2aa44e",htmlFor:this.checkboxId},this.label),this.helperText&&r("span",{key:"004ead4527953b10b4ab6d89366159d7727320b2",onClick:this.retargetInnerClicks.bind(this),class:"helper-text",id:this.helperId,role:"status"},this.helperText))),this.errorMessage&&r("span",{key:"0fa0dcfdf2fe61d510bfe9f0c4f8d16a341f97d7",onClick:this.retargetInnerClicks.bind(this),class:"error-text",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-checkbox-h { display: inline-block; --checkbox-box-size: var(--lmvz-global-s18, 18px); --checkbox-border-radius: var(--lmvz-global-s4, 4px); --checkbox-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --checkbox-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --checkbox-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --checkbox-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --checkbox-wrapper-bg-checked: var(--lmvz-semantic-color-status-active, #f6fbfe); --checkbox-ripple-bg: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --checkbox-checkmark-color: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --checkbox-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --checkbox-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-easing: var(--lmvz-global-easing-default, ease); --checkbox-duration: 0.2s; } .pill.sc-lmvz-checkbox { display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); padding-block: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); text-decoration: none; background-color: transparent; transition: background-color var(--checkbox-duration) var(--checkbox-easing); } input.sc-lmvz-checkbox { position: absolute; opacity: 0; width: var(--checkbox-box-size); height: var(--checkbox-box-size); margin: 0; cursor: pointer; z-index: 1; appearance: none; } .box.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; width: var(--checkbox-box-size); height: var(--checkbox-box-size); background-color: var(--checkbox-bg); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--checkbox-border-color); border-radius: var(--checkbox-border-radius); color: var(--checkbox-checkmark-color); cursor: pointer; transition: border-color var(--checkbox-duration) var(--checkbox-easing), background-color var(--checkbox-duration) var(--checkbox-easing); pointer-events: none; flex-shrink: 0; } .indicator.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; line-height: 0; } .content.sc-lmvz-checkbox { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; cursor: pointer; } label.sc-lmvz-checkbox { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--checkbox-label-color); transition: color var(--checkbox-duration) var(--checkbox-easing); cursor: pointer; } .helper-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-helper-color); margin-block-start: 2px; } .error-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-error-color); display: block; margin-block-start: 4px; padding-inline: 10px; } @media (hover: hover) { .pill.sc-lmvz-checkbox:hover { background-color: var(--checkbox-wrapper-bg-hover); } .pill.sc-lmvz-checkbox:hover .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-hover); } } [checked].sc-lmvz-checkbox-h .pill.sc-lmvz-checkbox { background-color: var(--checkbox-wrapper-bg-checked); } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-checked); } [checked].sc-lmvz-checkbox-h label.sc-lmvz-checkbox { color: var(--checkbox-label-color-checked); } [error].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-error); } [error].sc-lmvz-checkbox-h .helper-text.sc-lmvz-checkbox { color: var(--checkbox-error-color); } [disabled].sc-lmvz-checkbox-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; input, label, .box, .content { cursor: not-allowed; } } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } @media (forced-colors: active) { .box.sc-lmvz-checkbox { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: Highlight; background-color: Field; } .indicator.sc-lmvz-checkbox { color: ButtonText; } [checked].sc-lmvz-checkbox-h .indicator.sc-lmvz-checkbox { color: HighlightText; } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline-color: Highlight; box-shadow: none; } }"}},[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]),b=d,m=function(){"undefined"!=typeof customElements&&["lmvz-checkbox"].forEach((e=>{"lmvz-checkbox"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))};export{b as LmvzCheckbox,m as defineCustomElement}
|
package/components/lmvz-chip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-qLAod5PR.js";const p=o,r=s;export{p as LmvzChip,r as defineCustomElement}
|