@riverty/web-components 5.7.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 +128 -0
- package/custom-elements.json +152 -372
- 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 +45 -14
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +2 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +28 -24
- package/dist/cjs/r-checkbox.cjs.entry.js +97 -81
- 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-icon.cjs.entry.js +1 -1
- package/dist/cjs/r-input-code.cjs.entry.js +133 -25
- package/dist/cjs/r-input-date.cjs.entry.js +87 -23
- package/dist/cjs/r-input-password.cjs.entry.js +34 -13
- package/dist/cjs/r-input-phone-number.cjs.entry.js +30 -22
- package/dist/cjs/r-input.cjs.entry.js +108 -49
- package/dist/cjs/r-list-item.cjs.entry.js +5 -5
- package/dist/cjs/r-pagination.cjs.entry.js +1 -1
- package/dist/cjs/r-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- 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 +32 -32
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +116 -40
- 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 +24 -23
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +51 -20
- 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 +58 -12
- package/dist/collection/components/alert/alert.js +92 -17
- package/dist/collection/components/alert/exports.js +1 -1
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/button/button.css +6 -7
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +121 -104
- package/dist/collection/components/checkbox-group/checkbox-group.js +48 -63
- 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/bundled-icons/riverty-kit.json +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +0 -7
- 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 +221 -378
- package/dist/collection/components/input-code/exports.js +2 -0
- package/dist/collection/components/input-code/input-code.js +335 -34
- package/dist/collection/components/input-date/input-date.js +237 -87
- 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 +233 -75
- package/dist/collection/components/input-phone-number/input-phone-number.js +50 -85
- 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/pagination/pagination.css +23 -23
- 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 +13 -13
- package/dist/collection/components/popover/popover.js +2 -55
- package/dist/collection/components/popover-action/popover-action.css +3 -5
- 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 +53 -135
- package/dist/collection/components/select/select.js +197 -349
- 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 +44 -163
- package/dist/collection/components/toast/toast.css +22 -14
- package/dist/collection/components/toast/toast.js +95 -43
- 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 +45 -14
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +2 -2
- package/dist/esm/r-checkbox-group.entry.js +28 -24
- package/dist/esm/r-checkbox.entry.js +97 -81
- 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-icon.entry.js +1 -1
- package/dist/esm/r-input-code.entry.js +133 -25
- package/dist/esm/r-input-date.entry.js +87 -23
- package/dist/esm/r-input-password.entry.js +34 -13
- package/dist/esm/r-input-phone-number.entry.js +30 -22
- package/dist/esm/r-input.entry.js +108 -49
- package/dist/esm/r-list-item.entry.js +5 -5
- package/dist/esm/r-pagination.entry.js +1 -1
- package/dist/esm/r-panel.entry.js +2 -2
- package/dist/esm/r-popover-action.entry.js +2 -2
- 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 +32 -32
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +116 -40
- 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 +24 -23
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +51 -20
- 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 +9 -1
- package/dist/types/components/alert/exports.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +29 -34
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +6 -11
- package/dist/types/components/dialog/dialog.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +35 -72
- package/dist/types/components/input-code/exports.d.ts +4 -0
- package/dist/types/components/input-code/input-code.d.ts +54 -7
- package/dist/types/components/input-date/input-date.d.ts +30 -16
- package/dist/types/components/input-password/exports.d.ts +1 -0
- package/dist/types/components/input-password/input-password.d.ts +53 -16
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +5 -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 +6 -28
- package/dist/types/components/select/select.d.ts +34 -52
- package/dist/types/components/textarea/textarea.d.ts +5 -32
- package/dist/types/components/toast/toast.d.ts +10 -7
- package/dist/types/components.d.ts +347 -647
- package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
- 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-1da75540.entry.js +1 -0
- 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-6a4f3836.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-77155630.entry.js → p-b98ab649.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-c478712b.entry.js +1 -0
- package/dist/web-components/{p-72c0c0d8.entry.js → p-d054eb4d.entry.js} +1 -1
- package/dist/web-components/p-d433a828.entry.js +1 -0
- 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-289eb4b0.entry.js +0 -1
- package/dist/web-components/p-2b8e12ae.entry.js +0 -1
- package/dist/web-components/p-2e2c8a5b.entry.js +0 -1
- package/dist/web-components/p-3a39932b.entry.js +0 -1
- package/dist/web-components/p-3bc93d65.entry.js +0 -1
- package/dist/web-components/p-44be9992.entry.js +0 -1
- package/dist/web-components/p-4652635a.entry.js +0 -1
- package/dist/web-components/p-51a5804b.entry.js +0 -1
- package/dist/web-components/p-63474b32.entry.js +0 -1
- package/dist/web-components/p-74d2a563.entry.js +0 -1
- package/dist/web-components/p-7ad8e78b.entry.js +0 -1
- package/dist/web-components/p-8028c2a9.entry.js +0 -1
- package/dist/web-components/p-96ddeb7f.entry.js +0 -1
- package/dist/web-components/p-9d898089.entry.js +0 -1
- package/dist/web-components/p-9e50120b.entry.js +0 -1
- package/dist/web-components/p-9eb1f262.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-b2f03016.entry.js +0 -1
- package/dist/web-components/p-c300c22f.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-d93c240d.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-f6a92287.entry.js +0 -1
- package/dist/web-components/p-f770e22b.entry.js +0 -1
- package/dist/web-components/p-f952161b.entry.js +0 -1
|
@@ -9,19 +9,8 @@ import StyleObserver from "style-observer";
|
|
|
9
9
|
*/
|
|
10
10
|
export class Select {
|
|
11
11
|
constructor() {
|
|
12
|
-
/** Controls the visibility of validation indicators for the field. */
|
|
13
|
-
this.showValid = false;
|
|
14
12
|
/** Define if select should render as a text item or a block */
|
|
15
13
|
this.fullWidth = false;
|
|
16
|
-
/** _DEPRECATED_ (This property will be removed in November 2025 release. Use `leading slot` instead)
|
|
17
|
-
* Define size of an icon that serves as leading icon in select */
|
|
18
|
-
this.leadingIconSize = 's';
|
|
19
|
-
/** _DEPRECATED_ (This property will be removed in November 2025 release.)
|
|
20
|
-
* Defines the trailing icon defined by name for select, Default: 'andle-down' */
|
|
21
|
-
this.trailingIcon = 'angle-down';
|
|
22
|
-
/** _DEPRECATED_ (This property will be removed in November 2025 release.)
|
|
23
|
-
* Define size of an icon that serves as trailing icon in select */
|
|
24
|
-
this.tralingIconSize = 's';
|
|
25
14
|
/** Define wether listbox appears on top or at the bottom of the select */
|
|
26
15
|
this.listboxPosition = 'bottom';
|
|
27
16
|
/**
|
|
@@ -48,10 +37,13 @@ export class Select {
|
|
|
48
37
|
this.valueToDisplay = '';
|
|
49
38
|
this.isInitializing = false;
|
|
50
39
|
this.isResetting = false;
|
|
51
|
-
this.isNewValue = false;
|
|
52
40
|
this.focusedOption = null;
|
|
53
41
|
this.isValueFocused = false;
|
|
54
42
|
this.isNoResultsFound = false;
|
|
43
|
+
/** Indicates if the user has interacted with the select (focused/clicked) */
|
|
44
|
+
this.touched = false;
|
|
45
|
+
/** Indicates if the value has been changed by user interaction */
|
|
46
|
+
this.dirty = false;
|
|
55
47
|
this.handleSlotChange = () => {
|
|
56
48
|
setTimeout(() => {
|
|
57
49
|
this.initialize();
|
|
@@ -65,16 +57,19 @@ export class Select {
|
|
|
65
57
|
/** Unique id */
|
|
66
58
|
this.uniqueId = `r-select-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
67
59
|
this.getValidityStateData = (element) => {
|
|
60
|
+
let validityState = '';
|
|
61
|
+
let validityMessage = '';
|
|
68
62
|
for (const state in element.validity) {
|
|
69
63
|
if (element.validity[state]) {
|
|
70
|
-
|
|
64
|
+
validityState = state;
|
|
71
65
|
if (this[state + 'Message']) {
|
|
72
|
-
|
|
73
|
-
return;
|
|
66
|
+
validityMessage = this[state + 'Message'];
|
|
67
|
+
return { validityState, validityMessage };
|
|
74
68
|
}
|
|
75
|
-
|
|
69
|
+
validityMessage = element.validationMessage;
|
|
76
70
|
}
|
|
77
71
|
}
|
|
72
|
+
return { validityState, validityMessage };
|
|
78
73
|
};
|
|
79
74
|
this.validateFormElement = (element = null) => {
|
|
80
75
|
if (element === null)
|
|
@@ -83,7 +78,9 @@ export class Select {
|
|
|
83
78
|
return;
|
|
84
79
|
if (this.error)
|
|
85
80
|
return;
|
|
86
|
-
this.getValidityStateData(element);
|
|
81
|
+
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
82
|
+
this.validityState = validityState;
|
|
83
|
+
this.validityMessage = validityMessage;
|
|
87
84
|
const isValid = this.validityState === 'valid';
|
|
88
85
|
this.valid = isValid;
|
|
89
86
|
this.invalid = !isValid;
|
|
@@ -105,6 +102,8 @@ export class Select {
|
|
|
105
102
|
return;
|
|
106
103
|
e.preventDefault();
|
|
107
104
|
e.stopPropagation();
|
|
105
|
+
// Mark as touched when user clicks on the select
|
|
106
|
+
this.touched = true;
|
|
108
107
|
this.toggle();
|
|
109
108
|
if (!this.isExpanded)
|
|
110
109
|
return;
|
|
@@ -119,7 +118,11 @@ export class Select {
|
|
|
119
118
|
return () => {
|
|
120
119
|
var _a;
|
|
121
120
|
if (this.isExpanded) {
|
|
122
|
-
|
|
121
|
+
const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
122
|
+
if (newValue !== this.currentValue) {
|
|
123
|
+
this.dirty = true;
|
|
124
|
+
}
|
|
125
|
+
this.setValueFromUserInteraction(newValue);
|
|
123
126
|
return;
|
|
124
127
|
}
|
|
125
128
|
this.expand();
|
|
@@ -140,7 +143,11 @@ export class Select {
|
|
|
140
143
|
return;
|
|
141
144
|
}
|
|
142
145
|
if (this.focusedOption && altKey) {
|
|
143
|
-
|
|
146
|
+
const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
147
|
+
if (newValue !== this.currentValue) {
|
|
148
|
+
this.dirty = true;
|
|
149
|
+
}
|
|
150
|
+
this.setValueFromUserInteraction(newValue);
|
|
144
151
|
return;
|
|
145
152
|
}
|
|
146
153
|
if (!this.combobox && this.focusedOption === this.optionElements[0])
|
|
@@ -214,7 +221,14 @@ export class Select {
|
|
|
214
221
|
};
|
|
215
222
|
}
|
|
216
223
|
case 'Tab':
|
|
217
|
-
return () => {
|
|
224
|
+
return () => {
|
|
225
|
+
var _a;
|
|
226
|
+
const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
227
|
+
if (newValue !== this.currentValue) {
|
|
228
|
+
this.dirty = true;
|
|
229
|
+
}
|
|
230
|
+
this.setValueFromUserInteraction(newValue);
|
|
231
|
+
};
|
|
218
232
|
default:
|
|
219
233
|
// No matching key handler: intentional no-op
|
|
220
234
|
return () => { void 0; };
|
|
@@ -286,7 +300,11 @@ export class Select {
|
|
|
286
300
|
return;
|
|
287
301
|
}
|
|
288
302
|
this.valueElement.value = '';
|
|
289
|
-
|
|
303
|
+
const newValue = '';
|
|
304
|
+
if (newValue !== this.currentValue) {
|
|
305
|
+
this.dirty = true;
|
|
306
|
+
}
|
|
307
|
+
this.setValueFromUserInteraction(newValue);
|
|
290
308
|
this.reportValidity();
|
|
291
309
|
break;
|
|
292
310
|
default:
|
|
@@ -303,6 +321,8 @@ export class Select {
|
|
|
303
321
|
};
|
|
304
322
|
this.onValueFocus = () => {
|
|
305
323
|
this.isValueFocused = true;
|
|
324
|
+
// Mark as touched when user focuses on the select
|
|
325
|
+
this.touched = true;
|
|
306
326
|
};
|
|
307
327
|
this.filterOptionsListByComboboxValue = (value = '') => {
|
|
308
328
|
const options = Array.from(this.host.querySelectorAll('r-select-option:not([data-no-results="true"])'));
|
|
@@ -348,6 +368,8 @@ export class Select {
|
|
|
348
368
|
this.onResetForm = () => {
|
|
349
369
|
// Clear validation results
|
|
350
370
|
this.resetValidation();
|
|
371
|
+
// Reset touched and dirty states
|
|
372
|
+
this.markAsPristine();
|
|
351
373
|
// Restore initial value
|
|
352
374
|
this.setValue(this.initial['value']);
|
|
353
375
|
// Emit rReset
|
|
@@ -387,15 +409,24 @@ export class Select {
|
|
|
387
409
|
handleValueChange(value, oldValue) {
|
|
388
410
|
if (this.isInitializing)
|
|
389
411
|
return;
|
|
390
|
-
this
|
|
391
|
-
|
|
412
|
+
// Only process if this is not the initial load (oldValue is defined)
|
|
413
|
+
if (oldValue !== undefined && oldValue !== value) {
|
|
414
|
+
// This is a programmatic change from parent attribute
|
|
415
|
+
// Do NOT mark as dirty, do NOT emit rChange
|
|
416
|
+
this._renderSelected(value, false);
|
|
417
|
+
this.clearComboboxOptions();
|
|
418
|
+
}
|
|
392
419
|
}
|
|
393
420
|
/** Listen for custom event triggered by "onClick" event on `<r-select-option>` */
|
|
394
421
|
optionSelectAction(e) {
|
|
395
422
|
e.stopPropagation();
|
|
396
423
|
if (this.disabled)
|
|
397
424
|
return;
|
|
398
|
-
|
|
425
|
+
// Mark as dirty only if value actually changes
|
|
426
|
+
if (e.target.value !== this.currentValue) {
|
|
427
|
+
this.dirty = true;
|
|
428
|
+
}
|
|
429
|
+
this.setValueFromUserInteraction(e.target.value);
|
|
399
430
|
}
|
|
400
431
|
tooltipFocusAction() {
|
|
401
432
|
this.collapse();
|
|
@@ -435,11 +466,28 @@ export class Select {
|
|
|
435
466
|
if (this.isExpanded)
|
|
436
467
|
this.defineListboxPositionState();
|
|
437
468
|
}
|
|
438
|
-
/**
|
|
469
|
+
/**
|
|
470
|
+
* Set value of the select programmatically.
|
|
471
|
+
* Does NOT mark as dirty or emit change events.
|
|
472
|
+
* Use this for programmatic value updates.
|
|
473
|
+
*/
|
|
439
474
|
async setValue(value = '') {
|
|
440
475
|
// Clear validation results
|
|
441
476
|
this.resetValidation();
|
|
442
|
-
|
|
477
|
+
// Don't emit change event for programmatic updates
|
|
478
|
+
this._renderSelected(value, false);
|
|
479
|
+
this.clearComboboxOptions();
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Internal method to set value from user interaction.
|
|
483
|
+
* Assumes dirty flag is already set by the caller.
|
|
484
|
+
* Will emit rChange if dirty flag is true.
|
|
485
|
+
*/
|
|
486
|
+
setValueFromUserInteraction(value = '') {
|
|
487
|
+
// Clear validation results
|
|
488
|
+
this.resetValidation();
|
|
489
|
+
// Emit change event for user interactions (if dirty is set)
|
|
490
|
+
this._renderSelected(value, true);
|
|
443
491
|
this.clearComboboxOptions();
|
|
444
492
|
}
|
|
445
493
|
/** Set value of the select */
|
|
@@ -450,6 +498,8 @@ export class Select {
|
|
|
450
498
|
async reset() {
|
|
451
499
|
// Clear validation results
|
|
452
500
|
this.resetValidation();
|
|
501
|
+
// Reset touched and dirty states
|
|
502
|
+
this.markAsPristine();
|
|
453
503
|
// Collapse options listbox
|
|
454
504
|
this.collapse();
|
|
455
505
|
// Restore unfiltered list
|
|
@@ -482,6 +532,35 @@ export class Select {
|
|
|
482
532
|
this.invalid = this.initial['invalid'];
|
|
483
533
|
this.valid = !this.invalid;
|
|
484
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Returns whether the select has been touched (focused/clicked by user).
|
|
537
|
+
* @returns A boolean indicating whether the select has been touched.
|
|
538
|
+
*/
|
|
539
|
+
async isTouched() {
|
|
540
|
+
return this.touched;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Returns whether the select value has been changed by user interaction.
|
|
544
|
+
* @returns A boolean indicating whether the select is dirty.
|
|
545
|
+
*/
|
|
546
|
+
async isDirty() {
|
|
547
|
+
return this.dirty;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Marks the select as untouched and pristine (not dirty).
|
|
551
|
+
*/
|
|
552
|
+
async markAsPristine() {
|
|
553
|
+
this.touched = false;
|
|
554
|
+
this.dirty = false;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Validates the textarea without triggering UI and returns a boolean indicating its validity.
|
|
558
|
+
* @returns A boolean indicating whether the textarea is valid.
|
|
559
|
+
*/
|
|
560
|
+
async checkValidity() {
|
|
561
|
+
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
562
|
+
return validityState === 'valid';
|
|
563
|
+
}
|
|
485
564
|
/** Check validity and reveal validation state and message */
|
|
486
565
|
async reportValidity() {
|
|
487
566
|
this.validateFormElement(this.nativeElement);
|
|
@@ -614,7 +693,11 @@ export class Select {
|
|
|
614
693
|
if (!this.isBusy) {
|
|
615
694
|
this.reportValidity();
|
|
616
695
|
}
|
|
617
|
-
|
|
696
|
+
// Only emit rChange if:
|
|
697
|
+
// 1. emitValue is true
|
|
698
|
+
// 2. Not during initialization or reset
|
|
699
|
+
// 3. The component is dirty (user has interacted)
|
|
700
|
+
if (emitValue && !this.isBusy && this.dirty) {
|
|
618
701
|
this.rChange.emit({
|
|
619
702
|
element: this.host,
|
|
620
703
|
value: value
|
|
@@ -931,11 +1014,8 @@ export class Select {
|
|
|
931
1014
|
var _a;
|
|
932
1015
|
return this.validityState !== 'valid' && ((_a = this.validityMessage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
933
1016
|
}
|
|
934
|
-
get hasValidationSuccess() {
|
|
935
|
-
return this.valid && this.validMessage && this.showValid;
|
|
936
|
-
}
|
|
937
1017
|
get hasMessage() {
|
|
938
|
-
return this.hasError || this.hasValidationError
|
|
1018
|
+
return this.hasError || this.hasValidationError;
|
|
939
1019
|
}
|
|
940
1020
|
get isInteractive() {
|
|
941
1021
|
return !this.disabled && !this.isReadonly;
|
|
@@ -970,14 +1050,10 @@ export class Select {
|
|
|
970
1050
|
}
|
|
971
1051
|
render() {
|
|
972
1052
|
var _a;
|
|
973
|
-
const { uniqueId, disabled, isExpanded, fieldIndicator, invalid, placeholder, required, hint, label, internal
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
tooltip,
|
|
977
|
-
'tooltip-icon': tooltipIcon,
|
|
978
|
-
'tooltip-icon-color': tooltipIconColor,
|
|
1053
|
+
const { uniqueId, disabled, isExpanded, fieldIndicator, invalid, placeholder, required, hint, label, internal } = this;
|
|
1054
|
+
const labelAttr = label ? {
|
|
1055
|
+
fieldIndicator
|
|
979
1056
|
} : {};
|
|
980
|
-
const labelAttr = label ? Object.assign({ fieldIndicator }, tooltipAttrs) : {};
|
|
981
1057
|
const isRequired = this.isInteractive ? !!required : false;
|
|
982
1058
|
const comboboxAttrs = {
|
|
983
1059
|
id: `${uniqueId}-value`,
|
|
@@ -1004,8 +1080,8 @@ export class Select {
|
|
|
1004
1080
|
disabled,
|
|
1005
1081
|
required: isRequired
|
|
1006
1082
|
};
|
|
1007
|
-
return (h(Host, { key: '
|
|
1008
|
-
h("r-hint", { key: '
|
|
1083
|
+
return (h(Host, { key: '7f1fb8ee95b7da1cd7aad0d212d1efa9da744dc2', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: 'cb2a21da12f1f1c0dc298f42338d32b709f62375', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: 'd293ba41b9846d24ba4a2c44fb8fcb9895637c03', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'b562d22174f435deed545a94d0fd7ce0233ba3de', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: '2412f39f04b62a1fac018b588fb463efc9760ae0' }, labelAttr), label)), h("slot", { key: '99c5c78534118199fc1e99daac2737b78d55bc28', name: "popover" })), hint &&
|
|
1084
|
+
h("r-hint", { key: '74f3cf98c25ba600e8faf8a1793d56ab14c01466', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '1960780639c8896bc52d1b62269d9453645132ef', class: "r-select" }, h("select", Object.assign({ key: '2b9d75c37066bfeb8e06b4097ecc73bd96358702', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: '3eff5f8f263a013e0ba7ba64eace1da6167b6d1f', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: 'bbfb28e905d17feee0bd2693faac327d8ef97894', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: '319993c58f2133c271c2db357d22132497751958', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: 'bbb21659679bb22e3aeb9471a34e3e007ab835d8', onSlotchange: this.handleSlotChange })))), h("div", { key: '5971e5c4f3bbb453dcae9f3ecbdf2c2f14cf0293', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '1c1aba3c4f3baa93cd6ecab59dd40d99ad5bd0b2', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage))));
|
|
1009
1085
|
}
|
|
1010
1086
|
static get is() { return "r-select"; }
|
|
1011
1087
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1135,69 +1211,6 @@ export class Select {
|
|
|
1135
1211
|
"setter": false,
|
|
1136
1212
|
"reflect": true
|
|
1137
1213
|
},
|
|
1138
|
-
"tooltip": {
|
|
1139
|
-
"type": "string",
|
|
1140
|
-
"attribute": "tooltip",
|
|
1141
|
-
"mutable": false,
|
|
1142
|
-
"complexType": {
|
|
1143
|
-
"original": "string",
|
|
1144
|
-
"resolved": "string",
|
|
1145
|
-
"references": {}
|
|
1146
|
-
},
|
|
1147
|
-
"required": false,
|
|
1148
|
-
"optional": true,
|
|
1149
|
-
"docs": {
|
|
1150
|
-
"tags": [],
|
|
1151
|
-
"text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nLabel tooltip text"
|
|
1152
|
-
},
|
|
1153
|
-
"getter": false,
|
|
1154
|
-
"setter": false,
|
|
1155
|
-
"reflect": true
|
|
1156
|
-
},
|
|
1157
|
-
"tooltipIcon": {
|
|
1158
|
-
"type": "string",
|
|
1159
|
-
"attribute": "tooltip-icon",
|
|
1160
|
-
"mutable": false,
|
|
1161
|
-
"complexType": {
|
|
1162
|
-
"original": "IconName",
|
|
1163
|
-
"resolved": "string",
|
|
1164
|
-
"references": {
|
|
1165
|
-
"IconName": {
|
|
1166
|
-
"location": "import",
|
|
1167
|
-
"path": "../icon/exports",
|
|
1168
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
},
|
|
1172
|
-
"required": false,
|
|
1173
|
-
"optional": true,
|
|
1174
|
-
"docs": {
|
|
1175
|
-
"tags": [],
|
|
1176
|
-
"text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nLabel tooltip trigger icon"
|
|
1177
|
-
},
|
|
1178
|
-
"getter": false,
|
|
1179
|
-
"setter": false,
|
|
1180
|
-
"reflect": false
|
|
1181
|
-
},
|
|
1182
|
-
"tooltipIconColor": {
|
|
1183
|
-
"type": "string",
|
|
1184
|
-
"attribute": "tooltip-icon-color",
|
|
1185
|
-
"mutable": false,
|
|
1186
|
-
"complexType": {
|
|
1187
|
-
"original": "string",
|
|
1188
|
-
"resolved": "string",
|
|
1189
|
-
"references": {}
|
|
1190
|
-
},
|
|
1191
|
-
"required": false,
|
|
1192
|
-
"optional": true,
|
|
1193
|
-
"docs": {
|
|
1194
|
-
"tags": [],
|
|
1195
|
-
"text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nChange color of an icon that triggers tooltip to one of the Riverty color tokens."
|
|
1196
|
-
},
|
|
1197
|
-
"getter": false,
|
|
1198
|
-
"setter": false,
|
|
1199
|
-
"reflect": false
|
|
1200
|
-
},
|
|
1201
1214
|
"placeholder": {
|
|
1202
1215
|
"type": "string",
|
|
1203
1216
|
"attribute": "placeholder",
|
|
@@ -1255,31 +1268,6 @@ export class Select {
|
|
|
1255
1268
|
"setter": false,
|
|
1256
1269
|
"reflect": true
|
|
1257
1270
|
},
|
|
1258
|
-
"disabledIcon": {
|
|
1259
|
-
"type": "string",
|
|
1260
|
-
"attribute": "disabled-icon",
|
|
1261
|
-
"mutable": false,
|
|
1262
|
-
"complexType": {
|
|
1263
|
-
"original": "IconName",
|
|
1264
|
-
"resolved": "string",
|
|
1265
|
-
"references": {
|
|
1266
|
-
"IconName": {
|
|
1267
|
-
"location": "import",
|
|
1268
|
-
"path": "../icon/exports",
|
|
1269
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
},
|
|
1273
|
-
"required": false,
|
|
1274
|
-
"optional": true,
|
|
1275
|
-
"docs": {
|
|
1276
|
-
"tags": [],
|
|
1277
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nDefines the trailing icon for select in disabled state"
|
|
1278
|
-
},
|
|
1279
|
-
"getter": false,
|
|
1280
|
-
"setter": false,
|
|
1281
|
-
"reflect": false
|
|
1282
|
-
},
|
|
1283
1271
|
"required": {
|
|
1284
1272
|
"type": "boolean",
|
|
1285
1273
|
"attribute": "required",
|
|
@@ -1318,64 +1306,6 @@ export class Select {
|
|
|
1318
1306
|
"setter": false,
|
|
1319
1307
|
"reflect": true
|
|
1320
1308
|
},
|
|
1321
|
-
"optional": {
|
|
1322
|
-
"type": "boolean",
|
|
1323
|
-
"attribute": "optional",
|
|
1324
|
-
"mutable": false,
|
|
1325
|
-
"complexType": {
|
|
1326
|
-
"original": "boolean",
|
|
1327
|
-
"resolved": "boolean",
|
|
1328
|
-
"references": {}
|
|
1329
|
-
},
|
|
1330
|
-
"required": false,
|
|
1331
|
-
"optional": true,
|
|
1332
|
-
"docs": {
|
|
1333
|
-
"tags": [],
|
|
1334
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release. Use `fieldIndicator` instead) Marks the field as optional"
|
|
1335
|
-
},
|
|
1336
|
-
"getter": false,
|
|
1337
|
-
"setter": false,
|
|
1338
|
-
"reflect": false
|
|
1339
|
-
},
|
|
1340
|
-
"optionalText": {
|
|
1341
|
-
"type": "string",
|
|
1342
|
-
"attribute": "optional-text",
|
|
1343
|
-
"mutable": false,
|
|
1344
|
-
"complexType": {
|
|
1345
|
-
"original": "string",
|
|
1346
|
-
"resolved": "string",
|
|
1347
|
-
"references": {}
|
|
1348
|
-
},
|
|
1349
|
-
"required": false,
|
|
1350
|
-
"optional": true,
|
|
1351
|
-
"docs": {
|
|
1352
|
-
"tags": [],
|
|
1353
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release. Use `fieldIndicator` instead)\nDefine the optional marker text if the field is marked as optional"
|
|
1354
|
-
},
|
|
1355
|
-
"getter": false,
|
|
1356
|
-
"setter": false,
|
|
1357
|
-
"reflect": true
|
|
1358
|
-
},
|
|
1359
|
-
"showValid": {
|
|
1360
|
-
"type": "boolean",
|
|
1361
|
-
"attribute": "show-valid",
|
|
1362
|
-
"mutable": false,
|
|
1363
|
-
"complexType": {
|
|
1364
|
-
"original": "boolean",
|
|
1365
|
-
"resolved": "boolean",
|
|
1366
|
-
"references": {}
|
|
1367
|
-
},
|
|
1368
|
-
"required": false,
|
|
1369
|
-
"optional": false,
|
|
1370
|
-
"docs": {
|
|
1371
|
-
"tags": [],
|
|
1372
|
-
"text": "Controls the visibility of validation indicators for the field."
|
|
1373
|
-
},
|
|
1374
|
-
"getter": false,
|
|
1375
|
-
"setter": false,
|
|
1376
|
-
"reflect": false,
|
|
1377
|
-
"defaultValue": "false"
|
|
1378
|
-
},
|
|
1379
1309
|
"valid": {
|
|
1380
1310
|
"type": "boolean",
|
|
1381
1311
|
"attribute": "valid",
|
|
@@ -1453,147 +1383,6 @@ export class Select {
|
|
|
1453
1383
|
"reflect": true,
|
|
1454
1384
|
"defaultValue": "false"
|
|
1455
1385
|
},
|
|
1456
|
-
"leadingIcon": {
|
|
1457
|
-
"type": "string",
|
|
1458
|
-
"attribute": "leading-icon",
|
|
1459
|
-
"mutable": false,
|
|
1460
|
-
"complexType": {
|
|
1461
|
-
"original": "IconName",
|
|
1462
|
-
"resolved": "string",
|
|
1463
|
-
"references": {
|
|
1464
|
-
"IconName": {
|
|
1465
|
-
"location": "import",
|
|
1466
|
-
"path": "../icon/exports",
|
|
1467
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
},
|
|
1471
|
-
"required": false,
|
|
1472
|
-
"optional": true,
|
|
1473
|
-
"docs": {
|
|
1474
|
-
"tags": [],
|
|
1475
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release. Use `leading slot` instead)\nAdds an icon defined by name that serves as leading icon in select"
|
|
1476
|
-
},
|
|
1477
|
-
"getter": false,
|
|
1478
|
-
"setter": false,
|
|
1479
|
-
"reflect": false
|
|
1480
|
-
},
|
|
1481
|
-
"leadingIconSrc": {
|
|
1482
|
-
"type": "string",
|
|
1483
|
-
"attribute": "leading-icon-src",
|
|
1484
|
-
"mutable": false,
|
|
1485
|
-
"complexType": {
|
|
1486
|
-
"original": "string",
|
|
1487
|
-
"resolved": "string",
|
|
1488
|
-
"references": {}
|
|
1489
|
-
},
|
|
1490
|
-
"required": false,
|
|
1491
|
-
"optional": true,
|
|
1492
|
-
"docs": {
|
|
1493
|
-
"tags": [],
|
|
1494
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release. Use `leading slot` instead)\nAdds an icon defined by file source that serves as leading icon in select"
|
|
1495
|
-
},
|
|
1496
|
-
"getter": false,
|
|
1497
|
-
"setter": false,
|
|
1498
|
-
"reflect": false
|
|
1499
|
-
},
|
|
1500
|
-
"leadingIconSize": {
|
|
1501
|
-
"type": "string",
|
|
1502
|
-
"attribute": "leading-icon-size",
|
|
1503
|
-
"mutable": false,
|
|
1504
|
-
"complexType": {
|
|
1505
|
-
"original": "IconSize",
|
|
1506
|
-
"resolved": "\"l\" | \"m\" | \"s\"",
|
|
1507
|
-
"references": {
|
|
1508
|
-
"IconSize": {
|
|
1509
|
-
"location": "import",
|
|
1510
|
-
"path": "../icon/exports",
|
|
1511
|
-
"id": "src/components/icon/exports.ts::IconSize"
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
},
|
|
1515
|
-
"required": false,
|
|
1516
|
-
"optional": true,
|
|
1517
|
-
"docs": {
|
|
1518
|
-
"tags": [],
|
|
1519
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release. Use `leading slot` instead)\nDefine size of an icon that serves as leading icon in select"
|
|
1520
|
-
},
|
|
1521
|
-
"getter": false,
|
|
1522
|
-
"setter": false,
|
|
1523
|
-
"reflect": false,
|
|
1524
|
-
"defaultValue": "'s'"
|
|
1525
|
-
},
|
|
1526
|
-
"trailingIcon": {
|
|
1527
|
-
"type": "string",
|
|
1528
|
-
"attribute": "trailing-icon",
|
|
1529
|
-
"mutable": false,
|
|
1530
|
-
"complexType": {
|
|
1531
|
-
"original": "IconName",
|
|
1532
|
-
"resolved": "string",
|
|
1533
|
-
"references": {
|
|
1534
|
-
"IconName": {
|
|
1535
|
-
"location": "import",
|
|
1536
|
-
"path": "../icon/exports",
|
|
1537
|
-
"id": "src/components/icon/exports.ts::IconName"
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
},
|
|
1541
|
-
"required": false,
|
|
1542
|
-
"optional": false,
|
|
1543
|
-
"docs": {
|
|
1544
|
-
"tags": [],
|
|
1545
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nDefines the trailing icon defined by name for select, Default: 'andle-down'"
|
|
1546
|
-
},
|
|
1547
|
-
"getter": false,
|
|
1548
|
-
"setter": false,
|
|
1549
|
-
"reflect": false,
|
|
1550
|
-
"defaultValue": "'angle-down'"
|
|
1551
|
-
},
|
|
1552
|
-
"trailingIconSrc": {
|
|
1553
|
-
"type": "string",
|
|
1554
|
-
"attribute": "trailing-icon-src",
|
|
1555
|
-
"mutable": false,
|
|
1556
|
-
"complexType": {
|
|
1557
|
-
"original": "string",
|
|
1558
|
-
"resolved": "string",
|
|
1559
|
-
"references": {}
|
|
1560
|
-
},
|
|
1561
|
-
"required": false,
|
|
1562
|
-
"optional": true,
|
|
1563
|
-
"docs": {
|
|
1564
|
-
"tags": [],
|
|
1565
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nDefines the trailing icon defined by source for select"
|
|
1566
|
-
},
|
|
1567
|
-
"getter": false,
|
|
1568
|
-
"setter": false,
|
|
1569
|
-
"reflect": false
|
|
1570
|
-
},
|
|
1571
|
-
"tralingIconSize": {
|
|
1572
|
-
"type": "string",
|
|
1573
|
-
"attribute": "traling-icon-size",
|
|
1574
|
-
"mutable": false,
|
|
1575
|
-
"complexType": {
|
|
1576
|
-
"original": "IconSize",
|
|
1577
|
-
"resolved": "\"l\" | \"m\" | \"s\"",
|
|
1578
|
-
"references": {
|
|
1579
|
-
"IconSize": {
|
|
1580
|
-
"location": "import",
|
|
1581
|
-
"path": "../icon/exports",
|
|
1582
|
-
"id": "src/components/icon/exports.ts::IconSize"
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
},
|
|
1586
|
-
"required": false,
|
|
1587
|
-
"optional": false,
|
|
1588
|
-
"docs": {
|
|
1589
|
-
"tags": [],
|
|
1590
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nDefine size of an icon that serves as trailing icon in select"
|
|
1591
|
-
},
|
|
1592
|
-
"getter": false,
|
|
1593
|
-
"setter": false,
|
|
1594
|
-
"reflect": false,
|
|
1595
|
-
"defaultValue": "'s'"
|
|
1596
|
-
},
|
|
1597
1386
|
"listboxPosition": {
|
|
1598
1387
|
"type": "string",
|
|
1599
1388
|
"attribute": "listbox-position",
|
|
@@ -1620,25 +1409,6 @@ export class Select {
|
|
|
1620
1409
|
"reflect": false,
|
|
1621
1410
|
"defaultValue": "'bottom'"
|
|
1622
1411
|
},
|
|
1623
|
-
"validMessage": {
|
|
1624
|
-
"type": "string",
|
|
1625
|
-
"attribute": "valid-message",
|
|
1626
|
-
"mutable": false,
|
|
1627
|
-
"complexType": {
|
|
1628
|
-
"original": "string",
|
|
1629
|
-
"resolved": "string",
|
|
1630
|
-
"references": {}
|
|
1631
|
-
},
|
|
1632
|
-
"required": false,
|
|
1633
|
-
"optional": true,
|
|
1634
|
-
"docs": {
|
|
1635
|
-
"tags": [],
|
|
1636
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nSet custom message if the element meets all its validation constraints."
|
|
1637
|
-
},
|
|
1638
|
-
"getter": false,
|
|
1639
|
-
"setter": false,
|
|
1640
|
-
"reflect": true
|
|
1641
|
-
},
|
|
1642
1412
|
"valueMissingMessage": {
|
|
1643
1413
|
"type": "string",
|
|
1644
1414
|
"attribute": "value-missing-message",
|
|
@@ -1793,10 +1563,11 @@ export class Select {
|
|
|
1793
1563
|
"valueToDisplay": {},
|
|
1794
1564
|
"isInitializing": {},
|
|
1795
1565
|
"isResetting": {},
|
|
1796
|
-
"isNewValue": {},
|
|
1797
1566
|
"focusedOption": {},
|
|
1798
1567
|
"isValueFocused": {},
|
|
1799
|
-
"isNoResultsFound": {}
|
|
1568
|
+
"isNoResultsFound": {},
|
|
1569
|
+
"touched": {},
|
|
1570
|
+
"dirty": {}
|
|
1800
1571
|
};
|
|
1801
1572
|
}
|
|
1802
1573
|
static get events() {
|
|
@@ -1910,7 +1681,7 @@ export class Select {
|
|
|
1910
1681
|
"return": "Promise<void>"
|
|
1911
1682
|
},
|
|
1912
1683
|
"docs": {
|
|
1913
|
-
"text": "Set value of the select",
|
|
1684
|
+
"text": "Set value of the select programmatically.\nDoes NOT mark as dirty or emit change events.\nUse this for programmatic value updates.",
|
|
1914
1685
|
"tags": []
|
|
1915
1686
|
}
|
|
1916
1687
|
},
|
|
@@ -1965,6 +1736,83 @@ export class Select {
|
|
|
1965
1736
|
"tags": []
|
|
1966
1737
|
}
|
|
1967
1738
|
},
|
|
1739
|
+
"isTouched": {
|
|
1740
|
+
"complexType": {
|
|
1741
|
+
"signature": "() => Promise<boolean>",
|
|
1742
|
+
"parameters": [],
|
|
1743
|
+
"references": {
|
|
1744
|
+
"Promise": {
|
|
1745
|
+
"location": "global",
|
|
1746
|
+
"id": "global::Promise"
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
"return": "Promise<boolean>"
|
|
1750
|
+
},
|
|
1751
|
+
"docs": {
|
|
1752
|
+
"text": "Returns whether the select has been touched (focused/clicked by user).",
|
|
1753
|
+
"tags": [{
|
|
1754
|
+
"name": "returns",
|
|
1755
|
+
"text": "A boolean indicating whether the select has been touched."
|
|
1756
|
+
}]
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
"isDirty": {
|
|
1760
|
+
"complexType": {
|
|
1761
|
+
"signature": "() => Promise<boolean>",
|
|
1762
|
+
"parameters": [],
|
|
1763
|
+
"references": {
|
|
1764
|
+
"Promise": {
|
|
1765
|
+
"location": "global",
|
|
1766
|
+
"id": "global::Promise"
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
"return": "Promise<boolean>"
|
|
1770
|
+
},
|
|
1771
|
+
"docs": {
|
|
1772
|
+
"text": "Returns whether the select value has been changed by user interaction.",
|
|
1773
|
+
"tags": [{
|
|
1774
|
+
"name": "returns",
|
|
1775
|
+
"text": "A boolean indicating whether the select is dirty."
|
|
1776
|
+
}]
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
"markAsPristine": {
|
|
1780
|
+
"complexType": {
|
|
1781
|
+
"signature": "() => Promise<void>",
|
|
1782
|
+
"parameters": [],
|
|
1783
|
+
"references": {
|
|
1784
|
+
"Promise": {
|
|
1785
|
+
"location": "global",
|
|
1786
|
+
"id": "global::Promise"
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
"return": "Promise<void>"
|
|
1790
|
+
},
|
|
1791
|
+
"docs": {
|
|
1792
|
+
"text": "Marks the select as untouched and pristine (not dirty).",
|
|
1793
|
+
"tags": []
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
"checkValidity": {
|
|
1797
|
+
"complexType": {
|
|
1798
|
+
"signature": "() => Promise<boolean>",
|
|
1799
|
+
"parameters": [],
|
|
1800
|
+
"references": {
|
|
1801
|
+
"Promise": {
|
|
1802
|
+
"location": "global",
|
|
1803
|
+
"id": "global::Promise"
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"return": "Promise<boolean>"
|
|
1807
|
+
},
|
|
1808
|
+
"docs": {
|
|
1809
|
+
"text": "Validates the textarea without triggering UI and returns a boolean indicating its validity.",
|
|
1810
|
+
"tags": [{
|
|
1811
|
+
"name": "returns",
|
|
1812
|
+
"text": "A boolean indicating whether the textarea is valid."
|
|
1813
|
+
}]
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1968
1816
|
"reportValidity": {
|
|
1969
1817
|
"complexType": {
|
|
1970
1818
|
"signature": "() => Promise<boolean>",
|