@lmvz-ds/components 0.35.2 → 0.36.1
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 +18 -0
- package/assets/icons/calendar.svg +7 -0
- package/cjs/{aria-validation-controller-BC0Eaiv4.js → aria-validation-controller-Do0uEK4t.js} +1 -1
- package/cjs/aria.constants-DPK5mQEL.js +65 -0
- package/cjs/{directional-focus-controller-DBat-oF7.js → directional-focus-controller-8Xd_7MHT.js} +3 -1
- package/cjs/{element-activation-controller-BHqCUgQv.js → element-activation-controller-DzTUocEO.js} +1 -1
- package/cjs/{element.util-CRS_YJ59.js → element.util-BlhcwmfR.js} +8 -54
- package/cjs/{index-TGsVZNDP.js → index-BgvZ4y-3.js} +12 -0
- package/cjs/lmvz-action-list.cjs.entry.js +5 -4
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +3 -2
- package/cjs/lmvz-button_2.cjs.entry.js +6 -5
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +40 -6
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +2771 -0
- package/cjs/lmvz-header_2.cjs.entry.js +7 -6
- package/cjs/lmvz-input.cjs.entry.js +71 -15
- package/cjs/lmvz-link.cjs.entry.js +2 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +6 -5
- package/cjs/lmvz-message.cjs.entry.js +2 -2
- package/cjs/lmvz-modal.cjs.entry.js +5 -4
- package/cjs/lmvz-popover.cjs.entry.js +25 -10
- package/cjs/lmvz-radio.cjs.entry.js +63 -5
- package/cjs/lmvz-select.cjs.entry.js +425 -18
- package/cjs/lmvz-snackbar.cjs.entry.js +2 -2
- package/cjs/lmvz-spinner.cjs.entry.js +2 -2
- package/cjs/lmvz-tab.cjs.entry.js +2 -2
- package/cjs/lmvz-tabs.cjs.entry.js +5 -4
- package/cjs/lmvz-toggle.cjs.entry.js +7 -4
- package/cjs/loader.cjs.js +2 -2
- package/collection/assets/icons/calendar.svg +7 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +4 -2
- package/collection/components/lmvz-checkbox/lmvz-checkbox.js +68 -8
- package/collection/components/lmvz-datepicker/lmvz-datepicker.css +161 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.js +1002 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.utils.js +189 -0
- package/collection/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.js +300 -0
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-input/lmvz-input.css +1 -1
- package/collection/components/lmvz-input/lmvz-input.js +85 -12
- package/collection/components/lmvz-link/lmvz-link.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-message/lmvz-message.js +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +50 -6
- package/collection/components/lmvz-radio/lmvz-radio.js +77 -9
- package/collection/components/lmvz-select/lmvz-select.css +96 -34
- package/collection/components/lmvz-select/lmvz-select.js +412 -21
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +1 -1
- package/collection/components/lmvz-spinner/lmvz-spinner.js +1 -1
- package/collection/components/lmvz-tab/lmvz-tab.js +1 -1
- package/collection/components/lmvz-tabs/lmvz-tabs.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.js +21 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/styles/fragments/_focus-within.css +2 -2
- package/collection/utils/aria/aria.constants.js +7 -0
- package/collection/utils/aria/directional-focus-controller.js +3 -1
- package/collection/utils/aria/listbox-controller.js +154 -0
- package/collection/utils/element/element.util.js +5 -0
- package/collection/utils/radio/radio-group-controller.js +17 -0
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -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.d.ts +11 -0
- package/components/lmvz-datepicker.d.ts.bak +11 -0
- package/components/lmvz-datepicker.js +1 -0
- 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-Chj7BuUZ.js → p--FDdvoIg.js} +1 -1
- package/components/{p-CFTmV4XZ.js → p-BAj4FkUt.js} +1 -1
- package/components/p-BApwCp0R.js +1 -0
- package/components/{p-CxLd309t.js → p-BLMXiDE0.js} +1 -1
- package/components/{p-DGg7OzDl.js → p-BPYBmylI.js} +1 -1
- package/components/p-BhALzK62.js +1 -0
- package/components/{p-B_rnXUwq.js → p-Bnri3fEI.js} +1 -1
- package/components/p-C-pRMuMh.js +1 -0
- package/components/p-C5gRiLRR.js +1 -0
- package/components/{p-D5FL8n1q.js → p-CrQCHVKL.js} +1 -1
- package/components/p-DqdrUt_G.js +1 -0
- package/components/{p-CgK6-SEe.js → p-diOze8wI.js} +1 -1
- package/esm/{aria-validation-controller-BvOU1BO8.js → aria-validation-controller-Cp6pofER.js} +1 -1
- package/esm/aria.constants-DIyiticz.js +62 -0
- package/esm/{directional-focus-controller-DgAdCZrG.js → directional-focus-controller-QukTTWBE.js} +3 -1
- package/esm/{element-activation-controller-7PNSl6io.js → element-activation-controller-dxJZKMag.js} +1 -1
- package/esm/{element.util-BFcYfHYq.js → element.util-3ydVsxUW.js} +7 -54
- package/esm/{index-BPeerEwm.js → index-BOXP1Vx0.js} +12 -1
- package/esm/lmvz-action-list.entry.js +5 -4
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +3 -2
- package/esm/lmvz-button_2.entry.js +6 -5
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +40 -6
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +2769 -0
- package/esm/lmvz-header_2.entry.js +7 -6
- package/esm/lmvz-input.entry.js +71 -15
- package/esm/lmvz-link.entry.js +2 -2
- package/esm/lmvz-menuitem.entry.js +6 -5
- package/esm/lmvz-message.entry.js +2 -2
- package/esm/lmvz-modal.entry.js +5 -4
- package/esm/lmvz-popover.entry.js +25 -10
- package/esm/lmvz-radio.entry.js +63 -5
- package/esm/lmvz-select.entry.js +425 -18
- package/esm/lmvz-snackbar.entry.js +2 -2
- package/esm/lmvz-spinner.entry.js +2 -2
- package/esm/lmvz-tab.entry.js +2 -2
- package/esm/lmvz-tabs.entry.js +5 -4
- package/esm/lmvz-toggle.entry.js +7 -4
- package/esm/loader.js +3 -3
- package/hydrate/index.js +3474 -75
- package/hydrate/index.mjs +3474 -75
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-eb62d4af.entry.js → p-0af0211a.entry.js} +1 -1
- package/lmvz-components/{p-5bbbcfc0.entry.js → p-0f65d001.entry.js} +1 -1
- package/lmvz-components/p-137b1fe1.entry.js +1 -0
- package/lmvz-components/p-26dd9684.entry.js +1 -0
- package/lmvz-components/p-36f44108.entry.js +1 -0
- package/lmvz-components/p-398b5cf4.entry.js +1 -0
- package/lmvz-components/p-3a396fc8.entry.js +1 -0
- package/lmvz-components/{p-0c05f24b.entry.js → p-3d5867df.entry.js} +1 -1
- package/lmvz-components/p-40716828.entry.js +1 -0
- package/lmvz-components/{p-a887018d.entry.js → p-492adf21.entry.js} +1 -1
- package/lmvz-components/{p-24d13be6.entry.js → p-4fa6e72f.entry.js} +1 -1
- package/lmvz-components/p-70f1e31a.entry.js +1 -0
- package/lmvz-components/p-71d06d1d.entry.js +1 -0
- package/lmvz-components/{p-d45164a8.entry.js → p-7a7aa922.entry.js} +1 -1
- package/lmvz-components/p-88661c50.entry.js +1 -0
- package/lmvz-components/p-91eb71bb.entry.js +1 -0
- package/lmvz-components/p-BA3wizqg.js +1 -0
- package/lmvz-components/{p-BPeerEwm.js → p-BOXP1Vx0.js} +2 -2
- package/lmvz-components/{p-D9PQIBzA.js → p-BeY96W7m.js} +1 -1
- package/lmvz-components/p-CHxiS3ja.js +1 -0
- package/lmvz-components/{p-wlMjNjuv.js → p-CPSyM_e-.js} +1 -1
- package/lmvz-components/p-DIyiticz.js +1 -0
- package/lmvz-components/p-a680a7b2.entry.js +1 -0
- package/lmvz-components/{p-c2544495.entry.js → p-a6fe9b61.entry.js} +1 -1
- package/lmvz-components/{p-ecbd9e93.entry.js → p-a99acb02.entry.js} +1 -1
- package/lmvz-components/p-f16a19fc.entry.js +1 -0
- package/lmvz-components/p-f3f0ed49.entry.js +1 -0
- package/lmvz-components/p-f516a949.entry.js +1 -0
- package/manifest.json +1305 -188
- package/package.json +5 -1
- package/types/api/ds.constants.d.ts +0 -1
- package/types/api/ds.types.d.ts +9 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +0 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +0 -1
- package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +9 -2
- package/types/components/lmvz-chip/lmvz-chip.d.ts +0 -1
- package/types/components/lmvz-datepicker/lmvz-datepicker.d.ts +77 -0
- package/types/components/lmvz-datepicker/lmvz-datepicker.utils.d.ts +22 -0
- package/types/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
- package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +8 -1
- package/types/components/lmvz-link/lmvz-link.d.ts +0 -1
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
- package/types/components/lmvz-message/lmvz-message.d.ts +0 -1
- package/types/components/lmvz-message/public.d.ts +0 -1
- package/types/components/lmvz-modal/lmvz-modal.d.ts +0 -1
- package/types/components/lmvz-modal/test/testing.d.ts +0 -1
- package/types/components/lmvz-popover/lmvz-popover.d.ts +2 -1
- package/types/components/lmvz-radio/lmvz-radio.d.ts +12 -3
- package/types/components/lmvz-select/lmvz-select.d.ts +53 -5
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +0 -1
- package/types/components/lmvz-snackbar/public.d.ts +0 -1
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +0 -1
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +0 -1
- package/types/components/lmvz-tab/lmvz-tab.d.ts +0 -1
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +0 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +1 -1
- package/types/components.d.ts +312 -12
- package/types/index.d.ts +0 -1
- package/types/utils/aria/aria-validation-controller.d.ts +0 -1
- package/types/utils/aria/aria.constants.d.ts +1 -1
- package/types/utils/aria/directional-focus-controller.d.ts +0 -1
- package/types/utils/aria/element-activation-controller.d.ts +0 -1
- package/types/utils/aria/listbox-controller.d.ts +42 -0
- package/types/utils/async/async.util.d.ts +1 -2
- package/types/utils/data/event.util.d.ts +0 -1
- package/types/utils/data/number.util.d.ts +0 -1
- package/types/utils/data/object.util.d.ts +0 -1
- package/types/utils/data/time.util.d.ts +0 -1
- package/types/utils/element/element.util.d.ts +1 -1
- package/types/utils/environment.d.ts +0 -1
- package/types/utils/icons/icons-registry.d.ts +0 -1
- package/types/utils/icons/icons.d.ts +0 -1
- package/types/utils/icons/icons.unit.d.ts +0 -1
- package/types/utils/icons/public.d.ts +0 -1
- package/types/utils/public.d.ts +0 -1
- package/types/utils/radio/radio-group-controller.d.ts +3 -1
- package/types/utils/stencil/assets.d.ts +0 -1
- package/types/utils/stencil/reactive-controller-host.d.ts +0 -1
- package/types/utils/stencil/stencil.util.d.ts +0 -1
- package/components/p-DLUsBYJH.js +0 -1
- package/components/p-zMWemcoB.js +0 -1
- package/lmvz-components/p-194a3af5.entry.js +0 -1
- package/lmvz-components/p-46edf36f.entry.js +0 -1
- package/lmvz-components/p-5ff55ba9.entry.js +0 -1
- package/lmvz-components/p-888e04d7.entry.js +0 -1
- package/lmvz-components/p-9dc420e2.entry.js +0 -1
- package/lmvz-components/p-BFcYfHYq.js +0 -1
- package/lmvz-components/p-BuEA0MWd.js +0 -1
- package/lmvz-components/p-aaa7691c.entry.js +0 -1
- package/lmvz-components/p-b6dd045b.entry.js +0 -1
- package/lmvz-components/p-c3e62aba.entry.js +0 -1
- package/lmvz-components/p-d4154a65.entry.js +0 -1
- package/lmvz-components/p-e4ce63b3.entry.js +0 -1
- package/lmvz-components/p-eb4c5a6f.entry.js +0 -1
- package/lmvz-components/p-f42b16e6.entry.js +0 -1
- package/lmvz-components/p-fbf066d9.entry.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { AriaValidationController } from "../../utils/aria/aria-validation-controller";
|
|
4
|
+
import { ariaHostMirrorAttributes } from "../../utils/aria/aria.constants";
|
|
4
5
|
import { ReactiveControllerHost } from "../../utils/stencil/reactive-controller-host";
|
|
5
6
|
import { componentOnReady } from "../../utils/stencil/stencil.util";
|
|
6
7
|
let inputIdCounter = 0;
|
|
@@ -11,9 +12,11 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
11
12
|
}
|
|
12
13
|
lmvzInput;
|
|
13
14
|
internals;
|
|
15
|
+
inputValidityActive = false;
|
|
14
16
|
nativeInputElement;
|
|
15
17
|
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
16
18
|
initialValue = '';
|
|
19
|
+
ariaHostMirrorObserver;
|
|
17
20
|
nativeError = false;
|
|
18
21
|
errorFromProp = false;
|
|
19
22
|
get helperId() {
|
|
@@ -66,7 +69,7 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
66
69
|
async setValue(newValue) {
|
|
67
70
|
const input = this.nativeInputElement;
|
|
68
71
|
const val = newValue ?? '';
|
|
69
|
-
if (input) {
|
|
72
|
+
if (input && input.value !== val) {
|
|
70
73
|
input.value = val;
|
|
71
74
|
}
|
|
72
75
|
this.value = val;
|
|
@@ -88,6 +91,9 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
88
91
|
async reportValidity() {
|
|
89
92
|
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
90
93
|
}
|
|
94
|
+
async getValidationMessage() {
|
|
95
|
+
return this.nativeInputElement?.validationMessage ?? '';
|
|
96
|
+
}
|
|
91
97
|
async getInputElement() {
|
|
92
98
|
if (!this.nativeInputElement) {
|
|
93
99
|
await new Promise((resolve) => componentOnReady(this.el, resolve));
|
|
@@ -104,14 +110,54 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
104
110
|
this.initialValue = this.value ?? '';
|
|
105
111
|
super.componentWillLoad();
|
|
106
112
|
}
|
|
113
|
+
connectedCallback() {
|
|
114
|
+
super.connectedCallback();
|
|
115
|
+
this.ariaHostMirrorObserver = new MutationObserver((mutations) => {
|
|
116
|
+
for (const mutation of mutations) {
|
|
117
|
+
this.mirrorHostAriaAttribute(mutation.attributeName);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
this.ariaHostMirrorObserver.observe(this.el, {
|
|
121
|
+
attributes: true,
|
|
122
|
+
attributeFilter: [...ariaHostMirrorAttributes],
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
disconnectedCallback() {
|
|
126
|
+
super.disconnectedCallback();
|
|
127
|
+
this.ariaHostMirrorObserver?.disconnect();
|
|
128
|
+
this.ariaHostMirrorObserver = undefined;
|
|
129
|
+
}
|
|
130
|
+
componentDidLoad() {
|
|
131
|
+
super.componentDidLoad();
|
|
132
|
+
for (const attr of ariaHostMirrorAttributes) {
|
|
133
|
+
this.mirrorHostAriaAttribute(attr);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
mirrorHostAriaAttribute(attr) {
|
|
137
|
+
if (!attr || !this.nativeInputElement)
|
|
138
|
+
return;
|
|
139
|
+
if (this.el.hasAttribute(attr)) {
|
|
140
|
+
const value = this.el.getAttribute(attr);
|
|
141
|
+
if (value !== null) {
|
|
142
|
+
this.nativeInputElement.setAttribute(attr, value);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.nativeInputElement.removeAttribute(attr);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
107
149
|
formAssociatedCallback(form) {
|
|
108
150
|
if (!form)
|
|
109
151
|
return;
|
|
110
152
|
this.internals.setFormValue?.(this.value ?? '');
|
|
111
153
|
}
|
|
112
154
|
formResetCallback() {
|
|
155
|
+
this.inputValidityActive = false;
|
|
113
156
|
this.internals.setValidity({});
|
|
114
157
|
this.setValue(this.initialValue);
|
|
158
|
+
if (this.nativeInputElement?.checkValidity?.()) {
|
|
159
|
+
this.nativeError = false;
|
|
160
|
+
}
|
|
115
161
|
}
|
|
116
162
|
formStateRestoreCallback(state) {
|
|
117
163
|
this.setValue(state);
|
|
@@ -125,35 +171,45 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
125
171
|
this.setValue(newValue);
|
|
126
172
|
}
|
|
127
173
|
handleDisabledChange(disabled) {
|
|
128
|
-
if (
|
|
174
|
+
if (!this.nativeInputElement)
|
|
175
|
+
return;
|
|
176
|
+
if (disabled) {
|
|
129
177
|
this.nativeInputElement.blur();
|
|
130
178
|
}
|
|
179
|
+
else {
|
|
180
|
+
this.inputValidityActive = false;
|
|
181
|
+
}
|
|
131
182
|
}
|
|
132
183
|
handleInput = (event) => {
|
|
133
184
|
const input = event.target;
|
|
134
185
|
this.setValue(input.value);
|
|
186
|
+
if (!this.inputValidityActive)
|
|
187
|
+
return;
|
|
188
|
+
this.updateNativeError('input');
|
|
135
189
|
};
|
|
136
190
|
handleChange = (event) => {
|
|
137
|
-
const input = event.target ?? this.nativeInputElement;
|
|
138
|
-
this.updateNativeError(input);
|
|
139
191
|
};
|
|
140
192
|
handleFocus = () => { };
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
193
|
+
handleInvalid = () => this.updateNativeError('invalid');
|
|
194
|
+
handleBlur = () => {
|
|
195
|
+
this.inputValidityActive = true;
|
|
196
|
+
this.updateNativeError('blur');
|
|
144
197
|
};
|
|
145
|
-
updateNativeError(
|
|
146
|
-
const input =
|
|
198
|
+
updateNativeError(sourceEvent) {
|
|
199
|
+
const input = this.nativeInputElement;
|
|
147
200
|
if (!input)
|
|
148
201
|
return;
|
|
149
|
-
|
|
202
|
+
const newState = sourceEvent === 'invalid' ? true : !(input.checkValidity?.() ?? true);
|
|
203
|
+
if (this.nativeError === newState)
|
|
204
|
+
return;
|
|
205
|
+
this.nativeError = newState;
|
|
150
206
|
}
|
|
151
207
|
render() {
|
|
152
208
|
const hasValue = Boolean(this.value);
|
|
153
209
|
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
154
|
-
return (h("div", { key: '
|
|
210
|
+
return (h("div", { key: '626697f00e9ba3ad46e6304d06b04df0f27bb2c2', class: classNames('input-container', {
|
|
155
211
|
'interaction-filled': hasValue,
|
|
156
|
-
}) }, h("div", { key: '
|
|
212
|
+
}) }, h("div", { key: '25ec1f448b689ff80defded1323f321d95d6b197', class: "input-wrapper" }, h("slot", { key: '1d5f301e0327b4cd1714f403615f94658a754466', name: "before-input" }), h("div", { key: 'ef553e6e8f6b74a5bb7cddef003d3b51650c7c9d', class: "label-input-group" }, h("label", { key: '17d92ff7c65598739e8a379680580561936e21dc', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (h("span", { key: 'cd40da3c85cc6cea49d7d8d270bba317534779f5', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), h("input", { key: '3ede0644d383c2a3f702230de2aac6fbcb2c7a06', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onInvalid: this.handleInvalid })), h("slot", { key: 'b282c5d9553b72af7fd05ed0f872af0d7b8a5689', name: "after-input" })), h("div", { key: 'da6008e798cb5ee29fa7d1ba3208057c1845a217', id: this.helperId, role: "status" }, this.helperText || null), h("div", { key: '5e7717a2d0dd32c53dd7ba6e170152239f3bfae9', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
157
213
|
}
|
|
158
214
|
static get is() { return "lmvz-input"; }
|
|
159
215
|
static get encapsulation() { return "scoped"; }
|
|
@@ -849,6 +905,23 @@ export class LmvzInput extends ReactiveControllerHost {
|
|
|
849
905
|
"tags": []
|
|
850
906
|
}
|
|
851
907
|
},
|
|
908
|
+
"getValidationMessage": {
|
|
909
|
+
"complexType": {
|
|
910
|
+
"signature": "() => Promise<string>",
|
|
911
|
+
"parameters": [],
|
|
912
|
+
"references": {
|
|
913
|
+
"Promise": {
|
|
914
|
+
"location": "global",
|
|
915
|
+
"id": "global::Promise"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
"return": "Promise<string>"
|
|
919
|
+
},
|
|
920
|
+
"docs": {
|
|
921
|
+
"text": "Returns the current validation message, if any.",
|
|
922
|
+
"tags": []
|
|
923
|
+
}
|
|
924
|
+
},
|
|
852
925
|
"getInputElement": {
|
|
853
926
|
"complexType": {
|
|
854
927
|
"signature": "() => Promise<HTMLInputElement | undefined>",
|
|
@@ -44,7 +44,7 @@ export class LmvzLink {
|
|
|
44
44
|
const rel = this.computeRel();
|
|
45
45
|
const iconSvg = this.type === 'external' ? EXTERNAL_SVG : ARROW_RIGHT_SVG;
|
|
46
46
|
const isBlank = this.target === '_blank';
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'ee4f5c107243ff858f9189840e56a0525fdac782' }, h("a", { key: '28229373bec276579c2bb7b9fcf254872baae9e8', href: this.computeHref(), target: this.target, rel: rel }, h("slot", { key: '7c58f3f7501e457ee4a35d2a9f2bf80ed0c33fb0' }), h("lmvz-icon", { key: '14784743d148d57e7c83da0f92ba96e4bb3a30a1', "aria-hidden": "true", icon: iconSvg }), isBlank && h("span", { key: 'f72adde57b462282d1a8313e2eb06cf6b68c2697', class: "sr-only" }, this.externalLabel))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "lmvz-link"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class LmvzMenuItem extends ReactiveControllerHost {
|
|
|
21
21
|
this.addController(new ElementActivationController(this));
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'cd5814d6bcfa9b0f5b1b2f5108ce0fc65722b909' }, h("slot", { key: 'b503b252c95bc09ca4b888d4576badd3976292e9', ref: (e) => (this.validationSlot = e) })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "lmvz-menuitem"; }
|
|
27
27
|
static get encapsulation() { return "scoped"; }
|
|
@@ -93,7 +93,7 @@ export class LmvzMessage {
|
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
95
|
const role = this.live === 'assertive' ? 'alert' : this.live === 'polite' ? 'status' : 'note';
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '1c45cf27f057535ffff047548a3d6681dd487d3c', role: role }, this.leadingIcon && h("span", { key: '8efab69f677dfaa06d333aa304479e17e6d60ad6', class: "leading-icon", "aria-hidden": "true", innerHTML: TYPE_SVG[this.type] }), h("span", { key: '2e88e9053444e2aae23341b7cba923c7c440ff64', class: "message" }, h("slot", { key: 'd6b0ee6c95846a1de97e0e6ed707001c29c78c92', ref: (el) => (this.messageSlot = el), onSlotchange: this.handleSlotChange })), this.actionLabel && (h("lmvz-button", { key: 'c55e38e274e98c8ac584ae16520fb0cab5e11d17', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel)), this.dismissible && (h("lmvz-button", { key: '1ae69fefbb23cd8a219aee1d624e9d7779ae0c08', variant: "tertiary", scale: "small", "aria-label": this.closeLabel, onClick: this.handleDismissClick }, h("lmvz-icon", { key: '572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc', "aria-hidden": "true", icon: CLOSE_SM_SVG })))));
|
|
97
97
|
}
|
|
98
98
|
static get is() { return "lmvz-message"; }
|
|
99
99
|
static get encapsulation() { return "shadow"; }
|
|
@@ -223,7 +223,7 @@ export class LmvzModal extends ReactiveControllerHost {
|
|
|
223
223
|
this.hasHeader = this.hasAssignedContent(this.headerSlot);
|
|
224
224
|
};
|
|
225
225
|
render() {
|
|
226
|
-
return (h(Host, { key: '
|
|
226
|
+
return (h(Host, { key: '9eb1aa89e4c682586d10291e2a8a2523b8fd17f7' }, h("dialog", { key: '477c537328622f85759dc72a0c499d56e3d5e345', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, h("div", { key: 'b9fe9cb306938a117002e5213740ea20269080b8', class: "modal-shell" }, h("header", { key: '34d0cd8078d55d98ec526843f02710044663de70', class: { header: true, 'has-title': this.hasHeader } }, h("div", { key: '1408f0e0875f5e0508ad0f5682f4879a93df65df', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, h("slot", { key: '735c1757962e4f3804700a4669d0b49f2d11fb16', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), h("lmvz-button", { key: 'b0eb76cde508fb434023abdc0f764e1b809b6447', ref: (element) => (this.closeButtonEl = element), type: "button", class: "close-button", "aria-label": this.closeLabel, onLmvzActivation: this.handleCloseButtonClick, variant: "tertiary" }, h("lmvz-icon", { key: '9f978d3117a4046202c3ba1df39aa0c7afc7ee28', icon: closeIconSvg }))), h("div", { key: '46ffd7e7315099189c0a2499d17bdeabeb0e46e5', class: "body" }, h("slot", { key: '095c3353f2ea00f6fa765ac0972ee0123f8e4154' })), h("footer", { key: '5b092b00f10acede66d0fac53f01584ecf528418', class: "actions", hidden: !this.buttonGroupEl?.hasActions }, h("lmvz-button-group", { key: 'ce312e1b1c3407838b8704f20393e7120d6338f9', ref: (element) => (this.buttonGroupEl = element) }, h("slot", { key: '6246782cbee1cc440cfdaf45dac36655f19c972e', name: "actions" })))))));
|
|
227
227
|
}
|
|
228
228
|
static get is() { return "lmvz-modal"; }
|
|
229
229
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,6 +18,7 @@ export class LmvzPopover {
|
|
|
18
18
|
placement = 'bottom-start';
|
|
19
19
|
size = 'sm';
|
|
20
20
|
autoFocus = true;
|
|
21
|
+
containerRole = 'dialog';
|
|
21
22
|
label;
|
|
22
23
|
lmvzOpen;
|
|
23
24
|
lmvzClose;
|
|
@@ -38,6 +39,7 @@ export class LmvzPopover {
|
|
|
38
39
|
}
|
|
39
40
|
componentDidLoad() {
|
|
40
41
|
autoAssignId(this.el);
|
|
42
|
+
this.syncContainerId();
|
|
41
43
|
}
|
|
42
44
|
handleOpenChange(isOpen) {
|
|
43
45
|
if (isOpen) {
|
|
@@ -64,16 +66,26 @@ export class LmvzPopover {
|
|
|
64
66
|
this.removeCloseHandlers();
|
|
65
67
|
this.extEventController.abort();
|
|
66
68
|
}
|
|
69
|
+
syncContainerId() {
|
|
70
|
+
const hostId = this.el.getAttribute('id');
|
|
71
|
+
if (!hostId || !this.containerEl)
|
|
72
|
+
return;
|
|
73
|
+
this.containerEl.id = hostId;
|
|
74
|
+
}
|
|
67
75
|
setupAnchorEl() {
|
|
68
76
|
const { anchorEl } = this;
|
|
69
77
|
if (!anchorEl) {
|
|
70
78
|
console.warn('no anchor element set for', this);
|
|
71
79
|
return;
|
|
72
80
|
}
|
|
81
|
+
this.syncContainerId();
|
|
73
82
|
if (!anchorEl.hasAttribute('aria-haspopup')) {
|
|
74
|
-
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
83
|
+
anchorEl.setAttribute('aria-haspopup', this.containerRole === 'dialog' ? 'dialog' : this.containerRole);
|
|
84
|
+
}
|
|
85
|
+
anchorEl.setAttribute('aria-controls', this.containerEl?.id || this.el.getAttribute('id'));
|
|
86
|
+
if (!anchorEl.hasAttribute('aria-expanded')) {
|
|
87
|
+
anchorEl.setAttribute('aria-expanded', this.open ? 'true' : 'false');
|
|
75
88
|
}
|
|
76
|
-
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
77
89
|
if (isActionButton(anchorEl)) {
|
|
78
90
|
addElementActivationListener(anchorEl, this.toggle.bind(this), this.extEventController.signal);
|
|
79
91
|
}
|
|
@@ -98,10 +110,11 @@ export class LmvzPopover {
|
|
|
98
110
|
await waitFrame();
|
|
99
111
|
await this.updatePosition();
|
|
100
112
|
autoAssignId(this.el);
|
|
113
|
+
this.syncContainerId();
|
|
101
114
|
this.applyAnchorAriaOpen();
|
|
102
115
|
this.lmvzOpen.emit();
|
|
103
116
|
await waitFrame();
|
|
104
|
-
if (this.autoFocus) {
|
|
117
|
+
if (this.autoFocus && this.containerRole === 'dialog') {
|
|
105
118
|
this.focusFirst();
|
|
106
119
|
}
|
|
107
120
|
}
|
|
@@ -159,7 +172,8 @@ export class LmvzPopover {
|
|
|
159
172
|
document.addEventListener('mousedown', (event) => {
|
|
160
173
|
if (!this.open)
|
|
161
174
|
return;
|
|
162
|
-
|
|
175
|
+
const mouseTarget = (event.target?.shadowRoot ?? document).elementFromPoint(event.x, event.y) ?? event.target;
|
|
176
|
+
if (this.el === event.target || this.el.contains(mouseTarget) || this.el.contains(event.target))
|
|
163
177
|
return;
|
|
164
178
|
this.triggerClose();
|
|
165
179
|
}, options);
|
|
@@ -175,7 +189,7 @@ export class LmvzPopover {
|
|
|
175
189
|
this.closureController?.abort();
|
|
176
190
|
}
|
|
177
191
|
render() {
|
|
178
|
-
return (h(Host, { key: '
|
|
192
|
+
return (h(Host, { key: '8dadcc766deebc03ea744fd1002078b382bfd48d' }, h("div", { key: 'd332714964212db6f5446afb1b8f38ff031a87b9', role: this.containerRole, part: "container", class: `container lmvz-wrapper-card-${this.size}`, "aria-label": this.label || undefined, ref: (el) => (this.containerEl = el) }, h("slot", { key: '0fa1d214c8c48942751cbd4759ebc992eacc8f72', ref: (el) => (this.slotEl = el) }))));
|
|
179
193
|
}
|
|
180
194
|
static get is() { return "lmvz-popover"; }
|
|
181
195
|
static get encapsulation() { return "shadow"; }
|
|
@@ -313,7 +327,7 @@ export class LmvzPopover {
|
|
|
313
327
|
"name": "default",
|
|
314
328
|
"text": "true"
|
|
315
329
|
}],
|
|
316
|
-
"text": "Whether to move focus to the first focusable element on open."
|
|
330
|
+
"text": "Whether to move focus to the first focusable element on open.\nIgnored (treated as `false`) when `containerRole` is not `'dialog'`, since\nnon-dialog roles (e.g. `'listbox'` for combobox/activedescendant integrations)\nmust keep focus on the anchor/trigger element."
|
|
317
331
|
},
|
|
318
332
|
"getter": false,
|
|
319
333
|
"setter": false,
|
|
@@ -321,6 +335,36 @@ export class LmvzPopover {
|
|
|
321
335
|
"attribute": "auto-focus",
|
|
322
336
|
"defaultValue": "true"
|
|
323
337
|
},
|
|
338
|
+
"containerRole": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"mutable": false,
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "Popover.ContainerRole",
|
|
343
|
+
"resolved": "\"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\"",
|
|
344
|
+
"references": {
|
|
345
|
+
"Popover": {
|
|
346
|
+
"location": "import",
|
|
347
|
+
"path": "../../api",
|
|
348
|
+
"id": "src/api/index.d.ts::Popover",
|
|
349
|
+
"referenceLocation": "Popover"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"required": false,
|
|
354
|
+
"optional": false,
|
|
355
|
+
"docs": {
|
|
356
|
+
"tags": [{
|
|
357
|
+
"name": "default",
|
|
358
|
+
"text": "'dialog'"
|
|
359
|
+
}],
|
|
360
|
+
"text": "ARIA role applied to the popover container.\nUse `'dialog'` (default) for focus-moving dialog-style popovers.\nUse a non-dialog role such as `'listbox'` to integrate with a `role=\"combobox\"`\ntrigger using the activedescendant model, in which case focus is kept on the\nanchor/trigger element instead of being moved into the popover."
|
|
361
|
+
},
|
|
362
|
+
"getter": false,
|
|
363
|
+
"setter": false,
|
|
364
|
+
"reflect": false,
|
|
365
|
+
"attribute": "container-role",
|
|
366
|
+
"defaultValue": "'dialog'"
|
|
367
|
+
},
|
|
324
368
|
"label": {
|
|
325
369
|
"type": "string",
|
|
326
370
|
"mutable": false,
|
|
@@ -22,7 +22,14 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
22
22
|
name;
|
|
23
23
|
disabled = false;
|
|
24
24
|
required = false;
|
|
25
|
-
|
|
25
|
+
nativeError = false;
|
|
26
|
+
errorFromProp = false;
|
|
27
|
+
get error() {
|
|
28
|
+
return this.errorFromProp || this.nativeError;
|
|
29
|
+
}
|
|
30
|
+
set error(value) {
|
|
31
|
+
this.errorFromProp = value;
|
|
32
|
+
}
|
|
26
33
|
helperText;
|
|
27
34
|
form;
|
|
28
35
|
autofocus = false;
|
|
@@ -30,6 +37,7 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
30
37
|
_handlingFormReset = false;
|
|
31
38
|
handleCheckedChange(newVal, oldVal) {
|
|
32
39
|
this.internals.setFormValue?.(newVal ? this.value : null);
|
|
40
|
+
this.updateValidity();
|
|
33
41
|
if (!newVal && oldVal && !this._handlingNativeChange && !this._handlingFormReset) {
|
|
34
42
|
this.lmvzChange.emit(false);
|
|
35
43
|
}
|
|
@@ -37,6 +45,9 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
37
45
|
this.lmvzChange.emit(true);
|
|
38
46
|
}
|
|
39
47
|
}
|
|
48
|
+
handleRequiredChange() {
|
|
49
|
+
this.updateValidity();
|
|
50
|
+
}
|
|
40
51
|
handleValueChange(newVal) {
|
|
41
52
|
if (this.checked) {
|
|
42
53
|
this.internals.setFormValue?.(newVal);
|
|
@@ -58,6 +69,9 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
58
69
|
async reportValidity() {
|
|
59
70
|
return this.internals?.reportValidity() ?? true;
|
|
60
71
|
}
|
|
72
|
+
async getValidationMessage() {
|
|
73
|
+
return this.internals?.validationMessage ?? '';
|
|
74
|
+
}
|
|
61
75
|
constructor() {
|
|
62
76
|
super();
|
|
63
77
|
this.addController(new AriaValidationController(this, {
|
|
@@ -69,8 +83,13 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
69
83
|
componentWillLoad() {
|
|
70
84
|
this.initialChecked = this.checked;
|
|
71
85
|
this.internals.setFormValue?.(this.checked ? this.value : null);
|
|
86
|
+
this.updateValidity();
|
|
72
87
|
super.componentWillLoad();
|
|
73
88
|
}
|
|
89
|
+
componentDidLoad() {
|
|
90
|
+
this.updateValidity();
|
|
91
|
+
super.componentDidLoad();
|
|
92
|
+
}
|
|
74
93
|
formAssociatedCallback() {
|
|
75
94
|
this.internals.setFormValue?.(this.checked ? this.value : null);
|
|
76
95
|
}
|
|
@@ -82,6 +101,8 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
82
101
|
finally {
|
|
83
102
|
this._handlingFormReset = false;
|
|
84
103
|
}
|
|
104
|
+
this.updateValidity();
|
|
105
|
+
this.radioGroupController.refreshValidity();
|
|
85
106
|
}
|
|
86
107
|
formStateRestoreCallback(state) {
|
|
87
108
|
if (typeof state !== 'string')
|
|
@@ -94,6 +115,20 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
94
115
|
this._handlingFormReset = false;
|
|
95
116
|
}
|
|
96
117
|
}
|
|
118
|
+
isAnyInGroupChecked() {
|
|
119
|
+
return this.radioGroupController.isAnyChecked();
|
|
120
|
+
}
|
|
121
|
+
updateValidity() {
|
|
122
|
+
if (this.required && !this.isAnyInGroupChecked()) {
|
|
123
|
+
this.internals.setValidity?.({ valueMissing: true }, 'Please select an option.', this.nativeInput);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
this.internals.setValidity?.({});
|
|
127
|
+
this.nativeError = false;
|
|
128
|
+
}
|
|
129
|
+
handleInvalid() {
|
|
130
|
+
this.nativeError = true;
|
|
131
|
+
}
|
|
97
132
|
handleChange = (event) => {
|
|
98
133
|
this._handlingNativeChange = true;
|
|
99
134
|
try {
|
|
@@ -136,8 +171,11 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
136
171
|
return;
|
|
137
172
|
this.radioGroupController.setFocused(target);
|
|
138
173
|
}
|
|
174
|
+
retargetInnerClicks() {
|
|
175
|
+
this.nativeInput?.click();
|
|
176
|
+
}
|
|
139
177
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
178
|
+
return (h(Host, { key: 'f1fdc1167c4e59c2524e1e545c3382ca32853788' }, h("input", { key: 'c1b711444475ed401766cc5827eeaec0c46b62cf', type: "radio", id: this.radioId, value: this.value, checked: this.checked, disabled: this.disabled, autoFocus: this.autofocus, "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error ? 'true' : undefined, "aria-describedby": this.helperId, ref: (el) => (this.nativeInput = el), onChange: this.handleChange }), h("span", { key: 'b25e623269df05bdf8159e72da4df2e0bfb5d7bc', class: "circle", "aria-hidden": "true" }, this.checked && h("span", { key: '93d12890c7ba0abe203c63953ea1115aee37d7a0', class: "dot" })), h("span", { key: '44dcfdc4e7ee3820624b0d02a438139f45bb8733', class: "content" }, h("label", { key: 'd0547cd5e79642b298da155c9937715224b52cae', htmlFor: this.radioId }, this.label), h("span", { key: 'a9df5dd8a775a2f7422d5bac296869f88553e33f', onClick: this.retargetInnerClicks.bind(this), "aria-live": "polite", class: "helper-text", id: this.helperId }, this.helperText))));
|
|
141
179
|
}
|
|
142
180
|
static get is() { return "lmvz-radio"; }
|
|
143
181
|
static get encapsulation() { return "scoped"; }
|
|
@@ -232,13 +270,13 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
232
270
|
"docs": {
|
|
233
271
|
"tags": [{
|
|
234
272
|
"name": "remarks",
|
|
235
|
-
"text": "A value of `\"\"` (empty string) is
|
|
273
|
+
"text": "A value of `\"\"` (empty string) is treated as unnamed by `RadioGroupController` \u2014\nno group coordination occurs between radios with `name=\"\"`."
|
|
236
274
|
}],
|
|
237
|
-
"text": "Name attribute for form submission via ElementInternals.\n\
|
|
275
|
+
"text": "Name attribute for form submission via ElementInternals.\n\nThe `name` is NOT forwarded to the native `<input type=\"radio\">` \u2014 this component\nrenders in `scoped` (light DOM) mode, so a native `name` attribute would make the\ninner `<input>` an independent, genuinely form-associated element of the outer\n`<form>`, submitting a duplicate value alongside the host's own `ElementInternals`\nparticipation. Instead, `name` is used purely as a JS-level grouping key: the\n`RadioGroupController` tracks all `lmvz-radio` hosts sharing the same `name` and form\nscope in an internal registry and enforces mutual exclusion itself (via\n`RadioGroup.select()`, which sets `checked = false` on every other host in the group).\nIf a radio is outside any form, its scope defaults to the document level \u2014 same-name\nradios outside forms form a document-scoped group. Radios with the same `name` in\ndifferent forms are independent groups.\n\nThe `RadioGroupController` also manages roving tabindex (only the checked radio has\n`tabindex=\"0\"`) and keyboard navigation (Arrow keys, Home, End) within the group."
|
|
238
276
|
},
|
|
239
277
|
"getter": false,
|
|
240
278
|
"setter": false,
|
|
241
|
-
"reflect":
|
|
279
|
+
"reflect": true,
|
|
242
280
|
"attribute": "name"
|
|
243
281
|
},
|
|
244
282
|
"disabled": {
|
|
@@ -304,11 +342,10 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
304
342
|
}],
|
|
305
343
|
"text": "Whether the radio is in an error state."
|
|
306
344
|
},
|
|
307
|
-
"getter":
|
|
308
|
-
"setter":
|
|
345
|
+
"getter": true,
|
|
346
|
+
"setter": true,
|
|
309
347
|
"reflect": true,
|
|
310
|
-
"attribute": "error"
|
|
311
|
-
"defaultValue": "false"
|
|
348
|
+
"attribute": "error"
|
|
312
349
|
},
|
|
313
350
|
"helperText": {
|
|
314
351
|
"type": "string",
|
|
@@ -373,6 +410,11 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
373
410
|
}
|
|
374
411
|
};
|
|
375
412
|
}
|
|
413
|
+
static get states() {
|
|
414
|
+
return {
|
|
415
|
+
"nativeError": {}
|
|
416
|
+
};
|
|
417
|
+
}
|
|
376
418
|
static get events() {
|
|
377
419
|
return [{
|
|
378
420
|
"method": "lmvzChange",
|
|
@@ -458,6 +500,23 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
458
500
|
"text": "Reports validation errors to the user.",
|
|
459
501
|
"tags": []
|
|
460
502
|
}
|
|
503
|
+
},
|
|
504
|
+
"getValidationMessage": {
|
|
505
|
+
"complexType": {
|
|
506
|
+
"signature": "() => Promise<string>",
|
|
507
|
+
"parameters": [],
|
|
508
|
+
"references": {
|
|
509
|
+
"Promise": {
|
|
510
|
+
"location": "global",
|
|
511
|
+
"id": "global::Promise"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"return": "Promise<string>"
|
|
515
|
+
},
|
|
516
|
+
"docs": {
|
|
517
|
+
"text": "Returns the current validation message, if any.",
|
|
518
|
+
"tags": []
|
|
519
|
+
}
|
|
461
520
|
}
|
|
462
521
|
};
|
|
463
522
|
}
|
|
@@ -466,6 +525,9 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
466
525
|
return [{
|
|
467
526
|
"propName": "checked",
|
|
468
527
|
"methodName": "handleCheckedChange"
|
|
528
|
+
}, {
|
|
529
|
+
"propName": "required",
|
|
530
|
+
"methodName": "handleRequiredChange"
|
|
469
531
|
}, {
|
|
470
532
|
"propName": "value",
|
|
471
533
|
"methodName": "handleValueChange"
|
|
@@ -476,6 +538,12 @@ export class LmvzRadio extends ReactiveControllerHost {
|
|
|
476
538
|
}
|
|
477
539
|
static get listeners() {
|
|
478
540
|
return [{
|
|
541
|
+
"name": "invalid",
|
|
542
|
+
"method": "handleInvalid",
|
|
543
|
+
"target": undefined,
|
|
544
|
+
"capture": false,
|
|
545
|
+
"passive": false
|
|
546
|
+
}, {
|
|
479
547
|
"name": "keydown",
|
|
480
548
|
"method": "handleKeydown",
|
|
481
549
|
"target": undefined,
|