@lmvz-ds/components 0.24.0 → 0.25.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 (111) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/cjs/{index-lW-SEvL7.js → index-BCFBLj0e.js} +1 -1
  3. package/cjs/lmvz-action.cjs.entry.js +1 -1
  4. package/cjs/lmvz-button_3.cjs.entry.js +4 -4
  5. package/cjs/lmvz-card.cjs.entry.js +2 -2
  6. package/cjs/lmvz-checkbox.cjs.entry.js +5 -5
  7. package/cjs/lmvz-chip.cjs.entry.js +3 -3
  8. package/cjs/lmvz-components.cjs.js +3 -3
  9. package/cjs/lmvz-header_2.cjs.entry.js +2 -2
  10. package/cjs/lmvz-input.cjs.entry.js +3 -3
  11. package/cjs/lmvz-menuitem.cjs.entry.js +3 -3
  12. package/cjs/lmvz-modal.cjs.entry.js +5 -5
  13. package/cjs/lmvz-radio.cjs.entry.js +334 -0
  14. package/cjs/lmvz-select.cjs.entry.js +4 -4
  15. package/cjs/lmvz-toggle.cjs.entry.js +7 -5
  16. package/cjs/loader.cjs.js +2 -2
  17. package/cjs/{reactive-controller-host-BOFg4vL-.js → reactive-controller-host-DrtMkMd7.js} +1 -1
  18. package/collection/collection-manifest.json +2 -1
  19. package/collection/components/lmvz-button/lmvz-button.css +7 -7
  20. package/collection/components/lmvz-button-group/lmvz-button-group.css +1 -1
  21. package/collection/components/lmvz-card/lmvz-card.css +7 -7
  22. package/collection/components/lmvz-checkbox/lmvz-checkbox.css +8 -11
  23. package/collection/components/lmvz-checkbox/lmvz-checkbox.js +2 -2
  24. package/collection/components/lmvz-chip/lmvz-chip.css +3 -3
  25. package/collection/components/lmvz-input/lmvz-input.css +5 -9
  26. package/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -2
  27. package/collection/components/lmvz-modal/lmvz-modal.css +28 -10
  28. package/collection/components/lmvz-modal/lmvz-modal.js +2 -2
  29. package/collection/components/lmvz-radio/lmvz-radio.css +182 -0
  30. package/collection/components/lmvz-radio/lmvz-radio.js +487 -0
  31. package/collection/components/lmvz-select/lmvz-select.css +3 -3
  32. package/collection/components/lmvz-select/lmvz-select.js +1 -1
  33. package/collection/components/lmvz-toggle/lmvz-toggle.css +4 -9
  34. package/collection/components/lmvz-toggle/lmvz-toggle.js +3 -3
  35. package/collection/integration/header-integration/header-integration.js +1 -1
  36. package/collection/styles/fragments/_focus-within.css +13 -0
  37. package/collection/utils/radio/radio-group-controller.js +160 -0
  38. package/components/index.d.ts +2 -0
  39. package/components/index.d.ts.bak +2 -0
  40. package/components/index.js +1 -1
  41. package/components/lmvz-action.js +1 -1
  42. package/components/lmvz-button-group.js +1 -1
  43. package/components/lmvz-button.js +1 -1
  44. package/components/lmvz-card.js +1 -1
  45. package/components/lmvz-checkbox.js +1 -1
  46. package/components/lmvz-chip.js +1 -1
  47. package/components/lmvz-header.js +1 -1
  48. package/components/lmvz-icon.js +1 -1
  49. package/components/lmvz-input.js +1 -1
  50. package/components/lmvz-menuitem.js +1 -1
  51. package/components/lmvz-modal.js +1 -1
  52. package/components/lmvz-radio.d.ts +11 -0
  53. package/components/lmvz-radio.d.ts.bak +11 -0
  54. package/components/lmvz-radio.js +1 -0
  55. package/components/lmvz-select.js +1 -1
  56. package/components/lmvz-toggle.js +1 -1
  57. package/components/p-Bb-kEOmU.js +1 -0
  58. package/components/{p-Cg2XX_J-.js → p-CCcoDnH-.js} +1 -1
  59. package/components/{p-slgmfnHm.js → p-CNmHnJ1D.js} +1 -1
  60. package/components/p-vUYpZZoR.js +1 -0
  61. package/esm/{index-Aa_425iY.js → index-CKYszC64.js} +1 -1
  62. package/esm/lmvz-action.entry.js +1 -1
  63. package/esm/lmvz-button_3.entry.js +4 -4
  64. package/esm/lmvz-card.entry.js +2 -2
  65. package/esm/lmvz-checkbox.entry.js +5 -5
  66. package/esm/lmvz-chip.entry.js +3 -3
  67. package/esm/lmvz-components.js +4 -4
  68. package/esm/lmvz-header_2.entry.js +2 -2
  69. package/esm/lmvz-input.entry.js +3 -3
  70. package/esm/lmvz-menuitem.entry.js +3 -3
  71. package/esm/lmvz-modal.entry.js +5 -5
  72. package/esm/lmvz-radio.entry.js +332 -0
  73. package/esm/lmvz-select.entry.js +4 -4
  74. package/esm/lmvz-toggle.entry.js +7 -5
  75. package/esm/loader.js +3 -3
  76. package/esm/{reactive-controller-host-CroMsXdS.js → reactive-controller-host-ZrGf1F2-.js} +1 -1
  77. package/hydrate/index.js +371 -19
  78. package/hydrate/index.mjs +371 -19
  79. package/lmvz-components/lmvz-components.esm.js +1 -1
  80. package/lmvz-components/{p-d1dacf7e.entry.js → p-01aeca60.entry.js} +1 -1
  81. package/lmvz-components/p-0dced359.entry.js +1 -0
  82. package/lmvz-components/{p-f6d1d9df.entry.js → p-2044a9ac.entry.js} +1 -1
  83. package/lmvz-components/p-3c2adbb4.entry.js +1 -0
  84. package/lmvz-components/{p-4263c9b2.entry.js → p-3df070b0.entry.js} +1 -1
  85. package/lmvz-components/{p-6f8cbc4f.entry.js → p-758078db.entry.js} +1 -1
  86. package/lmvz-components/p-90f5a19d.entry.js +1 -0
  87. package/lmvz-components/{p-BRl6zKXT.js → p-CwX1wKkM.js} +1 -1
  88. package/lmvz-components/p-acfeae08.entry.js +1 -0
  89. package/lmvz-components/{p-88adb9fa.entry.js → p-c01a6c70.entry.js} +1 -1
  90. package/lmvz-components/{p-a7c3074a.entry.js → p-e1eaa7a2.entry.js} +1 -1
  91. package/lmvz-components/p-e23d0054.entry.js +1 -0
  92. package/lmvz-components/p-fe607f10.entry.js +1 -0
  93. package/manifest.json +410 -2
  94. package/package.json +5 -1
  95. package/types/components/lmvz-radio/lmvz-radio.d.ts +42 -0
  96. package/types/components.d.ts +176 -0
  97. package/types/stencil-public-runtime.d.ts +1 -0
  98. package/types/utils/radio/radio-group-controller.d.ts +26 -0
  99. package/assets/icons/checkmark.svg +0 -4
  100. package/assets/icons/close-sm.svg +0 -3
  101. package/collection/assets/icons/checkmark.svg +0 -4
  102. package/collection/assets/icons/close-sm.svg +0 -3
  103. package/components/p-CcnyKhAw.js +0 -1
  104. package/components/p-DSvYtVoD.js +0 -1
  105. package/lmvz-components/p-2824a56b.entry.js +0 -1
  106. package/lmvz-components/p-3846ba08.entry.js +0 -1
  107. package/lmvz-components/p-4f5c3c4a.entry.js +0 -1
  108. package/lmvz-components/p-b3b04d46.entry.js +0 -1
  109. package/lmvz-components/p-fefefc54.entry.js +0 -1
  110. /package/components/{p-CK8cAKcB.js → p-DYr7Jc0V.js} +0 -0
  111. /package/lmvz-components/{p-Aa_425iY.js → p-CKYszC64.js} +0 -0
@@ -0,0 +1,487 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { AriaValidationController } from "../../utils/aria/aria-validation-controller";
3
+ import { RadioGroupController } from "../../utils/radio/radio-group-controller";
4
+ import { ReactiveControllerHost } from "../../utils/reactive-controller-host";
5
+ let radioIdCounter = 0;
6
+ export class LmvzRadio extends ReactiveControllerHost {
7
+ el;
8
+ get validationEl() {
9
+ return this.el;
10
+ }
11
+ internals;
12
+ nativeInput;
13
+ radioId = `lmvz-radio-${radioIdCounter++}`;
14
+ initialChecked = false;
15
+ radioGroupController;
16
+ get helperId() {
17
+ return this.helperText ? `${this.radioId}-helper` : undefined;
18
+ }
19
+ label;
20
+ checked = false;
21
+ value = 'on';
22
+ name;
23
+ disabled = false;
24
+ required = false;
25
+ error = false;
26
+ helperText;
27
+ form;
28
+ autofocus = false;
29
+ _handlingNativeChange = false;
30
+ _handlingFormReset = false;
31
+ handleCheckedChange(newVal, oldVal) {
32
+ this.internals.setFormValue?.(newVal ? this.value : null);
33
+ if (!newVal && oldVal && !this._handlingNativeChange && !this._handlingFormReset) {
34
+ this.lmvzChange.emit(false);
35
+ }
36
+ if (newVal && !oldVal && !this._handlingNativeChange && !this._handlingFormReset) {
37
+ this.lmvzChange.emit(true);
38
+ }
39
+ }
40
+ handleValueChange(newVal) {
41
+ if (this.checked) {
42
+ this.internals.setFormValue?.(newVal);
43
+ }
44
+ }
45
+ handleLabelChange(newVal) {
46
+ if (!newVal) {
47
+ console.warn('[lmvz-radio] label prop is required and must not be empty');
48
+ }
49
+ }
50
+ lmvzChange;
51
+ lmvzActivation;
52
+ async focusInput() {
53
+ this.nativeInput?.focus();
54
+ }
55
+ async checkValidity() {
56
+ return this.internals?.checkValidity() ?? true;
57
+ }
58
+ async reportValidity() {
59
+ return this.internals?.reportValidity() ?? true;
60
+ }
61
+ constructor() {
62
+ super();
63
+ this.addController(new AriaValidationController(this, {
64
+ reValidateOnPropChanges: true,
65
+ }));
66
+ this.radioGroupController = new RadioGroupController(this);
67
+ this.addController(this.radioGroupController);
68
+ }
69
+ componentWillLoad() {
70
+ this.initialChecked = this.checked;
71
+ this.internals.setFormValue?.(this.checked ? this.value : null);
72
+ super.componentWillLoad();
73
+ }
74
+ formAssociatedCallback() {
75
+ this.internals.setFormValue?.(this.checked ? this.value : null);
76
+ }
77
+ formResetCallback() {
78
+ this._handlingFormReset = true;
79
+ try {
80
+ this.checked = this.initialChecked;
81
+ }
82
+ finally {
83
+ this._handlingFormReset = false;
84
+ }
85
+ }
86
+ formStateRestoreCallback(state) {
87
+ if (typeof state !== 'string')
88
+ return;
89
+ this._handlingFormReset = true;
90
+ try {
91
+ this.checked = state === this.value;
92
+ }
93
+ finally {
94
+ this._handlingFormReset = false;
95
+ }
96
+ }
97
+ handleChange = (event) => {
98
+ this._handlingNativeChange = true;
99
+ try {
100
+ const input = event.target;
101
+ this.checked = input.checked;
102
+ this.lmvzChange.emit(this.checked);
103
+ this.radioGroupController.select(this);
104
+ this.lmvzActivation.emit();
105
+ }
106
+ finally {
107
+ this._handlingNativeChange = false;
108
+ }
109
+ };
110
+ handleKeydown(event) {
111
+ const { key } = event;
112
+ if (!['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', 'Home', 'End'].includes(key))
113
+ return;
114
+ event.preventDefault();
115
+ const radios = this.radioGroupController.sortedEnabled;
116
+ if (radios.length === 0)
117
+ return;
118
+ const currentIndex = radios.indexOf(this);
119
+ if (currentIndex === -1)
120
+ return;
121
+ let targetIndex;
122
+ if (key === 'ArrowDown' || key === 'ArrowRight') {
123
+ targetIndex = (currentIndex + 1) % radios.length;
124
+ }
125
+ else if (key === 'ArrowUp' || key === 'ArrowLeft') {
126
+ targetIndex = (currentIndex - 1 + radios.length) % radios.length;
127
+ }
128
+ else if (key === 'Home') {
129
+ targetIndex = 0;
130
+ }
131
+ else {
132
+ targetIndex = radios.length - 1;
133
+ }
134
+ const target = radios[targetIndex];
135
+ if (!target)
136
+ return;
137
+ this.radioGroupController.setFocused(target);
138
+ }
139
+ render() {
140
+ return (h(Host, { key: '0226e313fcf4fe3c3cf343cfe0776cf71da169a6' }, h("input", { key: '5bb1f733d2f29217bc7544d8fd24f6b21bedc654', type: "radio", id: this.radioId, name: this.name ?? undefined, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, autoFocus: this.autofocus, "aria-invalid": this.error ? 'true' : undefined, "aria-describedby": this.helperId, ref: (el) => (this.nativeInput = el), onChange: this.handleChange }), h("span", { key: 'ae18f49167d1a2e8e6ec4ceca435e69e3d79f593', class: "circle", "aria-hidden": "true" }, this.checked && h("span", { key: '5dfb65105831a672f2a47952aff987cd45e9b178', class: "dot" })), h("span", { key: 'df148ca52be7e580226d94ff9aef4e3cf5a6182c', class: "content" }, h("label", { key: 'e042c57755eadb64692ace49204dccb1ee03ed1c', htmlFor: this.radioId }, this.label), h("span", { key: 'a90b0bef927dddb39f9e6357adf888e0818a3c5a', "aria-live": "polite", class: "helper-text", id: this.helperId }, this.helperText))));
141
+ }
142
+ static get is() { return "lmvz-radio"; }
143
+ static get encapsulation() { return "scoped"; }
144
+ static get formAssociated() { return true; }
145
+ static get originalStyleUrls() {
146
+ return {
147
+ "$": ["./lmvz-radio.css", "../../styles/fragments/_focus-within.css"]
148
+ };
149
+ }
150
+ static get styleUrls() {
151
+ return {
152
+ "$": ["lmvz-radio.css", "../../styles/fragments/_focus-within.css"]
153
+ };
154
+ }
155
+ static get properties() {
156
+ return {
157
+ "label": {
158
+ "type": "string",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string",
162
+ "resolved": "string",
163
+ "references": {}
164
+ },
165
+ "required": true,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Label text for the radio. Required for accessibility."
170
+ },
171
+ "getter": false,
172
+ "setter": false,
173
+ "reflect": false,
174
+ "attribute": "label"
175
+ },
176
+ "checked": {
177
+ "type": "boolean",
178
+ "mutable": true,
179
+ "complexType": {
180
+ "original": "boolean",
181
+ "resolved": "boolean",
182
+ "references": {}
183
+ },
184
+ "required": false,
185
+ "optional": false,
186
+ "docs": {
187
+ "tags": [{
188
+ "name": "default",
189
+ "text": "false"
190
+ }],
191
+ "text": "Whether the radio is checked.\n\nSetting this prop programmatically (e.g. `element.checked = true`) fires `lmvzChange`\nwith the new value, unless the change occurs during native form lifecycle callbacks\n(`formResetCallback` or `formStateRestoreCallback`), in which case emission is suppressed\nto match native `<input type=\"radio\">` behavior. Internal form state is always updated\nregardless of emission suppression."
192
+ },
193
+ "getter": false,
194
+ "setter": false,
195
+ "reflect": true,
196
+ "attribute": "checked",
197
+ "defaultValue": "false"
198
+ },
199
+ "value": {
200
+ "type": "string",
201
+ "mutable": false,
202
+ "complexType": {
203
+ "original": "string",
204
+ "resolved": "string",
205
+ "references": {}
206
+ },
207
+ "required": false,
208
+ "optional": false,
209
+ "docs": {
210
+ "tags": [{
211
+ "name": "default",
212
+ "text": "'on'"
213
+ }],
214
+ "text": "Form submission value when checked."
215
+ },
216
+ "getter": false,
217
+ "setter": false,
218
+ "reflect": false,
219
+ "attribute": "value",
220
+ "defaultValue": "'on'"
221
+ },
222
+ "name": {
223
+ "type": "string",
224
+ "mutable": false,
225
+ "complexType": {
226
+ "original": "string",
227
+ "resolved": "string | undefined",
228
+ "references": {}
229
+ },
230
+ "required": false,
231
+ "optional": true,
232
+ "docs": {
233
+ "tags": [{
234
+ "name": "remarks",
235
+ "text": "A value of `\"\"` (empty string) is forwarded to the native `<input>`, but\n`RadioGroupController` treats it as unnamed \u2014 no group coordination occurs between\nradios with `name=\"\"`."
236
+ }],
237
+ "text": "Name attribute for form submission via ElementInternals.\n\nWhen multiple `lmvz-radio` elements share the same `name` and form scope,\nthe `name` is forwarded directly to the native `<input type=\"radio\">`,\nenabling browser-native mutual exclusion: selecting one radio automatically\ndeselects all others with the same name in that form. If a radio is outside\nany form, its scope defaults to the document level \u2014 same-name radios\noutside forms form a document-scoped group. Radios with the same `name` in\ndifferent forms are independent groups.\n\nThe `RadioGroupController` automatically manages roving tabindex (only the\nchecked radio has `tabindex=\"0\"`) and keyboard navigation (Arrow keys, Home, End)\nwithin the form-scoped group."
238
+ },
239
+ "getter": false,
240
+ "setter": false,
241
+ "reflect": false,
242
+ "attribute": "name"
243
+ },
244
+ "disabled": {
245
+ "type": "boolean",
246
+ "mutable": false,
247
+ "complexType": {
248
+ "original": "boolean",
249
+ "resolved": "boolean",
250
+ "references": {}
251
+ },
252
+ "required": false,
253
+ "optional": false,
254
+ "docs": {
255
+ "tags": [{
256
+ "name": "default",
257
+ "text": "false"
258
+ }],
259
+ "text": "Whether the radio is disabled."
260
+ },
261
+ "getter": false,
262
+ "setter": false,
263
+ "reflect": true,
264
+ "attribute": "disabled",
265
+ "defaultValue": "false"
266
+ },
267
+ "required": {
268
+ "type": "boolean",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "boolean",
272
+ "resolved": "boolean",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [{
279
+ "name": "default",
280
+ "text": "false"
281
+ }],
282
+ "text": "Whether the radio is required."
283
+ },
284
+ "getter": false,
285
+ "setter": false,
286
+ "reflect": true,
287
+ "attribute": "required",
288
+ "defaultValue": "false"
289
+ },
290
+ "error": {
291
+ "type": "boolean",
292
+ "mutable": false,
293
+ "complexType": {
294
+ "original": "boolean",
295
+ "resolved": "boolean",
296
+ "references": {}
297
+ },
298
+ "required": false,
299
+ "optional": false,
300
+ "docs": {
301
+ "tags": [{
302
+ "name": "default",
303
+ "text": "false"
304
+ }],
305
+ "text": "Whether the radio is in an error state."
306
+ },
307
+ "getter": false,
308
+ "setter": false,
309
+ "reflect": true,
310
+ "attribute": "error",
311
+ "defaultValue": "false"
312
+ },
313
+ "helperText": {
314
+ "type": "string",
315
+ "mutable": false,
316
+ "complexType": {
317
+ "original": "string",
318
+ "resolved": "string | undefined",
319
+ "references": {}
320
+ },
321
+ "required": false,
322
+ "optional": true,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": "Helper / description text displayed below the label."
326
+ },
327
+ "getter": false,
328
+ "setter": false,
329
+ "reflect": false,
330
+ "attribute": "helper-text"
331
+ },
332
+ "form": {
333
+ "type": "string",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "string",
337
+ "resolved": "string | undefined",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": true,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "Form id to associate with (for out-of-form usage).\nReflected to the host attribute so both HTML attribute and programmatic assignment work."
345
+ },
346
+ "getter": false,
347
+ "setter": false,
348
+ "reflect": true,
349
+ "attribute": "form"
350
+ },
351
+ "autofocus": {
352
+ "type": "boolean",
353
+ "mutable": false,
354
+ "complexType": {
355
+ "original": "boolean",
356
+ "resolved": "boolean",
357
+ "references": {}
358
+ },
359
+ "required": false,
360
+ "optional": false,
361
+ "docs": {
362
+ "tags": [{
363
+ "name": "default",
364
+ "text": "false"
365
+ }],
366
+ "text": "Whether the radio should autofocus."
367
+ },
368
+ "getter": false,
369
+ "setter": false,
370
+ "reflect": false,
371
+ "attribute": "autofocus",
372
+ "defaultValue": "false"
373
+ }
374
+ };
375
+ }
376
+ static get events() {
377
+ return [{
378
+ "method": "lmvzChange",
379
+ "name": "lmvzChange",
380
+ "bubbles": true,
381
+ "cancelable": true,
382
+ "composed": true,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": "Emitted whenever the radio checked state changes.\nEvent detail contains the new checked boolean value.\n\nEmission contract:\n- Fires `true` on user selection (native `change` event).\n- Fires on programmatic external prop transitions: `true \u2192 false` (emits `false`) and\n `false \u2192 true` (emits `true`), e.g. `element.checked = false` or `element.checked = true`.\n- Does NOT fire during browser-driven form lifecycle callbacks: `formResetCallback` and\n `formStateRestoreCallback` (autofill / session restore). This matches native `<input type=\"radio\">`\n behaviour, which does not fire `change` on form reset. Note that internal form state\n (`ElementInternals.setFormValue`) is always updated regardless of suppression \u2014 only the\n event channel is silenced.\n- Does NOT re-fire from the `@Watch('checked')` watcher during the same tick as the native\n `change` handler, preventing a double-emission when the user clicks the radio."
386
+ },
387
+ "complexType": {
388
+ "original": "boolean",
389
+ "resolved": "boolean",
390
+ "references": {}
391
+ }
392
+ }, {
393
+ "method": "lmvzActivation",
394
+ "name": "lmvzActivation",
395
+ "bubbles": true,
396
+ "cancelable": true,
397
+ "composed": true,
398
+ "docs": {
399
+ "tags": [],
400
+ "text": "Fired on every explicit user activation of this radio \u2014 via click or Space key on the\nnative input. Fires even when the radio is already checked (re-activation). Use this\nevent to react to user intent; use `lmvzChange` to react to state transitions."
401
+ },
402
+ "complexType": {
403
+ "original": "void",
404
+ "resolved": "void",
405
+ "references": {}
406
+ }
407
+ }];
408
+ }
409
+ static get methods() {
410
+ return {
411
+ "focusInput": {
412
+ "complexType": {
413
+ "signature": "() => Promise<void>",
414
+ "parameters": [],
415
+ "references": {
416
+ "Promise": {
417
+ "location": "global",
418
+ "id": "global::Promise"
419
+ }
420
+ },
421
+ "return": "Promise<void>"
422
+ },
423
+ "docs": {
424
+ "text": "Sets focus on the native radio input.",
425
+ "tags": []
426
+ }
427
+ },
428
+ "checkValidity": {
429
+ "complexType": {
430
+ "signature": "() => Promise<boolean>",
431
+ "parameters": [],
432
+ "references": {
433
+ "Promise": {
434
+ "location": "global",
435
+ "id": "global::Promise"
436
+ }
437
+ },
438
+ "return": "Promise<boolean>"
439
+ },
440
+ "docs": {
441
+ "text": "Returns whether the radio satisfies its validation constraints.",
442
+ "tags": []
443
+ }
444
+ },
445
+ "reportValidity": {
446
+ "complexType": {
447
+ "signature": "() => Promise<boolean>",
448
+ "parameters": [],
449
+ "references": {
450
+ "Promise": {
451
+ "location": "global",
452
+ "id": "global::Promise"
453
+ }
454
+ },
455
+ "return": "Promise<boolean>"
456
+ },
457
+ "docs": {
458
+ "text": "Reports validation errors to the user.",
459
+ "tags": []
460
+ }
461
+ }
462
+ };
463
+ }
464
+ static get elementRef() { return "el"; }
465
+ static get watchers() {
466
+ return [{
467
+ "propName": "checked",
468
+ "methodName": "handleCheckedChange"
469
+ }, {
470
+ "propName": "value",
471
+ "methodName": "handleValueChange"
472
+ }, {
473
+ "propName": "label",
474
+ "methodName": "handleLabelChange"
475
+ }];
476
+ }
477
+ static get listeners() {
478
+ return [{
479
+ "name": "keydown",
480
+ "method": "handleKeydown",
481
+ "target": undefined,
482
+ "capture": false,
483
+ "passive": false
484
+ }];
485
+ }
486
+ static get attachInternalsMemberName() { return "internals"; }
487
+ }
@@ -59,7 +59,7 @@
59
59
  --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1);
60
60
  --lmvz-select-label-minimized-padding-x: 4px;
61
61
  --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%);
62
- --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a);
62
+ --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454);
63
63
  --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4);
64
64
  --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #e52a31);
65
65
  }
@@ -125,8 +125,8 @@ div[aria-hidden] {
125
125
  background-color: var(--lmvz-select-bg-hover);
126
126
  }
127
127
  .select-wrapper:focus-within div[aria-hidden] {
128
- outline: 2px solid var(--lmvz-select-focus-color);
129
- outline-offset: 2px;
128
+ outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
129
+ outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
130
130
  }
131
131
  div[aria-hidden] > span:first-child {
132
132
  flex: 1 0 0;
@@ -50,7 +50,7 @@ export class LmvzSelect extends ReactiveControllerHost {
50
50
  render() {
51
51
  const hasValue = this.hasValue;
52
52
  const shouldShowLabel = hasValue;
53
- return (h(Host, { key: 'f4d3104f4022581e4661f2181eec5d56ac7027af' }, h("div", { key: '1f8b1fdf7c6d8c65390298e0cd9dca24ef4903d7', class: "select-wrapper" }, h("label", { key: 'ff7a2e509c637424387b38b163739183deda3cba', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && h("span", { key: '7e3c03652d16dd1a20628d800ccae4221062d4b8', "aria-hidden": "true" }, " *")), h("div", { key: 'a2ee01b6ddfa98565fc1c41c9b9391091d254daf', "aria-hidden": "true" }, h("span", { key: 'c96a6960f693baca0ba48b44e569ad87c1bbc980' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: '4631b13509919f7bfd0e5a1287334cd3a8412e50', "aria-hidden": "true" }, " *")), h("span", { key: '4781647ee3a6a780e4253b9f92738c4645e20578' }, h("img", { key: 'c83dab75df9ff20ec40b63f45cbe8262d1c71d7d', src: chevronDownSvg, alt: "" }))), h("select", { key: '035b19878300ac1f7b04b61157e39587782b44f7', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && h("option", { key: 'da76b299a1df9da8475e115b82d7e427cc659bfa', value: "", disabled: true, selected: true, hidden: true }), h("slot", { key: '1a91b540bc8ab97723df24c9c77d2bd52d941c92' }))), this.helperText && h("div", { key: '347fe4d805a58e03f2cb2ef427b0dba0b805e8be', role: "status" }, this.helperText)));
53
+ return (h(Host, { key: '597245455ffb9b5f83472a7970fb1c6c92017fd2' }, h("div", { key: 'edeb4d02d5a5291e60fd2d26d16edc500a355b63', class: "select-wrapper" }, h("label", { key: 'd0068817bb3586467d73284cecc03de393c37589', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && h("span", { key: '624ee28842aed8c01651c7758099bccc446840d6', "aria-hidden": "true" }, " *")), h("div", { key: '184591bc8ac11e9eed17795ce21319591e6d4211', "aria-hidden": "true" }, h("span", { key: '53e673521ed26125c24fb529d6016e3827b47a44' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: '7af1a756e3343701ad066f3c107b2028126c5f09', "aria-hidden": "true" }, " *")), h("span", { key: '6210f2069758f8579f67780530fd294210875b3f' }, h("img", { key: '05aa6cf110ba0c7eacd36f59525144c61f0705d9', src: chevronDownSvg, alt: "" }))), h("select", { key: 'dc9dfe93226858f73f1d5a655388b9ce3a5e4037', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && h("option", { key: '38ffb95d089932d0ce0c6a5629004679d3f7f857', value: "", disabled: true, selected: true, hidden: true }), h("slot", { key: '51b96884bb010b0a93f24b8b2f3f91a7b040e220' }))), this.helperText && h("div", { key: 'f7149a48024e87d2a3843d96674e45cb91fd9cf4', role: "status" }, this.helperText)));
54
54
  }
55
55
  static get is() { return "lmvz-select"; }
56
56
  static get encapsulation() { return "scoped"; }
@@ -40,7 +40,7 @@
40
40
  :host {
41
41
  display: inline-flex;
42
42
  align-items: center;
43
- gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));
43
+ gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));
44
44
  padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem));
45
45
  padding-inline: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));
46
46
  /* TODO[LDHCID-136]: min-height currently below accessibility requirements for tap targets (44px) */
@@ -54,10 +54,10 @@
54
54
  background-color: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0);
55
55
  }
56
56
  :host([checked]) {
57
- background-color: var(--lmvz-semantic-color-status-active, #f1f9fe);
57
+ background-color: var(--lmvz-semantic-color-status-active, #f6fbfe);
58
58
  }
59
59
  :host([disabled][checked]) {
60
- background-color: var(--lmvz-semantic-color-status-active, #f1f9fe);
60
+ background-color: var(--lmvz-semantic-color-status-active, #f6fbfe);
61
61
  }
62
62
  :host([disabled]) {
63
63
  cursor: not-allowed;
@@ -90,17 +90,12 @@ input {
90
90
  margin: 0;
91
91
  cursor: inherit;
92
92
  }
93
- :host(:focus-within) {
94
- /* TODO[LDHCID-136]: no focus-visible token in DS */
95
- outline: 2px solid var(--lmvz-semantic-color-border-active, #0f8acc);
96
- outline-offset: 2px;
97
- }
98
93
  .thumb {
99
94
  position: absolute;
100
95
  width: var(--lmvz-global-s13, 13px);
101
96
  height: var(--lmvz-global-s13, 13px);
102
97
  border-radius: 50%;
103
- background-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a);
98
+ background-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454);
104
99
  top: 50%;
105
100
  transform: translateY(-50%);
106
101
  left: var(--lmvz-global-s4, 4px);
@@ -65,19 +65,19 @@ export class LmvzToggle extends ReactiveControllerHost {
65
65
  this.lmvzChange.emit(newChecked);
66
66
  };
67
67
  render() {
68
- return (h(Host, { key: 'b7d3c3d2ae30744669032797b2fefcd1e7fe0b61' }, h("span", { key: '93dc128b588e19a5e322cb93efae33669375709a', class: "track" }, h("input", { key: '80650720ac6276f7c8996e071d8104e98002e06e', type: "checkbox", role: "switch", id: this.toggleId, checked: this.checked, disabled: this.disabled, required: this.required, name: this.name, value: this.value, form: this.form, ref: (el) => (this.nativeInputElement = el), onChange: this.handleChange }), h("span", { key: '59838c27a032d7a116faea67fa1dc75cf9ee92cd', class: "thumb", "aria-hidden": "true" })), h("label", { key: '809057cf268adf05c8163a802a6020dca9b666b9', htmlFor: this.toggleId }, this.label)));
68
+ return (h(Host, { key: '4bb633301740c3e69a836615e2266242980ac17a' }, h("span", { key: 'cc7188d8e2caff2968ad6c64c72565a71c89ec74', class: "track" }, h("input", { key: '867f7865711b9224b89f0f491df8a19589342729', type: "checkbox", role: "switch", id: this.toggleId, checked: this.checked, disabled: this.disabled, required: this.required, name: this.name, value: this.value, form: this.form, ref: (el) => (this.nativeInputElement = el), onChange: this.handleChange }), h("span", { key: '426ee9f042afcc3d74b2137d2edbe95573b3c136', class: "thumb", "aria-hidden": "true" })), h("label", { key: '600cb22f2915d86edafa9ac57b77707055f6ae16', htmlFor: this.toggleId }, this.label)));
69
69
  }
70
70
  static get is() { return "lmvz-toggle"; }
71
71
  static get encapsulation() { return "scoped"; }
72
72
  static get formAssociated() { return true; }
73
73
  static get originalStyleUrls() {
74
74
  return {
75
- "$": ["./lmvz-toggle.css"]
75
+ "$": ["./lmvz-toggle.css", "../../styles/fragments/_focus-within.css"]
76
76
  };
77
77
  }
78
78
  static get styleUrls() {
79
79
  return {
80
- "$": ["lmvz-toggle.css"]
80
+ "$": ["lmvz-toggle.css", "../../styles/fragments/_focus-within.css"]
81
81
  };
82
82
  }
83
83
  static get properties() {
@@ -20,7 +20,7 @@ export class HeaderIntegration {
20
20
  this.activeNav = navId;
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: 'b05ae15bbbfab76ce0ace63899049a848cd6eb32' }, h("lmvz-header", { key: 'bfa73e270d5ceefa5ca86af7bcb09b8f342b9dd2', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: 'b8f5a5b2bfe038c6473f2c8c6c99593b6c20678a', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '16d87cdf2d6a00ac158d691a673fed4c46fe074b', href: "#" }, "Lehrmittel")), h("lmvz-menuitem", { key: 'a52a8108ca53205e5e67902af2ed74c84c5d4c9a', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '0b3f5ebbe9c2b9c666915268ed78263b22801568', href: "#" }, "Verwaltung")), h("lmvz-menuitem", { key: '9fb9cf48b4301473b6c233017afe9d23ab3618e9', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '5a80aa152c4d49af083025574c2453f87435ed8b', ...typedIconFromSet('lmvz', 'edit') }), "Deutsch 7"), h("lmvz-menuitem", { key: 'b09687d5ae802a6641c812487f77f4ce751c1ce9', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '9591aa516a86c4a7ce783f5ef2ab5bba6c631d8c', ...typedIconFromSet('lmvz', 'edit') }), "Mathe 2"), h("lmvz-menuitem", { key: 'deca565d53046f5718613f6d859beba55e0cb945', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: '0db15758c2b9858472223040cbadfcfe2548b706', ...typedIconFromSet('lmvz', 'settings') }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: 'f4c0eeb31d7999fe9bcfc79c4c0be3f269b920a5', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: 'a5ad09f10d2832d37a443a058be5fe2c3cecc9a5', ...typedIconFromSet('lmvz', 'settings') })), h("lmvz-button", { key: 'b4095e8c92187525a6b085c6c38dccf241f7d02d', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: '5a913204d7b28e5968aa487230d3e5958df206e4', ...typedIconFromSet('lmvz', 'user'), size: "lg" })))));
23
+ return (h(Host, { key: '7c381821f1839fd61368f10878fcd77a89e3f6fc' }, h("lmvz-header", { key: '93d1b351824b01b0124e0c038c569f959f8a449a', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: '96db71af9361829426af3cf431d481f5a2f6678a', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '0e0110287b032895b72b76f00226c95d795feeea', href: "#" }, "Lehrmittel")), h("lmvz-menuitem", { key: '42edf9a666a8f3a6603d323190135607466ae75f', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, h("a", { key: '507b858cf867eb3568f470baeca0be664f717c46', href: "#" }, "Verwaltung")), h("lmvz-menuitem", { key: '7adaa0324fa4996965bc5d3a148dcc17238ce3ba', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'adb86d8a2fc921a5205f78c101beb51b8926a4be', ...typedIconFromSet('lmvz', 'edit') }), "Deutsch 7"), h("lmvz-menuitem", { key: 'bc65dc75f17dca9859234c29b327166da04ed37f', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: '506530a75db127cb3aab58b3d9628af618c0e628', ...typedIconFromSet('lmvz', 'edit') }), "Mathe 2"), h("lmvz-menuitem", { key: '6618dfb601a99f6ef60631ff7ef51daaeb770aba', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: '9bc773a8378b4dc711c6874675c0ffb6bda47335', ...typedIconFromSet('lmvz', 'settings') }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: 'c3becfeba08589f33a6530e77928121b88eb1aa0', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: 'a7ddd7b3f99d496591cccc79bebcaeec8a27db9f', ...typedIconFromSet('lmvz', 'settings') })), h("lmvz-button", { key: '16454fea1422c61ecdabf4190b494a993b7affd2', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: '9b467e5187d1b7e39752554611c51ccb844f79da', ...typedIconFromSet('lmvz', 'user'), size: "lg" })))));
24
24
  }
25
25
  static get is() { return "header-integration"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,13 @@
1
+ :host(:focus-within) {
2
+ outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
3
+ outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
4
+ }
5
+
6
+ /* Forced Colors / Windows High Contrast */
7
+
8
+ @media (forced-colors: active) {
9
+ :host(:focus-within) {
10
+ outline-color: Highlight;
11
+ box-shadow: none;
12
+ }
13
+ }