@lmvz-ds/components 0.25.0 → 0.27.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 +24 -0
- package/cjs/{reactive-controller-host-DrtMkMd7.js → aria-validation-controller-BMV2tv9-.js} +0 -41
- package/cjs/{ds.constants-DSnxZ3ia.js → ds.constants-8fh6ItAF.js} +1 -1
- package/cjs/index.cjs.js +196 -2
- package/cjs/list-keyboard-controller-CzZdPBeH.js +173 -0
- package/cjs/lmvz-button-group.cjs.entry.js +183 -0
- package/cjs/lmvz-button_2.cjs.entry.js +199 -0
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +8 -4
- package/cjs/lmvz-chip.cjs.entry.js +5 -4
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +7 -51
- package/cjs/lmvz-input.cjs.entry.js +3 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +4 -3
- package/cjs/lmvz-modal.cjs.entry.js +4 -3
- package/cjs/lmvz-radio.cjs.entry.js +4 -3
- package/cjs/lmvz-select.cjs.entry.js +3 -2
- package/cjs/lmvz-snackbar.cjs.entry.js +83 -0
- package/cjs/lmvz-tab.cjs.entry.js +31 -0
- package/cjs/lmvz-tabs.cjs.entry.js +256 -0
- package/cjs/lmvz-toggle.cjs.entry.js +5 -4
- package/cjs/loader.cjs.js +1 -1
- package/cjs/reactive-controller-host-B_lZtcA6.js +43 -0
- package/collection/api/ds.constants.js +4 -1
- package/collection/collection-manifest.json +3 -0
- package/collection/components/lmvz-button/lmvz-button.css +6 -6
- package/collection/components/lmvz-button-group/lmvz-button-group.css +2 -2
- package/collection/components/lmvz-card/lmvz-card.css +9 -9
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +14 -12
- package/collection/components/lmvz-checkbox/lmvz-checkbox.js +4 -1
- package/collection/components/lmvz-chip/lmvz-chip.css +2 -2
- package/collection/components/lmvz-header/lmvz-header.js +3 -3
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.css +4 -16
- package/collection/components/lmvz-radio/lmvz-radio.css +4 -4
- package/collection/components/lmvz-snackbar/lmvz-snackbar.css +101 -0
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +266 -0
- package/collection/components/lmvz-snackbar/public.js +1 -0
- package/collection/components/lmvz-snackbar/snackbar-controller.js +194 -0
- package/collection/components/lmvz-tab/lmvz-tab.css +148 -0
- package/collection/components/lmvz-tab/lmvz-tab.js +125 -0
- package/collection/components/lmvz-tabs/lmvz-tabs.css +58 -0
- package/collection/components/lmvz-tabs/lmvz-tabs.js +399 -0
- package/collection/components/lmvz-toggle/lmvz-toggle.css +2 -2
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/index.js +1 -0
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/utils/aria/list-keyboard-controller.js +151 -28
- package/components/index.d.ts +6 -0
- package/components/index.d.ts.bak +6 -0
- package/components/index.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.d.ts +11 -0
- package/components/lmvz-snackbar.d.ts.bak +11 -0
- package/components/lmvz-snackbar.js +1 -0
- package/components/lmvz-tab.d.ts +11 -0
- package/components/lmvz-tab.d.ts.bak +11 -0
- package/components/lmvz-tab.js +1 -0
- package/components/lmvz-tabs.d.ts +11 -0
- package/components/lmvz-tabs.d.ts.bak +11 -0
- package/components/lmvz-tabs.js +1 -0
- package/components/lmvz-toggle.js +1 -1
- package/components/p-0P2Wb3pE.js +1 -0
- package/components/p-2VdcUIrr.js +1 -0
- package/components/p-BJEQw1Sz.js +1 -0
- package/components/{p-Bb-kEOmU.js → p-Cs7RCOHZ.js} +1 -1
- package/components/p-CtaMrBNE.js +1 -0
- package/components/p-DjvbwRyl.js +1 -0
- package/components/{p-DYr7Jc0V.js → p-c7OzBK8f.js} +1 -1
- package/esm/{reactive-controller-host-ZrGf1F2-.js → aria-validation-controller-D-KO0Asb.js} +1 -41
- package/esm/{ds.constants-Bmi89ll1.js → ds.constants-BOOwq5dE.js} +1 -1
- package/esm/index.js +198 -1
- package/esm/list-keyboard-controller-Coi8XfUH.js +171 -0
- package/esm/lmvz-button-group.entry.js +181 -0
- package/esm/lmvz-button_2.entry.js +196 -0
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +7 -3
- package/esm/lmvz-chip.entry.js +4 -3
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +6 -50
- package/esm/lmvz-input.entry.js +2 -1
- package/esm/lmvz-menuitem.entry.js +3 -2
- package/esm/lmvz-modal.entry.js +3 -2
- package/esm/lmvz-radio.entry.js +3 -2
- package/esm/lmvz-select.entry.js +2 -1
- package/esm/lmvz-snackbar.entry.js +81 -0
- package/esm/lmvz-tab.entry.js +29 -0
- package/esm/lmvz-tabs.entry.js +254 -0
- package/esm/lmvz-toggle.entry.js +4 -3
- package/esm/loader.js +1 -1
- package/esm/reactive-controller-host-FBuCCcFC.js +41 -0
- package/hydrate/index.js +565 -40
- package/hydrate/index.mjs +565 -40
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-0a37e0f2.entry.js +1 -0
- package/lmvz-components/p-25f045b2.entry.js +1 -0
- package/lmvz-components/p-43b463bf.entry.js +1 -0
- package/lmvz-components/p-4bd71a3c.entry.js +1 -0
- package/lmvz-components/p-6484fbc6.entry.js +1 -0
- package/lmvz-components/p-6988c3ea.entry.js +1 -0
- package/lmvz-components/p-6de9981f.entry.js +1 -0
- package/lmvz-components/p-758dbb82.entry.js +1 -0
- package/lmvz-components/p-7b15cdce.entry.js +1 -0
- package/lmvz-components/p-8874ff19.entry.js +1 -0
- package/lmvz-components/p-BOOwq5dE.js +1 -0
- package/lmvz-components/p-CtaMrBNE.js +1 -0
- package/lmvz-components/p-FBuCCcFC.js +1 -0
- package/lmvz-components/p-a5c921dc.entry.js +1 -0
- package/lmvz-components/p-bb46a884.entry.js +1 -0
- package/lmvz-components/p-bd23eab3.entry.js +1 -0
- package/lmvz-components/p-c6228cee.entry.js +1 -0
- package/lmvz-components/p-da16ff58.entry.js +1 -0
- package/lmvz-components/p-hRb38wX6.js +1 -0
- package/manifest.json +858 -186
- package/package.json +13 -1
- package/types/api/ds.constants.d.ts +9 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +2 -2
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +21 -0
- package/types/components/lmvz-snackbar/public.d.ts +2 -0
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +32 -0
- package/types/components/lmvz-tab/lmvz-tab.d.ts +11 -0
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +43 -0
- package/types/components.d.ts +212 -1
- package/types/index.d.ts +1 -0
- package/types/utils/aria/list-keyboard-controller.d.ts +28 -5
- package/cjs/lmvz-button_3.cjs.entry.js +0 -375
- package/components/p-CCcoDnH-.js +0 -1
- package/components/p-CNmHnJ1D.js +0 -1
- package/components/p-vUYpZZoR.js +0 -1
- package/esm/lmvz-button_3.entry.js +0 -371
- package/lmvz-components/p-01aeca60.entry.js +0 -1
- package/lmvz-components/p-0dced359.entry.js +0 -1
- package/lmvz-components/p-2044a9ac.entry.js +0 -1
- package/lmvz-components/p-3c2adbb4.entry.js +0 -1
- package/lmvz-components/p-3df070b0.entry.js +0 -1
- package/lmvz-components/p-758078db.entry.js +0 -1
- package/lmvz-components/p-90f5a19d.entry.js +0 -1
- package/lmvz-components/p-Bmi89ll1.js +0 -1
- package/lmvz-components/p-CwX1wKkM.js +0 -1
- package/lmvz-components/p-acfeae08.entry.js +0 -1
- package/lmvz-components/p-c01a6c70.entry.js +0 -1
- package/lmvz-components/p-e1eaa7a2.entry.js +0 -1
- package/lmvz-components/p-e23d0054.entry.js +0 -1
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-CKYszC64.js';
|
|
2
|
-
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-ZrGf1F2-.js';
|
|
4
|
-
import { E as ElementActivationController } from './element-activation-controller-CN0JX9-m.js';
|
|
5
|
-
import { i as inheritAriaAttributes, f as findFormByRef, a as canReceiveFocus } from './component-DOTK1OW3.js';
|
|
6
|
-
import { a as isPromise, i as isAriaValidationEnabled } from './aria-loader-GfsGHZHY.js';
|
|
7
|
-
import { p as parseSvgString } from './svg-B2YoIRuh.js';
|
|
8
|
-
import { a as resolveIconSvg } from './icons-CmuFKDRz.js';
|
|
9
|
-
import './logger-CGmJG63p.js';
|
|
10
|
-
|
|
11
|
-
const lmvzButtonCss = () => ` @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; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: 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, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: inline-block; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
12
|
-
|
|
13
|
-
const LmvzButton = class extends ReactiveControllerHost {
|
|
14
|
-
get el() { return getElement(this); }
|
|
15
|
-
validationEl;
|
|
16
|
-
inheritedAttributes = {};
|
|
17
|
-
formEl = null;
|
|
18
|
-
formButtonEl = null;
|
|
19
|
-
lmvzActivation;
|
|
20
|
-
get ti() {
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
scale = 'default';
|
|
24
|
-
variant;
|
|
25
|
-
disabled = false;
|
|
26
|
-
type = 'button';
|
|
27
|
-
form;
|
|
28
|
-
formMethod;
|
|
29
|
-
name;
|
|
30
|
-
value;
|
|
31
|
-
constructor(hostRef) {
|
|
32
|
-
super();
|
|
33
|
-
registerInstance(this, hostRef);
|
|
34
|
-
this.lmvzActivation = createEvent(this, "lmvzActivation", 7);
|
|
35
|
-
this.addController(new AriaValidationController(this));
|
|
36
|
-
this.addController(new ElementActivationController(this, {
|
|
37
|
-
localHandler: this.handleClick.bind(this),
|
|
38
|
-
keys: ['Enter'],
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
43
|
-
super.connectedCallback();
|
|
44
|
-
}
|
|
45
|
-
disconnectedCallback() {
|
|
46
|
-
this.formButtonEl?.remove();
|
|
47
|
-
this.formButtonEl = null;
|
|
48
|
-
this.formEl = null;
|
|
49
|
-
super.disconnectedCallback();
|
|
50
|
-
}
|
|
51
|
-
renderHiddenButton() {
|
|
52
|
-
if (this.type !== 'submit') {
|
|
53
|
-
this.formButtonEl?.remove();
|
|
54
|
-
this.formButtonEl = null;
|
|
55
|
-
this.formEl = null;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const formEl = findFormByRef(this.form, this.el);
|
|
59
|
-
if (!formEl) {
|
|
60
|
-
this.formButtonEl?.remove();
|
|
61
|
-
this.formButtonEl = null;
|
|
62
|
-
this.formEl = null;
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
this.formEl = formEl;
|
|
66
|
-
const formButtonEl = this.formButtonEl ?? document.createElement('button');
|
|
67
|
-
formButtonEl.type = 'submit';
|
|
68
|
-
formButtonEl.style.display = 'none';
|
|
69
|
-
formButtonEl.disabled = this.disabled;
|
|
70
|
-
formButtonEl.name = this.name ?? '';
|
|
71
|
-
formButtonEl.value = this.value ?? '';
|
|
72
|
-
if (this.formMethod) {
|
|
73
|
-
formButtonEl.setAttribute('formmethod', this.formMethod);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
formButtonEl.removeAttribute('formmethod');
|
|
77
|
-
}
|
|
78
|
-
if (this.formButtonEl !== formButtonEl) {
|
|
79
|
-
this.formButtonEl = formButtonEl;
|
|
80
|
-
}
|
|
81
|
-
if (formButtonEl.parentElement !== formEl) {
|
|
82
|
-
formButtonEl.remove();
|
|
83
|
-
formEl.appendChild(formButtonEl);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
submitForm(ev) {
|
|
87
|
-
if (this.formEl && this.formButtonEl) {
|
|
88
|
-
ev.preventDefault();
|
|
89
|
-
this.formButtonEl.click();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
handleClick = (ev) => {
|
|
93
|
-
if (this.type === 'submit') {
|
|
94
|
-
this.submitForm(ev);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
render() {
|
|
98
|
-
this.renderHiddenButton();
|
|
99
|
-
return (h(Host, { key: '8196de85afc3878c6f38e582d7c031f5d19bcd36', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: '8d73f979fa227de22a03403a2a3938684911060a', ref: (e) => (this.validationEl = e), part: "button", disabled: this.disabled, type: this.type, class: classNames(this.variant ?? 'secondary', { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: '18e91a2f94ba0d7e5cf13150191003e2f0b2a03a' }))));
|
|
100
|
-
}
|
|
101
|
-
static get delegatesFocus() { return true; }
|
|
102
|
-
};
|
|
103
|
-
LmvzButton.style = lmvzButtonCss();
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Returns a function that delegates to the given predicate/filter and negates its result.
|
|
107
|
-
* The returned function preserves the input function's types, arguments and timing.
|
|
108
|
-
*
|
|
109
|
-
* @param delegate - The predicate/filter function to negate.
|
|
110
|
-
* @returns A function that returns the negated result.
|
|
111
|
-
*/
|
|
112
|
-
function negate(delegate) {
|
|
113
|
-
return (...args) => {
|
|
114
|
-
const result = delegate(...args);
|
|
115
|
-
return isPromise(result) ? result.then((res) => !res) : !result;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const lmvzButtonGroupCss = () => `:host{display:flex;justify-content:flex-end;gap:var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router);flex-wrap:wrap}::slotted([hidden]){display:none !important}`;
|
|
120
|
-
|
|
121
|
-
const LmvzButtonGroup = class {
|
|
122
|
-
constructor(hostRef) {
|
|
123
|
-
registerInstance(this, hostRef);
|
|
124
|
-
}
|
|
125
|
-
actionsSlot;
|
|
126
|
-
validationMessageCache = [];
|
|
127
|
-
actionsStateObserver;
|
|
128
|
-
get primaryEnabledAction() {
|
|
129
|
-
return this.enabledButtons.find(isPrimaryAction) ?? this.enabledButtons[0];
|
|
130
|
-
}
|
|
131
|
-
get hasActions() {
|
|
132
|
-
return this.assignedButtons.some((element) => isVisible(element) && isActionButton(element) && !isDisabledButton(element));
|
|
133
|
-
}
|
|
134
|
-
componentDidLoad() {
|
|
135
|
-
this.handleActionsSlotChange();
|
|
136
|
-
}
|
|
137
|
-
disconnectedCallback() {
|
|
138
|
-
this.actionsStateObserver?.disconnect();
|
|
139
|
-
}
|
|
140
|
-
get assignedElements() {
|
|
141
|
-
return this.actionsSlot?.assignedElements({ flatten: true }) ?? [];
|
|
142
|
-
}
|
|
143
|
-
get assignedButtons() {
|
|
144
|
-
return this.assignedElements.filter(isActionButton);
|
|
145
|
-
}
|
|
146
|
-
get visibleButtons() {
|
|
147
|
-
return this.assignedButtons.filter(isVisible);
|
|
148
|
-
}
|
|
149
|
-
get enabledButtons() {
|
|
150
|
-
return this.visibleButtons.filter(negate(isDisabledButton));
|
|
151
|
-
}
|
|
152
|
-
getActionValidationResult() {
|
|
153
|
-
if (!this.visibleButtons.length) {
|
|
154
|
-
return [];
|
|
155
|
-
}
|
|
156
|
-
const primaryActions = this.visibleButtons.filter(isPrimaryAction);
|
|
157
|
-
const secondaryActions = this.visibleButtons.filter(isSecondaryAction);
|
|
158
|
-
const issues = [];
|
|
159
|
-
const order = this.visibleButtons.toReversed();
|
|
160
|
-
if (primaryActions.length !== 1)
|
|
161
|
-
issues.push('LmvzModal actions slot must contain exactly one primary action.');
|
|
162
|
-
if (secondaryActions.length > 1)
|
|
163
|
-
issues.push(`LmvzModal actions slot must contain at most one secondary action (received ${secondaryActions.length})`);
|
|
164
|
-
if (primaryActions.length) {
|
|
165
|
-
const primaryAction = primaryActions[0];
|
|
166
|
-
const secondaryAction = secondaryActions[0];
|
|
167
|
-
if (order.indexOf(primaryAction) !== 0)
|
|
168
|
-
issues.push('Primary action must be the last focusable element in the actions slot (i.e. rightmost button).');
|
|
169
|
-
if (secondaryAction && order.indexOf(secondaryAction) !== 1)
|
|
170
|
-
issues.push('Secondary action must be the second-to-last focusable element in the actions slot (i.e. left of primary button).');
|
|
171
|
-
}
|
|
172
|
-
else if (secondaryActions.length) {
|
|
173
|
-
const secondaryAction = secondaryActions[0];
|
|
174
|
-
if (order.indexOf(secondaryAction) !== 0)
|
|
175
|
-
issues.push('Secondary action must be the last focusable element in the actions slot when no primary action is present (i.e. rightmost button).');
|
|
176
|
-
}
|
|
177
|
-
return issues;
|
|
178
|
-
}
|
|
179
|
-
handleActionsSlotChange = () => {
|
|
180
|
-
this.observeActionState();
|
|
181
|
-
this.syncActionsState();
|
|
182
|
-
};
|
|
183
|
-
observeActionState() {
|
|
184
|
-
if (typeof MutationObserver === 'undefined')
|
|
185
|
-
return;
|
|
186
|
-
this.actionsStateObserver?.disconnect();
|
|
187
|
-
if (!this.assignedButtons.length)
|
|
188
|
-
return;
|
|
189
|
-
this.actionsStateObserver = new MutationObserver(() => {
|
|
190
|
-
this.syncActionsState();
|
|
191
|
-
});
|
|
192
|
-
this.assignedButtons.forEach((element) => {
|
|
193
|
-
this.actionsStateObserver?.observe(element, {
|
|
194
|
-
attributes: true,
|
|
195
|
-
attributeFilter: ['disabled', 'hidden', 'variant'],
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
syncActionsState() {
|
|
200
|
-
const assignedElements = this.assignedElements;
|
|
201
|
-
assignedElements.forEach((element) => {
|
|
202
|
-
const isAllowedAction = ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
|
|
203
|
-
if (isAllowedAction)
|
|
204
|
-
return;
|
|
205
|
-
if (!element.hasAttribute('hidden')) {
|
|
206
|
-
element.setAttribute('hidden', '');
|
|
207
|
-
}
|
|
208
|
-
if (element.getAttribute('aria-hidden') !== 'true') {
|
|
209
|
-
element.setAttribute('aria-hidden', 'true');
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
this.checkActions();
|
|
213
|
-
const length = this.visibleButtons.length;
|
|
214
|
-
for (let i = 0; i < length; i++) {
|
|
215
|
-
const variant = i === length - 1 ? 'primary' : i === length - 2 ? 'secondary' : 'tertiary';
|
|
216
|
-
const element = this.visibleButtons.at(i);
|
|
217
|
-
if (!element)
|
|
218
|
-
continue;
|
|
219
|
-
if (isLmvzButton(element)) {
|
|
220
|
-
if (!element.getAttribute('variant'))
|
|
221
|
-
element.setAttribute('variant', variant);
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
element.classList.add(variant);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
this.focusPrimaryAction();
|
|
228
|
-
}
|
|
229
|
-
focusPrimaryAction() {
|
|
230
|
-
const focusTarget = this.primaryEnabledAction;
|
|
231
|
-
if (!focusTarget || typeof window === 'undefined')
|
|
232
|
-
return;
|
|
233
|
-
window.requestAnimationFrame(() => {
|
|
234
|
-
if (canReceiveFocus(focusTarget)) {
|
|
235
|
-
focusTarget.focus();
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
checkActions() {
|
|
240
|
-
if (!isAriaValidationEnabled())
|
|
241
|
-
return;
|
|
242
|
-
const issues = this.getActionValidationResult();
|
|
243
|
-
if (!issues.length) {
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
issues.forEach((issue) => {
|
|
247
|
-
if (this.validationMessageCache.includes(issue))
|
|
248
|
-
return;
|
|
249
|
-
console.warn(issue);
|
|
250
|
-
this.validationMessageCache.push(issue);
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
render() {
|
|
254
|
-
return (h(Host, { key: '56b60821ecaa2301d13e78d621e873aa74cd170e' }, h("slot", { key: 'e6a1422950fa5b0026356b7788a607a690116186', ref: (element) => (this.actionsSlot = element), onSlotchange: this.handleActionsSlotChange })));
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
function isActionButton(element) {
|
|
258
|
-
return ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
|
|
259
|
-
}
|
|
260
|
-
function isLmvzButton(element) {
|
|
261
|
-
return element?.tagName.toUpperCase() === 'LMVZ-BUTTON';
|
|
262
|
-
}
|
|
263
|
-
function isDisabledButton(element) {
|
|
264
|
-
return element.hasAttribute('disabled') || element.disabled === true;
|
|
265
|
-
}
|
|
266
|
-
function isVisible(element) {
|
|
267
|
-
return !element.hasAttribute('hidden');
|
|
268
|
-
}
|
|
269
|
-
function getActionVariant(element) {
|
|
270
|
-
const variant = element.getAttribute('variant') ?? element.variant;
|
|
271
|
-
return variant === 'primary' || variant === 'secondary' || variant === 'tertiary' ? variant : 'secondary';
|
|
272
|
-
}
|
|
273
|
-
function isPrimaryAction(element) {
|
|
274
|
-
return getActionVariant(element) === 'primary';
|
|
275
|
-
}
|
|
276
|
-
function isSecondaryAction(element) {
|
|
277
|
-
return getActionVariant(element) === 'secondary';
|
|
278
|
-
}
|
|
279
|
-
LmvzButtonGroup.style = lmvzButtonGroupCss();
|
|
280
|
-
|
|
281
|
-
const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;
|
|
282
|
-
|
|
283
|
-
const LmvzIcon = class extends ReactiveControllerHost {
|
|
284
|
-
intersectionObserver;
|
|
285
|
-
ariaValidationController = new AriaValidationController(this);
|
|
286
|
-
get el() { return getElement(this); }
|
|
287
|
-
validationEl;
|
|
288
|
-
icon;
|
|
289
|
-
weight = 'medium';
|
|
290
|
-
size = 'md';
|
|
291
|
-
iconset;
|
|
292
|
-
iconData;
|
|
293
|
-
visible = false;
|
|
294
|
-
ariaLabel;
|
|
295
|
-
get ariaHidden() {
|
|
296
|
-
return !this.ariaLabel;
|
|
297
|
-
}
|
|
298
|
-
constructor(hostRef) {
|
|
299
|
-
super();
|
|
300
|
-
registerInstance(this, hostRef);
|
|
301
|
-
this.addController(this.ariaValidationController);
|
|
302
|
-
}
|
|
303
|
-
connectedCallback() {
|
|
304
|
-
this.waitUntilVisible(() => {
|
|
305
|
-
this.visible = true;
|
|
306
|
-
this.loadIconPathData();
|
|
307
|
-
});
|
|
308
|
-
super.connectedCallback();
|
|
309
|
-
}
|
|
310
|
-
disconnectedCallback() {
|
|
311
|
-
if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
|
|
312
|
-
this.intersectionObserver.disconnect();
|
|
313
|
-
}
|
|
314
|
-
this.intersectionObserver = undefined;
|
|
315
|
-
super.disconnectedCallback();
|
|
316
|
-
}
|
|
317
|
-
async loadIconPathData() {
|
|
318
|
-
const { icon, iconset, visible } = this;
|
|
319
|
-
if (!icon || !visible) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
const maybeIcon = parseSvgString(icon);
|
|
323
|
-
if (maybeIcon) {
|
|
324
|
-
this.iconData = maybeIcon;
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
this.iconData = await resolveIconSvg({
|
|
328
|
-
icon,
|
|
329
|
-
iconset,
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
componentDidRender() {
|
|
333
|
-
this.validationEl = this.el.querySelector('svg');
|
|
334
|
-
this.ariaValidationController.revalidateAria();
|
|
335
|
-
super.componentDidRender();
|
|
336
|
-
}
|
|
337
|
-
render() {
|
|
338
|
-
return h(Host, { key: '03b4391d02a77409257bcda51c2b65ad9a9e0a0c', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
|
|
339
|
-
}
|
|
340
|
-
waitUntilVisible(callback, rootMargin = 50) {
|
|
341
|
-
if (typeof window === 'undefined' || !window.IntersectionObserver) {
|
|
342
|
-
callback();
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
346
|
-
entries.some((entry) => {
|
|
347
|
-
if (entry.isIntersecting) {
|
|
348
|
-
if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
|
|
349
|
-
this.intersectionObserver.disconnect();
|
|
350
|
-
}
|
|
351
|
-
this.intersectionObserver = undefined;
|
|
352
|
-
callback();
|
|
353
|
-
return true;
|
|
354
|
-
}
|
|
355
|
-
return false;
|
|
356
|
-
});
|
|
357
|
-
}, { rootMargin: `${rootMargin}px` });
|
|
358
|
-
this.intersectionObserver.observe(this.el);
|
|
359
|
-
}
|
|
360
|
-
static get watchers() { return {
|
|
361
|
-
"icon": [{
|
|
362
|
-
"loadIconPathData": 0
|
|
363
|
-
}],
|
|
364
|
-
"iconset": [{
|
|
365
|
-
"loadIconPathData": 0
|
|
366
|
-
}]
|
|
367
|
-
}; }
|
|
368
|
-
};
|
|
369
|
-
LmvzIcon.style = lmvzIconCss();
|
|
370
|
-
|
|
371
|
-
export { LmvzButton as lmvz_button, LmvzButtonGroup as lmvz_button_group, LmvzIcon as lmvz_icon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as M,r as N,h as e,H as I}from"./p-CKYszC64.js";import{R as j,A as D}from"./p-CwX1wKkM.js";import{g,a}from"./p-DOTK1OW3.js";export{lmvz_menuitem}from"./p-c01a6c70.entry.js";import"./p-CdDO7mQa.js";import"./p-CN0JX9-m.js";class u{host;elements=[];constructor(M){this.host=M}hostDidRender(){this.host.el.addEventListener("keydown",this.handleKeydown)}updateElements(M){this.elements=M}handleKeydown=M=>{const{key:N}=M;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(N))return;const e=g(document),I=this.getNextFocusableElement(e,["ArrowDown","ArrowRight"].includes(N)?"down":"up");I&&(M.preventDefault(),I.focus?.())};getNextFocusableElement(M,N){if(!M)return;const{elements:e}=this,I=e.indexOf(M);if(-1===I)return;let j;if("down"===N?j=(I+1)%e.length:"up"===N&&(j=(I-1+e.length)%e.length),null==j)return;const D=e[j];return a(D)?D:this.getNextFocusableElement(D,N)}}const i=class extends j{get el(){return M(this)}get validationEl(){return this.el}primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new u(this);get primaryMenuitems(){return this.primarySlot?.assignedElements({flatten:!1})||[]}get secondaryMenuitems(){return this.secondarySlot?.assignedElements({flatten:!0})||[]}get role(){return"banner"}lmvzActiveNav;get secondarySlotName(){return`connect-nav-${this.lmvzActiveNav}`}constructor(M){super(),N(this,M),this.addController(new D(this,{reValidateOnPropChanges:!0})),this.addController(this.keyboardNavigationController)}handleActiveNavChange(){this.updateElementsActive()}componentDidLoad(){this.primarySlot?.addEventListener("slotchange",this.handlePrimaryNavItemsChange.bind(this)),this.handlePrimaryNavItemsChange(),this.secondarySlot?.addEventListener("slotchange",this.handleSecondaryNavItemsChange.bind(this)),super.componentDidLoad()}handlePrimaryNavItemsChange(){const M=this.primaryMenuitems;M.length?(M.forEach((M=>{M.setAttribute("aria-haspopup","true"),M.setAttribute("aria-controls","nav-secondary")})),this.updateElementsActive(),this.updateKeyboardNavSubjects()):console.warn("Primary slot has no assigned elements. Please add navigation items to the primary slot.")}handleSecondaryNavItemsChange(){this.secondaryMenuitems.length&&this.updateKeyboardNavSubjects()}updateKeyboardNavSubjects(){this.keyboardNavigationController.updateElements([...this.primaryMenuitems,...this.secondaryMenuitems])}updateElementsActive(){const M=this.primaryMenuitems;if(!M.length)return;let N="";M.forEach((M=>{const e=M.id===this.lmvzActiveNav;e&&(N=M.textContent||M.id),M.setAttribute("aria-expanded",e?"true":"false")})),N&&this.secondaryNav?.setAttribute("aria-label",`Untermenü für ${N}`)}delegateFocus(){const M=this.primaryMenuitems[0];M&&M.focus()}render(){return e(I,{key:"323b7b13ef147f48e5f06537c7f27ab6e8a649ca",onFocus:this.delegateFocus.bind(this)},e("div",{key:"518434d55b7bfc5c1a8988f707984b8e2a41163c",class:"brand"},e("slot",{key:"1829a1ba10ba3a4e1a0e32564c534e960dc652d1",name:"brand"},e("img",{key:"485c217a7fc920646ec531cac9744a10f29dab4e",id:"fallback-logo-lmvz",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",alt:"Lehrmittelverlag Zürich"}))),e("nav",{key:"df2cea9f42427c0bb51a498cc2627f0113a608a0","aria-label":"Hauptnavigation"},e("div",{key:"93d6e0edc45c0032c5d3c93ea5f22e204fb0617e",role:"menubar",class:"primary-menubar"},e("slot",{key:"1b0238ca89023cc9a0ec4453e79a4597aaa92f2a",name:"nav-primary",ref:M=>this.primarySlot=M}),e("div",{key:"d7576b23a5f9268a106c98052a869825493e0485",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:M=>this.secondaryNav=M},e("slot",{key:"ada5f271c58350c44bb55c3bd976450214795f2b",name:this.secondarySlotName,ref:M=>this.secondarySlot=M})))),e("div",{key:"db47039ebf932942210fd3f0920f9f86f9d2b09b",class:"actions"},e("slot",{key:"2d220a2946f26e69052d20dd4524e60fafbfe137",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}};i.style=":host{display:flex;width:100vw;flex-direction:row;align-items:center;box-sizing:border-box;background-color:var(--lmvz-semantic-color-surface-primary, #ffffff);--lmvz-header-x-spacing-level-1:var(--lmvz-dimension-8-28, clamp(0.5rem, 0.2rem + 1.29vw, 1.75rem));--lmvz-header-x-spacing-level-2:var(--lmvz-component-buttongroup-wrapper-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));padding:var(--lmvz-dimension-8-16, clamp(0.5rem, 0.38rem + 0.52vw, 1rem)) var(--lmvz-header-x-spacing-level-1);gap:var(--lmvz-header-x-spacing-level-1);.brand{display:inline-flex;justify-content:center;align-items:center}#fallback-logo-lmvz{height:34px;width:auto}nav{flex-grow:1}.primary-menubar{display:flex;flex-direction:row;align-items:center}.secondary-menubar{display:flex;flex-direction:row;align-items:center;margin-left:var(--lmvz-header-x-spacing-level-2);padding-left:var(--lmvz-header-x-spacing-level-2);border-left:1px solid var(--lmvz-semantic-color-border-default, #e0e0e0)}}";export{i as lmvz_header}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r,r as e,c as o,h as t,H as i}from"./p-CKYszC64.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import"./p-CdDO7mQa.js";function l(r){return r.el.shadowRoot?.querySelector("input")??r.el.querySelector("input")??null}class c{hosts=[];_focusedHost=null;_focusinHandler=r=>{this.hosts.some((e=>e.el.contains(r.target)))||this.clearFocused()};register(r){if(!this.hosts.includes(r)){const e=0===this.hosts.length;this.hosts.push(r),this.sortHosts(),e&&document.addEventListener("focusin",this._focusinHandler,!0)}}unregister(r){r===this._focusedHost&&(this._focusedHost=null),this.hosts=this.hosts.filter((e=>e!==r)),0===this.hosts.length&&document.removeEventListener("focusin",this._focusinHandler,!0)}get sortedEnabled(){return this.hosts.filter((r=>!r.disabled))}setFocused(r){this._focusedHost=r,this.updateTabindex(),r.focusInput()}clearFocused(){this._focusedHost=null,this.updateTabindex()}select(r){this._focusedHost=null;for(const e of this.hosts)e.checked=e===r;this.updateTabindex()}updateTabindex(){const r=this.sortedEnabled,e=this.hosts.find((r=>r.checked));let o;o=this._focusedHost&&r.includes(this._focusedHost)?this._focusedHost:e??r[0]??null;for(const r of this.hosts){const e=l(r);e&&(e.tabIndex=r===o?0:-1)}}sortHosts(){this.hosts.sort(((r,e)=>r.el.compareDocumentPosition(e.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}}class n{host;static registry=new Map;group=null;_groupKey=null;_scope=null;constructor(r){this.host=r}hostConnected(){const{group:r,key:e,scope:o}=n.acquireGroup(this.host);this._groupKey=e,this._scope=o,this.group=r,this.group.register(this.host),this.group.updateTabindex()}hostDidRender(){this.group?.updateTabindex()}hostDisconnected(){this.group&&(this.group.unregister(this.host),this.group.updateTabindex(),n.releaseGroup(this._groupKey,this._scope),this._groupKey=null,this._scope=null,this.group=null)}get sortedEnabled(){return this.group?.sortedEnabled??[]}select(r){this.group?.select(r)}setFocused(r){this.group?.setFocused(r)}clearFocused(){this.group?.clearFocused()}updateTabindex(){this.group?.updateTabindex()}static acquireGroup(r){const e=r.name;if(!e)return{group:new c,key:null,scope:null};const o=r.el.closest("form")??document,t=function(r,e){return e instanceof HTMLFormElement?(e.dataset.lmvzRadioGroupId||(e.dataset.lmvzRadioGroupId=String(Math.random())),`${r}::form::${e.dataset.lmvzRadioGroupId}`):`${r}::document`}(e,o);let i=n.registry.get(t);return i||(i={group:new c,refCount:0},n.registry.set(t,i)),i.refCount++,{group:i.group,key:t,scope:o}}static releaseGroup(r,e){if(!r)return;const o=n.registry.get(r);o&&(o.refCount--,o.refCount<=0&&(n.registry.delete(r),e instanceof HTMLFormElement&&e.removeAttribute("data-lmvz-radio-group-id")))}}let d=0;const h=class extends a{get el(){return r(this)}get validationEl(){return this.el}internals;nativeInput;radioId="lmvz-radio-"+d++;initialChecked=!1;radioGroupController;get helperId(){return this.helperText?`${this.radioId}-helper`:void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;error=!1;helperText;form;autofocus=!1;_handlingNativeChange=!1;_handlingFormReset=!1;handleCheckedChange(r,e){this.internals.setFormValue?.(r?this.value:null),r||!e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!1),!r||e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!0)}handleValueChange(r){this.checked&&this.internals.setFormValue?.(r)}handleLabelChange(r){r||console.warn("[lmvz-radio] label prop is required and must not be empty")}lmvzChange;lmvzActivation;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}constructor(r){super(),e(this,r),this.lmvzChange=o(this,"lmvzChange",7),this.lmvzActivation=o(this,"lmvzActivation",7),r.$hostElement$["s-ei"]?this.internals=r.$hostElement$["s-ei"]:(this.internals=r.$hostElement$.attachInternals(),r.$hostElement$["s-ei"]=this.internals),this.addController(new s(this,{reValidateOnPropChanges:!0})),this.radioGroupController=new n(this),this.addController(this.radioGroupController)}componentWillLoad(){this.initialChecked=this.checked,this.internals.setFormValue?.(this.checked?this.value:null),super.componentWillLoad()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this._handlingFormReset=!0;try{this.checked=this.initialChecked}finally{this._handlingFormReset=!1}}formStateRestoreCallback(r){if("string"==typeof r){this._handlingFormReset=!0;try{this.checked=r===this.value}finally{this._handlingFormReset=!1}}}handleChange=r=>{this._handlingNativeChange=!0;try{this.checked=r.target.checked,this.lmvzChange.emit(this.checked),this.radioGroupController.select(this),this.lmvzActivation.emit()}finally{this._handlingNativeChange=!1}};handleKeydown(r){const{key:e}=r;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(e))return;r.preventDefault();const o=this.radioGroupController.sortedEnabled;if(0===o.length)return;const t=o.indexOf(this);if(-1===t)return;let i;i="ArrowDown"===e||"ArrowRight"===e?(t+1)%o.length:"ArrowUp"===e||"ArrowLeft"===e?(t-1+o.length)%o.length:"Home"===e?0:o.length-1;const a=o[i];a&&this.radioGroupController.setFocused(a)}render(){return t(i,{key:"0226e313fcf4fe3c3cf343cfe0776cf71da169a6"},t("input",{key:"5bb1f733d2f29217bc7544d8fd24f6b21bedc654",type:"radio",id:this.radioId,name:this.name??void 0,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,autoFocus:this.autofocus,"aria-invalid":this.error?"true":void 0,"aria-describedby":this.helperId,ref:r=>this.nativeInput=r,onChange:this.handleChange}),t("span",{key:"ae18f49167d1a2e8e6ec4ceca435e69e3d79f593",class:"circle","aria-hidden":"true"},this.checked&&t("span",{key:"5dfb65105831a672f2a47952aff987cd45e9b178",class:"dot"})),t("span",{key:"df148ca52be7e580226d94ff9aef4e3cf5a6182c",class:"content"},t("label",{key:"e042c57755eadb64692ace49204dccb1ee03ed1c",htmlFor:this.radioId},this.label),t("span",{key:"a90b0bef927dddb39f9e6357adf888e0818a3c5a","aria-live":"polite",class:"helper-text",id:this.helperId},this.helperText)))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}}};h.style="@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-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #e52a31); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }.sc-lmvz-radio-h:focus-within{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){.sc-lmvz-radio-h:focus-within{outline-color:Highlight;box-shadow:none}}";export{h as lmvz_radio}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as o,r as e,h as r,H as t}from"./p-CKYszC64.js";import{a,c as l}from"./p-Bmi89ll1.js";import{R as s,A as c}from"./p-CwX1wKkM.js";import{i as n}from"./p-CdDO7mQa.js";const i=class extends s{ariaValidationController=new c(this);beforeSlot;defaultSlot;afterSlot;get el(){return o(this)}get validationEl(){return this.el}type="active";size="default";constructor(o){super(),e(this,o),this.addController(this.ariaValidationController)}normalizeType(o){const e=a.includes(o)?o:"active";e!==this.type&&(this.type=e)}normalizeSize(o){const e=l.includes(o)?o:"default";e!==this.size&&(this.size=e)}componentWillLoad(){this.normalizeType(this.type),this.normalizeSize(this.size),super.componentWillLoad()}connectedCallback(){super.connectedCallback(),this.checkContent()}checkContent=function(o){let e;return()=>{void 0!==e&&window.clearTimeout(e),e=window.setTimeout((()=>{o(),e=void 0}),500)}}((()=>{n()&&([...this.beforeSlot?.assignedElements()??[],...this.defaultSlot?.assignedElements()??[],...this.afterSlot?.assignedElements()??[]].length||console.warn("LmvzChip has no assigned content. Please add content to the default slot or the before-text/after-text slots."))}));render(){return r(t,{key:"70654d69189e77f9356853a921366083b2c4b969",type:this.type,size:this.size},r("slot",{key:"c7e667b93166286fe68a812dd8eec82885e3fc5e",name:"before-text",ref:o=>this.beforeSlot=o,onSlotchange:()=>this.checkContent()}),r("span",{key:"af38dd0429b42685a114e26175ce42d09f5fdcc1",class:"content-overflow-wrapper"},r("slot",{key:"924158498d65b9ac7c912b6b1a479016176e0b78",ref:o=>this.defaultSlot=o,onSlotchange:()=>this.checkContent()})),r("slot",{key:"9ff0394dbfb2131fafe513d0f2d8ce26c7781f20",name:"after-text",ref:o=>this.afterSlot=o,onSlotchange:()=>this.checkContent()}))}static get watchers(){return{type:[{normalizeType:0}],size:[{normalizeSize:0}]}}};i.style=":host { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); padding-block: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); padding-inline: var(--lmvz-dimension-8-10, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); border: 1px solid var(--lmvz-chip-border-color); border-radius: var(--lmvz-semantic-border-radius-round, 999px); font: var(--lmvz-typography-body-xs-strong, 500 clamp(0.63rem, 0.61rem + 0.06vw, 0.69rem) / 1.4 Router); background-color: var(--lmvz-chip-background-color); color: var(--lmvz-chip-foreground-color); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); box-sizing: border-box; max-width: 100%; overflow: hidden; white-space: nowrap; > .content-overflow-wrapper { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } :host([size='small']) { padding-block: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); padding-inline: var(--lmvz-dimension-6-8, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); font: var(--lmvz-typography-body-2xs-strong, 500 clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem) / 1.4 Router); gap: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); } ::slotted(*) { display: inline; white-space: inherit; } ::slotted(lmvz-icon) { --lmvz-component-color: var(--lmvz-chip-foreground-color); --lmvz-component-size: var(--lmvz-dimension-12-14, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } :host([size='small']) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-10-12, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } :host([type='active']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-active-subtle, #c1e6fa); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } :host([type='warning']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-warning-subtle, #ffdf75); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-warning, #fffbf0); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-warning, #7a5e00); } :host([type='success']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-success-subtle, #a5dad3); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-success, #f1f9f8); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-success, #37867c); } :host([type='error']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-danger-subtle, #f7bfc2); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-danger, #fdf1f2); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } :host([type='neutral']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); } ";export{i as lmvz_chip}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,r as o,c as e,h as n,H as i}from"./p-CKYszC64.js";import{c as r}from"./p-BfTCfPZ1.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import{E as l}from"./p-CN0JX9-m.js";import{i as m,f as c,a as d}from"./p-DOTK1OW3.js";import{a as v,i as u}from"./p-CdDO7mQa.js";import{p as h}from"./p-CcxjkCOx.js";import{a as b}from"./p-CFsC37ww.js";import"./p-CGmJG63p.js";const p=class extends a{get el(){return t(this)}validationEl;inheritedAttributes={};formEl=null;formButtonEl=null;lmvzActivation;get ti(){return 0}scale="default";variant;disabled=!1;type="button";form;formMethod;name;value;constructor(t){super(),o(this,t),this.lmvzActivation=e(this,"lmvzActivation",7),this.addController(new s(this)),this.addController(new l(this,{localHandler:this.handleClick.bind(this),keys:["Enter"]}))}connectedCallback(){this.inheritedAttributes=m(this.el),super.connectedCallback()}disconnectedCallback(){this.formButtonEl?.remove(),this.formButtonEl=null,this.formEl=null,super.disconnectedCallback()}renderHiddenButton(){if("submit"!==this.type)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);const t=c(this.form,this.el);if(!t)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);this.formEl=t;const o=this.formButtonEl??document.createElement("button");o.type="submit",o.style.display="none",o.disabled=this.disabled,o.name=this.name??"",o.value=this.value??"",this.formMethod?o.setAttribute("formmethod",this.formMethod):o.removeAttribute("formmethod"),this.formButtonEl!==o&&(this.formButtonEl=o),o.parentElement!==t&&(o.remove(),t.appendChild(o))}submitForm(t){this.formEl&&this.formButtonEl&&(t.preventDefault(),this.formButtonEl.click())}handleClick=t=>{"submit"===this.type&&this.submitForm(t)};render(){return this.renderHiddenButton(),n(i,{key:"8196de85afc3878c6f38e582d7c031f5d19bcd36","aria-disabled":this.disabled?"true":null},n("button",{key:"8d73f979fa227de22a03403a2a3938684911060a",ref:t=>this.validationEl=t,part:"button",disabled:this.disabled,type:this.type,class:r(this.variant??"secondary",{[this.scale??""]:!!this.scale,disabled:this.disabled}),...this.inheritedAttributes},n("slot",{key:"18e91a2f94ba0d7e5cf13150191003e2f0b2a03a"})))}static get delegatesFocus(){return!0}};p.style=" @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; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: 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, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: inline-block; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } ";const z=class{constructor(t){o(this,t)}actionsSlot;validationMessageCache=[];actionsStateObserver;get primaryEnabledAction(){return this.enabledButtons.find(R)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>w(t)&&f(t)&&!y(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(f)}get visibleButtons(){return this.assignedButtons.filter(w)}get enabledButtons(){return this.visibleButtons.filter((t=y,(...o)=>{const e=t(...o);return v(e)?e.then((t=>!t)):!e}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(R),o=this.visibleButtons.filter(C),e=[],n=this.visibleButtons.toReversed();if(1!==t.length&&e.push("LmvzModal actions slot must contain exactly one primary action."),o.length>1&&e.push(`LmvzModal actions slot must contain at most one secondary action (received ${o.length})`),t.length){const i=o[0];0!==n.indexOf(t[0])&&e.push("Primary action must be the last focusable element in the actions slot (i.e. rightmost button)."),i&&1!==n.indexOf(i)&&e.push("Secondary action must be the second-to-last focusable element in the actions slot (i.e. left of primary button).")}else o.length&&0!==n.indexOf(o[0])&&e.push("Secondary action must be the last focusable element in the actions slot when no primary action is present (i.e. rightmost button).");return e}handleActionsSlotChange=()=>{this.observeActionState(),this.syncActionsState()};observeActionState(){"undefined"!=typeof MutationObserver&&(this.actionsStateObserver?.disconnect(),this.assignedButtons.length&&(this.actionsStateObserver=new MutationObserver((()=>{this.syncActionsState()})),this.assignedButtons.forEach((t=>{this.actionsStateObserver?.observe(t,{attributes:!0,attributeFilter:["disabled","hidden","variant"]})}))))}syncActionsState(){this.assignedElements.forEach((t=>{["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())||(t.hasAttribute("hidden")||t.setAttribute("hidden",""),"true"!==t.getAttribute("aria-hidden")&&t.setAttribute("aria-hidden","true"))})),this.checkActions();const t=this.visibleButtons.length;for(let o=0;o<t;o++){const e=o===t-1?"primary":o===t-2?"secondary":"tertiary",n=this.visibleButtons.at(o);n&&(g(n)?n.getAttribute("variant")||n.setAttribute("variant",e):n.classList.add(e))}this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{d(t)&&t.focus()}))}checkActions(){if(!u())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return n(i,{key:"56b60821ecaa2301d13e78d621e873aa74cd170e"},n("slot",{key:"e6a1422950fa5b0026356b7788a607a690116186",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}};function f(t){return["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())}function g(t){return"LMVZ-BUTTON"===t?.tagName.toUpperCase()}function y(t){return t.hasAttribute("disabled")||!0===t.disabled}function w(t){return!t.hasAttribute("hidden")}function k(t){const o=t.getAttribute("variant")??t.variant;return"primary"===o||"secondary"===o||"tertiary"===o?o:"secondary"}function R(t){return"primary"===k(t)}function C(t){return"secondary"===k(t)}z.style=":host{display:flex;justify-content:flex-end;gap:var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router);flex-wrap:wrap}::slotted([hidden]){display:none !important}";const x=class extends a{intersectionObserver;ariaValidationController=new s(this);get el(){return t(this)}validationEl;icon;weight="medium";size="md";iconset;iconData;visible=!1;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(t){super(),o(this,t),this.addController(this.ariaValidationController)}connectedCallback(){this.waitUntilVisible((()=>{this.visible=!0,this.loadIconPathData()})),super.connectedCallback()}disconnectedCallback(){this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,super.disconnectedCallback()}async loadIconPathData(){const{icon:t,iconset:o,visible:e}=this;if(!t||!e)return;const n=h(t);this.iconData=n||await b({icon:t,iconset:o})}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return n(i,{key:"03b4391d02a77409257bcda51c2b65ad9a9e0a0c",role:"img","aria-hidden":`${this.ariaHidden}`,innerHTML:this.iconData})}waitUntilVisible(t,o=50){"undefined"!=typeof window&&window.IntersectionObserver?(this.intersectionObserver=new IntersectionObserver((o=>{o.some((o=>!!o.isIntersecting&&(this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,t(),!0)))}),{rootMargin:`${o}px`}),this.intersectionObserver.observe(this.el)):t()}static get watchers(){return{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}}};x.style=".sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}";export{p as lmvz_button,z as lmvz_button_group,x as lmvz_icon}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,r as o,c,h as r,H as a}from"./p-CKYszC64.js";import{t}from"./p-CcxjkCOx.js";import{R as l,A as s}from"./p-CwX1wKkM.js";import"./p-CGmJG63p.js";import"./p-CdDO7mQa.js";const i=t("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuNzUgMTIuNTYyNUw4LjgzMDc5IDE3LjYyNUwyMC40Mzc1IDYuMzc1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K");let h=0;const n=class extends l{get el(){return e(this)}get validationEl(){return this.el}internals;nativeInput;checkboxId="lmvz-checkbox-"+h++;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;error=!1;errorMessage;helperText;form;autofocus=!1;checkedState=!1;handleCheckedChange(e){this.checkedState=e,this.internals.setFormValue?.(e?this.value??"on":null)}lmvzChange;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}constructor(e){super(),o(this,e),this.lmvzChange=c(this,"lmvzChange",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.addController(new s(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialChecked=this.checked,this.checkedState=this.checked,this.internals.setFormValue?.(this.checked?this.value??"on":null),super.componentWillLoad()}componentWillRender(){this.error&&!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}formStateRestoreCallback(e){this.checked=e===(this.value??"on")}handleChange=e=>{this.checked=e.target.checked,this.lmvzChange.emit(this.checked)};render(){return r(a,{key:"158efacac5c28a18003149d4acb0d1cf5385cef4"},r("div",{key:"5deaf853f9c465b70b7e5472579c5d5212105c34",class:"pill"},r("input",{key:"7e8da452d41cd48293569ec60dad0585ff3290f1",type:"checkbox",id:this.checkboxId,checked:this.checkedState,disabled:this.disabled,required:this.required,"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:"d1ee72be8e3fc2b4e70ff64b70bfcec93f08f063",class:"box","aria-hidden":"true"},this.checkedState&&r("span",{key:"73e123aa8c91e9098b4d8bbd48bbc7bae6c12383",class:"indicator",innerHTML:i})),r("span",{key:"2a161e6db9e792dca1fa24c1562bd0b79d62235b",class:"content"},r("label",{key:"fb38792095bf6da433867472d866d6700db45dac",htmlFor:this.checkboxId},this.label),this.helperText&&r("span",{key:"b8c16fc4782f67e1dca82329d081943a7d75a524",class:"helper-text",id:this.helperId,role:"status"},this.helperText))),this.errorMessage&&r("span",{key:"87d6940217d379777e26c578cff761dcfd96e79a",class:"error-text",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}]}}};n.style="@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, #c7c7c7); --checkbox-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-border-color-error: var(--lmvz-semantic-color-status-on-danger, #e52a31); --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, #e52a31); --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-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); cursor: pointer; 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; } .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); 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; } label.sc-lmvz-checkbox { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); color: var(--checkbox-label-color); transition: color var(--checkbox-duration) var(--checkbox-easing); } .helper-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); color: var(--checkbox-helper-color); margin-block-start: 2px; } .error-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 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; } [disabled].sc-lmvz-checkbox-h .pill.sc-lmvz-checkbox { cursor: not-allowed; } [disabled].sc-lmvz-checkbox-h input.sc-lmvz-checkbox { cursor: not-allowed; } .sc-lmvz-checkbox-h:focus-within .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:focus-within .pill.sc-lmvz-checkbox { outline-color: Highlight; box-shadow: none; } }";export{n as lmvz_checkbox}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,r as e,c as r,h as i}from"./p-CKYszC64.js";import{c as o}from"./p-BfTCfPZ1.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import{c as n}from"./p-DOTK1OW3.js";import"./p-CdDO7mQa.js";let l=0;const c=class extends a{get el(){return t(this)}get validationEl(){return this.el}lmvzInput;internals;nativeInputElement;inputId="lmvz-input-"+l++;initialValue="";nativeError=!1;errorFromProp=!1;get helperId(){return this.helperText?`${this.inputId}-helper`:void 0}get showErrorMessage(){return this.error&&Boolean(this.errorMessage)}get errorId(){return`${this.inputId}-error`}get describedBy(){const t=[];return this.helperId&&t.push(this.helperId),this.showErrorMessage&&t.push(this.errorId),t.length>0?t.join(" "):void 0}value;label;helperText;placeholder;disabled=!1;readonly=!1;required=!1;name;type="text";errorMessage;autocomplete;inputmode;autocorrect;autocapitalize;spellcheck;autofocus=!1;minlength;maxlength;pattern;min;max;step;form;get error(){return this.errorFromProp||this.nativeError}set error(t){this.errorFromProp=t}async setValue(t){const e=this.nativeInputElement,r=t??"";e&&(e.value=r),this.value=r,this.internals.setFormValue?.(r),this.lmvzInput.emit(r)}async focusInput(){this.nativeInputElement?.focus()}async blurInput(){this.nativeInputElement?.blur()}async select(){this.nativeInputElement?.select()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getInputElement(){return this.nativeInputElement||await new Promise((t=>n(this.el,t))),Promise.resolve(this.nativeInputElement)}constructor(t){super(),e(this,t),this.lmvzInput=r(this,"lmvzInput",7),t.$hostElement$["s-ei"]?this.internals=t.$hostElement$["s-ei"]:(this.internals=t.$hostElement$.attachInternals(),t.$hostElement$["s-ei"]=this.internals),this.addController(new s(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialValue=this.value??"",super.componentWillLoad()}formAssociatedCallback(t){t&&this.internals.setFormValue?.(this.value??"")}formResetCallback(){this.internals.setValidity({}),this.setValue(this.initialValue)}formStateRestoreCallback(t){this.setValue(t)}handleValueChange(t){this.nativeInputElement&&(this.nativeInputElement.value===t||this.setValue(t))}handleDisabledChange(t){t&&this.nativeInputElement&&this.nativeInputElement.blur()}handleInput=t=>{this.setValue(t.target.value)};handleChange=t=>{this.updateNativeError(t.target??this.nativeInputElement)};handleFocus=()=>{};handleBlur=t=>{const e=t.target;e.reportValidity?.()};updateNativeError(t){const e=t??this.nativeInputElement;e&&(this.nativeError=!(e.checkValidity?.()??1))}render(){const t=Boolean(this.value),e=t||Boolean(this.placeholder);return i("div",{key:"b8c3aaccafb89725aaa157a72633c67ae8b4d58c",class:o("input-container",{"interaction-filled":t})},i("div",{key:"80261c486d3bfe61aa060d50e9a6774c961339a1",class:"input-wrapper"},i("slot",{key:"6856dd64991251adc63d8064ed63e9cf7b1773a2",name:"before-input"}),i("div",{key:"c975357079efef465c56fb50cbb404bd1cbe3fb1",class:"label-input-group"},i("label",{key:"798417172f8411be97866edbffbd2bb98c308c69",htmlFor:this.inputId,class:o({floating:e})},this.label,this.required&&i("span",{key:"9fd59f3d93c984304e6c8ae6531df82bc0057243",class:"required-indicator","aria-hidden":"true"}," ","*")),i("input",{key:"a4e1133b4891c01044365eb3c97ee234c84c9bac",id:this.inputId,ref:t=>this.nativeInputElement=t,type:this.type,min:this.min,max:this.max,step:this.step,value:this.value,name:this.name,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,form:this.form,autocomplete:this.autocomplete,inputmode:this.inputmode,autocorrect:this.autocorrect,autocapitalize:this.autocapitalize,spellcheck:this.spellcheck,autofocus:this.autofocus,minlength:this.minlength,maxlength:this.maxlength,pattern:this.pattern,"aria-invalid":this.error?"true":"false","aria-required":this.required?"true":"false","aria-describedby":this.describedBy,"aria-errormessage":this.errorId,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur})),i("slot",{key:"c774f03e704889b524f305c00d60c0902abdff5f",name:"after-input"})),i("div",{key:"f513746541c71ce0d67c26eb220b54408fc3f136",id:this.helperId,role:"status"},this.helperText||null),i("div",{key:"197683e55807bf100ca1543f5b84b14e910e721f",id:this.errorId,role:"alert"},this.showErrorMessage&&this.errorMessage||null))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}}};c.style="@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-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }";export{c as lmvz_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,r as t,c as o,h as r,H as l}from"./p-CKYszC64.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import{c as i}from"./p-DOTK1OW3.js";import"./p-CdDO7mQa.js";let c=0;const n=class extends a{get el(){return e(this)}get validationEl(){return this.el}internals;nativeInputElement;toggleId="lmvz-toggle-"+c++;lmvzChange;label;checked=!1;disabled=!1;required=!1;name;value="on";form;constructor(e){super(),t(this,e),this.lmvzChange=o(this,"lmvzChange",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.addController(new s(this))}formAssociatedCallback(e){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this.checked=!1}formStateRestoreCallback(e){this.checked=e===this.value,this.internals.setFormValue?.(this.checked?this.value:null)}handleCheckedChange(e){this.internals.setFormValue?.(e?this.value:null)}handleDisabledChange(e){e&&this.nativeInputElement&&this.nativeInputElement.blur()}async focusToggle(){this.nativeInputElement?.focus()}async blurToggle(){this.nativeInputElement?.blur()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getInputElement(){return this.nativeInputElement||await new Promise((e=>i(this.el,e))),Promise.resolve(this.nativeInputElement)}handleChange=e=>{const t=e.target.checked;this.checked=t,this.lmvzChange.emit(t)};render(){return r(l,{key:"4bb633301740c3e69a836615e2266242980ac17a"},r("span",{key:"cc7188d8e2caff2968ad6c64c72565a71c89ec74",class:"track"},r("input",{key:"867f7865711b9224b89f0f491df8a19589342729",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:e=>this.nativeInputElement=e,onChange:this.handleChange}),r("span",{key:"426ee9f042afcc3d74b2137d2edbe95573b3c136",class:"thumb","aria-hidden":"true"})),r("label",{key:"600cb22f2915d86edafa9ac57b77707055f6ae16",htmlFor:this.toggleId},this.label))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}}};n.style="@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-toggle-h { display: inline-flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); cursor: pointer; background-color: transparent; user-select: none; } .sc-lmvz-toggle-h:not([disabled]):hover { background-color: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } [checked].sc-lmvz-toggle-h { background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); } [disabled][checked].sc-lmvz-toggle-h { background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); } [disabled].sc-lmvz-toggle-h { cursor: not-allowed; opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; } .track.sc-lmvz-toggle { position: relative; flex-shrink: 0; width: var(--lmvz-global-s32, 32px); height: var(--lmvz-global-s20, 20px); border-radius: var(--lmvz-semantic-border-radius-round, 999px); background-color: var(--lmvz-semantic-color-surface-input-primary, #ffffff); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); } .sc-lmvz-toggle-h:not([disabled]):hover .track.sc-lmvz-toggle { border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } [checked].sc-lmvz-toggle-h .track.sc-lmvz-toggle { border-color: var(--lmvz-semantic-color-border-active, #0f8acc); } input.sc-lmvz-toggle { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: inherit; } .thumb.sc-lmvz-toggle { position: absolute; width: var(--lmvz-global-s13, 13px); height: var(--lmvz-global-s13, 13px); border-radius: 50%; background-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); top: 50%; transform: translateY(-50%); left: var(--lmvz-global-s4, 4px); transition: left 0.2s ease, background-color 0.2s ease; pointer-events: none; } [checked].sc-lmvz-toggle-h .thumb.sc-lmvz-toggle { left: calc(var(--lmvz-global-s4, 4px) + var(--lmvz-global-s11, 11px)); background-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } label.sc-lmvz-toggle { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); color: var(--lmvz-semantic-color-on-surface-primary, #000000); cursor: pointer; }.sc-lmvz-toggle-h:focus-within{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){.sc-lmvz-toggle-h:focus-within{outline-color:Highlight;box-shadow:none}}";export{n as lmvz_toggle}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=["xs","sm","md","lg"],a=[...s,"xl"],e=["text","email","password","tel","url","search","number"],l=[...s,"inherit"],r=["thin","medium","bold","filled"],t=["active","warning","success","error","neutral"],i=["default","small"];export{t as a,r as b,i as c,e as d,l as i,a as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as t,u as i,A as s,q as o}from"./p-CdDO7mQa.js";import{B as e}from"./p-CKYszC64.js";class n{host;config;visibilityObserver;elementQueued=!1;elementValidated=!1;elementLoaded=!1;static knownValidationErrors=[];get disabled(){return!t()}get useVerboseLogging(){return this.config?.verboseLogging||e.isDev||i()}constructor(t,i){this.host=t,this.config=i}onRuntimeConfigChange=()=>{t()&&this.checkLazyValidation()};hostDidLoad(){this.elementLoaded=!0,"undefined"!=typeof window&&window.addEventListener(s,this.onRuntimeConfigChange),this.elementQueued||this.elementValidated||("slot"!==this.config?.validationTiming?this.host.validationEl?.checkVisibility?.()&&"load"===this.config?.validationTiming?this.enqueueValidation():this.observeVisibilityOnce():this.observeSlot())}hostDidUpdate(){this.checkLazyValidation()}hostDisconnected(){this.discardVisibilityObserver(),"undefined"!=typeof window&&window.removeEventListener(s,this.onRuntimeConfigChange)}revalidateAria(){this.enqueueValidation()}observeSlot(){this.host.validationSlot?.addEventListener("slotchange",this.enqueueValidation.bind(this))}observeVisibilityOnce(){window.setTimeout((()=>{this.host.validationEl&&(this.visibilityObserver=new IntersectionObserver((t=>{for(const i of t)i.target===this.host.validationEl&&i.isIntersecting&&(this.checkLazyValidation(),this.discardVisibilityObserver())}),{root:this.host.validationEl?.parentElement,rootMargin:"0px",threshold:.01}),this.visibilityObserver.observe(this.host.validationEl))}))}checkLazyValidation(){this.elementLoaded&&(this.config?.reValidateOnPropChanges||!this.elementQueued&&!this.elementValidated)&&this.host.validationEl?.checkVisibility?.()&&this.enqueueValidation()}enqueueValidation(){t()&&(this.elementQueued=!0,o({context:{include:this.host.validationEl,exclude:n.knownValidationErrors},onComplete:(t,i)=>{this.elementValidated=!0;const s=this.host.tagName||this.host.validationEl?.tagName||"Element";if(t)return console.error("Error running ARIA validation:",t,s),void(this.host.validationEl?.tagName||console.dir(this.host));const o=[s];if(!i?.violations.length)return void(this.useVerboseLogging&&(console.log(...o,"has no ARIA violations"),this.host.validationEl?.tagName||console.dir(this.host)));const e=i.violations.length,h=[...o,i.violations.at(0).id,e>1?`(+${e-1} more)`:""].filter(Boolean).join(" ");this.useVerboseLogging?console.group(h):console.groupCollapsed(h);const r=i.violations.flatMap((t=>(console.dir(t,{showHidden:!0,compact:!1}),t.nodes.map((t=>t.target)))));this.host.validationEl?console.log("element:",this.host.validationEl):console.dir(this.host),console.groupEnd(),n.knownValidationErrors.push(...r)}}))}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}class h{controllers=new Set;addController(t){this.controllers.add(t)}removeController(t){this.controllers.delete(t)}get activeControllers(){return Array.from(this.controllers).filter((t=>!t.disabled))}connectedCallback(){this.controllers.size||console.warn("ReactiveControllerHost connected with no controllers registered.",this),this.activeControllers.forEach((t=>t.hostConnected?.()))}disconnectedCallback(){this.activeControllers.forEach((t=>t.hostDisconnected?.()))}componentWillLoad(){this.activeControllers.forEach((t=>t.hostWillLoad?.()))}componentDidLoad(){this.activeControllers.forEach((t=>t.hostDidLoad?.()))}componentWillRender(){this.activeControllers.forEach((t=>t.hostWillRender?.()))}componentDidRender(){this.activeControllers.forEach((t=>t.hostDidRender?.()))}componentWillUpdate(){this.activeControllers.forEach((t=>t.hostWillUpdate?.()))}componentDidUpdate(){this.activeControllers.forEach((t=>t.hostDidUpdate?.()))}}export{n as A,h as R}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,r as e,c as r,h as o,H as a}from"./p-CKYszC64.js";const n=class{constructor(t){e(this,t),this.primaryAction=r(this,"primaryAction",7)}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return((e,r)=>{const o=function(...t){return t.filter(Boolean).join("/").replace("//","/").replace("/./","/")}("../../assets",r,e);try{return t(o)}catch{return console.warn(`Failed to create URL for asset "${e}" in path "${r}".\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(t){console.log(t)}render(){return o(a,{key:"2d9ecdeed986f142fb7ff477b56dece59549bbc7",role:"article"},o("div",{key:"34fc9c3a1338b31ce73424e8c07c79a291ead85c",class:"top"},o("div",{key:"1756e6b26d7f42499753c36ed0fc13755fe32bfe",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},o("div",{key:"cd8be8acc9e949092b6363024316d12d445a9fbc",class:"chip-slot"},o("slot",{key:"26389ab3b7031b948ff1701857e6028446662cf5",name:"chip"})))),o("div",{key:"2fa61cd7bef437f15929ae39be7fa294e8778321",class:"bottom"},o("header",{key:"b237ca025e42a29f528f827dc3c83b3b0f9267c0"},o("h2",{key:"ffd0a509ba97acb75d4c15d0fd01eef08689a2a7",class:"title"},this.cardTitle)),o("p",{key:"c40bd5d5f7e41a0cebc2f7f9e572ba98cc892cc1",class:"description"},this.description),o("div",{key:"7663f93b41ef1e798b464bd6ad75ca8a53c0667b",class:"actions"},o("button",{key:"3348e6700aa1571183558ab8fe4f73393c1cc943",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),o("button",{key:"d3a12cdabbdd68c3b04e06984db44abd3bbd22ea",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},o("span",{key:"80e31e6b691e18d1b42a2b4831349c3abf8e02b0",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}};n.style="@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; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: 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, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 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.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, 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-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, 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(2.25rem, 2.13rem + 0.52vw, 2.75rem) / 1.2 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.4 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; }";export{n as lmvz_card}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,r as t,c as r,h as o,H as m}from"./p-CKYszC64.js";import{R as a,A as i}from"./p-CwX1wKkM.js";import{E as l}from"./p-CN0JX9-m.js";import"./p-CdDO7mQa.js";const n=class extends a{get el(){return e(this)}get validationEl(){return this.el}validationSlot;get role(){return"menuitem"}get ti(){return 0}lmvzActivation;constructor(e){super(),t(this,e),this.lmvzActivation=r(this,"lmvzActivation",7),this.addController(new i(this,{validationTiming:"slot"})),this.addController(new l(this))}render(){return o(m,{key:"3a722fe1fbacabd99ac5a5bd23537a1ff383fb95"},o("slot",{key:"e475dd50bbd2f9f349edb61766a0b21c1fb1ae16",ref:e=>this.validationSlot=e}))}};n.style="@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-menuitem-h { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); padding: var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); cursor: pointer; --lmvz-menuitem-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); background: var(--lmvz-menuitem-background); color: var(--lmvz-menuitem-color); } .sc-lmvz-menuitem-h:hover { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } .sc-lmvz-menuitem-h:active { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } .sc-lmvz-menuitem-h:focus-visible { z-index: 1; } [aria-expanded='true'].sc-lmvz-menuitem-h { --lmvz-menuitem-background: var(--lmvz-semantic-color-status-active, #f6fbfe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); }";export{n as lmvz_menuitem}
|