@lmvz-ds/components 0.14.1 → 0.15.2
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/{aria-loader-BBKbBZLq.js → aria-loader-B7b45RMv.js} +13 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lmvz-button_3.cjs.entry.js +399 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +1 -1
- package/dist/cjs/lmvz-components.cjs.js +1 -1
- package/dist/cjs/lmvz-header.cjs.entry.js +6 -4
- package/dist/cjs/lmvz-icon.cjs.entry.js +2 -2
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{reactive-controller-host-DWpVosFu.js → reactive-controller-host-Ai9l4S9S.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/lmvz-button/lmvz-button.css +4 -0
- package/dist/collection/components/lmvz-card/lmvz-card.css +4 -0
- package/dist/collection/components/lmvz-header/lmvz-header.js +5 -3
- package/dist/collection/components/lmvz-input/lmvz-input.js +5 -3
- package/dist/collection/components/lmvz-select/lmvz-select.css +197 -0
- package/dist/collection/components/lmvz-select/lmvz-select.js +223 -0
- package/dist/collection/integration/header-integration.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/lmvz-button.js +1 -1
- package/dist/components/lmvz-card.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.d.ts +11 -0
- package/dist/components/lmvz-select.js +1 -0
- package/dist/components/p-DR19QMDG.js +1 -0
- package/dist/esm/{aria-loader-DB71Xewa.js → aria-loader-Ddn7Qz_6.js} +13 -3
- package/dist/esm/{component-B3JVFwO1.js → component-DpoTUPzl.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lmvz-button_3.entry.js +395 -0
- package/dist/esm/lmvz-card.entry.js +1 -1
- package/dist/esm/lmvz-components.js +1 -1
- package/dist/esm/lmvz-header.entry.js +7 -5
- package/dist/esm/lmvz-icon.entry.js +2 -2
- package/dist/esm/lmvz-menuitem.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{reactive-controller-host-1nFoJEdT.js → reactive-controller-host-CdAJ3t-B.js} +1 -1
- package/dist/lmvz-components/index.esm.js +1 -1
- package/dist/lmvz-components/lmvz-components.esm.js +1 -1
- package/dist/lmvz-components/{p-c61f7daa.entry.js → p-70ca3319.entry.js} +1 -1
- package/dist/lmvz-components/p-73648317.entry.js +1 -0
- package/dist/lmvz-components/{p-5775a56c.entry.js → p-8ed959da.entry.js} +1 -1
- package/dist/lmvz-components/p-9526c364.entry.js +1 -0
- package/dist/lmvz-components/{p-B3j8zrhV.js → p-B7KSylv_.js} +1 -1
- package/dist/lmvz-components/{p-BTpia82J.js → p-D7RHrBYK.js} +1 -1
- package/dist/lmvz-components/{p-B3JVFwO1.js → p-DpoTUPzl.js} +1 -1
- package/dist/lmvz-components/p-ea1a9d4a.entry.js +6 -0
- package/dist/manifest.json +205 -1
- package/dist/types/components/lmvz-header/lmvz-header.d.ts +1 -1
- package/dist/types/components/lmvz-input/lmvz-input.d.ts +1 -1
- package/dist/types/components/lmvz-select/lmvz-select.d.ts +24 -0
- package/dist/types/components.d.ts +152 -0
- package/hydrate/index.js +105 -10
- package/hydrate/index.mjs +105 -10
- package/package.json +10 -6
- package/dist/cjs/index-Bp6Dd2i1.js +0 -94
- package/dist/cjs/lmvz-button.cjs.entry.js +0 -73
- package/dist/cjs/lmvz-input.cjs.entry.js +0 -177
- package/dist/components/p-DugBvwmd.js +0 -1
- package/dist/esm/index-BfTCfPZ1.js +0 -92
- package/dist/esm/lmvz-button.entry.js +0 -71
- package/dist/esm/lmvz-input.entry.js +0 -175
- package/dist/lmvz-components/p-0e5aa1a3.entry.js +0 -1
- package/dist/lmvz-components/p-18c18de4.entry.js +0 -1
- package/dist/lmvz-components/p-814ee542.entry.js +0 -1
- package/dist/lmvz-components/p-BfTCfPZ1.js +0 -6
- package/dist/lmvz-components/p-c6bae21b.entry.js +0 -1
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-9ZJx0550.js');
|
|
4
|
-
var index$1 = require('./index-Bp6Dd2i1.js');
|
|
5
|
-
var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
|
|
6
|
-
var component = require('./component-CRc6eHcV.js');
|
|
7
|
-
require('./aria-loader-BBKbBZLq.js');
|
|
8
|
-
|
|
9
|
-
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; }`;
|
|
10
|
-
|
|
11
|
-
let inputIdCounter = 0;
|
|
12
|
-
const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
13
|
-
get el() { return index.getElement(this); }
|
|
14
|
-
validationEl = this.el;
|
|
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
|
-
this.value = input.value = newValue ?? '';
|
|
71
|
-
this.internals.setFormValue?.(newValue);
|
|
72
|
-
this.lmvzInput.emit(newValue);
|
|
73
|
-
}
|
|
74
|
-
async focusInput() {
|
|
75
|
-
this.nativeInputElement?.focus();
|
|
76
|
-
}
|
|
77
|
-
async blurInput() {
|
|
78
|
-
this.nativeInputElement?.blur();
|
|
79
|
-
}
|
|
80
|
-
async select() {
|
|
81
|
-
this.nativeInputElement?.select();
|
|
82
|
-
}
|
|
83
|
-
async checkValidity() {
|
|
84
|
-
return this.nativeInputElement?.checkValidity?.() ?? false;
|
|
85
|
-
}
|
|
86
|
-
async reportValidity() {
|
|
87
|
-
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
88
|
-
}
|
|
89
|
-
async getInputElement() {
|
|
90
|
-
if (!this.nativeInputElement) {
|
|
91
|
-
await new Promise((resolve) => component.componentOnReady(this.el, resolve));
|
|
92
|
-
}
|
|
93
|
-
return Promise.resolve(this.nativeInputElement);
|
|
94
|
-
}
|
|
95
|
-
constructor(hostRef) {
|
|
96
|
-
super();
|
|
97
|
-
index.registerInstance(this, hostRef);
|
|
98
|
-
this.lmvzInput = index.createEvent(this, "lmvzInput");
|
|
99
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
100
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
104
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
105
|
-
}
|
|
106
|
-
this.addController(new reactiveControllerHost.AriaValidationController(this, {
|
|
107
|
-
reValidateOnPropChanges: true,
|
|
108
|
-
}));
|
|
109
|
-
}
|
|
110
|
-
componentWillLoad() {
|
|
111
|
-
this.initialValue = this.value;
|
|
112
|
-
super.componentWillLoad();
|
|
113
|
-
}
|
|
114
|
-
formAssociatedCallback(form) {
|
|
115
|
-
if (!form)
|
|
116
|
-
return;
|
|
117
|
-
this.internals.setFormValue?.(this.value);
|
|
118
|
-
}
|
|
119
|
-
formResetCallback() {
|
|
120
|
-
this.internals.setValidity({});
|
|
121
|
-
this.setValue(this.initialValue);
|
|
122
|
-
}
|
|
123
|
-
formStateRestoreCallback(state) {
|
|
124
|
-
this.setValue(state);
|
|
125
|
-
}
|
|
126
|
-
handleValueChange(newValue) {
|
|
127
|
-
if (!this.nativeInputElement)
|
|
128
|
-
return;
|
|
129
|
-
const isInternalChange = this.nativeInputElement.value === newValue;
|
|
130
|
-
if (isInternalChange)
|
|
131
|
-
return;
|
|
132
|
-
this.setValue(newValue);
|
|
133
|
-
}
|
|
134
|
-
handleDisabledChange(disabled) {
|
|
135
|
-
if (disabled && this.nativeInputElement) {
|
|
136
|
-
this.nativeInputElement.blur();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
handleInput = (event) => {
|
|
140
|
-
const input = event.target;
|
|
141
|
-
this.setValue(input.value);
|
|
142
|
-
};
|
|
143
|
-
handleChange = (event) => {
|
|
144
|
-
const input = event.target ?? this.nativeInputElement;
|
|
145
|
-
this.updateNativeError(input);
|
|
146
|
-
};
|
|
147
|
-
handleFocus = () => { };
|
|
148
|
-
handleBlur = (event) => {
|
|
149
|
-
const input = event.target;
|
|
150
|
-
input.reportValidity?.();
|
|
151
|
-
};
|
|
152
|
-
updateNativeError(fromEvent) {
|
|
153
|
-
const input = fromEvent ?? this.nativeInputElement;
|
|
154
|
-
if (!input)
|
|
155
|
-
return;
|
|
156
|
-
this.nativeError = !(input.checkValidity?.() ?? true);
|
|
157
|
-
}
|
|
158
|
-
render() {
|
|
159
|
-
const hasValue = Boolean(this.value);
|
|
160
|
-
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
161
|
-
return (index.h("div", { key: '79ab97e1e1d0217d5302ca1dea7087292ef19fc7', class: index$1.classNames('input-container', {
|
|
162
|
-
'interaction-filled': hasValue,
|
|
163
|
-
}) }, index.h("div", { key: '9e59a33c261f610f93e1d6db3a07107f9300bbda', class: 'input-wrapper' }, index.h("slot", { key: 'fadb3f5e49afa817014cdbd44774462b467827f4', name: 'before-input' }), index.h("div", { key: '27d592787bb841fbd430c2e8ce0adc10f59b68ec', class: 'label-input-group' }, index.h("label", { key: 'f83f154f356660ecafde254b5437ce6c42898b54', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: 'b51463179a2099ecd687ccd2480136379b0d0502', class: 'required-indicator', "aria-hidden": 'true' }, ' ', "*"))), index.h("input", { key: '30d8308f286e82fba5d2ebdad972509c06294543', 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 })), index.h("slot", { key: 'a8448a0827ce24194b21b8281d2b54eb76f24652', name: 'after-input' })), index.h("div", { key: '79413854b97380812c84f3128d1db053d4154008', id: this.helperId, role: 'status' }, this.helperText || null), index.h("div", { key: 'd34c6b421688934b69917f6da1f9bb22c220a6f9', id: this.errorId, role: 'alert' }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
164
|
-
}
|
|
165
|
-
static get formAssociated() { return true; }
|
|
166
|
-
static get watchers() { return {
|
|
167
|
-
"value": [{
|
|
168
|
-
"handleValueChange": 0
|
|
169
|
-
}],
|
|
170
|
-
"disabled": [{
|
|
171
|
-
"handleDisabledChange": 0
|
|
172
|
-
}]
|
|
173
|
-
}; }
|
|
174
|
-
};
|
|
175
|
-
LmvzInput.style = lmvzInputCss();
|
|
176
|
-
|
|
177
|
-
exports.lmvz_input = LmvzInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as t,H as i}from"./p-BaPwpeMs.js";const o=Symbol("__lmvzAriaValidationRuntimeState"),s="lmvz:aria-validation-runtime-changed";function e(){const t=globalThis;return t[o]||(t[o]={enabled:!1}),t[o]}function n(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(s))}const h=()=>e().enabled,r=()=>e().verboseLogging??!1,a=(t={})=>{const i=e();i.enabled||(Object.assign(i,t),i.enabled=!0,async function(...t){const i=await async function(){const t=e();if(!t.enabled)return null;if(t.runtime)return t.runtime;t.loadPromise||(t.loadPromise=import("./p-DK2hpvEW.js").catch((()=>null)));const i=await t.loadPromise;return i&&(t.runtime=i),i}();e().enabled&&(i?i.initializeValidationStream(...t):console.warn("Failed to load aria validation runtime"))}().then((()=>{n()})))},l=()=>{const t=e();t.enabled&&(t.enabled=!1,n())};function c(...t){const i=e();i.enabled&&i.runtime&&i.runtime.enqueueValidation(...t)}class d{host;config;visibilityObserver;elementQueued=!1;elementValidated=!1;elementLoaded=!1;static knownValidationErrors=[];get disabled(){return!h()}get useVerboseLogging(){return this.config?.verboseLogging||t.isDev||r()}constructor(t,i){this.host=t,this.config=i}onRuntimeConfigChange=()=>{h()&&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(){h()&&(this.elementQueued=!0,c({context:{include:this.host.validationEl,exclude:d.knownValidationErrors},onComplete:(t,i)=>{this.elementValidated=!0;const o=this.host.tagName||this.host.validationEl?.tagName||"Element";if(t)return console.error("Error running ARIA validation:",t,o),void(this.host.validationEl?.tagName||console.dir(this.host));const s=[o];if(!i?.violations.length)return void(this.useVerboseLogging&&(console.log(...s,"has no ARIA violations"),this.host.validationEl?.tagName||console.dir(this.host)));const e=i.violations.length,n=[...s,i.violations.at(0).id,e>1?`(+${e-1} more)`:""].filter(Boolean).join(" ");this.useVerboseLogging?console.group(n):console.groupCollapsed(n);const h=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(),d.knownValidationErrors.push(...h)}}))}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}const u=class extends i{constructor(){super(!1)}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{s as A,u as R,d as a,l as d,a as e,h as i,c as q,r as u}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function getDefaultExportFromCjs (x) {
|
|
2
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
var classnames = {exports: {}};
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
Copyright (c) 2018 Jed Watson.
|
|
9
|
-
Licensed under the MIT License (MIT), see
|
|
10
|
-
http://jedwatson.github.io/classnames
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
var hasRequiredClassnames;
|
|
14
|
-
|
|
15
|
-
function requireClassnames () {
|
|
16
|
-
if (hasRequiredClassnames) return classnames.exports;
|
|
17
|
-
hasRequiredClassnames = 1;
|
|
18
|
-
(function (module) {
|
|
19
|
-
/* global define */
|
|
20
|
-
|
|
21
|
-
(function () {
|
|
22
|
-
|
|
23
|
-
var hasOwn = {}.hasOwnProperty;
|
|
24
|
-
|
|
25
|
-
function classNames () {
|
|
26
|
-
var classes = '';
|
|
27
|
-
|
|
28
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
29
|
-
var arg = arguments[i];
|
|
30
|
-
if (arg) {
|
|
31
|
-
classes = appendClass(classes, parseValue(arg));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return classes;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function parseValue (arg) {
|
|
39
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
40
|
-
return arg;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (typeof arg !== 'object') {
|
|
44
|
-
return '';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (Array.isArray(arg)) {
|
|
48
|
-
return classNames.apply(null, arg);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
52
|
-
return arg.toString();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var classes = '';
|
|
56
|
-
|
|
57
|
-
for (var key in arg) {
|
|
58
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
59
|
-
classes = appendClass(classes, key);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return classes;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function appendClass (value, newClass) {
|
|
67
|
-
if (!newClass) {
|
|
68
|
-
return value;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (value) {
|
|
72
|
-
return value + ' ' + newClass;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return value + newClass;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (module.exports) {
|
|
79
|
-
classNames.default = classNames;
|
|
80
|
-
module.exports = classNames;
|
|
81
|
-
} else {
|
|
82
|
-
window.classNames = classNames;
|
|
83
|
-
}
|
|
84
|
-
}());
|
|
85
|
-
} (classnames));
|
|
86
|
-
return classnames.exports;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
var classnamesExports = requireClassnames();
|
|
90
|
-
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
91
|
-
|
|
92
|
-
export { classNames as c };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-smGPjoDX.js';
|
|
2
|
-
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-1nFoJEdT.js';
|
|
4
|
-
import { E as ElementActivationController } from './element-activation-controller-CN0JX9-m.js';
|
|
5
|
-
import { i as inheritAriaAttributes, f as findFormByRef } from './component-B3JVFwO1.js';
|
|
6
|
-
import './aria-loader-DB71Xewa.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 { 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: '3f3eda78349322ce5160d7aac1290a73f0adcd4a', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: 'b132404d8d5f5bf0fa7e845b562c953c5ceec36c', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: 'ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d' }))));
|
|
66
|
-
}
|
|
67
|
-
static get delegatesFocus() { return true; }
|
|
68
|
-
};
|
|
69
|
-
LmvzButton.style = lmvzButtonCss();
|
|
70
|
-
|
|
71
|
-
export { LmvzButton as lmvz_button };
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h } from './index-smGPjoDX.js';
|
|
2
|
-
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
-
import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-1nFoJEdT.js';
|
|
4
|
-
import { a as componentOnReady } from './component-B3JVFwO1.js';
|
|
5
|
-
import './aria-loader-DB71Xewa.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
|
-
validationEl = this.el;
|
|
13
|
-
lmvzInput;
|
|
14
|
-
internals;
|
|
15
|
-
nativeInputElement;
|
|
16
|
-
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
17
|
-
initialValue = '';
|
|
18
|
-
nativeError = false;
|
|
19
|
-
errorFromProp = false;
|
|
20
|
-
get helperId() {
|
|
21
|
-
return this.helperText ? `${this.inputId}-helper` : undefined;
|
|
22
|
-
}
|
|
23
|
-
get showErrorMessage() {
|
|
24
|
-
return this.error && Boolean(this.errorMessage);
|
|
25
|
-
}
|
|
26
|
-
get errorId() {
|
|
27
|
-
return `${this.inputId}-error`;
|
|
28
|
-
}
|
|
29
|
-
get describedBy() {
|
|
30
|
-
const ids = [];
|
|
31
|
-
if (this.helperId)
|
|
32
|
-
ids.push(this.helperId);
|
|
33
|
-
if (this.showErrorMessage)
|
|
34
|
-
ids.push(this.errorId);
|
|
35
|
-
return ids.length > 0 ? ids.join(' ') : undefined;
|
|
36
|
-
}
|
|
37
|
-
value;
|
|
38
|
-
label;
|
|
39
|
-
helperText;
|
|
40
|
-
placeholder;
|
|
41
|
-
disabled = false;
|
|
42
|
-
readonly = false;
|
|
43
|
-
required = false;
|
|
44
|
-
name;
|
|
45
|
-
type = 'text';
|
|
46
|
-
errorMessage;
|
|
47
|
-
autocomplete;
|
|
48
|
-
inputmode;
|
|
49
|
-
autocorrect;
|
|
50
|
-
autocapitalize;
|
|
51
|
-
spellcheck;
|
|
52
|
-
autofocus = false;
|
|
53
|
-
minlength;
|
|
54
|
-
maxlength;
|
|
55
|
-
pattern;
|
|
56
|
-
min;
|
|
57
|
-
max;
|
|
58
|
-
step;
|
|
59
|
-
form;
|
|
60
|
-
get error() {
|
|
61
|
-
return this.errorFromProp || this.nativeError;
|
|
62
|
-
}
|
|
63
|
-
set error(value) {
|
|
64
|
-
this.errorFromProp = value;
|
|
65
|
-
}
|
|
66
|
-
async setValue(newValue) {
|
|
67
|
-
const input = this.nativeInputElement;
|
|
68
|
-
this.value = input.value = newValue ?? '';
|
|
69
|
-
this.internals.setFormValue?.(newValue);
|
|
70
|
-
this.lmvzInput.emit(newValue);
|
|
71
|
-
}
|
|
72
|
-
async focusInput() {
|
|
73
|
-
this.nativeInputElement?.focus();
|
|
74
|
-
}
|
|
75
|
-
async blurInput() {
|
|
76
|
-
this.nativeInputElement?.blur();
|
|
77
|
-
}
|
|
78
|
-
async select() {
|
|
79
|
-
this.nativeInputElement?.select();
|
|
80
|
-
}
|
|
81
|
-
async checkValidity() {
|
|
82
|
-
return this.nativeInputElement?.checkValidity?.() ?? false;
|
|
83
|
-
}
|
|
84
|
-
async reportValidity() {
|
|
85
|
-
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
86
|
-
}
|
|
87
|
-
async getInputElement() {
|
|
88
|
-
if (!this.nativeInputElement) {
|
|
89
|
-
await new Promise((resolve) => componentOnReady(this.el, resolve));
|
|
90
|
-
}
|
|
91
|
-
return Promise.resolve(this.nativeInputElement);
|
|
92
|
-
}
|
|
93
|
-
constructor(hostRef) {
|
|
94
|
-
super();
|
|
95
|
-
registerInstance(this, hostRef);
|
|
96
|
-
this.lmvzInput = createEvent(this, "lmvzInput");
|
|
97
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
98
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
102
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
103
|
-
}
|
|
104
|
-
this.addController(new AriaValidationController(this, {
|
|
105
|
-
reValidateOnPropChanges: true,
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
componentWillLoad() {
|
|
109
|
-
this.initialValue = this.value;
|
|
110
|
-
super.componentWillLoad();
|
|
111
|
-
}
|
|
112
|
-
formAssociatedCallback(form) {
|
|
113
|
-
if (!form)
|
|
114
|
-
return;
|
|
115
|
-
this.internals.setFormValue?.(this.value);
|
|
116
|
-
}
|
|
117
|
-
formResetCallback() {
|
|
118
|
-
this.internals.setValidity({});
|
|
119
|
-
this.setValue(this.initialValue);
|
|
120
|
-
}
|
|
121
|
-
formStateRestoreCallback(state) {
|
|
122
|
-
this.setValue(state);
|
|
123
|
-
}
|
|
124
|
-
handleValueChange(newValue) {
|
|
125
|
-
if (!this.nativeInputElement)
|
|
126
|
-
return;
|
|
127
|
-
const isInternalChange = this.nativeInputElement.value === newValue;
|
|
128
|
-
if (isInternalChange)
|
|
129
|
-
return;
|
|
130
|
-
this.setValue(newValue);
|
|
131
|
-
}
|
|
132
|
-
handleDisabledChange(disabled) {
|
|
133
|
-
if (disabled && this.nativeInputElement) {
|
|
134
|
-
this.nativeInputElement.blur();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
handleInput = (event) => {
|
|
138
|
-
const input = event.target;
|
|
139
|
-
this.setValue(input.value);
|
|
140
|
-
};
|
|
141
|
-
handleChange = (event) => {
|
|
142
|
-
const input = event.target ?? this.nativeInputElement;
|
|
143
|
-
this.updateNativeError(input);
|
|
144
|
-
};
|
|
145
|
-
handleFocus = () => { };
|
|
146
|
-
handleBlur = (event) => {
|
|
147
|
-
const input = event.target;
|
|
148
|
-
input.reportValidity?.();
|
|
149
|
-
};
|
|
150
|
-
updateNativeError(fromEvent) {
|
|
151
|
-
const input = fromEvent ?? this.nativeInputElement;
|
|
152
|
-
if (!input)
|
|
153
|
-
return;
|
|
154
|
-
this.nativeError = !(input.checkValidity?.() ?? true);
|
|
155
|
-
}
|
|
156
|
-
render() {
|
|
157
|
-
const hasValue = Boolean(this.value);
|
|
158
|
-
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
159
|
-
return (h("div", { key: '79ab97e1e1d0217d5302ca1dea7087292ef19fc7', class: classNames('input-container', {
|
|
160
|
-
'interaction-filled': hasValue,
|
|
161
|
-
}) }, h("div", { key: '9e59a33c261f610f93e1d6db3a07107f9300bbda', class: 'input-wrapper' }, h("slot", { key: 'fadb3f5e49afa817014cdbd44774462b467827f4', name: 'before-input' }), h("div", { key: '27d592787bb841fbd430c2e8ce0adc10f59b68ec', class: 'label-input-group' }, h("label", { key: 'f83f154f356660ecafde254b5437ce6c42898b54', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (h("span", { key: 'b51463179a2099ecd687ccd2480136379b0d0502', class: 'required-indicator', "aria-hidden": 'true' }, ' ', "*"))), h("input", { key: '30d8308f286e82fba5d2ebdad972509c06294543', 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: 'a8448a0827ce24194b21b8281d2b54eb76f24652', name: 'after-input' })), h("div", { key: '79413854b97380812c84f3128d1db053d4154008', id: this.helperId, role: 'status' }, this.helperText || null), h("div", { key: 'd34c6b421688934b69917f6da1f9bb22c220a6f9', id: this.errorId, role: 'alert' }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
162
|
-
}
|
|
163
|
-
static get formAssociated() { return true; }
|
|
164
|
-
static get watchers() { return {
|
|
165
|
-
"value": [{
|
|
166
|
-
"handleValueChange": 0
|
|
167
|
-
}],
|
|
168
|
-
"disabled": [{
|
|
169
|
-
"handleDisabledChange": 0
|
|
170
|
-
}]
|
|
171
|
-
}; }
|
|
172
|
-
};
|
|
173
|
-
LmvzInput.style = lmvzInputCss();
|
|
174
|
-
|
|
175
|
-
export { LmvzInput as lmvz_input };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,c as e,h as t,H as a}from"./p-smGPjoDX.js";import{c as o}from"./p-D7GrtdQF.js";const m=class{constructor(t){r(this,t),this.primaryAction=e(this,"primaryAction")}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return o("card-placeholder.svg")}_onPrimaryClick(){this.primaryAction.emit()}_onOverflowClick(r){console.log(r)}render(){return t(a,{key:"ba2e8d9e25428c744da2470cbd677306c56b09ae",role:"article"},t("div",{key:"54ff7545559a4b6fb00c94909717234f4dfedd7c",class:"top"},t("div",{key:"7bff35f247b6e8aca9b6346103139daa65ca16a3",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},t("div",{key:"c2c3d21227175b9dc0a55c75294f6c21bc713a26",class:"chip-slot"},t("slot",{key:"1a7002aab5fc3f9f698c3d1678f8819ea36f91d3",name:"chip"})))),t("div",{key:"a313321abe4da83db4b2ba64fdefa28edde93d41",class:"bottom"},t("header",{key:"f5ba333fcaa59d5b4f61dee94aba4628f49db9d7"},t("h2",{key:"b7d9ad6944b136476703cde89f885b189583eef1",class:"title"},this.cardTitle)),t("p",{key:"6594626904a4f9fbc53d5956b71bbdefe00add8c",class:"description"},this.description),t("div",{key:"d8bbfebeb572fcf6990160a0dba7c5ae8a5a7fc7",class:"actions"},t("button",{key:"6311a97a18412f8fbf8eb33e8a0f7a17700e71c6",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),t("button",{key:"12033ad5018d100f84f0149d83dc965d8e5b2c66",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},t("span",{key:"e11f8008542b4f7f70d1273bb31200c50d02aabb",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}};m.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('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 { 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; }";export{m as lmvz_card}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as M,r as N,h as e,H as I}from"./p-smGPjoDX.js";import{R as j,A as D}from"./p-B3j8zrhV.js";import{g,c as u}from"./p-B3JVFwO1.js";import"./p-BTpia82J.js";class i{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){const{elements:e}=this,I=e.indexOf(M);if(-1===I)return null;let j=null;if("down"===N?j=(I+1)%e.length:"up"===N&&(j=(I-1+e.length)%e.length),null==j)return null;const D=e[j];return u(D)?D:this.getNextFocusableElement(D,N)}}const a=class extends j{get el(){return M(this)}validationEl=this.el;primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new i(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(){let M;this.primaryMenuitems.forEach((N=>{const e=N.id===this.lmvzActiveNav;e&&(M=N.textContent||N.id),N.setAttribute("aria-expanded",e?"true":"false")})),this.secondaryNav.setAttribute("aria-label",`Untermenü für ${M}`)}delegateFocus(){const M=this.primaryMenuitems[0];M&&M.focus()}render(){return e(I,{key:"e5efeeb233de82c44e23302d20ebb488dfc6307b",onFocus:this.delegateFocus.bind(this)},e("div",{key:"5e34efe17901ec990d09cd6764c37858ced1f021",class:"brand"},e("slot",{key:"d30fa8bf8e77a6f02bad45dbad58fe9bbdc8b3f3",name:"brand"},e("img",{key:"074192bf3b5b4bcdb19302a954c56c5c61ee4b8f",id:"fallback-logo-lmvz",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",alt:"Lehrmittelverlag Zürich"}))),e("nav",{key:"663f04ecb9d6ea026f9476888b532f8e1c4e432c","aria-label":"Hauptnavigation"},e("div",{key:"ed0f492144c2b94822db02733c371329a95d8a1e",role:"menubar",class:"primary-menubar"},e("slot",{key:"cbcf15f96b5b6c2133506902dc992c962e4873fb",name:"nav-primary",ref:M=>this.primarySlot=M}),e("div",{key:"109ca0ea7ee937c9a1a4a510305595486ea48d94",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:M=>this.secondaryNav=M},e("slot",{key:"b88d0da4772cf171854c369fa4e01131377c4f35",name:this.secondarySlotName,ref:M=>this.secondarySlot=M})))),e("div",{key:"4f024b948ea1ebce1ef914b1149420cd9ed817dd",class:"actions"},e("slot",{key:"b1f6cff936e2a8fa5c0ff4e3bcc938a5c4f88e0c",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}};a.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{a as lmvz_header}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,r as o,c as r,h as e,H as n}from"./p-smGPjoDX.js";import{c as a}from"./p-BfTCfPZ1.js";import{R as l,A as m}from"./p-B3j8zrhV.js";import{E as i}from"./p-CN0JX9-m.js";import{i as s,f as d}from"./p-B3JVFwO1.js";import"./p-BTpia82J.js";const c=class extends l{get el(){return t(this)}validationEl;inheritedAttributes={};formEl=null;formButtonEl=null;lmvzActivation;get ti(){return 0}scale="default";variant="secondary";disabled=!1;type="button";form;constructor(t){super(),o(this,t),this.lmvzActivation=r(this,"lmvzActivation"),this.addController(new m(this)),this.addController(new i(this,{localHandler:this.handleClick.bind(this),keys:["Enter"]}))}connectedCallback(){this.inheritedAttributes=s(this.el),super.connectedCallback()}renderHiddenButton(){const t=this.formEl=d(this.form,this.el);if(!t)return;const{formButtonEl:o}=this;if(null!==o&&t.contains(o))return;const r=this.formButtonEl=document.createElement("button");r.type="submit",r.style.display="none",r.disabled=this.disabled,t.appendChild(r)}submitForm(t){this.formEl&&this.formButtonEl&&(t.preventDefault(),this.formButtonEl.click())}handleClick=t=>{"submit"===this.type&&this.submitForm(t)};render(){return this.renderHiddenButton(),e(n,{key:"3f3eda78349322ce5160d7aac1290a73f0adcd4a","aria-disabled":this.disabled?"true":null},e("button",{key:"b132404d8d5f5bf0fa7e845b562c953c5ceec36c",ref:t=>this.validationEl=t,disabled:this.disabled,class:a(this.variant,{[this.scale??""]:!!this.scale,disabled:this.disabled}),...this.inheritedAttributes},e("slot",{key:"ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d"})))}static get delegatesFocus(){return!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('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 { 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); } ";export{c as lmvz_button}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
function r(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var n,t,e={exports:{}},u=(n||(n=1,t=e,function(){var r={}.hasOwnProperty;function n(){for(var r="",n=0;n<arguments.length;n++){var t=arguments[n];t&&(r=u(r,e(t)))}return r}function e(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var f in t)r.call(t,f)&&t[f]&&(e=u(e,f));return e}function u(r,n){return n?r?r+" "+n:r+n:r}t.exports?(n.default=n,t.exports=n):window.classNames=n}()),e.exports),f=r(u);
|
|
2
|
-
/*!
|
|
3
|
-
Copyright (c) 2018 Jed Watson.
|
|
4
|
-
Licensed under the MIT License (MIT), see
|
|
5
|
-
http://jedwatson.github.io/classnames
|
|
6
|
-
*/export{f as c}
|