@lmvz-ds/components 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +12 -20
- package/cjs/{aria-validation-controller-Do0uEK4t.js → aria-validation-controller-DKNXjnQr.js} +1 -1
- package/cjs/checkmark-CuKDPAcx.js +5 -0
- package/cjs/{directional-focus-controller-8Xd_7MHT.js → directional-focus-controller-DDnhfX5w.js} +15 -5
- package/cjs/{index-BgvZ4y-3.js → index-DWy4nuyZ.js} +41 -0
- package/cjs/index.cjs.js +3 -195
- package/cjs/lmvz-action-list.cjs.entry.js +4 -4
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +5 -1
- package/cjs/lmvz-button_2.cjs.entry.js +3 -3
- package/cjs/lmvz-card.cjs.entry.js +2 -2
- package/cjs/lmvz-checkbox.cjs.entry.js +4 -5
- package/cjs/lmvz-chip.cjs.entry.js +5 -5
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +5 -5
- package/cjs/lmvz-input.cjs.entry.js +4 -7
- package/cjs/lmvz-link.cjs.entry.js +1 -1
- package/cjs/lmvz-menuitem.cjs.entry.js +2 -2
- package/cjs/lmvz-message.cjs.entry.js +4 -2
- package/cjs/lmvz-modal.cjs.entry.js +2 -2
- package/cjs/lmvz-popover.cjs.entry.js +5 -14
- package/cjs/lmvz-radio.cjs.entry.js +2 -2
- package/cjs/lmvz-select.cjs.entry.js +110 -16
- package/cjs/lmvz-snackbar.cjs.entry.js +1 -1
- package/cjs/lmvz-spinner.cjs.entry.js +1 -1
- package/cjs/lmvz-tab.cjs.entry.js +1 -1
- package/cjs/lmvz-tabs.cjs.entry.js +9 -3
- package/cjs/lmvz-toggle.cjs.entry.js +2 -2
- package/cjs/loader.cjs.js +2 -2
- package/cjs/public-DTgpEs1_.js +206 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.css +119 -116
- package/collection/components/lmvz-button/lmvz-button.css +109 -106
- package/collection/components/lmvz-card/lmvz-card.css +106 -103
- package/collection/components/lmvz-chip/lmvz-chip.css +1 -1
- package/collection/components/lmvz-chip/lmvz-chip.js +2 -2
- package/collection/components/lmvz-header/lmvz-header.js +2 -2
- package/collection/components/lmvz-input/lmvz-input.js +2 -5
- package/collection/components/lmvz-message/lmvz-message.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +2 -11
- package/collection/components/lmvz-select/lmvz-select.css +102 -53
- package/collection/components/lmvz-select/lmvz-select.js +151 -41
- package/collection/components/lmvz-snackbar/public.js +3 -0
- package/collection/components/lmvz-tabs/lmvz-tabs.js +7 -1
- package/collection/utils/aria/directional-focus-controller.js +16 -7
- package/collection/utils/icons/public.js +3 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-datepicker.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/{p-BLMXiDE0.js → p--mU29mrX.js} +1 -1
- package/components/p-BPa0FHVO.js +1 -0
- package/components/p-Bc5MM0zh.js +1 -0
- package/components/p-CyDgnpOB.js +1 -0
- package/components/p-DAikapVO.js +1 -0
- package/components/{p-C-pRMuMh.js → p-DIyiticz.js} +1 -1
- package/components/{p-BhALzK62.js → p-DJLdOjL4.js} +1 -1
- package/components/p-DSDBThqb.js +1 -0
- package/components/{p-diOze8wI.js → p-DXFoXTse.js} +1 -1
- package/components/p-DXhP6UeF.js +1 -0
- package/components/p-D_mff3n7.js +1 -0
- package/components/p-DbBJxuBm.js +1 -0
- package/components/p-DsTgD0_a.js +1 -0
- package/components/p-DyQ1GbaN.js +1 -0
- package/components/p-niXjuPxe.js +1 -0
- package/components/{p-BAj4FkUt.js → p-sACbyedu.js} +1 -1
- package/esm/{aria-validation-controller-Cp6pofER.js → aria-validation-controller-Dwv7n0rk.js} +1 -1
- package/esm/checkmark-DAikapVO.js +3 -0
- package/esm/{directional-focus-controller-QukTTWBE.js → directional-focus-controller-CJ0yNC00.js} +15 -5
- package/esm/{index-BOXP1Vx0.js → index-DVab4vzV.js} +41 -1
- package/esm/index.js +1 -197
- package/esm/lmvz-action-list.entry.js +4 -4
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +5 -1
- package/esm/lmvz-button_2.entry.js +3 -3
- package/esm/lmvz-card.entry.js +2 -2
- package/esm/lmvz-checkbox.entry.js +3 -4
- package/esm/lmvz-chip.entry.js +5 -5
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +1 -1
- package/esm/lmvz-header_2.entry.js +5 -5
- package/esm/lmvz-input.entry.js +4 -7
- package/esm/lmvz-link.entry.js +1 -1
- package/esm/lmvz-menuitem.entry.js +2 -2
- package/esm/lmvz-message.entry.js +4 -2
- package/esm/lmvz-modal.entry.js +2 -2
- package/esm/lmvz-popover.entry.js +5 -14
- package/esm/lmvz-radio.entry.js +2 -2
- package/esm/lmvz-select.entry.js +110 -16
- package/esm/lmvz-snackbar.entry.js +1 -1
- package/esm/lmvz-spinner.entry.js +1 -1
- package/esm/lmvz-tab.entry.js +1 -1
- package/esm/lmvz-tabs.entry.js +9 -3
- package/esm/lmvz-toggle.entry.js +2 -2
- package/esm/loader.js +3 -3
- package/esm/public-m6pRVUeP.js +204 -0
- package/hydrate/index.js +394 -50
- package/hydrate/index.mjs +394 -50
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-1ba1af8d.entry.js +1 -0
- package/lmvz-components/{p-0f65d001.entry.js → p-27e8b4fa.entry.js} +1 -1
- package/lmvz-components/p-304c7554.entry.js +1 -0
- package/lmvz-components/p-316dd61a.entry.js +1 -0
- package/lmvz-components/{p-3d5867df.entry.js → p-335b3867.entry.js} +1 -1
- package/lmvz-components/{p-7872a6b4.entry.js → p-3b7203a3.entry.js} +1 -1
- package/lmvz-components/p-41286514.entry.js +1 -0
- package/lmvz-components/p-6aae1df9.entry.js +1 -0
- package/lmvz-components/p-743616c0.entry.js +1 -0
- package/lmvz-components/{p-26dd9684.entry.js → p-773e9d95.entry.js} +1 -1
- package/lmvz-components/{p-a6fe9b61.entry.js → p-7cbfbc88.entry.js} +1 -1
- package/lmvz-components/p-87f21ac9.entry.js +1 -0
- package/lmvz-components/{p-a680a7b2.entry.js → p-8ba6ec19.entry.js} +1 -1
- package/lmvz-components/p-93b781ca.entry.js +1 -0
- package/lmvz-components/p-BPa0FHVO.js +1 -0
- package/lmvz-components/p-BlkpdeQI.js +1 -0
- package/lmvz-components/p-DAikapVO.js +1 -0
- package/lmvz-components/p-DVab4vzV.js +2 -0
- package/lmvz-components/{p-BeY96W7m.js → p-Wi9d2-w9.js} +1 -1
- package/lmvz-components/p-c884c76e.entry.js +1 -0
- package/lmvz-components/{p-eabbf901.entry.js → p-d73bb7fd.entry.js} +1 -1
- package/lmvz-components/{p-137b1fe1.entry.js → p-e35f49a1.entry.js} +1 -1
- package/lmvz-components/p-ebad823c.entry.js +1 -0
- package/lmvz-components/p-edec4d09.entry.js +1 -0
- package/lmvz-components/{p-88661c50.entry.js → p-efd9d50e.entry.js} +1 -1
- package/lmvz-components/p-f24f5207.entry.js +1 -0
- package/lmvz-components/p-f911691c.entry.js +1 -0
- package/manifest.json +72 -39
- package/package.json +2 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +0 -2
- package/types/components/lmvz-popover/lmvz-popover.d.ts +0 -1
- package/types/components/lmvz-select/lmvz-select.d.ts +12 -3
- package/types/components/lmvz-snackbar/public.d.ts +6 -0
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +1 -0
- package/types/components.d.ts +39 -19
- package/types/index.d.ts +5 -0
- package/types/utils/aria/directional-focus-controller.d.ts +9 -7
- package/types/utils/icons/public.d.ts +6 -0
- package/components/p--FDdvoIg.js +0 -1
- package/components/p-BApwCp0R.js +0 -1
- package/components/p-BPYBmylI.js +0 -1
- package/components/p-C5gRiLRR.js +0 -1
- package/components/p-CrQCHVKL.js +0 -1
- package/components/p-DiRcp9V6.js +0 -1
- package/components/p-DqdrUt_G.js +0 -1
- package/lmvz-components/p-00489151.entry.js +0 -1
- package/lmvz-components/p-0af0211a.entry.js +0 -1
- package/lmvz-components/p-398b5cf4.entry.js +0 -1
- package/lmvz-components/p-40716828.entry.js +0 -1
- package/lmvz-components/p-492adf21.entry.js +0 -1
- package/lmvz-components/p-4deaa010.entry.js +0 -1
- package/lmvz-components/p-4fa6e72f.entry.js +0 -1
- package/lmvz-components/p-57a366e6.entry.js +0 -1
- package/lmvz-components/p-70f1e31a.entry.js +0 -1
- package/lmvz-components/p-91eb71bb.entry.js +0 -1
- package/lmvz-components/p-BOXP1Vx0.js +0 -2
- package/lmvz-components/p-CHxiS3ja.js +0 -1
- package/lmvz-components/p-e14058e1.entry.js +0 -1
- package/lmvz-components/p-f3f0ed49.entry.js +0 -1
- package/lmvz-components/p-f516a949.entry.js +0 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var icons = require('./icons-snv0hyf1.js');
|
|
4
|
+
|
|
5
|
+
const PRIORITY_MAP = {
|
|
6
|
+
low: 0,
|
|
7
|
+
normal: 1,
|
|
8
|
+
high: 2,
|
|
9
|
+
};
|
|
10
|
+
const STATUS_DURATION = {
|
|
11
|
+
success: 5000,
|
|
12
|
+
warning: 5000,
|
|
13
|
+
error: 8000,
|
|
14
|
+
};
|
|
15
|
+
let idCounter = 0;
|
|
16
|
+
function nextId() {
|
|
17
|
+
idCounter += 1;
|
|
18
|
+
return `snackbar-${idCounter}`;
|
|
19
|
+
}
|
|
20
|
+
function resolveHostElement() {
|
|
21
|
+
if (typeof document === 'undefined') {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const existing = document.querySelector('[data-snackbar-host]');
|
|
25
|
+
if (existing) {
|
|
26
|
+
return existing;
|
|
27
|
+
}
|
|
28
|
+
const el = document.createElement('lmvz-snackbar');
|
|
29
|
+
el.setAttribute('data-snackbar-host', '');
|
|
30
|
+
document.body.appendChild(el);
|
|
31
|
+
return el;
|
|
32
|
+
}
|
|
33
|
+
class SnackbarController {
|
|
34
|
+
hostEl = undefined;
|
|
35
|
+
active = undefined;
|
|
36
|
+
getHost() {
|
|
37
|
+
if (this.hostEl !== undefined && !this.hostEl.isConnected) {
|
|
38
|
+
this.hostEl = undefined;
|
|
39
|
+
}
|
|
40
|
+
if (this.hostEl === undefined) {
|
|
41
|
+
this.hostEl = resolveHostElement();
|
|
42
|
+
}
|
|
43
|
+
return this.hostEl;
|
|
44
|
+
}
|
|
45
|
+
clearTimer(entry) {
|
|
46
|
+
if (entry.timerId !== undefined) {
|
|
47
|
+
clearTimeout(entry.timerId);
|
|
48
|
+
entry.timerId = undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
scheduleTimer(entry, delayMs) {
|
|
52
|
+
if (delayMs <= 0) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
entry.timerStartedAt = Date.now();
|
|
56
|
+
entry.timerId = setTimeout(() => {
|
|
57
|
+
if (this.active !== undefined && this.active.id === entry.id) {
|
|
58
|
+
this.dismissActive(entry, 'timeout');
|
|
59
|
+
}
|
|
60
|
+
}, delayMs);
|
|
61
|
+
}
|
|
62
|
+
dismissActive(entry, reason) {
|
|
63
|
+
this.clearTimer(entry);
|
|
64
|
+
const host = entry.hostEl;
|
|
65
|
+
host.removeEventListener('pointerenter', entry.onPointerEnter);
|
|
66
|
+
host.removeEventListener('pointerleave', entry.onPointerLeave);
|
|
67
|
+
host.removeEventListener('focusin', entry.onFocusIn);
|
|
68
|
+
host.removeEventListener('focusout', entry.onFocusOut);
|
|
69
|
+
if (entry.onActionListener) {
|
|
70
|
+
host.removeEventListener('lmvzAction', entry.onActionListener);
|
|
71
|
+
}
|
|
72
|
+
host.hide?.();
|
|
73
|
+
if (this.active?.id === entry.id) {
|
|
74
|
+
this.active = undefined;
|
|
75
|
+
}
|
|
76
|
+
if (reason !== 'action') {
|
|
77
|
+
host.dispatchEvent(new CustomEvent('lmvzClose', { detail: { reason }, bubbles: true, composed: true }));
|
|
78
|
+
}
|
|
79
|
+
entry.resolve({ reason });
|
|
80
|
+
}
|
|
81
|
+
pauseTimer(entry) {
|
|
82
|
+
entry.pauseCount += 1;
|
|
83
|
+
if (entry.pauseCount > 1 || entry.timerId === undefined) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const elapsed = entry.timerStartedAt !== undefined ? Date.now() - entry.timerStartedAt : 0;
|
|
87
|
+
entry.remaining = Math.max(0, entry.remaining - elapsed);
|
|
88
|
+
entry.timerStartedAt = undefined;
|
|
89
|
+
this.clearTimer(entry);
|
|
90
|
+
}
|
|
91
|
+
resumeTimer(entry) {
|
|
92
|
+
if (entry.pauseCount > 0) {
|
|
93
|
+
entry.pauseCount -= 1;
|
|
94
|
+
}
|
|
95
|
+
if (entry.pauseCount > 0) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (entry.remaining > 0) {
|
|
99
|
+
this.scheduleTimer(entry, entry.remaining);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
applyToHost(host, options) {
|
|
103
|
+
host.setAttribute('status', options.status ?? 'success');
|
|
104
|
+
if (options.actionLabel !== undefined) {
|
|
105
|
+
host.setAttribute('action-label', options.actionLabel);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
host.removeAttribute('action-label');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
open(options) {
|
|
112
|
+
const incomingPriority = PRIORITY_MAP[options.priority ?? 'normal'];
|
|
113
|
+
if (this.active !== undefined && incomingPriority < this.active.priority) {
|
|
114
|
+
let swallowResolve;
|
|
115
|
+
const closed = new Promise((resolve) => {
|
|
116
|
+
swallowResolve = resolve;
|
|
117
|
+
});
|
|
118
|
+
swallowResolve({ reason: 'swallowed' });
|
|
119
|
+
const id = nextId();
|
|
120
|
+
return {
|
|
121
|
+
id,
|
|
122
|
+
closed,
|
|
123
|
+
dismiss() {
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (this.active !== undefined) {
|
|
128
|
+
this.dismissActive(this.active, 'overridden');
|
|
129
|
+
}
|
|
130
|
+
const host = this.getHost();
|
|
131
|
+
if (host === undefined) {
|
|
132
|
+
const id = nextId();
|
|
133
|
+
let ssrResolve;
|
|
134
|
+
const closed = new Promise((resolve) => {
|
|
135
|
+
ssrResolve = resolve;
|
|
136
|
+
});
|
|
137
|
+
ssrResolve({ reason: 'swallowed' });
|
|
138
|
+
return { id, closed, dismiss() { } };
|
|
139
|
+
}
|
|
140
|
+
const id = nextId();
|
|
141
|
+
const status = options.status ?? 'success';
|
|
142
|
+
const durationMs = options.duration === 0 ? 0 : (options.duration ?? STATUS_DURATION[status]);
|
|
143
|
+
let entryResolve;
|
|
144
|
+
const closed = new Promise((resolve) => {
|
|
145
|
+
entryResolve = resolve;
|
|
146
|
+
});
|
|
147
|
+
const entry = {
|
|
148
|
+
id,
|
|
149
|
+
priority: incomingPriority,
|
|
150
|
+
resolve: entryResolve,
|
|
151
|
+
timerId: undefined,
|
|
152
|
+
remaining: durationMs,
|
|
153
|
+
timerStartedAt: undefined,
|
|
154
|
+
pauseCount: 0,
|
|
155
|
+
hostEl: host,
|
|
156
|
+
onPointerEnter: () => this.pauseTimer(entry),
|
|
157
|
+
onPointerLeave: () => this.resumeTimer(entry),
|
|
158
|
+
onFocusIn: () => this.pauseTimer(entry),
|
|
159
|
+
onFocusOut: () => this.resumeTimer(entry),
|
|
160
|
+
};
|
|
161
|
+
this.active = entry;
|
|
162
|
+
host.addEventListener('pointerenter', entry.onPointerEnter);
|
|
163
|
+
host.addEventListener('pointerleave', entry.onPointerLeave);
|
|
164
|
+
host.addEventListener('focusin', entry.onFocusIn);
|
|
165
|
+
host.addEventListener('focusout', entry.onFocusOut);
|
|
166
|
+
this.applyToHost(host, options);
|
|
167
|
+
const onAction = () => {
|
|
168
|
+
if (this.active !== undefined && this.active.id === id) {
|
|
169
|
+
options.onAction?.();
|
|
170
|
+
this.dismissActive(entry, 'action');
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
entry.onActionListener = onAction;
|
|
174
|
+
host.addEventListener('lmvzAction', onAction, { once: true });
|
|
175
|
+
host.show?.();
|
|
176
|
+
queueMicrotask(() => host.setAttribute('message', options.message));
|
|
177
|
+
if (durationMs > 0) {
|
|
178
|
+
this.scheduleTimer(entry, durationMs);
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
id,
|
|
182
|
+
closed,
|
|
183
|
+
dismiss: () => {
|
|
184
|
+
if (this.active?.id === id) {
|
|
185
|
+
this.dismissActive(entry, 'manual');
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
dismiss(id) {
|
|
191
|
+
if (!this.active) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (!id || this.active.id === id) {
|
|
195
|
+
this.dismissActive(this.active, 'manual');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
window.LmvzApi ??= {};
|
|
201
|
+
window.LmvzApi.SnackbarController = SnackbarController;
|
|
202
|
+
|
|
203
|
+
window.LmvzApi ??= {};
|
|
204
|
+
window.LmvzApi.typedIconFromSet = icons.typedIconFromSet;
|
|
205
|
+
|
|
206
|
+
exports.SnackbarController = SnackbarController;
|
|
@@ -47,14 +47,27 @@ legend {
|
|
|
47
47
|
gap: 0;
|
|
48
48
|
min-width: 15vw;
|
|
49
49
|
|
|
50
|
-
/*
|
|
51
|
-
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
50
|
+
/* re-import button styles for nested <button/>s */
|
|
52
51
|
button {
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
/* the (invalid nested) import will be handled by postcss */
|
|
53
|
+
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
54
|
+
/* stylelint-disable nesting-selector-no-missing-scoping-root */
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* This fragment is meant to be reusable in multiple component types.
|
|
58
|
+
* CAUTION: always wrap the import in a tag selector (ususally button)!
|
|
59
|
+
*/
|
|
60
|
+
& {
|
|
61
|
+
/* the (invalid nested) import will be handled by postcss */
|
|
62
|
+
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
63
|
+
/* stylelint-disable nesting-selector-no-missing-scoping-root */
|
|
64
|
+
& {
|
|
65
|
+
/* variables are declared on :host
|
|
55
66
|
so that outer ::slotted(lmvz-button) overrides are inherited correctly via shadow inheritance.
|
|
56
|
-
They are also declared here so that non-shadow consumers
|
|
57
|
-
|
|
67
|
+
They are also declared here so that non-shadow consumers have the default values in scope. */
|
|
68
|
+
|
|
69
|
+
/* secondary styling is default, primary is explicit */
|
|
70
|
+
|
|
58
71
|
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0));
|
|
59
72
|
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000));
|
|
60
73
|
--lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px));
|
|
@@ -69,19 +82,20 @@ legend {
|
|
|
69
82
|
|
|
70
83
|
display: inline-flex;
|
|
71
84
|
align-items: center;
|
|
72
|
-
justify-content: var(--lmvz-button-content-justification
|
|
73
|
-
gap: var(--lmvz-button-gap);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color);
|
|
85
|
+
justify-content: var(--lmvz-button-content-justification, center);
|
|
86
|
+
gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)));
|
|
87
|
+
|
|
88
|
+
box-sizing: border-box; /* to inlclude paddings & border in min-height */
|
|
89
|
+
padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
90
|
+
padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
91
|
+
min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)));
|
|
92
|
+
border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent);
|
|
93
|
+
border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px));
|
|
94
|
+
|
|
80
95
|
background-color: var(--lmvz-button-background);
|
|
81
96
|
color: var(--lmvz-button-color);
|
|
82
97
|
cursor: pointer;
|
|
83
98
|
font: var(--lmvz-button-font);
|
|
84
|
-
/* text-align: center; */
|
|
85
99
|
text-decoration: none;
|
|
86
100
|
white-space: nowrap;
|
|
87
101
|
transition:
|
|
@@ -91,116 +105,94 @@ legend {
|
|
|
91
105
|
box-shadow 0.15s ease;
|
|
92
106
|
}
|
|
93
107
|
|
|
94
|
-
button > * {
|
|
95
|
-
font: inherit;
|
|
96
|
-
color: inherit;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
button:focus-visible {
|
|
100
|
-
outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
|
|
101
|
-
outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
|
|
102
|
-
position: relative;
|
|
103
|
-
z-index: 1;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
button:is([disabled], .disabled) {
|
|
107
|
-
cursor: not-allowed;
|
|
108
|
-
pointer-events: none;
|
|
109
|
-
/* } */
|
|
110
|
-
|
|
111
|
-
/* button:is(:is([disabled], .disabled):not(.secondary):not(.tertiary), .primary:is([disabled], .disabled)) { */
|
|
112
|
-
/* button:is([disabled], .disabled) { */
|
|
113
|
-
/* --lmvz-button-background: var(--lmvz-global-color-neutral-500); */
|
|
114
|
-
/* --lmvz-button-color: var(--lmvz-global-color-neutral-white); */
|
|
115
|
-
opacity: var(--lmvz-component-input-disabled-opacity, 40%);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
button:not([disabled]):hover {
|
|
119
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
button:not([disabled]):active {
|
|
123
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4));
|
|
124
|
-
}
|
|
125
108
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
button.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b));
|
|
154
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
button.tertiary {
|
|
158
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
159
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000));
|
|
160
|
-
}
|
|
109
|
+
& > * {
|
|
110
|
+
font: inherit;
|
|
111
|
+
color: inherit;
|
|
112
|
+
}
|
|
113
|
+
&:focus-visible {
|
|
114
|
+
outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
|
|
115
|
+
outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
|
|
116
|
+
position: relative;
|
|
117
|
+
z-index: 1;
|
|
118
|
+
}
|
|
119
|
+
&:is([disabled], .disabled) {
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
/* } */
|
|
123
|
+
|
|
124
|
+
/* button:is(:is([disabled], .disabled):not(.secondary):not(.tertiary), .primary:is([disabled], .disabled)) { */
|
|
125
|
+
/* button:is([disabled], .disabled) { */
|
|
126
|
+
/* --lmvz-button-background: var(--lmvz-global-color-neutral-500); */
|
|
127
|
+
/* --lmvz-button-color: var(--lmvz-global-color-neutral-white); */
|
|
128
|
+
opacity: var(--lmvz-component-input-disabled-opacity, 40%);
|
|
129
|
+
}
|
|
130
|
+
&:not([disabled]):hover {
|
|
131
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0));
|
|
132
|
+
}
|
|
133
|
+
&:not([disabled]):active {
|
|
134
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4));
|
|
135
|
+
}
|
|
161
136
|
|
|
162
|
-
|
|
163
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0));
|
|
164
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000));
|
|
165
|
-
}
|
|
137
|
+
/* secondary styling is default, primary is explicit */
|
|
166
138
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
139
|
+
&.primary {
|
|
140
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000));
|
|
141
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff));
|
|
142
|
+
--lmvz-button-border-width: var(--lmvz-button-border-width-override, 0);
|
|
143
|
+
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
144
|
+
}
|
|
145
|
+
&.primary:not([disabled], .disabled):hover {
|
|
146
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e));
|
|
147
|
+
}
|
|
148
|
+
&.primary:not([disabled], .disabled):active {
|
|
149
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454));
|
|
150
|
+
}
|
|
151
|
+
&.danger {
|
|
152
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
153
|
+
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
154
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
155
|
+
}
|
|
156
|
+
&.danger:not([disabled], .disabled):hover {
|
|
157
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0));
|
|
158
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
159
|
+
}
|
|
160
|
+
&.danger:not([disabled], .disabled):active {
|
|
161
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b));
|
|
162
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
163
|
+
}
|
|
164
|
+
&.tertiary {
|
|
165
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
166
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000));
|
|
167
|
+
}
|
|
168
|
+
&.tertiary:not([disabled], .disabled):hover {
|
|
169
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0));
|
|
170
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000));
|
|
171
|
+
}
|
|
172
|
+
&.tertiary:not([disabled], .disabled):active {
|
|
173
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0));
|
|
174
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000));
|
|
175
|
+
}
|
|
171
176
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
&.small {
|
|
178
|
+
--lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)));
|
|
179
|
+
--lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)));
|
|
180
|
+
--lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)));
|
|
181
|
+
--lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)));
|
|
182
|
+
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5
|
|
178
183
|
Router));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
button.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5
|
|
184
|
+
}
|
|
185
|
+
&.large {
|
|
186
|
+
--lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));
|
|
187
|
+
--lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));
|
|
188
|
+
--lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)));
|
|
189
|
+
--lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)));
|
|
190
|
+
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5
|
|
187
191
|
Router));
|
|
192
|
+
}
|
|
188
193
|
}
|
|
189
194
|
|
|
190
195
|
|
|
191
|
-
lmvz-button,
|
|
192
|
-
button {
|
|
193
|
-
--lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px);
|
|
194
|
-
--lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));
|
|
195
|
-
--lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));
|
|
196
|
-
--lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);
|
|
197
|
-
--lmvz-button-content-justification-override: normal;
|
|
198
|
-
|
|
199
|
-
width: 100%;
|
|
200
|
-
display: block;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
button {
|
|
204
196
|
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
205
197
|
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000));
|
|
206
198
|
|
|
@@ -214,4 +206,15 @@ button.large {
|
|
|
214
206
|
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000));
|
|
215
207
|
}
|
|
216
208
|
}
|
|
209
|
+
|
|
210
|
+
lmvz-button,
|
|
211
|
+
button {
|
|
212
|
+
--lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px);
|
|
213
|
+
--lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));
|
|
214
|
+
--lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));
|
|
215
|
+
--lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);
|
|
216
|
+
--lmvz-button-content-justification: normal;
|
|
217
|
+
|
|
218
|
+
width: 100%;
|
|
219
|
+
}
|
|
217
220
|
}
|