@lmvz-ds/components 0.24.0 → 0.26.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/cjs/{ds.constants-DSnxZ3ia.js → ds.constants-8fh6ItAF.js} +1 -1
  3. package/cjs/{index-lW-SEvL7.js → index-BCFBLj0e.js} +1 -1
  4. package/cjs/index.cjs.js +196 -2
  5. package/cjs/lmvz-action.cjs.entry.js +1 -1
  6. package/cjs/lmvz-button-group.cjs.entry.js +183 -0
  7. package/cjs/lmvz-button_2.cjs.entry.js +198 -0
  8. package/cjs/lmvz-card.cjs.entry.js +2 -2
  9. package/cjs/lmvz-checkbox.cjs.entry.js +5 -5
  10. package/cjs/lmvz-chip.cjs.entry.js +4 -4
  11. package/cjs/lmvz-components.cjs.js +3 -3
  12. package/cjs/lmvz-header_2.cjs.entry.js +2 -2
  13. package/cjs/lmvz-input.cjs.entry.js +3 -3
  14. package/cjs/lmvz-menuitem.cjs.entry.js +3 -3
  15. package/cjs/lmvz-modal.cjs.entry.js +5 -5
  16. package/cjs/lmvz-radio.cjs.entry.js +334 -0
  17. package/cjs/lmvz-select.cjs.entry.js +4 -4
  18. package/cjs/lmvz-snackbar.cjs.entry.js +83 -0
  19. package/cjs/lmvz-toggle.cjs.entry.js +7 -5
  20. package/cjs/loader.cjs.js +2 -2
  21. package/cjs/{reactive-controller-host-BOFg4vL-.js → reactive-controller-host-DrtMkMd7.js} +1 -1
  22. package/collection/api/ds.constants.js +4 -1
  23. package/collection/collection-manifest.json +3 -1
  24. package/collection/components/lmvz-button/lmvz-button.css +8 -8
  25. package/collection/components/lmvz-button-group/lmvz-button-group.css +1 -1
  26. package/collection/components/lmvz-card/lmvz-card.css +11 -11
  27. package/collection/components/lmvz-checkbox/lmvz-checkbox.css +8 -11
  28. package/collection/components/lmvz-checkbox/lmvz-checkbox.js +2 -2
  29. package/collection/components/lmvz-chip/lmvz-chip.css +3 -3
  30. package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
  31. package/collection/components/lmvz-input/lmvz-input.css +5 -9
  32. package/collection/components/lmvz-menuitem/lmvz-menuitem.css +3 -3
  33. package/collection/components/lmvz-modal/lmvz-modal.css +21 -15
  34. package/collection/components/lmvz-modal/lmvz-modal.js +2 -2
  35. package/collection/components/lmvz-radio/lmvz-radio.css +182 -0
  36. package/collection/components/lmvz-radio/lmvz-radio.js +487 -0
  37. package/collection/components/lmvz-select/lmvz-select.css +3 -3
  38. package/collection/components/lmvz-select/lmvz-select.js +1 -1
  39. package/collection/components/lmvz-snackbar/lmvz-snackbar.css +101 -0
  40. package/collection/components/lmvz-snackbar/lmvz-snackbar.js +266 -0
  41. package/collection/components/lmvz-snackbar/public.js +1 -0
  42. package/collection/components/lmvz-snackbar/snackbar-controller.js +194 -0
  43. package/collection/components/lmvz-toggle/lmvz-toggle.css +4 -9
  44. package/collection/components/lmvz-toggle/lmvz-toggle.js +3 -3
  45. package/collection/index.js +1 -0
  46. package/collection/integration/header-integration/header-integration.js +1 -1
  47. package/collection/styles/fragments/_focus-within.css +13 -0
  48. package/collection/utils/radio/radio-group-controller.js +160 -0
  49. package/components/index.d.ts +4 -0
  50. package/components/index.d.ts.bak +4 -0
  51. package/components/index.js +1 -1
  52. package/components/lmvz-action.js +1 -1
  53. package/components/lmvz-button-group.js +1 -1
  54. package/components/lmvz-button.js +1 -1
  55. package/components/lmvz-card.js +1 -1
  56. package/components/lmvz-checkbox.js +1 -1
  57. package/components/lmvz-chip.js +1 -1
  58. package/components/lmvz-header.js +1 -1
  59. package/components/lmvz-icon.js +1 -1
  60. package/components/lmvz-input.js +1 -1
  61. package/components/lmvz-menuitem.js +1 -1
  62. package/components/lmvz-modal.js +1 -1
  63. package/components/lmvz-radio.d.ts +11 -0
  64. package/components/lmvz-radio.d.ts.bak +11 -0
  65. package/components/lmvz-radio.js +1 -0
  66. package/components/lmvz-select.js +1 -1
  67. package/components/lmvz-snackbar.d.ts +11 -0
  68. package/components/lmvz-snackbar.d.ts.bak +11 -0
  69. package/components/lmvz-snackbar.js +1 -0
  70. package/components/lmvz-toggle.js +1 -1
  71. package/components/{p-slgmfnHm.js → p-BOzeYzKk.js} +1 -1
  72. package/components/{p-Cg2XX_J-.js → p-DYa3zcGE.js} +1 -1
  73. package/components/{p-DOTK1OW3.js → p-JAKQdFhF.js} +1 -1
  74. package/components/{p-CcnyKhAw.js → p-WLZ7VWNX.js} +1 -1
  75. package/components/{p-CK8cAKcB.js → p-c7OzBK8f.js} +1 -1
  76. package/components/{p-DSvYtVoD.js → p-lsUdmjdw.js} +1 -1
  77. package/esm/{ds.constants-Bmi89ll1.js → ds.constants-BOOwq5dE.js} +1 -1
  78. package/esm/{index-Aa_425iY.js → index-CKYszC64.js} +1 -1
  79. package/esm/index.js +198 -1
  80. package/esm/lmvz-action.entry.js +1 -1
  81. package/esm/lmvz-button-group.entry.js +181 -0
  82. package/esm/lmvz-button_2.entry.js +195 -0
  83. package/esm/lmvz-card.entry.js +2 -2
  84. package/esm/lmvz-checkbox.entry.js +5 -5
  85. package/esm/lmvz-chip.entry.js +4 -4
  86. package/esm/lmvz-components.js +4 -4
  87. package/esm/lmvz-header_2.entry.js +2 -2
  88. package/esm/lmvz-input.entry.js +3 -3
  89. package/esm/lmvz-menuitem.entry.js +3 -3
  90. package/esm/lmvz-modal.entry.js +5 -5
  91. package/esm/lmvz-radio.entry.js +332 -0
  92. package/esm/lmvz-select.entry.js +4 -4
  93. package/esm/lmvz-snackbar.entry.js +81 -0
  94. package/esm/lmvz-toggle.entry.js +7 -5
  95. package/esm/loader.js +3 -3
  96. package/esm/{reactive-controller-host-CroMsXdS.js → reactive-controller-host-ZrGf1F2-.js} +1 -1
  97. package/hydrate/index.js +467 -19
  98. package/hydrate/index.mjs +467 -19
  99. package/lmvz-components/index.esm.js +1 -1
  100. package/lmvz-components/lmvz-components.esm.js +1 -1
  101. package/lmvz-components/{p-d1dacf7e.entry.js → p-01aeca60.entry.js} +1 -1
  102. package/lmvz-components/p-0a37e0f2.entry.js +1 -0
  103. package/lmvz-components/p-14c3d837.entry.js +1 -0
  104. package/lmvz-components/{p-4263c9b2.entry.js → p-24e63b0a.entry.js} +1 -1
  105. package/lmvz-components/p-25f045b2.entry.js +1 -0
  106. package/lmvz-components/{p-f6d1d9df.entry.js → p-3da301a6.entry.js} +1 -1
  107. package/lmvz-components/p-40228d48.entry.js +1 -0
  108. package/lmvz-components/p-4da9073a.entry.js +1 -0
  109. package/lmvz-components/p-6de9981f.entry.js +1 -0
  110. package/lmvz-components/{p-6f8cbc4f.entry.js → p-758078db.entry.js} +1 -1
  111. package/lmvz-components/{p-88adb9fa.entry.js → p-8dae99f1.entry.js} +1 -1
  112. package/lmvz-components/p-BOOwq5dE.js +1 -0
  113. package/lmvz-components/{p-BRl6zKXT.js → p-CwX1wKkM.js} +1 -1
  114. package/lmvz-components/{p-a7c3074a.entry.js → p-e1eaa7a2.entry.js} +1 -1
  115. package/lmvz-components/p-f5cece32.entry.js +1 -0
  116. package/lmvz-components/p-fe607f10.entry.js +1 -0
  117. package/manifest.json +892 -205
  118. package/package.json +9 -1
  119. package/types/api/ds.constants.d.ts +9 -1
  120. package/types/components/lmvz-radio/lmvz-radio.d.ts +42 -0
  121. package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +21 -0
  122. package/types/components/lmvz-snackbar/public.d.ts +2 -0
  123. package/types/components/lmvz-snackbar/snackbar-controller.d.ts +32 -0
  124. package/types/components.d.ts +237 -1
  125. package/types/index.d.ts +1 -0
  126. package/types/stencil-public-runtime.d.ts +1 -0
  127. package/types/utils/radio/radio-group-controller.d.ts +26 -0
  128. package/assets/icons/checkmark.svg +0 -4
  129. package/assets/icons/close-sm.svg +0 -3
  130. package/cjs/lmvz-button_3.cjs.entry.js +0 -375
  131. package/collection/assets/icons/checkmark.svg +0 -4
  132. package/collection/assets/icons/close-sm.svg +0 -3
  133. package/esm/lmvz-button_3.entry.js +0 -371
  134. package/lmvz-components/p-2824a56b.entry.js +0 -1
  135. package/lmvz-components/p-3846ba08.entry.js +0 -1
  136. package/lmvz-components/p-4f5c3c4a.entry.js +0 -1
  137. package/lmvz-components/p-Bmi89ll1.js +0 -1
  138. package/lmvz-components/p-b3b04d46.entry.js +0 -1
  139. package/lmvz-components/p-fefefc54.entry.js +0 -1
  140. /package/lmvz-components/{p-Aa_425iY.js → p-CKYszC64.js} +0 -0
package/esm/index.js CHANGED
@@ -1,5 +1,202 @@
1
1
  export { A as ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, d as disableAriaValidation, e as enableAriaValidation, i as isAriaValidationEnabled, q as queueValidation, u as useVerboseLogging } from './aria-loader-GfsGHZHY.js';
2
- export { c as chipSizes, a as chipTypes, i as iconSizes, b as iconWeights, d as inputTypes, t as textSizes } from './ds.constants-Bmi89ll1.js';
2
+ export { c as chipSizes, a as chipTypes, i as iconSizes, b as iconWeights, d as inputTypes, t as textSizes } from './ds.constants-BOOwq5dE.js';
3
3
  export { g as getRegisteredIconProvider, r as registerIconProvider, t as typedIconFromSet } from './icons-CmuFKDRz.js';
4
4
  import './svg-B2YoIRuh.js';
5
5
  import './logger-CGmJG63p.js';
6
+
7
+ const PRIORITY_MAP = {
8
+ low: 0,
9
+ normal: 1,
10
+ high: 2,
11
+ };
12
+ const STATUS_DURATION = {
13
+ success: 5000,
14
+ warning: 5000,
15
+ error: 8000,
16
+ };
17
+ let idCounter = 0;
18
+ function nextId() {
19
+ idCounter += 1;
20
+ return `snackbar-${idCounter}`;
21
+ }
22
+ function resolveHostElement() {
23
+ if (typeof document === 'undefined') {
24
+ return undefined;
25
+ }
26
+ const existing = document.querySelector('[data-snackbar-host]');
27
+ if (existing) {
28
+ return existing;
29
+ }
30
+ const el = document.createElement('lmvz-snackbar');
31
+ el.setAttribute('data-snackbar-host', '');
32
+ document.body.appendChild(el);
33
+ return el;
34
+ }
35
+ class SnackbarController {
36
+ hostEl = undefined;
37
+ active = undefined;
38
+ getHost() {
39
+ if (this.hostEl !== undefined && !this.hostEl.isConnected) {
40
+ this.hostEl = undefined;
41
+ }
42
+ if (this.hostEl === undefined) {
43
+ this.hostEl = resolveHostElement();
44
+ }
45
+ return this.hostEl;
46
+ }
47
+ clearTimer(entry) {
48
+ if (entry.timerId !== undefined) {
49
+ clearTimeout(entry.timerId);
50
+ entry.timerId = undefined;
51
+ }
52
+ }
53
+ scheduleTimer(entry, delayMs) {
54
+ if (delayMs <= 0) {
55
+ return;
56
+ }
57
+ entry.timerStartedAt = Date.now();
58
+ entry.timerId = setTimeout(() => {
59
+ if (this.active !== undefined && this.active.id === entry.id) {
60
+ this.dismissActive(entry, 'timeout');
61
+ }
62
+ }, delayMs);
63
+ }
64
+ dismissActive(entry, reason) {
65
+ this.clearTimer(entry);
66
+ const host = entry.hostEl;
67
+ host.removeEventListener('pointerenter', entry.onPointerEnter);
68
+ host.removeEventListener('pointerleave', entry.onPointerLeave);
69
+ host.removeEventListener('focusin', entry.onFocusIn);
70
+ host.removeEventListener('focusout', entry.onFocusOut);
71
+ if (entry.onActionListener) {
72
+ host.removeEventListener('lmvzAction', entry.onActionListener);
73
+ }
74
+ host.hide?.();
75
+ if (this.active?.id === entry.id) {
76
+ this.active = undefined;
77
+ }
78
+ if (reason !== 'action') {
79
+ host.dispatchEvent(new CustomEvent('lmvzClose', { detail: { reason }, bubbles: true, composed: true }));
80
+ }
81
+ entry.resolve({ reason });
82
+ }
83
+ pauseTimer(entry) {
84
+ entry.pauseCount += 1;
85
+ if (entry.pauseCount > 1 || entry.timerId === undefined) {
86
+ return;
87
+ }
88
+ const elapsed = entry.timerStartedAt !== undefined ? Date.now() - entry.timerStartedAt : 0;
89
+ entry.remaining = Math.max(0, entry.remaining - elapsed);
90
+ entry.timerStartedAt = undefined;
91
+ this.clearTimer(entry);
92
+ }
93
+ resumeTimer(entry) {
94
+ if (entry.pauseCount > 0) {
95
+ entry.pauseCount -= 1;
96
+ }
97
+ if (entry.pauseCount > 0) {
98
+ return;
99
+ }
100
+ if (entry.remaining > 0) {
101
+ this.scheduleTimer(entry, entry.remaining);
102
+ }
103
+ }
104
+ applyToHost(host, options) {
105
+ host.setAttribute('status', options.status ?? 'success');
106
+ if (options.actionLabel !== undefined) {
107
+ host.setAttribute('action-label', options.actionLabel);
108
+ }
109
+ else {
110
+ host.removeAttribute('action-label');
111
+ }
112
+ }
113
+ open(options) {
114
+ const incomingPriority = PRIORITY_MAP[options.priority ?? 'normal'];
115
+ if (this.active !== undefined && incomingPriority < this.active.priority) {
116
+ let swallowResolve;
117
+ const closed = new Promise((resolve) => {
118
+ swallowResolve = resolve;
119
+ });
120
+ swallowResolve({ reason: 'swallowed' });
121
+ const id = nextId();
122
+ return {
123
+ id,
124
+ closed,
125
+ dismiss() {
126
+ },
127
+ };
128
+ }
129
+ if (this.active !== undefined) {
130
+ this.dismissActive(this.active, 'overridden');
131
+ }
132
+ const host = this.getHost();
133
+ if (host === undefined) {
134
+ const id = nextId();
135
+ let ssrResolve;
136
+ const closed = new Promise((resolve) => {
137
+ ssrResolve = resolve;
138
+ });
139
+ ssrResolve({ reason: 'swallowed' });
140
+ return { id, closed, dismiss() { } };
141
+ }
142
+ const id = nextId();
143
+ const status = options.status ?? 'success';
144
+ const durationMs = options.duration === 0 ? 0 : (options.duration ?? STATUS_DURATION[status]);
145
+ let entryResolve;
146
+ const closed = new Promise((resolve) => {
147
+ entryResolve = resolve;
148
+ });
149
+ const entry = {
150
+ id,
151
+ priority: incomingPriority,
152
+ resolve: entryResolve,
153
+ timerId: undefined,
154
+ remaining: durationMs,
155
+ timerStartedAt: undefined,
156
+ pauseCount: 0,
157
+ hostEl: host,
158
+ onPointerEnter: () => this.pauseTimer(entry),
159
+ onPointerLeave: () => this.resumeTimer(entry),
160
+ onFocusIn: () => this.pauseTimer(entry),
161
+ onFocusOut: () => this.resumeTimer(entry),
162
+ };
163
+ this.active = entry;
164
+ host.addEventListener('pointerenter', entry.onPointerEnter);
165
+ host.addEventListener('pointerleave', entry.onPointerLeave);
166
+ host.addEventListener('focusin', entry.onFocusIn);
167
+ host.addEventListener('focusout', entry.onFocusOut);
168
+ this.applyToHost(host, options);
169
+ const onAction = () => {
170
+ if (this.active !== undefined && this.active.id === id) {
171
+ options.onAction?.();
172
+ this.dismissActive(entry, 'action');
173
+ }
174
+ };
175
+ entry.onActionListener = onAction;
176
+ host.addEventListener('lmvzAction', onAction, { once: true });
177
+ host.show?.();
178
+ queueMicrotask(() => host.setAttribute('message', options.message));
179
+ if (durationMs > 0) {
180
+ this.scheduleTimer(entry, durationMs);
181
+ }
182
+ return {
183
+ id,
184
+ closed,
185
+ dismiss: () => {
186
+ if (this.active?.id === id) {
187
+ this.dismissActive(entry, 'manual');
188
+ }
189
+ },
190
+ };
191
+ }
192
+ dismiss(id) {
193
+ if (!this.active) {
194
+ return;
195
+ }
196
+ if (!id || this.active.id === id) {
197
+ this.dismissActive(this.active, 'manual');
198
+ }
199
+ }
200
+ }
201
+
202
+ export { SnackbarController };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-Aa_425iY.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-CKYszC64.js';
2
2
 
3
3
  const lmvzActionCss = () => `:host{display:block}`;
4
4
 
@@ -0,0 +1,181 @@
1
+ import { r as registerInstance, h, H as Host } from './index-CKYszC64.js';
2
+ import { a as isPromise, i as isAriaValidationEnabled } from './aria-loader-GfsGHZHY.js';
3
+ import { a as canReceiveFocus } from './component-DOTK1OW3.js';
4
+
5
+ /**
6
+ * Returns a function that delegates to the given predicate/filter and negates its result.
7
+ * The returned function preserves the input function's types, arguments and timing.
8
+ *
9
+ * @param delegate - The predicate/filter function to negate.
10
+ * @returns A function that returns the negated result.
11
+ */
12
+ function negate(delegate) {
13
+ return (...args) => {
14
+ const result = delegate(...args);
15
+ return isPromise(result) ? result.then((res) => !res) : !result;
16
+ };
17
+ }
18
+
19
+ const lmvzButtonGroupCss = () => `:host{display:flex;justify-content:flex-end;gap:var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);flex-wrap:wrap}::slotted([hidden]){display:none !important}`;
20
+
21
+ const LmvzButtonGroup = class {
22
+ constructor(hostRef) {
23
+ registerInstance(this, hostRef);
24
+ }
25
+ actionsSlot;
26
+ validationMessageCache = [];
27
+ actionsStateObserver;
28
+ get primaryEnabledAction() {
29
+ return this.enabledButtons.find(isPrimaryAction) ?? this.enabledButtons[0];
30
+ }
31
+ get hasActions() {
32
+ return this.assignedButtons.some((element) => isVisible(element) && isActionButton(element) && !isDisabledButton(element));
33
+ }
34
+ componentDidLoad() {
35
+ this.handleActionsSlotChange();
36
+ }
37
+ disconnectedCallback() {
38
+ this.actionsStateObserver?.disconnect();
39
+ }
40
+ get assignedElements() {
41
+ return this.actionsSlot?.assignedElements({ flatten: true }) ?? [];
42
+ }
43
+ get assignedButtons() {
44
+ return this.assignedElements.filter(isActionButton);
45
+ }
46
+ get visibleButtons() {
47
+ return this.assignedButtons.filter(isVisible);
48
+ }
49
+ get enabledButtons() {
50
+ return this.visibleButtons.filter(negate(isDisabledButton));
51
+ }
52
+ getActionValidationResult() {
53
+ if (!this.visibleButtons.length) {
54
+ return [];
55
+ }
56
+ const primaryActions = this.visibleButtons.filter(isPrimaryAction);
57
+ const secondaryActions = this.visibleButtons.filter(isSecondaryAction);
58
+ const issues = [];
59
+ const order = this.visibleButtons.toReversed();
60
+ if (primaryActions.length !== 1)
61
+ issues.push('LmvzModal actions slot must contain exactly one primary action.');
62
+ if (secondaryActions.length > 1)
63
+ issues.push(`LmvzModal actions slot must contain at most one secondary action (received ${secondaryActions.length})`);
64
+ if (primaryActions.length) {
65
+ const primaryAction = primaryActions[0];
66
+ const secondaryAction = secondaryActions[0];
67
+ if (order.indexOf(primaryAction) !== 0)
68
+ issues.push('Primary action must be the last focusable element in the actions slot (i.e. rightmost button).');
69
+ if (secondaryAction && order.indexOf(secondaryAction) !== 1)
70
+ issues.push('Secondary action must be the second-to-last focusable element in the actions slot (i.e. left of primary button).');
71
+ }
72
+ else if (secondaryActions.length) {
73
+ const secondaryAction = secondaryActions[0];
74
+ if (order.indexOf(secondaryAction) !== 0)
75
+ issues.push('Secondary action must be the last focusable element in the actions slot when no primary action is present (i.e. rightmost button).');
76
+ }
77
+ return issues;
78
+ }
79
+ handleActionsSlotChange = () => {
80
+ this.observeActionState();
81
+ this.syncActionsState();
82
+ };
83
+ observeActionState() {
84
+ if (typeof MutationObserver === 'undefined')
85
+ return;
86
+ this.actionsStateObserver?.disconnect();
87
+ if (!this.assignedButtons.length)
88
+ return;
89
+ this.actionsStateObserver = new MutationObserver(() => {
90
+ this.syncActionsState();
91
+ });
92
+ this.assignedButtons.forEach((element) => {
93
+ this.actionsStateObserver?.observe(element, {
94
+ attributes: true,
95
+ attributeFilter: ['disabled', 'hidden', 'variant'],
96
+ });
97
+ });
98
+ }
99
+ syncActionsState() {
100
+ const assignedElements = this.assignedElements;
101
+ assignedElements.forEach((element) => {
102
+ const isAllowedAction = ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
103
+ if (isAllowedAction)
104
+ return;
105
+ if (!element.hasAttribute('hidden')) {
106
+ element.setAttribute('hidden', '');
107
+ }
108
+ if (element.getAttribute('aria-hidden') !== 'true') {
109
+ element.setAttribute('aria-hidden', 'true');
110
+ }
111
+ });
112
+ this.checkActions();
113
+ const length = this.visibleButtons.length;
114
+ for (let i = 0; i < length; i++) {
115
+ const variant = i === length - 1 ? 'primary' : i === length - 2 ? 'secondary' : 'tertiary';
116
+ const element = this.visibleButtons.at(i);
117
+ if (!element)
118
+ continue;
119
+ if (isLmvzButton(element)) {
120
+ if (!element.getAttribute('variant'))
121
+ element.setAttribute('variant', variant);
122
+ }
123
+ else {
124
+ element.classList.add(variant);
125
+ }
126
+ }
127
+ this.focusPrimaryAction();
128
+ }
129
+ focusPrimaryAction() {
130
+ const focusTarget = this.primaryEnabledAction;
131
+ if (!focusTarget || typeof window === 'undefined')
132
+ return;
133
+ window.requestAnimationFrame(() => {
134
+ if (canReceiveFocus(focusTarget)) {
135
+ focusTarget.focus();
136
+ }
137
+ });
138
+ }
139
+ checkActions() {
140
+ if (!isAriaValidationEnabled())
141
+ return;
142
+ const issues = this.getActionValidationResult();
143
+ if (!issues.length) {
144
+ return;
145
+ }
146
+ issues.forEach((issue) => {
147
+ if (this.validationMessageCache.includes(issue))
148
+ return;
149
+ console.warn(issue);
150
+ this.validationMessageCache.push(issue);
151
+ });
152
+ }
153
+ render() {
154
+ return (h(Host, { key: '56b60821ecaa2301d13e78d621e873aa74cd170e' }, h("slot", { key: 'e6a1422950fa5b0026356b7788a607a690116186', ref: (element) => (this.actionsSlot = element), onSlotchange: this.handleActionsSlotChange })));
155
+ }
156
+ };
157
+ function isActionButton(element) {
158
+ return ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
159
+ }
160
+ function isLmvzButton(element) {
161
+ return element?.tagName.toUpperCase() === 'LMVZ-BUTTON';
162
+ }
163
+ function isDisabledButton(element) {
164
+ return element.hasAttribute('disabled') || element.disabled === true;
165
+ }
166
+ function isVisible(element) {
167
+ return !element.hasAttribute('hidden');
168
+ }
169
+ function getActionVariant(element) {
170
+ const variant = element.getAttribute('variant') ?? element.variant;
171
+ return variant === 'primary' || variant === 'secondary' || variant === 'tertiary' ? variant : 'secondary';
172
+ }
173
+ function isPrimaryAction(element) {
174
+ return getActionVariant(element) === 'primary';
175
+ }
176
+ function isSecondaryAction(element) {
177
+ return getActionVariant(element) === 'secondary';
178
+ }
179
+ LmvzButtonGroup.style = lmvzButtonGroupCss();
180
+
181
+ export { LmvzButtonGroup as lmvz_button_group };
@@ -0,0 +1,195 @@
1
+ import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-CKYszC64.js';
2
+ import { c as classNames } from './index-BfTCfPZ1.js';
3
+ import { R as ReactiveControllerHost, A as AriaValidationController } from './reactive-controller-host-ZrGf1F2-.js';
4
+ import { E as ElementActivationController } from './element-activation-controller-CN0JX9-m.js';
5
+ import { i as inheritAriaAttributes, f as findFormByRef } from './component-DOTK1OW3.js';
6
+ import { p as parseSvgString } from './svg-B2YoIRuh.js';
7
+ import { a as resolveIconSvg } from './icons-CmuFKDRz.js';
8
+ import './aria-loader-GfsGHZHY.js';
9
+ import './logger-CGmJG63p.js';
10
+
11
+ const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.5 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router); } display: inline-block; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
12
+
13
+ const LmvzButton = class extends ReactiveControllerHost {
14
+ get el() { return getElement(this); }
15
+ validationEl;
16
+ inheritedAttributes = {};
17
+ formEl = null;
18
+ formButtonEl = null;
19
+ lmvzActivation;
20
+ get ti() {
21
+ return 0;
22
+ }
23
+ scale = 'default';
24
+ variant;
25
+ disabled = false;
26
+ type = 'button';
27
+ form;
28
+ formMethod;
29
+ name;
30
+ value;
31
+ constructor(hostRef) {
32
+ super();
33
+ registerInstance(this, hostRef);
34
+ this.lmvzActivation = createEvent(this, "lmvzActivation", 7);
35
+ this.addController(new AriaValidationController(this));
36
+ this.addController(new ElementActivationController(this, {
37
+ localHandler: this.handleClick.bind(this),
38
+ keys: ['Enter'],
39
+ }));
40
+ }
41
+ connectedCallback() {
42
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
43
+ super.connectedCallback();
44
+ }
45
+ disconnectedCallback() {
46
+ this.formButtonEl?.remove();
47
+ this.formButtonEl = null;
48
+ this.formEl = null;
49
+ super.disconnectedCallback();
50
+ }
51
+ renderHiddenButton() {
52
+ if (this.type !== 'submit') {
53
+ this.formButtonEl?.remove();
54
+ this.formButtonEl = null;
55
+ this.formEl = null;
56
+ return;
57
+ }
58
+ const formEl = findFormByRef(this.form, this.el);
59
+ if (!formEl) {
60
+ this.formButtonEl?.remove();
61
+ this.formButtonEl = null;
62
+ this.formEl = null;
63
+ return;
64
+ }
65
+ this.formEl = formEl;
66
+ const formButtonEl = this.formButtonEl ?? document.createElement('button');
67
+ formButtonEl.type = 'submit';
68
+ formButtonEl.style.display = 'none';
69
+ formButtonEl.disabled = this.disabled;
70
+ formButtonEl.name = this.name ?? '';
71
+ formButtonEl.value = this.value ?? '';
72
+ if (this.formMethod) {
73
+ formButtonEl.setAttribute('formmethod', this.formMethod);
74
+ }
75
+ else {
76
+ formButtonEl.removeAttribute('formmethod');
77
+ }
78
+ if (this.formButtonEl !== formButtonEl) {
79
+ this.formButtonEl = formButtonEl;
80
+ }
81
+ if (formButtonEl.parentElement !== formEl) {
82
+ formButtonEl.remove();
83
+ formEl.appendChild(formButtonEl);
84
+ }
85
+ }
86
+ submitForm(ev) {
87
+ if (this.formEl && this.formButtonEl) {
88
+ ev.preventDefault();
89
+ this.formButtonEl.click();
90
+ }
91
+ }
92
+ handleClick = (ev) => {
93
+ if (this.type === 'submit') {
94
+ this.submitForm(ev);
95
+ }
96
+ };
97
+ render() {
98
+ this.renderHiddenButton();
99
+ return (h(Host, { key: '8196de85afc3878c6f38e582d7c031f5d19bcd36', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: '8d73f979fa227de22a03403a2a3938684911060a', ref: (e) => (this.validationEl = e), part: "button", disabled: this.disabled, type: this.type, class: classNames(this.variant ?? 'secondary', { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: '18e91a2f94ba0d7e5cf13150191003e2f0b2a03a' }))));
100
+ }
101
+ static get delegatesFocus() { return true; }
102
+ };
103
+ LmvzButton.style = lmvzButtonCss();
104
+
105
+ const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;
106
+
107
+ const LmvzIcon = class extends ReactiveControllerHost {
108
+ intersectionObserver;
109
+ ariaValidationController = new AriaValidationController(this);
110
+ get el() { return getElement(this); }
111
+ validationEl;
112
+ icon;
113
+ weight = 'medium';
114
+ size = 'md';
115
+ iconset;
116
+ iconData;
117
+ visible = false;
118
+ ariaLabel;
119
+ get ariaHidden() {
120
+ return !this.ariaLabel;
121
+ }
122
+ constructor(hostRef) {
123
+ super();
124
+ registerInstance(this, hostRef);
125
+ this.addController(this.ariaValidationController);
126
+ }
127
+ connectedCallback() {
128
+ this.waitUntilVisible(() => {
129
+ this.visible = true;
130
+ this.loadIconPathData();
131
+ });
132
+ super.connectedCallback();
133
+ }
134
+ disconnectedCallback() {
135
+ if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
136
+ this.intersectionObserver.disconnect();
137
+ }
138
+ this.intersectionObserver = undefined;
139
+ super.disconnectedCallback();
140
+ }
141
+ async loadIconPathData() {
142
+ const { icon, iconset, visible } = this;
143
+ if (!icon || !visible) {
144
+ return;
145
+ }
146
+ const maybeIcon = parseSvgString(icon);
147
+ if (maybeIcon) {
148
+ this.iconData = maybeIcon;
149
+ return;
150
+ }
151
+ this.iconData = await resolveIconSvg({
152
+ icon,
153
+ iconset,
154
+ });
155
+ }
156
+ componentDidRender() {
157
+ this.validationEl = this.el.querySelector('svg');
158
+ this.ariaValidationController.revalidateAria();
159
+ super.componentDidRender();
160
+ }
161
+ render() {
162
+ return h(Host, { key: '03b4391d02a77409257bcda51c2b65ad9a9e0a0c', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
163
+ }
164
+ waitUntilVisible(callback, rootMargin = 50) {
165
+ if (typeof window === 'undefined' || !window.IntersectionObserver) {
166
+ callback();
167
+ return;
168
+ }
169
+ this.intersectionObserver = new IntersectionObserver((entries) => {
170
+ entries.some((entry) => {
171
+ if (entry.isIntersecting) {
172
+ if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
173
+ this.intersectionObserver.disconnect();
174
+ }
175
+ this.intersectionObserver = undefined;
176
+ callback();
177
+ return true;
178
+ }
179
+ return false;
180
+ });
181
+ }, { rootMargin: `${rootMargin}px` });
182
+ this.intersectionObserver.observe(this.el);
183
+ }
184
+ static get watchers() { return {
185
+ "icon": [{
186
+ "loadIconPathData": 0
187
+ }],
188
+ "iconset": [{
189
+ "loadIconPathData": 0
190
+ }]
191
+ }; }
192
+ };
193
+ LmvzIcon.style = lmvzIconCss();
194
+
195
+ export { LmvzButton as lmvz_button, LmvzIcon as lmvz_icon };
@@ -1,4 +1,4 @@
1
- import { a as getAssetPath, r as registerInstance, c as createEvent, h, H as Host } from './index-Aa_425iY.js';
1
+ import { a as getAssetPath, r as registerInstance, c as createEvent, h, H as Host } from './index-CKYszC64.js';
2
2
 
3
3
  function getLocationBase() {
4
4
  return import.meta?.url ?? window?.location?.origin ?? '';
@@ -20,7 +20,7 @@ function joinPath(...parts) {
20
20
  return parts.filter(Boolean).join('/').replace('//', '/').replace('/./', '/');
21
21
  }
22
22
 
23
- const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: 2px solid var(--lmvz-semantic-color-border-active, #0f8acc); outline-offset: 2px; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.75rem, 0.73rem + 0.06vw, 0.81rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2.25rem, 2.13rem + 0.52vw, 2.75rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
23
+ const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-button-font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); } button.primary { --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); --lmvz-button-color: var(--lmvz-semantic-color-int-on-primary, #ffffff); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-button-font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.5 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-button-min-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-button-font: var(--lmvz-typography-body-lg-strong, 500 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router); } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2.25rem, 2.13rem + 0.52vw, 2.75rem) / 1.4 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
24
24
 
25
25
  const LmvzCard = class {
26
26
  constructor(hostRef) {