@lmvz-ds/components 0.15.2 → 0.17.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/dist/cjs/{Effect-CpZhfb0D.js → Effect-DdYOHaR4.js} +121 -83
- package/dist/cjs/{aria-loader-B7b45RMv.js → aria-loader-BRxRUIyi.js} +45 -10
- package/dist/cjs/{assets-BnJmIx_h.js → assets-OvQ-WUwR.js} +2 -2
- package/dist/cjs/{component-CRc6eHcV.js → component-Csg9MtNK.js} +4 -2
- package/dist/cjs/{icons-Brr4vqiE.js → icons-EHBLbidD.js} +2 -2
- package/dist/cjs/{index-QRnWYctw.js → index-BBqtydE-.js} +1 -1
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{index-9ZJx0550.js → index-CH-YLRgg.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/lmvz-action.cjs.entry.js +2 -2
- package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +3 -3
- package/dist/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/dist/cjs/lmvz-components.cjs.js +3 -3
- package/dist/cjs/{lmvz-header.cjs.entry.js → lmvz-header_2.cjs.entry.js} +24 -15
- package/dist/cjs/lmvz-icon.cjs.entry.js +10 -10
- package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +7 -5
- package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{reactive-controller-host-Ai9l4S9S.js → reactive-controller-host-vy1TIIXv.js} +2 -2
- package/dist/collection/collection-manifest.json +14 -2
- package/dist/collection/components/lmvz-action/lmvz-action.js +1 -1
- package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
- package/dist/collection/components/lmvz-button/lmvz-button.js +2 -2
- package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
- package/dist/collection/components/lmvz-card/lmvz-card.js +3 -3
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +2 -2
- package/dist/collection/components/lmvz-header/lmvz-header.js +12 -8
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +7 -7
- package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
- package/dist/collection/components/lmvz-input/lmvz-input.js +31 -27
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +4 -2
- package/dist/collection/components/lmvz-select/lmvz-select.css +3 -25
- package/dist/collection/components/lmvz-select/lmvz-select.js +4 -4
- package/dist/collection/integration/header-integration.js +3 -3
- package/dist/collection/utils/aria/list-keyboard-controller.js +6 -4
- package/dist/collection/utils/component.js +6 -4
- package/dist/components/index.js +1 -1
- package/dist/components/lmvz-action.js +1 -1
- package/dist/components/lmvz-button.js +1 -1
- package/dist/components/lmvz-card.js +1 -1
- package/dist/components/lmvz-chip.js +1 -1
- package/dist/components/lmvz-header.js +1 -1
- package/dist/components/lmvz-icon.js +1 -1
- package/dist/components/lmvz-input.js +1 -1
- package/dist/components/lmvz-menuitem.js +1 -1
- package/dist/components/lmvz-select.js +1 -1
- package/dist/components/p-BsHYIl56.js +1 -0
- package/dist/components/{p-DcMNH3fv.js → p-CKtksB0G.js} +1 -1
- package/dist/components/{p-B3JVFwO1.js → p-DQEkWkMh.js} +1 -1
- package/dist/components/p-GKEnURpp.js +1 -0
- package/dist/components/{p-DK2hpvEW.js → p-vIq2biqy.js} +1 -1
- package/dist/esm/{Effect-DyamyJqO.js → Effect-9SROYpxM.js} +121 -83
- package/dist/esm/{aria-loader-Ddn7Qz_6.js → aria-loader-JxXwTAe5.js} +45 -10
- package/dist/esm/{assets-CvV1KMMV.js → assets-CNHv_WMG.js} +1 -1
- package/dist/esm/{component-DpoTUPzl.js → component-DIrAQ4IB.js} +4 -2
- package/dist/esm/{icons-C69Um2xB.js → icons-B255FOe4.js} +2 -2
- package/dist/esm/{index-CekEw3_K.js → index-BW1YMEA3.js} +1 -1
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-smGPjoDX.js → index-CQb-mBBB.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/lmvz-action.entry.js +2 -2
- package/dist/esm/lmvz-button.entry.js +71 -0
- package/dist/esm/lmvz-card.entry.js +3 -3
- package/dist/esm/lmvz-chip.entry.js +2 -2
- package/dist/esm/lmvz-components.js +4 -4
- package/dist/esm/{lmvz-header.entry.js → lmvz-header_2.entry.js} +23 -15
- package/dist/esm/lmvz-icon.entry.js +10 -10
- package/dist/esm/lmvz-input.entry.js +181 -0
- package/dist/esm/lmvz-menuitem.entry.js +7 -5
- package/dist/esm/lmvz-select.entry.js +69 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{reactive-controller-host-CdAJ3t-B.js → reactive-controller-host-OhKYwMvP.js} +2 -2
- package/dist/ext-libs.d.ts +1 -0
- package/dist/lmvz-components/index.esm.js +1 -1
- package/dist/lmvz-components/lmvz-components.esm.js +1 -1
- package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
- package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
- package/dist/lmvz-components/p-4530f088.entry.js +1 -0
- package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
- package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
- package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
- package/dist/lmvz-components/p-9SROYpxM.js +1 -0
- package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
- package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
- package/dist/lmvz-components/{p-B7KSylv_.js → p-Cp76bcGb.js} +1 -1
- package/dist/lmvz-components/{p-cM67HC0Z.js → p-Cp7cp10e.js} +1 -1
- package/dist/lmvz-components/{p-DpoTUPzl.js → p-DIrAQ4IB.js} +1 -1
- package/dist/lmvz-components/{p-D7GrtdQF.js → p-DyO6wO4l.js} +1 -1
- package/dist/lmvz-components/p-b8926640.entry.js +1 -0
- package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
- package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
- package/dist/lmvz-components/{p-BEoSvNlI.js → p-i2508Ct1.js} +1 -1
- package/dist/manifest.json +150 -66
- package/dist/stencil.config.base.js +44 -0
- package/dist/stencil.config.dev.js +21 -0
- package/dist/stencil.config.integration.js +26 -0
- package/dist/stencil.config.js +15 -0
- package/dist/stencil.config.prod.js +29 -0
- package/dist/types/components/lmvz-action/lmvz-action.d.ts +1 -1
- package/dist/types/components/lmvz-button/lmvz-button.d.ts +2 -2
- package/dist/types/components/lmvz-card/lmvz-card.d.ts +1 -1
- package/dist/types/components/lmvz-header/lmvz-header.d.ts +3 -3
- package/dist/types/components/lmvz-icon/lmvz-icon.d.ts +4 -4
- package/dist/types/components/lmvz-input/lmvz-input.d.ts +3 -3
- package/dist/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +3 -3
- package/dist/types/components/lmvz-select/lmvz-select.d.ts +1 -1
- package/dist/types/components.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.base.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.dev.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.integration.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.prod.d.ts +2 -0
- package/dist/types/utils/aria/aria-validation-controller.d.ts +1 -1
- package/dist/types/utils/aria/element-activation-controller.d.ts +1 -1
- package/dist/types/utils/component.d.ts +2 -2
- package/dist/types/utils/http.d.ts +3 -3
- package/dist/types/utils/validation/svg.d.ts +1 -1
- package/hydrate/index.js +908 -441
- package/hydrate/index.mjs +908 -441
- package/package.json +33 -73
- package/readme.md +3 -3
- package/dist/cjs/lmvz-button_3.cjs.entry.js +0 -399
- package/dist/collection/utils/typing.js +0 -1
- package/dist/components/p-CSRpdnrt.js +0 -1
- package/dist/components/p-DR19QMDG.js +0 -1
- package/dist/esm/lmvz-button_3.entry.js +0 -395
- package/dist/lmvz-components/p-70ca3319.entry.js +0 -1
- package/dist/lmvz-components/p-73648317.entry.js +0 -1
- package/dist/lmvz-components/p-8ed959da.entry.js +0 -1
- package/dist/lmvz-components/p-9526c364.entry.js +0 -1
- package/dist/lmvz-components/p-9faac8f3.entry.js +0 -1
- package/dist/lmvz-components/p-D7RHrBYK.js +0 -1
- package/dist/lmvz-components/p-DyamyJqO.js +0 -1
- package/dist/lmvz-components/p-d4b68381.entry.js +0 -1
- package/dist/lmvz-components/p-ea1a9d4a.entry.js +0 -6
- package/dist/types/utils/typing.d.ts +0 -3
- /package/dist/components/{p-BaPwpeMs.js → p-CahBdGGN.js} +0 -0
- /package/dist/lmvz-components/{p-smGPjoDX.js → p-CQb-mBBB.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
4
|
+
import { E as ElementActivationController } from './element-activation-controller-CN0JX9-m.js';
|
|
5
|
+
import { i as inheritAriaAttributes, f as findFormByRef } from './component-DIrAQ4IB.js';
|
|
6
|
+
import './aria-loader-JxXwTAe5.js';
|
|
7
|
+
|
|
8
|
+
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('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 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-primary, #000000); 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); 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-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } 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-primary-hover, #2e2e2e); } button:not([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: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: contents; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
9
|
+
|
|
10
|
+
const LmvzButton = class extends ReactiveControllerHost {
|
|
11
|
+
get el() { return getElement(this); }
|
|
12
|
+
validationEl;
|
|
13
|
+
inheritedAttributes = {};
|
|
14
|
+
formEl = null;
|
|
15
|
+
formButtonEl = null;
|
|
16
|
+
lmvzActivation;
|
|
17
|
+
get ti() {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
scale = 'default';
|
|
21
|
+
variant = 'secondary';
|
|
22
|
+
disabled = false;
|
|
23
|
+
type = 'button';
|
|
24
|
+
form;
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
super();
|
|
27
|
+
registerInstance(this, hostRef);
|
|
28
|
+
this.lmvzActivation = createEvent(this, "lmvzActivation");
|
|
29
|
+
this.addController(new AriaValidationController(this));
|
|
30
|
+
this.addController(new ElementActivationController(this, {
|
|
31
|
+
localHandler: this.handleClick.bind(this),
|
|
32
|
+
keys: ['Enter'],
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
connectedCallback() {
|
|
36
|
+
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
}
|
|
39
|
+
renderHiddenButton() {
|
|
40
|
+
const formEl = (this.formEl = findFormByRef(this.form, this.el));
|
|
41
|
+
if (!formEl)
|
|
42
|
+
return;
|
|
43
|
+
const { formButtonEl } = this;
|
|
44
|
+
if (formButtonEl !== null && formEl.contains(formButtonEl))
|
|
45
|
+
return;
|
|
46
|
+
const newFormButtonEl = (this.formButtonEl = document.createElement('button'));
|
|
47
|
+
newFormButtonEl.type = 'submit';
|
|
48
|
+
newFormButtonEl.style.display = 'none';
|
|
49
|
+
newFormButtonEl.disabled = this.disabled;
|
|
50
|
+
formEl.appendChild(newFormButtonEl);
|
|
51
|
+
}
|
|
52
|
+
submitForm(ev) {
|
|
53
|
+
if (this.formEl && this.formButtonEl) {
|
|
54
|
+
ev.preventDefault();
|
|
55
|
+
this.formButtonEl.click();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
handleClick = (ev) => {
|
|
59
|
+
if (this.type === 'submit') {
|
|
60
|
+
this.submitForm(ev);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
render() {
|
|
64
|
+
this.renderHiddenButton();
|
|
65
|
+
return (h(Host, { key: '9fb3bb6cc21e7d87fddb0313fd552e7070850881', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: '906117a1bb57fcc7e66a79be73959331066886be', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: '7028560eef75c978bea0ba3931100d4a6816ba37' }))));
|
|
66
|
+
}
|
|
67
|
+
static get delegatesFocus() { return true; }
|
|
68
|
+
};
|
|
69
|
+
LmvzButton.style = lmvzButtonCss();
|
|
70
|
+
|
|
71
|
+
export { LmvzButton as lmvz_button };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { c as createAssetUrlSafely } from './assets-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { c as createAssetUrlSafely } from './assets-CNHv_WMG.js';
|
|
3
3
|
|
|
4
4
|
const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 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-primary, #000000); 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); 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-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } 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-primary-hover, #2e2e2e); } button:not([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: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-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(2rem, 1.94rem + 0.26vw, 2.25rem) / 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; }`;
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ const LmvzCard = class {
|
|
|
26
26
|
const imgStyle = {
|
|
27
27
|
backgroundImage: `url(${this.imageUrl ?? this.fallbackImage})`,
|
|
28
28
|
};
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'fceb19eb0d7ad6c6aecfa6fbd5bb6425c7c3e312', role: "article" }, h("div", { key: '4cb516b5dee1f2f84f21984fa350f61fd83c771c', class: "top" }, h("div", { key: '713b2a3245d885a9b99f6c7d54a35053699c1be8', class: "image-wrapper", style: imgStyle }, h("div", { key: 'e8ea65e7f5d11a2335cab950d6bf02208d0b18a1', class: "chip-slot" }, h("slot", { key: 'e9a039742107fdf56216186ddcdf367c4432790b', name: "chip" })))), h("div", { key: '9549e46a1872e0edf298b79435d298aa1ae96a37', class: "bottom" }, h("header", { key: '3bbfb72ecec519d16380ae7e00da4b1ccb6f1cf3' }, h("h2", { key: 'f5a33e498893e61b407c10ab36c9a93b7eecf9f1', class: "title" }, this.cardTitle)), h("p", { key: '19709bb100d014369c836a5a7174772f2d095d2e', class: "description" }, this.description), h("div", { key: '06b5acab3c80cc91865f3aa39da32d42f470348e', class: "actions" }, h("button", { key: '4e954452ac9771359c881aa6b43f11e89e38aecf', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), h("button", { key: 'b6a682bf95eb26468c450bed494290565288a515', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, h("span", { key: '70a526d1fafd8b7051f6e7107b35d6f594e10d68', class: "icon-placeholder" }, "..."))))));
|
|
30
30
|
}
|
|
31
31
|
static get assetsDirs() { return ["../../assets"]; }
|
|
32
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
2
|
|
|
3
3
|
const lmvzChipCss = () => `:host{display:block}`;
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ const LmvzChip = class {
|
|
|
8
8
|
}
|
|
9
9
|
text;
|
|
10
10
|
render() {
|
|
11
|
-
return h(Host, { key: '
|
|
11
|
+
return h(Host, { key: '134d510fe3a04b989b0005bf31358149a9661cb2' }, this.text);
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
LmvzChip.style = lmvzChipCss();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-CQb-mBBB.js';
|
|
2
|
+
export { s as setNonce } from './index-CQb-mBBB.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.43.
|
|
6
|
+
Stencil Client Patch Browser v4.43.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["lmvz-
|
|
20
|
+
return bootstrapLazy([["lmvz-header_2",[[769,"lmvz-header",{"role":[2561],"lmvzActiveNav":[1,"lmvz-active-nav"]},null,{"lmvzActiveNav":[{"handleActiveNavChange":0}]}],[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-action",[[257,"lmvz-action"]]],["lmvz-button",[[785,"lmvz-button",{"ti":[2562,"tabindex"],"scale":[513],"variant":[513],"disabled":[516],"type":[1],"form":[1]}]]],["lmvz-card",[[774,"lmvz-card",{"cardTitle":[1,"card-title"],"imageUrl":[1,"image-url"],"description":[1],"primaryActionLabel":[1,"primary-action-label"]}]]],["lmvz-chip",[[513,"lmvz-chip",{"text":[1]}]]],["lmvz-icon",[[514,"lmvz-icon",{"icon":[513],"weight":[513],"size":[513],"ariaLabel":[513,"aria-label"],"iconData":[32],"visible":[32]},null,{"icon":[{"loadIconPathData":0}]}]]],["lmvz-input",[[838,"lmvz-input",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"required":[516],"name":[1],"type":[1],"errorMessage":[1,"error-message"],"autocomplete":[1],"inputmode":[1],"autocorrect":[1],"autocapitalize":[1],"spellcheck":[4],"autofocus":[4],"minlength":[2],"maxlength":[2],"pattern":[1],"min":[8],"max":[8],"step":[8],"form":[1],"error":[6660],"nativeError":[32],"setValue":[64],"focusInput":[64],"blurInput":[64],"select":[64],"checkValidity":[64],"reportValidity":[64],"getInputElement":[64]},null,{"value":[{"handleValueChange":0}],"disabled":[{"handleDisabledChange":0}]}]]],["lmvz-menuitem",[[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-select",[[774,"lmvz-select",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"disabled":[516],"required":[516],"name":[1],"selectedLabel":[32]},null,{"value":[{"handleValueChange":0}]}]]]], options);
|
|
21
21
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-
|
|
3
|
-
import { g as getDeepActiveElement, a as canReceiveFocus } from './component-
|
|
4
|
-
|
|
1
|
+
import { g as getElement, r as registerInstance, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
3
|
+
import { g as getDeepActiveElement, a as canReceiveFocus } from './component-DIrAQ4IB.js';
|
|
4
|
+
export { lmvz_menuitem } from './lmvz-menuitem.entry.js';
|
|
5
|
+
import './aria-loader-JxXwTAe5.js';
|
|
6
|
+
import './element-activation-controller-CN0JX9-m.js';
|
|
5
7
|
|
|
6
8
|
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
7
9
|
|
|
@@ -29,19 +31,21 @@ class ListKeyboardNavigationController {
|
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
getNextFocusableElement(current, direction) {
|
|
34
|
+
if (!current)
|
|
35
|
+
return undefined;
|
|
32
36
|
const { elements } = this;
|
|
33
37
|
const currentIndex = elements.indexOf(current);
|
|
34
38
|
if (currentIndex === -1)
|
|
35
|
-
return
|
|
36
|
-
let nextIndex =
|
|
39
|
+
return undefined;
|
|
40
|
+
let nextIndex = undefined;
|
|
37
41
|
if (direction === 'down') {
|
|
38
42
|
nextIndex = (currentIndex + 1) % elements.length;
|
|
39
43
|
}
|
|
40
44
|
else if (direction === 'up') {
|
|
41
45
|
nextIndex = (currentIndex - 1 + elements.length) % elements.length;
|
|
42
46
|
}
|
|
43
|
-
if (nextIndex ==
|
|
44
|
-
return
|
|
47
|
+
if (nextIndex == undefined)
|
|
48
|
+
return undefined;
|
|
45
49
|
const candidate = elements[nextIndex];
|
|
46
50
|
if (!canReceiveFocus(candidate))
|
|
47
51
|
return this.getNextFocusableElement(candidate, direction);
|
|
@@ -61,10 +65,10 @@ const LmvzHeader = class extends ReactiveControllerHost {
|
|
|
61
65
|
secondaryNav;
|
|
62
66
|
keyboardNavigationController = new ListKeyboardNavigationController(this);
|
|
63
67
|
get primaryMenuitems() {
|
|
64
|
-
return this.primarySlot
|
|
68
|
+
return this.primarySlot?.assignedElements({ flatten: false }) || [];
|
|
65
69
|
}
|
|
66
70
|
get secondaryMenuitems() {
|
|
67
|
-
return this.secondarySlot
|
|
71
|
+
return this.secondarySlot?.assignedElements({ flatten: true }) || [];
|
|
68
72
|
}
|
|
69
73
|
get role() {
|
|
70
74
|
return 'banner';
|
|
@@ -83,9 +87,9 @@ const LmvzHeader = class extends ReactiveControllerHost {
|
|
|
83
87
|
this.updateElementsActive();
|
|
84
88
|
}
|
|
85
89
|
componentDidLoad() {
|
|
86
|
-
this.primarySlot
|
|
90
|
+
this.primarySlot?.addEventListener('slotchange', this.handlePrimaryNavItemsChange.bind(this));
|
|
87
91
|
this.handlePrimaryNavItemsChange();
|
|
88
|
-
this.secondarySlot
|
|
92
|
+
this.secondarySlot?.addEventListener('slotchange', this.handleSecondaryNavItemsChange.bind(this));
|
|
89
93
|
super.componentDidLoad();
|
|
90
94
|
}
|
|
91
95
|
handlePrimaryNavItemsChange() {
|
|
@@ -113,14 +117,18 @@ const LmvzHeader = class extends ReactiveControllerHost {
|
|
|
113
117
|
}
|
|
114
118
|
updateElementsActive() {
|
|
115
119
|
const items = this.primaryMenuitems;
|
|
116
|
-
|
|
120
|
+
if (!items.length)
|
|
121
|
+
return;
|
|
122
|
+
let label = '';
|
|
117
123
|
items.forEach((el) => {
|
|
118
124
|
const isActive = el.id === this.lmvzActiveNav;
|
|
119
125
|
if (isActive)
|
|
120
126
|
label = el.textContent || el.id;
|
|
121
127
|
el.setAttribute('aria-expanded', isActive ? 'true' : 'false');
|
|
122
128
|
});
|
|
123
|
-
|
|
129
|
+
if (!label)
|
|
130
|
+
return;
|
|
131
|
+
this.secondaryNav?.setAttribute('aria-label', `Untermenü für ${label}`);
|
|
124
132
|
}
|
|
125
133
|
delegateFocus() {
|
|
126
134
|
const firstFocusable = this.primaryMenuitems[0];
|
|
@@ -129,7 +137,7 @@ const LmvzHeader = class extends ReactiveControllerHost {
|
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
139
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '3189d1bd21fb5bd8f30b27cbfb6e49648b0e70c4', onFocus: this.delegateFocus.bind(this) }, h("div", { key: '57c27e85c0d6292f0c39a850bad5d59de4cf8743', class: "brand" }, h("slot", { key: '13ea794d470861e25dc249c3174d2a5f2ba25096', name: "brand" }, h("img", { key: '37bea67eea1a2971a7502f6e9a5a2a28d3eec114', id: "fallback-logo-lmvz", src: logoSvg, alt: "Lehrmittelverlag Z\u00FCrich" }))), h("nav", { key: '59b1679357cd4dbef737f90f4b4ff5c80a4efa06', "aria-label": "Hauptnavigation" }, h("div", { key: '51ce71eed0f31ef4dbfbeb72dffed87797462487', role: "menubar", class: "primary-menubar" }, h("slot", { key: 'ac3357828b95a5aa6261c611612fb76f55bf92ee', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), h("div", { key: 'b78f2ad43e03f40d65c69674b94a295e72366c8e', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, h("slot", { key: 'd2cc74ff24cf10f0f958cea986149f3f03054291', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), h("div", { key: 'cc6e0c0a32e51d3fa0d7f1865023f03434458217', class: "actions" }, h("slot", { key: '8504df5d1970ac856a237cbb0dcce5a2707b7cab', name: "actions" }))));
|
|
133
141
|
}
|
|
134
142
|
static get watchers() { return {
|
|
135
143
|
"lmvzActiveNav": [{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { r as runPromise, t as tapError, l as logError, c as catchAll, s as succeed } from './Effect-
|
|
3
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-
|
|
4
|
-
import { f as fetchIconSvg, e as emptyDefaultSvg } from './icons-
|
|
5
|
-
import './aria-loader-
|
|
6
|
-
import './assets-
|
|
1
|
+
import { g as getElement, r as registerInstance, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { r as runPromise, t as tapError, l as logError, c as catchAll, s as succeed } from './Effect-9SROYpxM.js';
|
|
3
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
4
|
+
import { f as fetchIconSvg, e as emptyDefaultSvg } from './icons-B255FOe4.js';
|
|
5
|
+
import './aria-loader-JxXwTAe5.js';
|
|
6
|
+
import './assets-CNHv_WMG.js';
|
|
7
7
|
|
|
8
8
|
const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg>path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height: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)}}`;
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@ const LmvzIcon = class extends ReactiveControllerHost {
|
|
|
36
36
|
disconnectedCallback() {
|
|
37
37
|
if (this.intersectionObserver) {
|
|
38
38
|
this.intersectionObserver.disconnect();
|
|
39
|
-
this.intersectionObserver =
|
|
39
|
+
this.intersectionObserver = undefined;
|
|
40
40
|
}
|
|
41
41
|
super.disconnectedCallback();
|
|
42
42
|
}
|
|
@@ -53,7 +53,7 @@ const LmvzIcon = class extends ReactiveControllerHost {
|
|
|
53
53
|
super.componentDidRender();
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
return h(Host, { key: '
|
|
56
|
+
return h(Host, { key: '4ce6e3931a1c8bfa1ddd48c780d005d110902b19', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
|
|
57
57
|
}
|
|
58
58
|
waitUntilVisible(callback, rootMargin = 50) {
|
|
59
59
|
if (typeof window === 'undefined' || !window.IntersectionObserver) {
|
|
@@ -63,8 +63,8 @@ const LmvzIcon = class extends ReactiveControllerHost {
|
|
|
63
63
|
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
64
64
|
entries.some((entry) => {
|
|
65
65
|
if (entry.isIntersecting) {
|
|
66
|
-
this.intersectionObserver
|
|
67
|
-
this.intersectionObserver =
|
|
66
|
+
this.intersectionObserver?.disconnect();
|
|
67
|
+
this.intersectionObserver = undefined;
|
|
68
68
|
callback();
|
|
69
69
|
return true;
|
|
70
70
|
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h } from './index-CQb-mBBB.js';
|
|
2
|
+
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
4
|
+
import { c as componentOnReady } from './component-DIrAQ4IB.js';
|
|
5
|
+
import './aria-loader-JxXwTAe5.js';
|
|
6
|
+
|
|
7
|
+
const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .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-selected, #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, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --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 { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [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; }`;
|
|
8
|
+
|
|
9
|
+
let inputIdCounter = 0;
|
|
10
|
+
const LmvzInput = class extends ReactiveControllerHost {
|
|
11
|
+
get el() { return getElement(this); }
|
|
12
|
+
get validationEl() {
|
|
13
|
+
return this.el;
|
|
14
|
+
}
|
|
15
|
+
lmvzInput;
|
|
16
|
+
internals;
|
|
17
|
+
nativeInputElement;
|
|
18
|
+
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
19
|
+
initialValue = '';
|
|
20
|
+
nativeError = false;
|
|
21
|
+
errorFromProp = false;
|
|
22
|
+
get helperId() {
|
|
23
|
+
return this.helperText ? `${this.inputId}-helper` : undefined;
|
|
24
|
+
}
|
|
25
|
+
get showErrorMessage() {
|
|
26
|
+
return this.error && Boolean(this.errorMessage);
|
|
27
|
+
}
|
|
28
|
+
get errorId() {
|
|
29
|
+
return `${this.inputId}-error`;
|
|
30
|
+
}
|
|
31
|
+
get describedBy() {
|
|
32
|
+
const ids = [];
|
|
33
|
+
if (this.helperId)
|
|
34
|
+
ids.push(this.helperId);
|
|
35
|
+
if (this.showErrorMessage)
|
|
36
|
+
ids.push(this.errorId);
|
|
37
|
+
return ids.length > 0 ? ids.join(' ') : undefined;
|
|
38
|
+
}
|
|
39
|
+
value;
|
|
40
|
+
label;
|
|
41
|
+
helperText;
|
|
42
|
+
placeholder;
|
|
43
|
+
disabled = false;
|
|
44
|
+
readonly = false;
|
|
45
|
+
required = false;
|
|
46
|
+
name;
|
|
47
|
+
type = 'text';
|
|
48
|
+
errorMessage;
|
|
49
|
+
autocomplete;
|
|
50
|
+
inputmode;
|
|
51
|
+
autocorrect;
|
|
52
|
+
autocapitalize;
|
|
53
|
+
spellcheck;
|
|
54
|
+
autofocus = false;
|
|
55
|
+
minlength;
|
|
56
|
+
maxlength;
|
|
57
|
+
pattern;
|
|
58
|
+
min;
|
|
59
|
+
max;
|
|
60
|
+
step;
|
|
61
|
+
form;
|
|
62
|
+
get error() {
|
|
63
|
+
return this.errorFromProp || this.nativeError;
|
|
64
|
+
}
|
|
65
|
+
set error(value) {
|
|
66
|
+
this.errorFromProp = value;
|
|
67
|
+
}
|
|
68
|
+
async setValue(newValue) {
|
|
69
|
+
const input = this.nativeInputElement;
|
|
70
|
+
const val = newValue ?? '';
|
|
71
|
+
if (input) {
|
|
72
|
+
input.value = val;
|
|
73
|
+
}
|
|
74
|
+
this.value = val;
|
|
75
|
+
this.internals.setFormValue?.(val);
|
|
76
|
+
this.lmvzInput.emit(val);
|
|
77
|
+
}
|
|
78
|
+
async focusInput() {
|
|
79
|
+
this.nativeInputElement?.focus();
|
|
80
|
+
}
|
|
81
|
+
async blurInput() {
|
|
82
|
+
this.nativeInputElement?.blur();
|
|
83
|
+
}
|
|
84
|
+
async select() {
|
|
85
|
+
this.nativeInputElement?.select();
|
|
86
|
+
}
|
|
87
|
+
async checkValidity() {
|
|
88
|
+
return this.nativeInputElement?.checkValidity?.() ?? false;
|
|
89
|
+
}
|
|
90
|
+
async reportValidity() {
|
|
91
|
+
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
92
|
+
}
|
|
93
|
+
async getInputElement() {
|
|
94
|
+
if (!this.nativeInputElement) {
|
|
95
|
+
await new Promise((resolve) => componentOnReady(this.el, resolve));
|
|
96
|
+
}
|
|
97
|
+
return Promise.resolve(this.nativeInputElement);
|
|
98
|
+
}
|
|
99
|
+
constructor(hostRef) {
|
|
100
|
+
super();
|
|
101
|
+
registerInstance(this, hostRef);
|
|
102
|
+
this.lmvzInput = createEvent(this, "lmvzInput");
|
|
103
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
104
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
108
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
109
|
+
}
|
|
110
|
+
this.addController(new AriaValidationController(this, {
|
|
111
|
+
reValidateOnPropChanges: true,
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
componentWillLoad() {
|
|
115
|
+
this.initialValue = this.value ?? '';
|
|
116
|
+
super.componentWillLoad();
|
|
117
|
+
}
|
|
118
|
+
formAssociatedCallback(form) {
|
|
119
|
+
if (!form)
|
|
120
|
+
return;
|
|
121
|
+
this.internals.setFormValue?.(this.value ?? '');
|
|
122
|
+
}
|
|
123
|
+
formResetCallback() {
|
|
124
|
+
this.internals.setValidity({});
|
|
125
|
+
this.setValue(this.initialValue);
|
|
126
|
+
}
|
|
127
|
+
formStateRestoreCallback(state) {
|
|
128
|
+
this.setValue(state);
|
|
129
|
+
}
|
|
130
|
+
handleValueChange(newValue) {
|
|
131
|
+
if (!this.nativeInputElement)
|
|
132
|
+
return;
|
|
133
|
+
const isInternalChange = this.nativeInputElement.value === newValue;
|
|
134
|
+
if (isInternalChange)
|
|
135
|
+
return;
|
|
136
|
+
this.setValue(newValue);
|
|
137
|
+
}
|
|
138
|
+
handleDisabledChange(disabled) {
|
|
139
|
+
if (disabled && this.nativeInputElement) {
|
|
140
|
+
this.nativeInputElement.blur();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
handleInput = (event) => {
|
|
144
|
+
const input = event.target;
|
|
145
|
+
this.setValue(input.value);
|
|
146
|
+
};
|
|
147
|
+
handleChange = (event) => {
|
|
148
|
+
const input = event.target ?? this.nativeInputElement;
|
|
149
|
+
this.updateNativeError(input);
|
|
150
|
+
};
|
|
151
|
+
handleFocus = () => { };
|
|
152
|
+
handleBlur = (event) => {
|
|
153
|
+
const input = event.target;
|
|
154
|
+
input.reportValidity?.();
|
|
155
|
+
};
|
|
156
|
+
updateNativeError(fromEvent) {
|
|
157
|
+
const input = fromEvent ?? this.nativeInputElement;
|
|
158
|
+
if (!input)
|
|
159
|
+
return;
|
|
160
|
+
this.nativeError = !(input.checkValidity?.() ?? true);
|
|
161
|
+
}
|
|
162
|
+
render() {
|
|
163
|
+
const hasValue = Boolean(this.value);
|
|
164
|
+
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
165
|
+
return (h("div", { key: '97674bbf9a17f1533340f19f0643bc8695417da6', class: classNames('input-container', {
|
|
166
|
+
'interaction-filled': hasValue,
|
|
167
|
+
}) }, h("div", { key: '51aee84c821a5ad8884981bae3c42d0ed29a1fc5', class: "input-wrapper" }, h("slot", { key: '589b38e7977f74f7037a71b6b530ea98750f3bee', name: "before-input" }), h("div", { key: 'f5856cfc71ceb9093ceaa1b60bb6f4d964dadc7f', class: "label-input-group" }, h("label", { key: 'fbd6bb71131cf7384a79ba6f4f606c430e326bef', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (h("span", { key: 'd479254f9ac11a31278720d41e56db1300c06b15', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), h("input", { key: 'bb7b43947207bebb31412aa0e0eb58a9fed98963', id: this.inputId, ref: (el) => (this.nativeInputElement = el), 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 })), h("slot", { key: 'a21d46103f1b0040e67e20b4faf016a2b2fdd4dc', name: "after-input" })), h("div", { key: '53adfecb08ab29d1636052061dc37dffcd697ab2', id: this.helperId, role: "status" }, this.helperText || null), h("div", { key: 'ea3406ebd72ef02a0f293ab01cf4cf9971687b30', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
168
|
+
}
|
|
169
|
+
static get formAssociated() { return true; }
|
|
170
|
+
static get watchers() { return {
|
|
171
|
+
"value": [{
|
|
172
|
+
"handleValueChange": 0
|
|
173
|
+
}],
|
|
174
|
+
"disabled": [{
|
|
175
|
+
"handleDisabledChange": 0
|
|
176
|
+
}]
|
|
177
|
+
}; }
|
|
178
|
+
};
|
|
179
|
+
LmvzInput.style = lmvzInputCss();
|
|
180
|
+
|
|
181
|
+
export { LmvzInput as lmvz_input };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
3
3
|
import { E as ElementActivationController } from './element-activation-controller-CN0JX9-m.js';
|
|
4
|
-
import './aria-loader-
|
|
4
|
+
import './aria-loader-JxXwTAe5.js';
|
|
5
5
|
|
|
6
6
|
const lmvzMenuitemCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .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, #545454); --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-selected, #f1f9fe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); }`;
|
|
7
7
|
|
|
8
8
|
const LmvzMenuItem = class extends ReactiveControllerHost {
|
|
9
9
|
get el() { return getElement(this); }
|
|
10
|
-
validationEl
|
|
10
|
+
get validationEl() {
|
|
11
|
+
return this.el;
|
|
12
|
+
}
|
|
11
13
|
validationSlot;
|
|
12
14
|
get role() {
|
|
13
15
|
return 'menuitem';
|
|
@@ -24,7 +26,7 @@ const LmvzMenuItem = class extends ReactiveControllerHost {
|
|
|
24
26
|
this.addController(new ElementActivationController(this));
|
|
25
27
|
}
|
|
26
28
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '510ac59b18468ce9c65b866ae2767185f1b3da92' }, h("slot", { key: '7e032e0dab83f9bfbaa96ad2b78d8a5a58f978ab', ref: (e) => (this.validationSlot = e) })));
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
LmvzMenuItem.style = lmvzMenuitemCss();
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-CQb-mBBB.js';
|
|
2
|
+
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-OhKYwMvP.js';
|
|
3
|
+
import './aria-loader-JxXwTAe5.js';
|
|
4
|
+
|
|
5
|
+
const chevronDownSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjMzMzQgOC42NjY2M0wxMi4wMDAxIDE3TDMuNjY2NzUgOC42NjY2MyIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
|
|
6
|
+
|
|
7
|
+
const lmvzSelectCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; padding-top: var(--lmvz-internal-select-floating-label-top-offset); --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-select-bg-hover: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-select-text-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-select-height: 40px; --lmvz-select-label-font-size: var(--lmvz-component-component-typography-body-sm-font-size, 0.75rem); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } .select-wrapper.sc-lmvz-select { position: relative; height: var(--lmvz-select-height); } label.sc-lmvz-select { position: absolute; top: 50%; left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-label-color); line-height: normal; white-space: nowrap; pointer-events: none; z-index: 2; transform: translateY(-50%); transform-origin: left top; transition: top 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out; } label.assistive-label.sc-lmvz-select { opacity: 0; padding: 0; } label.floating-label.sc-lmvz-select { top: var(--lmvz-select-label-top-offset); transform: translateY(0) scale(0.85); left: calc(var(--lmvz-select-padding-x) - 2px); background-color: var(--lmvz-select-bg); padding: 0 var(--lmvz-select-label-minimized-padding-x); opacity: 1; font-weight: 500; } label.sc-lmvz-select > span[aria-hidden='true'].sc-lmvz-select, div[aria-hidden='true'].sc-lmvz-select > span.sc-lmvz-select:first-child > span[aria-hidden='true'].sc-lmvz-select { color: var(--lmvz-select-error-color); margin-left: 2px; display: inline-block; line-height: 0; vertical-align: middle; } div[aria-hidden].sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); cursor: pointer; position: relative; z-index: 1; transition: background-color 0.15s ease; } .sc-lmvz-select-h:not([disabled]) .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-select-bg-hover); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: 2px solid var(--lmvz-select-focus-color); outline-offset: 2px; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font-size: var(--lmvz-component-component-typography-body-md-font-size, 0.875rem); font-weight: var(--lmvz-global-font-weight-500, 500); color: var(--lmvz-select-text-color); line-height: 1.4; letter-spacing: var(--lmvz-component-body-md-letter-spacing, 0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } img.sc-lmvz-select { display: block; width: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); height: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } select.sc-lmvz-select { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; border: none; background: transparent; margin: 0; padding: 0; } [disabled].sc-lmvz-select-h .select-wrapper.sc-lmvz-select { opacity: var(--lmvz-select-disabled-opacity); pointer-events: none; cursor: not-allowed; } [role='status'].sc-lmvz-select { margin-top: 4px; padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-helper-color); line-height: normal; }`;
|
|
8
|
+
|
|
9
|
+
let selectIdCounter = 0;
|
|
10
|
+
const LmvzSelect = class extends ReactiveControllerHost {
|
|
11
|
+
get el() { return getElement(this); }
|
|
12
|
+
get validationEl() {
|
|
13
|
+
return this.el;
|
|
14
|
+
}
|
|
15
|
+
selectId = `lmvz-select-${selectIdCounter++}`;
|
|
16
|
+
nativeSelectEl;
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
super();
|
|
19
|
+
registerInstance(this, hostRef);
|
|
20
|
+
this.lmvzChange = createEvent(this, "lmvzChange");
|
|
21
|
+
this.addController(new AriaValidationController(this));
|
|
22
|
+
}
|
|
23
|
+
lmvzChange;
|
|
24
|
+
value;
|
|
25
|
+
label;
|
|
26
|
+
helperText;
|
|
27
|
+
disabled = false;
|
|
28
|
+
required = false;
|
|
29
|
+
name;
|
|
30
|
+
selectedLabel = '';
|
|
31
|
+
get hasValue() {
|
|
32
|
+
return Boolean(this.value);
|
|
33
|
+
}
|
|
34
|
+
componentDidLoad() {
|
|
35
|
+
this.syncSelectedLabel();
|
|
36
|
+
super.componentDidLoad();
|
|
37
|
+
}
|
|
38
|
+
handleValueChange(newValue) {
|
|
39
|
+
if (this.nativeSelectEl && this.nativeSelectEl.value !== (newValue ?? '')) {
|
|
40
|
+
this.nativeSelectEl.value = newValue ?? '';
|
|
41
|
+
}
|
|
42
|
+
this.syncSelectedLabel();
|
|
43
|
+
}
|
|
44
|
+
syncSelectedLabel() {
|
|
45
|
+
if (!this.nativeSelectEl)
|
|
46
|
+
return;
|
|
47
|
+
const idx = this.nativeSelectEl.selectedIndex;
|
|
48
|
+
this.selectedLabel = idx >= 0 ? (this.nativeSelectEl.options[idx]?.text ?? '') : '';
|
|
49
|
+
}
|
|
50
|
+
handleChange = (event) => {
|
|
51
|
+
const select = event.target;
|
|
52
|
+
this.value = select.value;
|
|
53
|
+
this.syncSelectedLabel();
|
|
54
|
+
this.lmvzChange.emit(select.value);
|
|
55
|
+
};
|
|
56
|
+
render() {
|
|
57
|
+
const hasValue = this.hasValue;
|
|
58
|
+
const shouldShowLabel = hasValue;
|
|
59
|
+
return (h(Host, { key: '7f4650d5971bb93dba48385df734e6b7a0b4f7eb' }, h("div", { key: '79d6234cd15f64c8bff787d715107e7e86145333', class: "select-wrapper" }, h("label", { key: '14d93469c6d309b68427ff7bfc2bd531c8f0ecf6', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && h("span", { key: 'c8be809e09d768d6f73ccccdfbf0bf495869ac72', "aria-hidden": "true" }, " *")), h("div", { key: '1db5d44b44100342a4ca5feff648b61a0bdadb1a', "aria-hidden": "true" }, h("span", { key: '3fdc95aab9997a10f4ba42dabc3758aea0797a22' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: '11aef8194551059130b6be5351587219a1e80f00', "aria-hidden": "true" }, " *")), h("span", { key: '8fc52ff3e46d7b52d8d5069a74ebf7bb0d981081' }, h("img", { key: '129dd4038772eba9313e1e322866c70408f4e2ad', src: chevronDownSvg, alt: "" }))), h("select", { key: '6eb6cf496e60b3c1bd9556e596cbef34d4da5a09', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && h("option", { key: '70d660e0bc7e4c127234ce77decf35d6fea7fe8d', value: "", disabled: true, selected: true, hidden: true }), h("slot", { key: 'e6cbc238c9c0cf8e8c31d0347a1f621272a94ca6' }))), this.helperText && h("div", { key: '432d405ee7338da46509ff207599b882a19ea44e', role: "status" }, this.helperText)));
|
|
60
|
+
}
|
|
61
|
+
static get watchers() { return {
|
|
62
|
+
"value": [{
|
|
63
|
+
"handleValueChange": 0
|
|
64
|
+
}]
|
|
65
|
+
}; }
|
|
66
|
+
};
|
|
67
|
+
LmvzSelect.style = lmvzSelectCss();
|
|
68
|
+
|
|
69
|
+
export { LmvzSelect as lmvz_select };
|