@riverty/web-components 5.8.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -0
- package/custom-elements.json +124 -369
- package/dist/cjs/index-DJ4H_bFj.js +6 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +5 -35
- package/dist/cjs/r-accordion.cjs.entry.js +3 -7
- package/dist/cjs/r-alert.cjs.entry.js +26 -11
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -11
- package/dist/cjs/r-checkbox.cjs.entry.js +76 -75
- package/dist/cjs/r-dialog.cjs.entry.js +3 -11
- package/dist/cjs/r-hint_2.cjs.entry.js +50 -0
- package/dist/cjs/{r-hint_3.cjs.entry.js → r-icon-button_2.cjs.entry.js} +64 -51
- package/dist/cjs/r-input-code.cjs.entry.js +112 -17
- package/dist/cjs/r-input-date.cjs.entry.js +8 -14
- package/dist/cjs/r-input-password.cjs.entry.js +16 -8
- package/dist/cjs/r-input-phone-number.cjs.entry.js +7 -12
- package/dist/cjs/r-input.cjs.entry.js +87 -41
- package/dist/cjs/r-list-item.cjs.entry.js +5 -5
- package/dist/cjs/r-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-popover.cjs.entry.js +3 -3
- package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button.cjs.entry.js +29 -12
- package/dist/cjs/r-radio-group.cjs.entry.js +18 -22
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +6 -24
- package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
- package/dist/cjs/r-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper.cjs.entry.js +1 -1
- package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-tab.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs-list.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs.cjs.entry.js +1 -1
- package/dist/cjs/r-textarea.cjs.entry.js +6 -18
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +9 -9
- package/dist/cjs/web-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/accordion/accordion.css +0 -2
- package/dist/collection/components/accordion/accordion.js +4 -8
- package/dist/collection/components/accordion/exports.js +1 -1
- package/dist/collection/components/accordion-panel/accordion-panel.js +1 -1
- package/dist/collection/components/accordion-section/accordion-section.js +1 -1
- package/dist/collection/components/accordion-trigger/accordion-trigger.css +0 -4
- package/dist/collection/components/accordion-trigger/accordion-trigger.js +4 -215
- package/dist/collection/components/alert/alert.css +6 -0
- package/dist/collection/components/alert/alert.js +48 -10
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +80 -98
- package/dist/collection/components/checkbox-group/checkbox-group.js +1 -50
- package/dist/collection/components/dialog/dialog.css +1 -3
- package/dist/collection/components/dialog/dialog.js +2 -10
- package/dist/collection/components/hint/hint.js +2 -2
- package/dist/collection/components/icon-button/icon-button.js +3 -3
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +180 -370
- package/dist/collection/components/input-code/exports.js +2 -0
- package/dist/collection/components/input-code/input-code.js +294 -26
- package/dist/collection/components/input-date/input-date.js +8 -77
- package/dist/collection/components/input-password/exports.js +1 -0
- package/dist/collection/components/input-password/input-password.css +1 -0
- package/dist/collection/components/input-password/input-password.js +195 -70
- package/dist/collection/components/input-phone-number/input-phone-number.js +7 -75
- package/dist/collection/components/label/label.js +3 -113
- package/dist/collection/components/list-item/list-item/list-item.css +7 -7
- package/dist/collection/components/list-item/list-item/list-item.js +4 -26
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover/exports.js +0 -1
- package/dist/collection/components/popover/popover.css +2 -10
- package/dist/collection/components/popover/popover.js +2 -55
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +49 -12
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.js +38 -124
- package/dist/collection/components/select/select.js +6 -330
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +2 -2
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tabs-list/tabs-list.js +1 -1
- package/dist/collection/components/textarea/textarea.js +6 -158
- package/dist/collection/components/toast/toast.js +9 -31
- package/dist/collection/components/toast-group/toast-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/esm/index-Da7qOBFr.js +6 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +5 -35
- package/dist/esm/r-accordion.entry.js +3 -7
- package/dist/esm/r-alert.entry.js +26 -11
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +1 -1
- package/dist/esm/r-checkbox-group.entry.js +1 -11
- package/dist/esm/r-checkbox.entry.js +76 -75
- package/dist/esm/r-dialog.entry.js +3 -11
- package/dist/esm/r-hint_2.entry.js +47 -0
- package/dist/esm/{r-hint_3.entry.js → r-icon-button_2.entry.js} +65 -51
- package/dist/esm/r-input-code.entry.js +112 -17
- package/dist/esm/r-input-date.entry.js +8 -14
- package/dist/esm/r-input-password.entry.js +16 -8
- package/dist/esm/r-input-phone-number.entry.js +7 -12
- package/dist/esm/r-input.entry.js +87 -41
- package/dist/esm/r-list-item.entry.js +5 -5
- package/dist/esm/r-panel.entry.js +2 -2
- package/dist/esm/r-popover-action.entry.js +1 -1
- package/dist/esm/r-popover-content.entry.js +1 -1
- package/dist/esm/r-popover-headline.entry.js +1 -1
- package/dist/esm/r-popover-trigger.entry.js +1 -1
- package/dist/esm/r-popover.entry.js +3 -3
- package/dist/esm/r-progress-bar.entry.js +1 -1
- package/dist/esm/r-radio-button-description.entry.js +1 -1
- package/dist/esm/r-radio-button-leading.entry.js +1 -1
- package/dist/esm/r-radio-button-title.entry.js +1 -1
- package/dist/esm/r-radio-button-trailing.entry.js +1 -1
- package/dist/esm/r-radio-button.entry.js +29 -12
- package/dist/esm/r-radio-group.entry.js +18 -22
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +6 -24
- package/dist/esm/r-skip-link.entry.js +1 -1
- package/dist/esm/r-stepper-item.entry.js +2 -2
- package/dist/esm/r-stepper.entry.js +1 -1
- package/dist/esm/r-tab-panel.entry.js +1 -1
- package/dist/esm/r-tab.entry.js +1 -1
- package/dist/esm/r-tabs-list.entry.js +1 -1
- package/dist/esm/r-tabs.entry.js +1 -1
- package/dist/esm/r-textarea.entry.js +6 -18
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +9 -9
- package/dist/esm/web-components.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +1 -5
- package/dist/types/components/accordion/exports.d.ts +1 -1
- package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +0 -36
- package/dist/types/components/alert/alert.d.ts +6 -1
- package/dist/types/components/checkbox/checkbox.d.ts +24 -34
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +0 -11
- package/dist/types/components/dialog/dialog.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +30 -72
- package/dist/types/components/input-code/exports.d.ts +4 -0
- package/dist/types/components/input-code/input-code.d.ts +49 -7
- package/dist/types/components/input-date/input-date.d.ts +0 -16
- package/dist/types/components/input-password/exports.d.ts +1 -0
- package/dist/types/components/input-password/input-password.d.ts +48 -16
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +0 -16
- package/dist/types/components/label/label.d.ts +0 -18
- package/dist/types/components/list-item/list-item/list-item.d.ts +0 -6
- package/dist/types/components/popover/exports.d.ts +0 -2
- package/dist/types/components/popover/popover.d.ts +1 -14
- package/dist/types/components/radio-button/radio-button.d.ts +5 -0
- package/dist/types/components/radio-group/radio-group.d.ts +5 -26
- package/dist/types/components/select/select.d.ts +0 -50
- package/dist/types/components/textarea/textarea.d.ts +0 -32
- package/dist/types/components/toast/toast.d.ts +0 -5
- package/dist/types/components.d.ts +201 -636
- package/dist/web-components/p-0347feff.entry.js +1 -0
- package/dist/web-components/p-05738503.entry.js +1 -0
- package/dist/web-components/p-0e4c8bf1.entry.js +1 -0
- package/dist/web-components/{p-5744d75c.entry.js → p-1da75540.entry.js} +1 -1
- package/dist/web-components/p-26ef77d6.entry.js +1 -0
- package/dist/web-components/p-3884c6e7.entry.js +1 -0
- package/dist/web-components/p-3a5a67e7.entry.js +1 -0
- package/dist/web-components/p-3f60c6c0.entry.js +1 -0
- package/dist/web-components/p-4254a383.entry.js +1 -0
- package/dist/web-components/{p-87f39749.entry.js → p-4595fa8e.entry.js} +1 -1
- package/dist/web-components/{p-4e3df002.entry.js → p-4cc58c6a.entry.js} +1 -1
- package/dist/web-components/p-5441b746.entry.js +1 -0
- package/dist/web-components/{p-72fa1fd1.entry.js → p-550e2237.entry.js} +1 -1
- package/dist/web-components/p-589baaf9.entry.js +1 -0
- package/dist/web-components/p-60341de2.entry.js +1 -0
- package/dist/web-components/{p-4bd3e077.entry.js → p-60ca994e.entry.js} +1 -1
- package/dist/web-components/{p-44ae9f33.entry.js → p-62b788bf.entry.js} +1 -1
- package/dist/web-components/{p-2b2f581a.entry.js → p-6303b9fe.entry.js} +1 -1
- package/dist/web-components/p-63fd817d.entry.js +1 -0
- package/dist/web-components/{p-e0e2f2b2.entry.js → p-673dbfd0.entry.js} +1 -1
- package/dist/web-components/p-67fa3f84.entry.js +1 -0
- package/dist/web-components/p-6cc2ea2c.entry.js +1 -0
- package/dist/web-components/p-70784685.entry.js +1 -0
- package/dist/web-components/{p-429213ea.entry.js → p-7fed6f4d.entry.js} +1 -1
- package/dist/web-components/p-8a66d20c.entry.js +1 -0
- package/dist/web-components/{p-0bb04d79.entry.js → p-8b4d2448.entry.js} +1 -1
- package/dist/web-components/{p-c7f8e59b.entry.js → p-8c31cbd5.entry.js} +1 -1
- package/dist/web-components/p-8dac326b.entry.js +1 -0
- package/dist/web-components/{p-1c2497de.entry.js → p-9ef1bbee.entry.js} +1 -1
- package/dist/web-components/p-a0dbde7c.entry.js +1 -0
- package/dist/web-components/{p-755cc697.entry.js → p-a71485d8.entry.js} +1 -1
- package/dist/web-components/p-a7d22c76.entry.js +1 -0
- package/dist/web-components/{p-85a9af42.entry.js → p-ae251d2f.entry.js} +1 -1
- package/dist/web-components/p-b9e3b3d6.entry.js +1 -0
- package/dist/web-components/p-c1e748f2.entry.js +1 -0
- package/dist/web-components/{p-5bbd6e3c.entry.js → p-c478712b.entry.js} +1 -1
- package/dist/web-components/{p-3078b2b8.entry.js → p-d054eb4d.entry.js} +1 -1
- package/dist/web-components/{p-8563a1ab.entry.js → p-d433a828.entry.js} +1 -1
- package/dist/web-components/p-d7726e46.entry.js +1 -0
- package/dist/web-components/p-d819c8e5.entry.js +1 -0
- package/dist/web-components/p-e2188953.entry.js +1 -0
- package/dist/web-components/{p-3b4e3faf.entry.js → p-e5945c01.entry.js} +1 -1
- package/dist/web-components/{p-d1379ac6.entry.js → p-f9d5004c.entry.js} +1 -1
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/r-accordion-item.cjs.entry.js +0 -78
- package/dist/cjs/r-icon-button.cjs.entry.js +0 -81
- package/dist/collection/components/accordion-item/accordion-item.css +0 -121
- package/dist/collection/components/accordion-item/accordion-item.js +0 -138
- package/dist/esm/r-accordion-item.entry.js +0 -76
- package/dist/esm/r-icon-button.entry.js +0 -79
- package/dist/types/components/accordion-item/accordion-item.d.ts +0 -26
- package/dist/web-components/p-00ca474f.entry.js +0 -1
- package/dist/web-components/p-15ac0fdd.entry.js +0 -1
- package/dist/web-components/p-1c956370.entry.js +0 -1
- package/dist/web-components/p-2a512983.entry.js +0 -1
- package/dist/web-components/p-2e18e762.entry.js +0 -1
- package/dist/web-components/p-3bc93d65.entry.js +0 -1
- package/dist/web-components/p-51a5804b.entry.js +0 -1
- package/dist/web-components/p-56da04d8.entry.js +0 -1
- package/dist/web-components/p-5e6aabd8.entry.js +0 -1
- package/dist/web-components/p-656229de.entry.js +0 -1
- package/dist/web-components/p-7775228c.entry.js +0 -1
- package/dist/web-components/p-7ad8e78b.entry.js +0 -1
- package/dist/web-components/p-9e50120b.entry.js +0 -1
- package/dist/web-components/p-a022f356.entry.js +0 -1
- package/dist/web-components/p-a7e7f8fa.entry.js +0 -1
- package/dist/web-components/p-ad9b2a48.entry.js +0 -1
- package/dist/web-components/p-b2f03016.entry.js +0 -1
- package/dist/web-components/p-b87ad83b.entry.js +0 -1
- package/dist/web-components/p-c937bd92.entry.js +0 -1
- package/dist/web-components/p-cbcd7699.entry.js +0 -1
- package/dist/web-components/p-dbe579e8.entry.js +0 -1
- package/dist/web-components/p-e4b66277.entry.js +0 -1
- package/dist/web-components/p-e6a31881.entry.js +0 -1
- package/dist/web-components/p-f2577a3c.entry.js +0 -1
- package/dist/web-components/p-f6a92287.entry.js +0 -1
|
@@ -12,24 +12,19 @@ export class RInput {
|
|
|
12
12
|
*/
|
|
13
13
|
this.value = '';
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.iconPosition = 'start';
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Will be removed November 2025.
|
|
21
|
-
* Legacy boolean to show a validation marker icon.
|
|
22
|
-
*/
|
|
23
|
-
this.validMarker = false;
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Will be removed November 2025.
|
|
26
|
-
* Icon name used when `validMarker` is active and state is valid.
|
|
27
|
-
*/
|
|
28
|
-
this.validMarkerIcon = 'circled-check';
|
|
15
|
+
* When `true` field renders valid/invalid marker within.
|
|
16
|
+
*/
|
|
17
|
+
this.validityMarker = true;
|
|
29
18
|
/** Validity state passed from validateFormElement function after validation */
|
|
30
19
|
this.validityState = '';
|
|
31
20
|
/** Validity message passed from validateFormElement function after validation */
|
|
32
21
|
this.validityMessage = '';
|
|
22
|
+
/** Defines if the component has been touched by user */
|
|
23
|
+
this.touched = false;
|
|
24
|
+
/** Defines if the value has been changed by user interaction */
|
|
25
|
+
this.dirty = false;
|
|
26
|
+
/** Private flag to prevent validation during reset */
|
|
27
|
+
this.isResetting = false;
|
|
33
28
|
this.nativeElement = null;
|
|
34
29
|
this.uniqueId = `r-input-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
35
30
|
/**
|
|
@@ -48,14 +43,18 @@ export class RInput {
|
|
|
48
43
|
for (const state in element.validity) {
|
|
49
44
|
if (element.validity[state]) {
|
|
50
45
|
validityState = state;
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
const customMessage = this[state + 'Message'];
|
|
47
|
+
if (customMessage) {
|
|
48
|
+
validityMessage = customMessage;
|
|
53
49
|
return { validityState, validityMessage };
|
|
54
50
|
}
|
|
55
51
|
validityMessage = element.validationMessage;
|
|
52
|
+
// Found an error, use it even if no custom message
|
|
53
|
+
return { validityState, validityMessage };
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
|
-
|
|
56
|
+
// No errors found, field is valid
|
|
57
|
+
return { validityState: 'valid', validityMessage: '' };
|
|
59
58
|
};
|
|
60
59
|
this.validateFormElement = (element) => {
|
|
61
60
|
if (element === null)
|
|
@@ -64,6 +63,10 @@ export class RInput {
|
|
|
64
63
|
return;
|
|
65
64
|
if (this.error)
|
|
66
65
|
return;
|
|
66
|
+
// Trigger browser validation to populate validity states
|
|
67
|
+
if (element.checkValidity) {
|
|
68
|
+
element.checkValidity();
|
|
69
|
+
}
|
|
67
70
|
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
68
71
|
this.validityState = validityState;
|
|
69
72
|
this.validityMessage = validityMessage;
|
|
@@ -79,6 +82,8 @@ export class RInput {
|
|
|
79
82
|
if (this.readonly)
|
|
80
83
|
return;
|
|
81
84
|
this.value = event.target.value;
|
|
85
|
+
this.touched = true;
|
|
86
|
+
this.dirty = true;
|
|
82
87
|
const { host, value } = this;
|
|
83
88
|
this.rInput.emit({ element: host, value });
|
|
84
89
|
};
|
|
@@ -86,11 +91,14 @@ export class RInput {
|
|
|
86
91
|
if (this.readonly)
|
|
87
92
|
return;
|
|
88
93
|
this.value = event.target.value;
|
|
94
|
+
this.touched = true;
|
|
95
|
+
this.dirty = true;
|
|
89
96
|
const { host, value } = this;
|
|
90
97
|
this.rChange.emit({ element: host, value });
|
|
91
98
|
};
|
|
92
99
|
this.onBlur = () => {
|
|
93
100
|
this.host.classList.remove('focused');
|
|
101
|
+
this.touched = true;
|
|
94
102
|
this.validateFormElement(this.nativeElement);
|
|
95
103
|
this.rBlur.emit();
|
|
96
104
|
};
|
|
@@ -104,17 +112,25 @@ export class RInput {
|
|
|
104
112
|
this.onResetForm = () => {
|
|
105
113
|
if (this.readonly)
|
|
106
114
|
return;
|
|
115
|
+
this.isResetting = true;
|
|
116
|
+
this.markAsPristine();
|
|
107
117
|
this.validityState = null;
|
|
108
118
|
this.validityMessage = null;
|
|
109
|
-
|
|
119
|
+
// Restore initial value without triggering validation
|
|
120
|
+
if (this.nativeElement) {
|
|
121
|
+
this.nativeElement.value = this.initial['value'] || '';
|
|
122
|
+
}
|
|
123
|
+
this.value = this.initial['value'];
|
|
110
124
|
this.invalid = this.initial['invalid'];
|
|
111
125
|
this.valid = !this.invalid;
|
|
126
|
+
this.isResetting = false;
|
|
112
127
|
const { host, value } = this;
|
|
113
128
|
this.rReset.emit({ element: host, value });
|
|
114
129
|
};
|
|
115
130
|
this.onSubmitForm = (event) => {
|
|
116
131
|
if (this.isNoValidate)
|
|
117
132
|
return;
|
|
133
|
+
this.touched = true;
|
|
118
134
|
this.validateFormElement(this.nativeElement);
|
|
119
135
|
if (this.invalid) {
|
|
120
136
|
event.preventDefault();
|
|
@@ -198,7 +214,10 @@ export class RInput {
|
|
|
198
214
|
* Set the current value programmatically (does not fire native input/change automatically).
|
|
199
215
|
*/
|
|
200
216
|
async setValue(value) {
|
|
201
|
-
this.nativeElement
|
|
217
|
+
if (this.nativeElement) {
|
|
218
|
+
this.nativeElement.value = value;
|
|
219
|
+
}
|
|
220
|
+
this.value = value;
|
|
202
221
|
this.validateFormElement(this.nativeElement);
|
|
203
222
|
}
|
|
204
223
|
/**
|
|
@@ -209,6 +228,25 @@ export class RInput {
|
|
|
209
228
|
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
210
229
|
return validityState === 'valid';
|
|
211
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Gets the touched state (whether user has interacted with the input)
|
|
233
|
+
*/
|
|
234
|
+
async isTouched() {
|
|
235
|
+
return this.touched;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Gets the dirty state (whether value has been changed by user)
|
|
239
|
+
*/
|
|
240
|
+
async isDirty() {
|
|
241
|
+
return this.dirty;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Resets touched and dirty states to pristine (untouched/clean)
|
|
245
|
+
*/
|
|
246
|
+
async markAsPristine() {
|
|
247
|
+
this.touched = false;
|
|
248
|
+
this.dirty = false;
|
|
249
|
+
}
|
|
212
250
|
/** Identify wrapping form element */
|
|
213
251
|
get parentFormEl() {
|
|
214
252
|
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
@@ -224,11 +262,8 @@ export class RInput {
|
|
|
224
262
|
get hasValidationError() {
|
|
225
263
|
return (this.validityState !== 'valid' || this.invalid) && !!(this.validityMessage || this.customErrorMessage);
|
|
226
264
|
}
|
|
227
|
-
get hasValidationSuccess() {
|
|
228
|
-
return (this.validityState === 'valid' || this.valid) && !!this.validMessage && this.showValid;
|
|
229
|
-
}
|
|
230
265
|
get hasMessage() {
|
|
231
|
-
return this.hasError || this.hasValidationError
|
|
266
|
+
return this.hasError || this.hasValidationError;
|
|
232
267
|
}
|
|
233
268
|
/**
|
|
234
269
|
* Determine whether this element should be ignored
|
|
@@ -272,10 +307,15 @@ export class RInput {
|
|
|
272
307
|
this.disconnectFormEventListeners();
|
|
273
308
|
}
|
|
274
309
|
handleValueChange() {
|
|
275
|
-
|
|
310
|
+
if (!this.isResetting) {
|
|
311
|
+
this.validateFormElement(this.nativeElement);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
handleTypeChange() {
|
|
315
|
+
this.setValue(this.nativeElement.value);
|
|
276
316
|
}
|
|
277
317
|
render() {
|
|
278
|
-
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid,
|
|
318
|
+
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid, hint, label, internal, uniqueId, autocomplete, readonly, autofocus, passwordrules, validityMarker } = this;
|
|
279
319
|
const inputAttrs = {
|
|
280
320
|
disabled,
|
|
281
321
|
readonly,
|
|
@@ -291,6 +331,7 @@ export class RInput {
|
|
|
291
331
|
pattern,
|
|
292
332
|
autocomplete,
|
|
293
333
|
autofocus: autofocus || null,
|
|
334
|
+
passwordrules,
|
|
294
335
|
id: uniqueId,
|
|
295
336
|
'data-value': value,
|
|
296
337
|
'aria-placeholder': placeholder,
|
|
@@ -298,20 +339,25 @@ export class RInput {
|
|
|
298
339
|
'aria-required': `${required || false}`,
|
|
299
340
|
'aria-describedby': this.ariaDescribedBy
|
|
300
341
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
'tooltip-icon': tooltipIcon,
|
|
305
|
-
'tooltip-icon-color': tooltipIconColor,
|
|
342
|
+
const labelAttr = label ? {
|
|
343
|
+
id: `${uniqueId}-label`,
|
|
344
|
+
fieldIndicator
|
|
306
345
|
} : {};
|
|
307
|
-
const labelAttr = label ? Object.assign({ id: `${uniqueId}-label`, fieldIndicator }, tooltipAttrs) : {};
|
|
308
346
|
const renderValidationMarker = () => {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
347
|
+
const icons = {
|
|
348
|
+
valid: 'circled-check',
|
|
349
|
+
invalid: 'circled-exclamation-mark'
|
|
350
|
+
};
|
|
351
|
+
const colors = {
|
|
352
|
+
valid: '--r-status-success-regular',
|
|
353
|
+
invalid: '--r-status-error-regular'
|
|
354
|
+
};
|
|
355
|
+
const shouldShowValidMarker = !!validityMarker && !!valid && !!value;
|
|
356
|
+
const shouldShowInvalidMarker = !!validityMarker && !!invalid;
|
|
357
|
+
if (!shouldShowValidMarker && !shouldShowInvalidMarker)
|
|
312
358
|
return null;
|
|
313
|
-
const iconName =
|
|
314
|
-
const iconColor =
|
|
359
|
+
const iconName = shouldShowInvalidMarker ? icons.invalid : icons.valid;
|
|
360
|
+
const iconColor = shouldShowInvalidMarker ? colors.invalid : colors.valid;
|
|
315
361
|
return h("r-icon", { class: "r-input--validation-icon", "aria-hidden": true, size: "s", name: iconName, color: iconColor });
|
|
316
362
|
};
|
|
317
363
|
// Filter out event listener properties based on naming convention.
|
|
@@ -322,13 +368,13 @@ export class RInput {
|
|
|
322
368
|
}
|
|
323
369
|
return acc;
|
|
324
370
|
}, {});
|
|
325
|
-
return (h(Host, { onClick: this.handleClick, onKeyup: this.handleKeyup }, h("div", { class: internal ? 'visually-hidden' : 'r-input--label-container' }, h("label", { htmlFor: uniqueId }, label ?
|
|
371
|
+
return (h(Host, { onClick: this.handleClick, onKeyup: this.handleKeyup, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { class: internal ? 'visually-hidden' : 'r-input--label-container' }, h("label", { htmlFor: uniqueId }, label ?
|
|
326
372
|
h("r-label", Object.assign({ class: "r-input--label" }, labelAttr), label)
|
|
327
373
|
:
|
|
328
374
|
h("slot", { name: "label" })), h("slot", { name: "popover" })), hint &&
|
|
329
375
|
h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { class: "r-input--container" }, h("slot", { name: "leading" }), h("input", Object.assign({ class: "r-input--input", type: this.type }, inputAttrs, eventListeners, { ref: el => this.nativeElement = el, value: this.value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus })), h("div", { class: "r-input--trailing" }, this.readonly &&
|
|
330
376
|
h("r-icon", { class: "r-input--readonly-icon", name: "pen-disabled", size: "s" }), renderValidationMarker(), this.hasTrailingSlot &&
|
|
331
|
-
h("slot", { name: "trailing" }))), h("div", { id: `${uniqueId}-message`, "aria-live": !internal ? 'polite' : null, class: !internal ? 'r-input--message' : 'visually-hidden' }, h("slot", { name: "message" }, this.hasMessage && h("r-hint", { variant: valid ? 'success' : 'error' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage)
|
|
377
|
+
h("slot", { name: "trailing" }))), h("div", { id: `${uniqueId}-message`, "aria-live": !internal ? 'polite' : null, class: !internal ? 'r-input--message' : 'visually-hidden' }, h("slot", { name: "message" }, this.hasMessage && h("r-hint", { variant: valid ? 'success' : 'error' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))))));
|
|
332
378
|
}
|
|
333
379
|
static get is() { return "r-input"; }
|
|
334
380
|
static get encapsulation() { return "shadow"; }
|
|
@@ -523,122 +569,6 @@ export class RInput {
|
|
|
523
569
|
"setter": false,
|
|
524
570
|
"reflect": true
|
|
525
571
|
},
|
|
526
|
-
"optional": {
|
|
527
|
-
"type": "boolean",
|
|
528
|
-
"attribute": "optional",
|
|
529
|
-
"mutable": false,
|
|
530
|
-
"complexType": {
|
|
531
|
-
"original": "boolean",
|
|
532
|
-
"resolved": "boolean",
|
|
533
|
-
"references": {}
|
|
534
|
-
},
|
|
535
|
-
"required": false,
|
|
536
|
-
"optional": true,
|
|
537
|
-
"docs": {
|
|
538
|
-
"tags": [{
|
|
539
|
-
"name": "deprecated",
|
|
540
|
-
"text": "Use `fieldIndicator` instead. Will be removed November 2025.\nBoolean flag to render an \u201Coptional\u201D marker."
|
|
541
|
-
}],
|
|
542
|
-
"text": ""
|
|
543
|
-
},
|
|
544
|
-
"getter": false,
|
|
545
|
-
"setter": false,
|
|
546
|
-
"reflect": false
|
|
547
|
-
},
|
|
548
|
-
"optionalText": {
|
|
549
|
-
"type": "string",
|
|
550
|
-
"attribute": "optional-text",
|
|
551
|
-
"mutable": false,
|
|
552
|
-
"complexType": {
|
|
553
|
-
"original": "string",
|
|
554
|
-
"resolved": "string",
|
|
555
|
-
"references": {}
|
|
556
|
-
},
|
|
557
|
-
"required": false,
|
|
558
|
-
"optional": true,
|
|
559
|
-
"docs": {
|
|
560
|
-
"tags": [{
|
|
561
|
-
"name": "deprecated",
|
|
562
|
-
"text": "Use `fieldIndicator` instead. Will be removed November 2025.\nCustom text for optional marker."
|
|
563
|
-
}],
|
|
564
|
-
"text": ""
|
|
565
|
-
},
|
|
566
|
-
"getter": false,
|
|
567
|
-
"setter": false,
|
|
568
|
-
"reflect": false
|
|
569
|
-
},
|
|
570
|
-
"tooltip": {
|
|
571
|
-
"type": "string",
|
|
572
|
-
"attribute": "tooltip",
|
|
573
|
-
"mutable": false,
|
|
574
|
-
"complexType": {
|
|
575
|
-
"original": "string",
|
|
576
|
-
"resolved": "string",
|
|
577
|
-
"references": {}
|
|
578
|
-
},
|
|
579
|
-
"required": false,
|
|
580
|
-
"optional": true,
|
|
581
|
-
"docs": {
|
|
582
|
-
"tags": [{
|
|
583
|
-
"name": "deprecated",
|
|
584
|
-
"text": "Use the `popover` slot instead. Will be removed November 2025.\nLabel tooltip text content."
|
|
585
|
-
}],
|
|
586
|
-
"text": ""
|
|
587
|
-
},
|
|
588
|
-
"getter": false,
|
|
589
|
-
"setter": false,
|
|
590
|
-
"reflect": false
|
|
591
|
-
},
|
|
592
|
-
"tooltipIcon": {
|
|
593
|
-
"type": "string",
|
|
594
|
-
"attribute": "tooltip-icon",
|
|
595
|
-
"mutable": false,
|
|
596
|
-
"complexType": {
|
|
597
|
-
"original": "IconName",
|
|
598
|
-
"resolved": "string",
|
|
599
|
-
"references": {
|
|
600
|
-
"IconName": {
|
|
601
|
-
"location": "import",
|
|
602
|
-
"path": "../icon/exports",
|
|
603
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
"required": false,
|
|
608
|
-
"optional": true,
|
|
609
|
-
"docs": {
|
|
610
|
-
"tags": [{
|
|
611
|
-
"name": "deprecated",
|
|
612
|
-
"text": "Use the `popover` slot instead. Will be removed November 2025.\nIcon name used as tooltip trigger."
|
|
613
|
-
}],
|
|
614
|
-
"text": ""
|
|
615
|
-
},
|
|
616
|
-
"getter": false,
|
|
617
|
-
"setter": false,
|
|
618
|
-
"reflect": false
|
|
619
|
-
},
|
|
620
|
-
"tooltipIconColor": {
|
|
621
|
-
"type": "string",
|
|
622
|
-
"attribute": "tooltip-icon-color",
|
|
623
|
-
"mutable": false,
|
|
624
|
-
"complexType": {
|
|
625
|
-
"original": "string",
|
|
626
|
-
"resolved": "string",
|
|
627
|
-
"references": {}
|
|
628
|
-
},
|
|
629
|
-
"required": false,
|
|
630
|
-
"optional": true,
|
|
631
|
-
"docs": {
|
|
632
|
-
"tags": [{
|
|
633
|
-
"name": "deprecated",
|
|
634
|
-
"text": "Use the `popover` slot instead. Will be removed November 2025.\nColor token for tooltip trigger icon."
|
|
635
|
-
}],
|
|
636
|
-
"text": ""
|
|
637
|
-
},
|
|
638
|
-
"getter": false,
|
|
639
|
-
"setter": false,
|
|
640
|
-
"reflect": false
|
|
641
|
-
},
|
|
642
572
|
"hint": {
|
|
643
573
|
"type": "string",
|
|
644
574
|
"attribute": "hint",
|
|
@@ -658,107 +588,6 @@ export class RInput {
|
|
|
658
588
|
"setter": false,
|
|
659
589
|
"reflect": false
|
|
660
590
|
},
|
|
661
|
-
"icon": {
|
|
662
|
-
"type": "string",
|
|
663
|
-
"attribute": "icon",
|
|
664
|
-
"mutable": false,
|
|
665
|
-
"complexType": {
|
|
666
|
-
"original": "IconName",
|
|
667
|
-
"resolved": "string",
|
|
668
|
-
"references": {
|
|
669
|
-
"IconName": {
|
|
670
|
-
"location": "import",
|
|
671
|
-
"path": "../icon/exports",
|
|
672
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
"required": false,
|
|
677
|
-
"optional": true,
|
|
678
|
-
"docs": {
|
|
679
|
-
"tags": [{
|
|
680
|
-
"name": "deprecated",
|
|
681
|
-
"text": "Will be removed November 2025.\nLegacy single icon (prefer `leading` / `trailing` slots)."
|
|
682
|
-
}],
|
|
683
|
-
"text": ""
|
|
684
|
-
},
|
|
685
|
-
"getter": false,
|
|
686
|
-
"setter": false,
|
|
687
|
-
"reflect": true
|
|
688
|
-
},
|
|
689
|
-
"iconColor": {
|
|
690
|
-
"type": "string",
|
|
691
|
-
"attribute": "icon-color",
|
|
692
|
-
"mutable": false,
|
|
693
|
-
"complexType": {
|
|
694
|
-
"original": "string",
|
|
695
|
-
"resolved": "string",
|
|
696
|
-
"references": {}
|
|
697
|
-
},
|
|
698
|
-
"required": false,
|
|
699
|
-
"optional": true,
|
|
700
|
-
"docs": {
|
|
701
|
-
"tags": [{
|
|
702
|
-
"name": "deprecated",
|
|
703
|
-
"text": "Will be removed November 2025.\nColor for legacy icon."
|
|
704
|
-
}],
|
|
705
|
-
"text": ""
|
|
706
|
-
},
|
|
707
|
-
"getter": false,
|
|
708
|
-
"setter": false,
|
|
709
|
-
"reflect": false
|
|
710
|
-
},
|
|
711
|
-
"iconPosition": {
|
|
712
|
-
"type": "string",
|
|
713
|
-
"attribute": "icon-position",
|
|
714
|
-
"mutable": false,
|
|
715
|
-
"complexType": {
|
|
716
|
-
"original": "IconPosition",
|
|
717
|
-
"resolved": "\"end\" | \"start\"",
|
|
718
|
-
"references": {
|
|
719
|
-
"IconPosition": {
|
|
720
|
-
"location": "import",
|
|
721
|
-
"path": "../icon/exports",
|
|
722
|
-
"id": "src/components/icon/exports.ts::IconPosition"
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
"required": false,
|
|
727
|
-
"optional": false,
|
|
728
|
-
"docs": {
|
|
729
|
-
"tags": [{
|
|
730
|
-
"name": "deprecated",
|
|
731
|
-
"text": "Will be removed November 2025.\nPosition of legacy icon: `start` | `end`."
|
|
732
|
-
}],
|
|
733
|
-
"text": ""
|
|
734
|
-
},
|
|
735
|
-
"getter": false,
|
|
736
|
-
"setter": false,
|
|
737
|
-
"reflect": false,
|
|
738
|
-
"defaultValue": "'start'"
|
|
739
|
-
},
|
|
740
|
-
"iconSubmit": {
|
|
741
|
-
"type": "boolean",
|
|
742
|
-
"attribute": "icon-submit",
|
|
743
|
-
"mutable": false,
|
|
744
|
-
"complexType": {
|
|
745
|
-
"original": "boolean",
|
|
746
|
-
"resolved": "boolean",
|
|
747
|
-
"references": {}
|
|
748
|
-
},
|
|
749
|
-
"required": false,
|
|
750
|
-
"optional": true,
|
|
751
|
-
"docs": {
|
|
752
|
-
"tags": [{
|
|
753
|
-
"name": "deprecated",
|
|
754
|
-
"text": "Will be removed November 2025.\nTreat legacy icon as submit trigger."
|
|
755
|
-
}],
|
|
756
|
-
"text": ""
|
|
757
|
-
},
|
|
758
|
-
"getter": false,
|
|
759
|
-
"setter": false,
|
|
760
|
-
"reflect": false
|
|
761
|
-
},
|
|
762
591
|
"fullWidth": {
|
|
763
592
|
"type": "boolean",
|
|
764
593
|
"attribute": "full-width",
|
|
@@ -778,28 +607,6 @@ export class RInput {
|
|
|
778
607
|
"setter": false,
|
|
779
608
|
"reflect": true
|
|
780
609
|
},
|
|
781
|
-
"showValid": {
|
|
782
|
-
"type": "boolean",
|
|
783
|
-
"attribute": "show-valid",
|
|
784
|
-
"mutable": false,
|
|
785
|
-
"complexType": {
|
|
786
|
-
"original": "boolean",
|
|
787
|
-
"resolved": "boolean",
|
|
788
|
-
"references": {}
|
|
789
|
-
},
|
|
790
|
-
"required": false,
|
|
791
|
-
"optional": true,
|
|
792
|
-
"docs": {
|
|
793
|
-
"tags": [{
|
|
794
|
-
"name": "deprecated",
|
|
795
|
-
"text": "Will be removed November 2025.\nControls visibility of success validation marker."
|
|
796
|
-
}],
|
|
797
|
-
"text": ""
|
|
798
|
-
},
|
|
799
|
-
"getter": false,
|
|
800
|
-
"setter": false,
|
|
801
|
-
"reflect": true
|
|
802
|
-
},
|
|
803
610
|
"valid": {
|
|
804
611
|
"type": "boolean",
|
|
805
612
|
"attribute": "valid",
|
|
@@ -819,80 +626,6 @@ export class RInput {
|
|
|
819
626
|
"setter": false,
|
|
820
627
|
"reflect": true
|
|
821
628
|
},
|
|
822
|
-
"validMarker": {
|
|
823
|
-
"type": "boolean",
|
|
824
|
-
"attribute": "valid-marker",
|
|
825
|
-
"mutable": false,
|
|
826
|
-
"complexType": {
|
|
827
|
-
"original": "boolean",
|
|
828
|
-
"resolved": "boolean",
|
|
829
|
-
"references": {}
|
|
830
|
-
},
|
|
831
|
-
"required": false,
|
|
832
|
-
"optional": false,
|
|
833
|
-
"docs": {
|
|
834
|
-
"tags": [{
|
|
835
|
-
"name": "deprecated",
|
|
836
|
-
"text": "Will be removed November 2025.\nLegacy boolean to show a validation marker icon."
|
|
837
|
-
}],
|
|
838
|
-
"text": ""
|
|
839
|
-
},
|
|
840
|
-
"getter": false,
|
|
841
|
-
"setter": false,
|
|
842
|
-
"reflect": true,
|
|
843
|
-
"defaultValue": "false"
|
|
844
|
-
},
|
|
845
|
-
"validMarkerIcon": {
|
|
846
|
-
"type": "string",
|
|
847
|
-
"attribute": "valid-marker-icon",
|
|
848
|
-
"mutable": false,
|
|
849
|
-
"complexType": {
|
|
850
|
-
"original": "IconName",
|
|
851
|
-
"resolved": "string",
|
|
852
|
-
"references": {
|
|
853
|
-
"IconName": {
|
|
854
|
-
"location": "import",
|
|
855
|
-
"path": "../icon/exports",
|
|
856
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
},
|
|
860
|
-
"required": false,
|
|
861
|
-
"optional": false,
|
|
862
|
-
"docs": {
|
|
863
|
-
"tags": [{
|
|
864
|
-
"name": "deprecated",
|
|
865
|
-
"text": "Will be removed November 2025.\nIcon name used when `validMarker` is active and state is valid."
|
|
866
|
-
}],
|
|
867
|
-
"text": ""
|
|
868
|
-
},
|
|
869
|
-
"getter": false,
|
|
870
|
-
"setter": false,
|
|
871
|
-
"reflect": true,
|
|
872
|
-
"defaultValue": "'circled-check'"
|
|
873
|
-
},
|
|
874
|
-
"validMessage": {
|
|
875
|
-
"type": "string",
|
|
876
|
-
"attribute": "valid-message",
|
|
877
|
-
"mutable": false,
|
|
878
|
-
"complexType": {
|
|
879
|
-
"original": "string",
|
|
880
|
-
"resolved": "string",
|
|
881
|
-
"references": {}
|
|
882
|
-
},
|
|
883
|
-
"required": false,
|
|
884
|
-
"optional": true,
|
|
885
|
-
"docs": {
|
|
886
|
-
"tags": [{
|
|
887
|
-
"name": "deprecated",
|
|
888
|
-
"text": "Will be removed November 2025.\nCustom success message when field is valid."
|
|
889
|
-
}],
|
|
890
|
-
"text": ""
|
|
891
|
-
},
|
|
892
|
-
"getter": false,
|
|
893
|
-
"setter": false,
|
|
894
|
-
"reflect": false
|
|
895
|
-
},
|
|
896
629
|
"invalid": {
|
|
897
630
|
"type": "boolean",
|
|
898
631
|
"attribute": "invalid",
|
|
@@ -1298,6 +1031,25 @@ export class RInput {
|
|
|
1298
1031
|
"setter": false,
|
|
1299
1032
|
"reflect": false
|
|
1300
1033
|
},
|
|
1034
|
+
"passwordrules": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"attribute": "passwordrules",
|
|
1037
|
+
"mutable": false,
|
|
1038
|
+
"complexType": {
|
|
1039
|
+
"original": "string",
|
|
1040
|
+
"resolved": "string",
|
|
1041
|
+
"references": {}
|
|
1042
|
+
},
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"optional": true,
|
|
1045
|
+
"docs": {
|
|
1046
|
+
"tags": [],
|
|
1047
|
+
"text": "Safari-specific password rules for strong password generation (password inputs only).\nFormat: \"minlength: X; required: lower; required: upper; required: digit; required: special;\"\nThis attribute is Safari-specific and will be ignored by other browsers.\nSee: https://developer.apple.com/documentation/security/password_autofill/customizing_password_autofill_rules"
|
|
1048
|
+
},
|
|
1049
|
+
"getter": false,
|
|
1050
|
+
"setter": false,
|
|
1051
|
+
"reflect": false
|
|
1052
|
+
},
|
|
1301
1053
|
"autofocus": {
|
|
1302
1054
|
"type": "boolean",
|
|
1303
1055
|
"attribute": "autofocus",
|
|
@@ -1335,35 +1087,39 @@ export class RInput {
|
|
|
1335
1087
|
"getter": false,
|
|
1336
1088
|
"setter": false,
|
|
1337
1089
|
"reflect": true
|
|
1090
|
+
},
|
|
1091
|
+
"validityMarker": {
|
|
1092
|
+
"type": "boolean",
|
|
1093
|
+
"attribute": "validity-marker",
|
|
1094
|
+
"mutable": false,
|
|
1095
|
+
"complexType": {
|
|
1096
|
+
"original": "boolean",
|
|
1097
|
+
"resolved": "boolean",
|
|
1098
|
+
"references": {}
|
|
1099
|
+
},
|
|
1100
|
+
"required": false,
|
|
1101
|
+
"optional": false,
|
|
1102
|
+
"docs": {
|
|
1103
|
+
"tags": [],
|
|
1104
|
+
"text": "When `true` field renders valid/invalid marker within."
|
|
1105
|
+
},
|
|
1106
|
+
"getter": false,
|
|
1107
|
+
"setter": false,
|
|
1108
|
+
"reflect": true,
|
|
1109
|
+
"defaultValue": "true"
|
|
1338
1110
|
}
|
|
1339
1111
|
};
|
|
1340
1112
|
}
|
|
1341
1113
|
static get states() {
|
|
1342
1114
|
return {
|
|
1343
1115
|
"validityState": {},
|
|
1344
|
-
"validityMessage": {}
|
|
1116
|
+
"validityMessage": {},
|
|
1117
|
+
"touched": {},
|
|
1118
|
+
"dirty": {}
|
|
1345
1119
|
};
|
|
1346
1120
|
}
|
|
1347
1121
|
static get events() {
|
|
1348
1122
|
return [{
|
|
1349
|
-
"method": "rClickIcon",
|
|
1350
|
-
"name": "rClickIcon",
|
|
1351
|
-
"bubbles": true,
|
|
1352
|
-
"cancelable": true,
|
|
1353
|
-
"composed": true,
|
|
1354
|
-
"docs": {
|
|
1355
|
-
"tags": [{
|
|
1356
|
-
"name": "deprecated",
|
|
1357
|
-
"text": "Will be removed November 2025.\nEmitted when legacy icon is clicked."
|
|
1358
|
-
}],
|
|
1359
|
-
"text": ""
|
|
1360
|
-
},
|
|
1361
|
-
"complexType": {
|
|
1362
|
-
"original": "any",
|
|
1363
|
-
"resolved": "any",
|
|
1364
|
-
"references": {}
|
|
1365
|
-
}
|
|
1366
|
-
}, {
|
|
1367
1123
|
"method": "rValidate",
|
|
1368
1124
|
"name": "rValidate",
|
|
1369
1125
|
"bubbles": true,
|
|
@@ -1652,6 +1408,57 @@ export class RInput {
|
|
|
1652
1408
|
"text": "A boolean indicating whether the input is valid."
|
|
1653
1409
|
}]
|
|
1654
1410
|
}
|
|
1411
|
+
},
|
|
1412
|
+
"isTouched": {
|
|
1413
|
+
"complexType": {
|
|
1414
|
+
"signature": "() => Promise<boolean>",
|
|
1415
|
+
"parameters": [],
|
|
1416
|
+
"references": {
|
|
1417
|
+
"Promise": {
|
|
1418
|
+
"location": "global",
|
|
1419
|
+
"id": "global::Promise"
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
"return": "Promise<boolean>"
|
|
1423
|
+
},
|
|
1424
|
+
"docs": {
|
|
1425
|
+
"text": "Gets the touched state (whether user has interacted with the input)",
|
|
1426
|
+
"tags": []
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
"isDirty": {
|
|
1430
|
+
"complexType": {
|
|
1431
|
+
"signature": "() => Promise<boolean>",
|
|
1432
|
+
"parameters": [],
|
|
1433
|
+
"references": {
|
|
1434
|
+
"Promise": {
|
|
1435
|
+
"location": "global",
|
|
1436
|
+
"id": "global::Promise"
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
"return": "Promise<boolean>"
|
|
1440
|
+
},
|
|
1441
|
+
"docs": {
|
|
1442
|
+
"text": "Gets the dirty state (whether value has been changed by user)",
|
|
1443
|
+
"tags": []
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
"markAsPristine": {
|
|
1447
|
+
"complexType": {
|
|
1448
|
+
"signature": "() => Promise<void>",
|
|
1449
|
+
"parameters": [],
|
|
1450
|
+
"references": {
|
|
1451
|
+
"Promise": {
|
|
1452
|
+
"location": "global",
|
|
1453
|
+
"id": "global::Promise"
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"return": "Promise<void>"
|
|
1457
|
+
},
|
|
1458
|
+
"docs": {
|
|
1459
|
+
"text": "Resets touched and dirty states to pristine (untouched/clean)",
|
|
1460
|
+
"tags": []
|
|
1461
|
+
}
|
|
1655
1462
|
}
|
|
1656
1463
|
};
|
|
1657
1464
|
}
|
|
@@ -1660,6 +1467,9 @@ export class RInput {
|
|
|
1660
1467
|
return [{
|
|
1661
1468
|
"propName": "value",
|
|
1662
1469
|
"methodName": "handleValueChange"
|
|
1470
|
+
}, {
|
|
1471
|
+
"propName": "type",
|
|
1472
|
+
"methodName": "handleTypeChange"
|
|
1663
1473
|
}];
|
|
1664
1474
|
}
|
|
1665
1475
|
}
|