@aurodesignsystem/auro-formkit 1.6.0-beta.10 → 1.6.0-beta.12
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/.turbo/cache/013a48308b893dac-meta.json +1 -1
- package/.turbo/cache/0593477832b1052b-meta.json +1 -0
- package/.turbo/cache/0593477832b1052b.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +1 -0
- package/.turbo/cache/0a2b0a4df8a0443f.tar.zst +0 -0
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/141bb7d9a95e288b-meta.json +1 -0
- package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
- package/.turbo/cache/15b611d69353176d-meta.json +1 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1de15d89eed2d760-meta.json +1 -0
- package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/28b3bf750d6c5738-meta.json +1 -0
- package/.turbo/cache/28b3bf750d6c5738.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +1 -0
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/4ceca20b1e98dbd7-meta.json +1 -0
- package/.turbo/cache/4ceca20b1e98dbd7.tar.zst +0 -0
- package/.turbo/cache/4e8c9ab436c836bc-meta.json +1 -0
- package/.turbo/cache/4e8c9ab436c836bc.tar.zst +0 -0
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -0
- package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
- package/.turbo/cache/5bfa30d06f8727c7-meta.json +1 -0
- package/.turbo/cache/5bfa30d06f8727c7.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- package/.turbo/cache/626afdc67e0cb540-meta.json +1 -0
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
- package/.turbo/cache/691a74627ec57993-meta.json +1 -1
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
- package/.turbo/cache/69f7eb632e38f934-meta.json +1 -0
- package/.turbo/cache/69f7eb632e38f934.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
- package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7f01d2fe1c245278-meta.json +1 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8ca4e3f31520b797-meta.json +1 -0
- package/.turbo/cache/8ca4e3f31520b797.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -0
- package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/b8b1814a990c06f8-meta.json +1 -0
- package/.turbo/cache/b8b1814a990c06f8.tar.zst +0 -0
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +1 -0
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/bb8ec1d0fe0a761f-meta.json +1 -0
- package/.turbo/cache/bb8ec1d0fe0a761f.tar.zst +0 -0
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +1 -0
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
- package/.turbo/cache/cd845bb6102c589a-meta.json +1 -0
- package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
- package/.turbo/cache/d65801fd9a8c1a75-meta.json +1 -0
- package/.turbo/cache/d65801fd9a8c1a75.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +1 -0
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/e44f36589cdc0bbc-meta.json +1 -0
- package/.turbo/cache/e44f36589cdc0bbc.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f5db6f7110f4ae32-meta.json +1 -0
- package/.turbo/cache/f5db6f7110f4ae32.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fa6b53275a3b4dc5-meta.json +1 -0
- package/.turbo/cache/fa6b53275a3b4dc5.tar.zst +0 -0
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
- package/.turbo/cache/ff58f630c9d69af4-meta.json +1 -0
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- package/CHANGELOG.md +39 -0
- package/components/checkbox/.turbo/turbo-build.log +6 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/demo/api.html +6 -1
- package/components/checkbox/demo/api.js +16 -0
- package/components/checkbox/demo/api.md +63 -4
- package/components/checkbox/demo/api.min.js +84 -13
- package/components/checkbox/demo/index.min.js +59 -13
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +5 -0
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +59 -13
- package/components/checkbox/src/auro-checkbox-group.js +18 -6
- package/components/checkbox/src/auro-checkbox.js +9 -0
- package/components/combobox/.turbo/turbo-build.log +6 -3
- package/components/combobox/demo/api.js +4 -2
- package/components/combobox/demo/api.md +60 -1
- package/components/combobox/demo/api.min.js +101 -31
- package/components/combobox/demo/index.min.js +92 -31
- package/components/combobox/dist/auro-combobox.d.ts +5 -1
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +91 -29
- package/components/combobox/src/auro-combobox.js +14 -3
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/datepicker/.turbo/turbo-build.log +6 -3
- package/components/datepicker/demo/api.js +2 -0
- package/components/datepicker/demo/api.md +46 -1
- package/components/datepicker/demo/api.min.js +100 -30
- package/components/datepicker/demo/index.min.js +91 -30
- package/components/datepicker/dist/auro-datepicker.d.ts +5 -2
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +91 -30
- package/components/datepicker/src/auro-datepicker.js +14 -4
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +3 -3
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/src/styles/bibStyles-css.js +1 -1
- package/components/dropdown/src/styles/bibStyles.css +0 -5
- package/components/dropdown/src/styles/bibStyles.scss +0 -7
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +2 -2
- package/components/input/.turbo/turbo-build.log +16 -13
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/input/demo/api.js +2 -0
- package/components/input/demo/api.md +148 -98
- package/components/input/demo/api.min.js +56 -21
- package/components/input/demo/index.min.js +44 -18
- package/components/input/dist/base-input.d.ts +7 -8
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +44 -18
- package/components/input/src/base-input.js +11 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +13 -0
- package/components/input/src/styles/input.scss +21 -0
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +3 -3
- package/components/input/src/styles/label.scss +1 -2
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +7 -0
- package/components/input/src/styles/notificationIcons.scss +14 -0
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +23 -3
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.min.js +1 -2
- package/components/menu/demo/index.min.js +1 -2
- package/components/menu/dist/auro-menuoption.d.ts +0 -1
- package/components/menu/dist/auro-menuoption.d.ts.map +1 -1
- package/components/menu/dist/index.js +1 -2
- package/components/menu/src/auro-menuoption.js +1 -2
- package/components/radio/.turbo/turbo-build.log +6 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.html +1 -0
- package/components/radio/demo/api.js +2 -0
- package/components/radio/demo/api.md +57 -3
- package/components/radio/demo/api.min.js +55 -12
- package/components/radio/demo/index.min.js +46 -12
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +5 -0
- package/components/radio/dist/auro-radio.d.ts.map +1 -1
- package/components/radio/dist/index.js +46 -12
- package/components/radio/src/auro-radio-group.js +5 -5
- package/components/radio/src/auro-radio.js +9 -0
- package/components/select/.turbo/turbo-build.log +7 -4
- package/components/select/demo/api.js +4 -2
- package/components/select/demo/api.md +81 -17
- package/components/select/demo/api.min.js +52 -12
- package/components/select/demo/index.min.js +43 -12
- package/components/select/dist/auro-select.d.ts +5 -1
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +42 -10
- package/components/select/src/auro-select.js +9 -2
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +32 -7
- package/.turbo/cache/049b9083252d38be-meta.json +0 -1
- package/.turbo/cache/049b9083252d38be.tar.zst +0 -0
- package/.turbo/cache/0a1dd4481355cb0b-meta.json +0 -1
- package/.turbo/cache/0a1dd4481355cb0b.tar.zst +0 -0
- package/.turbo/cache/13cf37c850bd8cf4-meta.json +0 -1
- package/.turbo/cache/3323eb841acb9c4e-meta.json +0 -1
- package/.turbo/cache/3323eb841acb9c4e.tar.zst +0 -0
- package/.turbo/cache/34ba23e2e2d652ad-meta.json +0 -1
- package/.turbo/cache/34ba23e2e2d652ad.tar.zst +0 -0
- package/.turbo/cache/368cd6fed7975ad2-meta.json +0 -1
- package/.turbo/cache/368cd6fed7975ad2.tar.zst +0 -0
- package/.turbo/cache/3924bce8e51f0ffa-meta.json +0 -1
- package/.turbo/cache/3924bce8e51f0ffa.tar.zst +0 -0
- package/.turbo/cache/4567487084a055b7-meta.json +0 -1
- package/.turbo/cache/4567487084a055b7.tar.zst +0 -0
- package/.turbo/cache/4763278a7d3dbc16-meta.json +0 -1
- package/.turbo/cache/4763278a7d3dbc16.tar.zst +0 -0
- package/.turbo/cache/549e6ef9f9ffd9a8-meta.json +0 -1
- package/.turbo/cache/549e6ef9f9ffd9a8.tar.zst +0 -0
- package/.turbo/cache/59ccd8430174883c-meta.json +0 -1
- package/.turbo/cache/59ccd8430174883c.tar.zst +0 -0
- package/.turbo/cache/683d4c0e20c077a9-meta.json +0 -1
- package/.turbo/cache/683d4c0e20c077a9.tar.zst +0 -0
- package/.turbo/cache/8f8ffe35cc79d1a9-meta.json +0 -1
- package/.turbo/cache/8f8ffe35cc79d1a9.tar.zst +0 -0
- package/.turbo/cache/926d632729ca6536-meta.json +0 -1
- package/.turbo/cache/926d632729ca6536.tar.zst +0 -0
- package/.turbo/cache/9e7be41cc3a7ef43-meta.json +0 -1
- package/.turbo/cache/9e7be41cc3a7ef43.tar.zst +0 -0
- package/.turbo/cache/9ee793063ea89126-meta.json +0 -1
- package/.turbo/cache/9ee793063ea89126.tar.zst +0 -0
- package/.turbo/cache/a1558cef51c034da-meta.json +0 -1
- package/.turbo/cache/a1558cef51c034da.tar.zst +0 -0
- package/.turbo/cache/a24f2ff8e94e56e8-meta.json +0 -1
- package/.turbo/cache/a24f2ff8e94e56e8.tar.zst +0 -0
- package/.turbo/cache/a2705cf095a2ceb0-meta.json +0 -1
- package/.turbo/cache/a2705cf095a2ceb0.tar.zst +0 -0
- package/.turbo/cache/a33c0749886a41b5-meta.json +0 -1
- package/.turbo/cache/a33c0749886a41b5.tar.zst +0 -0
- package/.turbo/cache/a66b465385a30a2b-meta.json +0 -1
- package/.turbo/cache/a66b465385a30a2b.tar.zst +0 -0
- package/.turbo/cache/c1b72a92dec4fe37-meta.json +0 -1
- package/.turbo/cache/e25ac25a8a0ad126-meta.json +0 -1
- package/.turbo/cache/e25ac25a8a0ad126.tar.zst +0 -0
- package/.turbo/cache/e671573e4ef02c47-meta.json +0 -1
- package/.turbo/cache/e671573e4ef02c47.tar.zst +0 -0
- package/.turbo/cache/e86cee22dff5e281-meta.json +0 -1
- package/.turbo/cache/e86cee22dff5e281.tar.zst +0 -0
- package/.turbo/cache/f680556a8e954eac-meta.json +0 -1
- package/.turbo/cache/f680556a8e954eac.tar.zst +0 -0
- package/.turbo/cache/ffec4500b911b85a-meta.json +0 -1
- package/.turbo/cache/ffec4500b911b85a.tar.zst +0 -0
- /package/.turbo/cache/{c1b72a92dec4fe37.tar.zst → 15b611d69353176d.tar.zst} +0 -0
- /package/.turbo/cache/{13cf37c850bd8cf4.tar.zst → 7f01d2fe1c245278.tar.zst} +0 -0
|
@@ -173,6 +173,30 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
173
173
|
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Resets the element to its initial state.
|
|
178
|
+
* @private
|
|
179
|
+
* @param {object} elem - HTML element to reset.
|
|
180
|
+
* @returns {void}
|
|
181
|
+
*/
|
|
182
|
+
reset(elem) {
|
|
183
|
+
elem.validity = undefined;
|
|
184
|
+
elem.value = undefined;
|
|
185
|
+
|
|
186
|
+
// Resets the second value of the datepicker in range state
|
|
187
|
+
if (elem.valueEnd) {
|
|
188
|
+
elem.valueEnd = undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Resets selected option of element
|
|
192
|
+
if (elem.optionSelected) {
|
|
193
|
+
elem.optionSelected = undefined;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Runs validation to handle error attribute
|
|
197
|
+
this.validate(elem);
|
|
198
|
+
}
|
|
199
|
+
|
|
176
200
|
/**
|
|
177
201
|
* Determines the validity state of the element based on the common attribute restrictions (pattern).
|
|
178
202
|
* @private
|
|
@@ -187,10 +211,15 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
187
211
|
elem.validity = 'badInput';
|
|
188
212
|
elem.setCustomValidity = elem.setCustomValidityBadInput || '';
|
|
189
213
|
}
|
|
190
|
-
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
217
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
191
218
|
elem.validity = 'tooShort';
|
|
192
219
|
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
193
|
-
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (elem.value?.length > elem.maxLength) {
|
|
194
223
|
elem.validity = 'tooLong';
|
|
195
224
|
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
196
225
|
}
|
|
@@ -216,7 +245,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
216
245
|
elem.validity = 'tooShort';
|
|
217
246
|
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
218
247
|
}
|
|
219
|
-
} else if (elem.type === 'number'
|
|
248
|
+
} else if (elem.type === 'number') {
|
|
220
249
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
221
250
|
elem.validity = 'rangeOverflow';
|
|
222
251
|
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
@@ -321,14 +350,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
321
350
|
|
|
322
351
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
323
352
|
if (elem.validity && elem.validity !== 'valid') {
|
|
324
|
-
elem.isValid = false;
|
|
325
|
-
|
|
326
353
|
// Use the validity message override if it is declared
|
|
327
354
|
if (elem.ValidityMessageOverride) {
|
|
328
355
|
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
329
356
|
}
|
|
330
|
-
} else {
|
|
331
|
-
elem.isValid = true;
|
|
332
357
|
}
|
|
333
358
|
|
|
334
359
|
this.getErrorMessage(elem);
|
|
@@ -2809,7 +2834,7 @@ var colorCss$1$2 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.
|
|
|
2809
2834
|
|
|
2810
2835
|
var tokensCss$5 = i$3$1`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
2811
2836
|
|
|
2812
|
-
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common]
|
|
2837
|
+
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
2813
2838
|
|
|
2814
2839
|
var colorCss$5 = i$3$1`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2815
2840
|
|
|
@@ -3410,7 +3435,7 @@ const t$4=globalThis,e$1$1=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.
|
|
|
3410
3435
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3411
3436
|
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}r._$litElement$=!0,r["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i$6=globalThis.litElementPolyfillSupport;i$6?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3412
3437
|
|
|
3413
|
-
var styleCss$3$1 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-
|
|
3438
|
+
var styleCss$3$1 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:0;pointer-events:none}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{opacity:1;pointer-events:auto}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{--size-lgsm: 1.875rem;--size-xlsm: 2.75rem;--size-mdxxs: 1.2rem;position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
3414
3439
|
|
|
3415
3440
|
var colorCss$3 = i$2`.wrapper{border-color:transparent}.inputElement-helpText{color:var(--ds-auro-input-help-text-color)}input{background-color:transparent;caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}input::placeholder{color:transparent}input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}input:disabled{--ds-auro-input-input-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}label{color:var(--ds-auro-input-label-text-color)}:host(:not([bordered],[borderless])) .wrapper{border-bottom-color:var(--ds-auro-input-border-color)}:host([bordered]) .wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-container-color)}:host([bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host(:not([borderless])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host(:not([borderless])) .wrapper:focus-within:before{border-bottom-color:transparent}:host([validity]:not([validity=valid])){--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);--ds-auro-input-help-text-color: var(--ds-color-text-error-default, #cc1816)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-input-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}`;
|
|
3416
3441
|
|
|
@@ -5052,6 +5077,30 @@ class AuroFormValidation {
|
|
|
5052
5077
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5053
5078
|
}
|
|
5054
5079
|
|
|
5080
|
+
/**
|
|
5081
|
+
* Resets the element to its initial state.
|
|
5082
|
+
* @private
|
|
5083
|
+
* @param {object} elem - HTML element to reset.
|
|
5084
|
+
* @returns {void}
|
|
5085
|
+
*/
|
|
5086
|
+
reset(elem) {
|
|
5087
|
+
elem.validity = undefined;
|
|
5088
|
+
elem.value = undefined;
|
|
5089
|
+
|
|
5090
|
+
// Resets the second value of the datepicker in range state
|
|
5091
|
+
if (elem.valueEnd) {
|
|
5092
|
+
elem.valueEnd = undefined;
|
|
5093
|
+
}
|
|
5094
|
+
|
|
5095
|
+
// Resets selected option of element
|
|
5096
|
+
if (elem.optionSelected) {
|
|
5097
|
+
elem.optionSelected = undefined;
|
|
5098
|
+
}
|
|
5099
|
+
|
|
5100
|
+
// Runs validation to handle error attribute
|
|
5101
|
+
this.validate(elem);
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5055
5104
|
/**
|
|
5056
5105
|
* Determines the validity state of the element based on the common attribute restrictions (pattern).
|
|
5057
5106
|
* @private
|
|
@@ -5066,10 +5115,15 @@ class AuroFormValidation {
|
|
|
5066
5115
|
elem.validity = 'badInput';
|
|
5067
5116
|
elem.setCustomValidity = elem.setCustomValidityBadInput || '';
|
|
5068
5117
|
}
|
|
5069
|
-
}
|
|
5118
|
+
}
|
|
5119
|
+
|
|
5120
|
+
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
5121
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
5070
5122
|
elem.validity = 'tooShort';
|
|
5071
5123
|
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
5072
|
-
}
|
|
5124
|
+
}
|
|
5125
|
+
|
|
5126
|
+
if (elem.value?.length > elem.maxLength) {
|
|
5073
5127
|
elem.validity = 'tooLong';
|
|
5074
5128
|
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
5075
5129
|
}
|
|
@@ -5095,7 +5149,7 @@ class AuroFormValidation {
|
|
|
5095
5149
|
elem.validity = 'tooShort';
|
|
5096
5150
|
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
5097
5151
|
}
|
|
5098
|
-
} else if (elem.type === 'number'
|
|
5152
|
+
} else if (elem.type === 'number') {
|
|
5099
5153
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
5100
5154
|
elem.validity = 'rangeOverflow';
|
|
5101
5155
|
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
@@ -5200,14 +5254,10 @@ class AuroFormValidation {
|
|
|
5200
5254
|
|
|
5201
5255
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
5202
5256
|
if (elem.validity && elem.validity !== 'valid') {
|
|
5203
|
-
elem.isValid = false;
|
|
5204
|
-
|
|
5205
5257
|
// Use the validity message override if it is declared
|
|
5206
5258
|
if (elem.ValidityMessageOverride) {
|
|
5207
5259
|
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
5208
5260
|
}
|
|
5209
|
-
} else {
|
|
5210
|
-
elem.isValid = true;
|
|
5211
5261
|
}
|
|
5212
5262
|
|
|
5213
5263
|
this.getErrorMessage(elem);
|
|
@@ -5297,12 +5347,11 @@ class AuroFormValidation {
|
|
|
5297
5347
|
* @attr {String} helpText - Deprecated, see `slot`.
|
|
5298
5348
|
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
5299
5349
|
* @attr {String} id - Sets the unique ID of the element.
|
|
5300
|
-
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
|
|
5301
5350
|
* @attr {String} label - Deprecated, see `slot`.
|
|
5302
5351
|
* @attr {String} lang - defines the language of an element.
|
|
5303
|
-
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `
|
|
5352
|
+
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5304
5353
|
* @attr {Number} maxLength - The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5305
|
-
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `
|
|
5354
|
+
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5306
5355
|
* @attr {Number} minLength - The minimum number of characters the user can enter into the text input. This must be an non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
5307
5356
|
* @attr {String} name - Populates the `name` attribute on the input.
|
|
5308
5357
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
@@ -5342,8 +5391,6 @@ class BaseInput extends r {
|
|
|
5342
5391
|
constructor() {
|
|
5343
5392
|
super();
|
|
5344
5393
|
|
|
5345
|
-
this.isValid = false;
|
|
5346
|
-
|
|
5347
5394
|
this.icon = false;
|
|
5348
5395
|
this.disabled = false;
|
|
5349
5396
|
this.required = false;
|
|
@@ -5372,6 +5419,7 @@ class BaseInput extends r {
|
|
|
5372
5419
|
|
|
5373
5420
|
this.allowedInputTypes = [
|
|
5374
5421
|
"text",
|
|
5422
|
+
"number",
|
|
5375
5423
|
"email",
|
|
5376
5424
|
"password",
|
|
5377
5425
|
"credit-card",
|
|
@@ -5464,10 +5512,6 @@ class BaseInput extends r {
|
|
|
5464
5512
|
reflect: true
|
|
5465
5513
|
},
|
|
5466
5514
|
errorMessage: { type: String },
|
|
5467
|
-
isValid: {
|
|
5468
|
-
type: String,
|
|
5469
|
-
reflect: true
|
|
5470
|
-
},
|
|
5471
5515
|
validity: {
|
|
5472
5516
|
type: String,
|
|
5473
5517
|
reflect: true
|
|
@@ -5870,7 +5914,7 @@ class BaseInput extends r {
|
|
|
5870
5914
|
* @return {void}
|
|
5871
5915
|
*/
|
|
5872
5916
|
handleInput() {
|
|
5873
|
-
// Prevent non-
|
|
5917
|
+
// Prevent non-number characters from being entered on credit card fields.
|
|
5874
5918
|
if (this.type === 'credit-card') {
|
|
5875
5919
|
this.inputElement.value = this.inputElement.value.replace(/[\D]/gu, '');
|
|
5876
5920
|
}
|
|
@@ -5956,6 +6000,13 @@ class BaseInput extends r {
|
|
|
5956
6000
|
this.validation.validate(this);
|
|
5957
6001
|
}
|
|
5958
6002
|
|
|
6003
|
+
/**
|
|
6004
|
+
* Resets component to initial state.
|
|
6005
|
+
* @returns {void}
|
|
6006
|
+
*/
|
|
6007
|
+
reset() {
|
|
6008
|
+
this.validation.reset(this);
|
|
6009
|
+
}
|
|
5959
6010
|
|
|
5960
6011
|
/**
|
|
5961
6012
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
@@ -7335,8 +7386,7 @@ class AuroCombobox extends r$6 {
|
|
|
7335
7386
|
reflect: true
|
|
7336
7387
|
},
|
|
7337
7388
|
value: {
|
|
7338
|
-
type: String
|
|
7339
|
-
reflect: true
|
|
7389
|
+
type: String
|
|
7340
7390
|
},
|
|
7341
7391
|
checkmark: {
|
|
7342
7392
|
type: Boolean,
|
|
@@ -7649,7 +7699,7 @@ class AuroCombobox extends r$6 {
|
|
|
7649
7699
|
}
|
|
7650
7700
|
|
|
7651
7701
|
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
7652
|
-
if (this.input.value.length === 0) {
|
|
7702
|
+
if (this.input.value && this.input.value.length === 0) {
|
|
7653
7703
|
this.hideBib();
|
|
7654
7704
|
this.classList.remove('combobox-filled');
|
|
7655
7705
|
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
@@ -7810,6 +7860,18 @@ class AuroCombobox extends r$6 {
|
|
|
7810
7860
|
this.input.focus();
|
|
7811
7861
|
}
|
|
7812
7862
|
|
|
7863
|
+
/**
|
|
7864
|
+
* Resets component to initial state.
|
|
7865
|
+
* @returns {void}
|
|
7866
|
+
*/
|
|
7867
|
+
reset() {
|
|
7868
|
+
// Resets the help text of the combobox
|
|
7869
|
+
this.auroInputHelpText = undefined;
|
|
7870
|
+
|
|
7871
|
+
this.input.reset();
|
|
7872
|
+
this.validation.reset(this);
|
|
7873
|
+
}
|
|
7874
|
+
|
|
7813
7875
|
updated(changedProperties) {
|
|
7814
7876
|
// After the component is ready, send direct value changes to auro-menu.
|
|
7815
7877
|
if (changedProperties.has('value')) {
|
|
@@ -8922,8 +8984,7 @@ class AuroMenuOption extends r$6 {
|
|
|
8922
8984
|
reflect: true
|
|
8923
8985
|
},
|
|
8924
8986
|
value: {
|
|
8925
|
-
type: String
|
|
8926
|
-
reflect: true
|
|
8987
|
+
type: String
|
|
8927
8988
|
},
|
|
8928
8989
|
tabIndex: {
|
|
8929
8990
|
type: Number,
|
|
@@ -59,7 +59,6 @@ export class AuroCombobox extends LitElement {
|
|
|
59
59
|
};
|
|
60
60
|
value: {
|
|
61
61
|
type: StringConstructor;
|
|
62
|
-
reflect: boolean;
|
|
63
62
|
};
|
|
64
63
|
checkmark: {
|
|
65
64
|
type: BooleanConstructor;
|
|
@@ -227,6 +226,11 @@ export class AuroCombobox extends LitElement {
|
|
|
227
226
|
* @returns {void}
|
|
228
227
|
*/
|
|
229
228
|
focus(): void;
|
|
229
|
+
/**
|
|
230
|
+
* Resets component to initial state.
|
|
231
|
+
* @returns {void}
|
|
232
|
+
*/
|
|
233
|
+
reset(): void;
|
|
230
234
|
updated(changedProperties: any): void;
|
|
231
235
|
/**
|
|
232
236
|
* Watch for slot changes and recalculate the menuoptions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auro-combobox.d.ts","sourceRoot":"","sources":["../src/auro-combobox.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;GAkBG;AAGH;IA+CE
|
|
1
|
+
{"version":3,"file":"auro-combobox.d.ts","sourceRoot":"","sources":["../src/auro-combobox.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;GAkBG;AAGH;IA+CE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6CI;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;MAGN;IAED,+CAEC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IA3IC,kBAAqB;IACrB,cAAyB;IACzB,WAAiB;IACjB,oBAA0B;IAI1B;;OAEG;IACH,mBAA0C;IAE1C;;OAEG;IACH,qBAAiD;IAEjD;;OAEG;IACH,6BAAiC;IAMjC,iBAAyF;IACzF,cAA6E;IAG/E;;;OAGG;IACH,wBAIC;IAHC,wBAA0B;IAC1B,kBAAwB;IACxB,4BAAqD;IAwGvD;;;;OAIG;IACH,0BAiDC;IA1CG,mBAA8B;IA4ClC;;;;OAIG;IACH,6BAMC;IAJG,qCAA+E;IAMnF;;;;OAIG;IACH,gBAIC;IAED;;;;OAIG;IACH,gBAcC;IAED;;;;OAIG;IACH,0BAaC;IAZC,iBAA8D;IAchE;;;;OAIG;IACH,sBAyEC;IAxEC,cAAwD;IA0E1D;;;;OAIG;IACH,uBAuEC;IAFG,uBAA2C;IAI/C;;;;;;;;;;;;;OAaG;IACH,gCAOC;IAED;;;;OAIG;IACH,+BAeC;IAED;;;;OAIG;IACH,0BAqCC;IAWC,iBAAiE;IAWnE,qBAgBC;IAZC,cAA4E;IAC5E,WAAoE;IAatE;;;OAGG;IACH,SAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,SAFa,IAAI,CAQhB;IAED,sCAgCC;IAED;;;;;OAKG;IACH,yBAcC;IAGD,4CA8CC;CACF;2BAzsB0B,KAAK"}
|
|
@@ -150,6 +150,30 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
150
150
|
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Resets the element to its initial state.
|
|
155
|
+
* @private
|
|
156
|
+
* @param {object} elem - HTML element to reset.
|
|
157
|
+
* @returns {void}
|
|
158
|
+
*/
|
|
159
|
+
reset(elem) {
|
|
160
|
+
elem.validity = undefined;
|
|
161
|
+
elem.value = undefined;
|
|
162
|
+
|
|
163
|
+
// Resets the second value of the datepicker in range state
|
|
164
|
+
if (elem.valueEnd) {
|
|
165
|
+
elem.valueEnd = undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Resets selected option of element
|
|
169
|
+
if (elem.optionSelected) {
|
|
170
|
+
elem.optionSelected = undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Runs validation to handle error attribute
|
|
174
|
+
this.validate(elem);
|
|
175
|
+
}
|
|
176
|
+
|
|
153
177
|
/**
|
|
154
178
|
* Determines the validity state of the element based on the common attribute restrictions (pattern).
|
|
155
179
|
* @private
|
|
@@ -164,10 +188,15 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
164
188
|
elem.validity = 'badInput';
|
|
165
189
|
elem.setCustomValidity = elem.setCustomValidityBadInput || '';
|
|
166
190
|
}
|
|
167
|
-
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
194
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
168
195
|
elem.validity = 'tooShort';
|
|
169
196
|
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
170
|
-
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (elem.value?.length > elem.maxLength) {
|
|
171
200
|
elem.validity = 'tooLong';
|
|
172
201
|
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
173
202
|
}
|
|
@@ -193,7 +222,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
193
222
|
elem.validity = 'tooShort';
|
|
194
223
|
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
195
224
|
}
|
|
196
|
-
} else if (elem.type === 'number'
|
|
225
|
+
} else if (elem.type === 'number') {
|
|
197
226
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
198
227
|
elem.validity = 'rangeOverflow';
|
|
199
228
|
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
@@ -298,14 +327,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
298
327
|
|
|
299
328
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
300
329
|
if (elem.validity && elem.validity !== 'valid') {
|
|
301
|
-
elem.isValid = false;
|
|
302
|
-
|
|
303
330
|
// Use the validity message override if it is declared
|
|
304
331
|
if (elem.ValidityMessageOverride) {
|
|
305
332
|
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
306
333
|
}
|
|
307
|
-
} else {
|
|
308
|
-
elem.isValid = true;
|
|
309
334
|
}
|
|
310
335
|
|
|
311
336
|
this.getErrorMessage(elem);
|
|
@@ -2786,7 +2811,7 @@ var colorCss$1$1 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.
|
|
|
2786
2811
|
|
|
2787
2812
|
var tokensCss$4 = i$3$1`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
2788
2813
|
|
|
2789
|
-
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common]
|
|
2814
|
+
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
2790
2815
|
|
|
2791
2816
|
var colorCss$4 = i$3$1`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2792
2817
|
|
|
@@ -3387,7 +3412,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
3387
3412
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3388
3413
|
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}r._$litElement$=!0,r["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3389
3414
|
|
|
3390
|
-
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-
|
|
3415
|
+
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:0;pointer-events:none}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{opacity:1;pointer-events:auto}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{--size-lgsm: 1.875rem;--size-xlsm: 2.75rem;--size-mdxxs: 1.2rem;position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
3391
3416
|
|
|
3392
3417
|
var colorCss$3 = i$2`.wrapper{border-color:transparent}.inputElement-helpText{color:var(--ds-auro-input-help-text-color)}input{background-color:transparent;caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}input::placeholder{color:transparent}input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}input:disabled{--ds-auro-input-input-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}label{color:var(--ds-auro-input-label-text-color)}:host(:not([bordered],[borderless])) .wrapper{border-bottom-color:var(--ds-auro-input-border-color)}:host([bordered]) .wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-container-color)}:host([bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host(:not([borderless])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host(:not([borderless])) .wrapper:focus-within:before{border-bottom-color:transparent}:host([validity]:not([validity=valid])){--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);--ds-auro-input-help-text-color: var(--ds-color-text-error-default, #cc1816)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-input-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}`;
|
|
3393
3418
|
|
|
@@ -5029,6 +5054,30 @@ class AuroFormValidation {
|
|
|
5029
5054
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5030
5055
|
}
|
|
5031
5056
|
|
|
5057
|
+
/**
|
|
5058
|
+
* Resets the element to its initial state.
|
|
5059
|
+
* @private
|
|
5060
|
+
* @param {object} elem - HTML element to reset.
|
|
5061
|
+
* @returns {void}
|
|
5062
|
+
*/
|
|
5063
|
+
reset(elem) {
|
|
5064
|
+
elem.validity = undefined;
|
|
5065
|
+
elem.value = undefined;
|
|
5066
|
+
|
|
5067
|
+
// Resets the second value of the datepicker in range state
|
|
5068
|
+
if (elem.valueEnd) {
|
|
5069
|
+
elem.valueEnd = undefined;
|
|
5070
|
+
}
|
|
5071
|
+
|
|
5072
|
+
// Resets selected option of element
|
|
5073
|
+
if (elem.optionSelected) {
|
|
5074
|
+
elem.optionSelected = undefined;
|
|
5075
|
+
}
|
|
5076
|
+
|
|
5077
|
+
// Runs validation to handle error attribute
|
|
5078
|
+
this.validate(elem);
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5032
5081
|
/**
|
|
5033
5082
|
* Determines the validity state of the element based on the common attribute restrictions (pattern).
|
|
5034
5083
|
* @private
|
|
@@ -5043,10 +5092,15 @@ class AuroFormValidation {
|
|
|
5043
5092
|
elem.validity = 'badInput';
|
|
5044
5093
|
elem.setCustomValidity = elem.setCustomValidityBadInput || '';
|
|
5045
5094
|
}
|
|
5046
|
-
}
|
|
5095
|
+
}
|
|
5096
|
+
|
|
5097
|
+
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
5098
|
+
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
5047
5099
|
elem.validity = 'tooShort';
|
|
5048
5100
|
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
5049
|
-
}
|
|
5101
|
+
}
|
|
5102
|
+
|
|
5103
|
+
if (elem.value?.length > elem.maxLength) {
|
|
5050
5104
|
elem.validity = 'tooLong';
|
|
5051
5105
|
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
5052
5106
|
}
|
|
@@ -5072,7 +5126,7 @@ class AuroFormValidation {
|
|
|
5072
5126
|
elem.validity = 'tooShort';
|
|
5073
5127
|
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
5074
5128
|
}
|
|
5075
|
-
} else if (elem.type === 'number'
|
|
5129
|
+
} else if (elem.type === 'number') {
|
|
5076
5130
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
5077
5131
|
elem.validity = 'rangeOverflow';
|
|
5078
5132
|
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
@@ -5177,14 +5231,10 @@ class AuroFormValidation {
|
|
|
5177
5231
|
|
|
5178
5232
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
5179
5233
|
if (elem.validity && elem.validity !== 'valid') {
|
|
5180
|
-
elem.isValid = false;
|
|
5181
|
-
|
|
5182
5234
|
// Use the validity message override if it is declared
|
|
5183
5235
|
if (elem.ValidityMessageOverride) {
|
|
5184
5236
|
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
5185
5237
|
}
|
|
5186
|
-
} else {
|
|
5187
|
-
elem.isValid = true;
|
|
5188
5238
|
}
|
|
5189
5239
|
|
|
5190
5240
|
this.getErrorMessage(elem);
|
|
@@ -5274,12 +5324,11 @@ class AuroFormValidation {
|
|
|
5274
5324
|
* @attr {String} helpText - Deprecated, see `slot`.
|
|
5275
5325
|
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
5276
5326
|
* @attr {String} id - Sets the unique ID of the element.
|
|
5277
|
-
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
|
|
5278
5327
|
* @attr {String} label - Deprecated, see `slot`.
|
|
5279
5328
|
* @attr {String} lang - defines the language of an element.
|
|
5280
|
-
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `
|
|
5329
|
+
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5281
5330
|
* @attr {Number} maxLength - The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5282
|
-
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `
|
|
5331
|
+
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5283
5332
|
* @attr {Number} minLength - The minimum number of characters the user can enter into the text input. This must be an non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
5284
5333
|
* @attr {String} name - Populates the `name` attribute on the input.
|
|
5285
5334
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
@@ -5319,8 +5368,6 @@ class BaseInput extends r {
|
|
|
5319
5368
|
constructor() {
|
|
5320
5369
|
super();
|
|
5321
5370
|
|
|
5322
|
-
this.isValid = false;
|
|
5323
|
-
|
|
5324
5371
|
this.icon = false;
|
|
5325
5372
|
this.disabled = false;
|
|
5326
5373
|
this.required = false;
|
|
@@ -5349,6 +5396,7 @@ class BaseInput extends r {
|
|
|
5349
5396
|
|
|
5350
5397
|
this.allowedInputTypes = [
|
|
5351
5398
|
"text",
|
|
5399
|
+
"number",
|
|
5352
5400
|
"email",
|
|
5353
5401
|
"password",
|
|
5354
5402
|
"credit-card",
|
|
@@ -5441,10 +5489,6 @@ class BaseInput extends r {
|
|
|
5441
5489
|
reflect: true
|
|
5442
5490
|
},
|
|
5443
5491
|
errorMessage: { type: String },
|
|
5444
|
-
isValid: {
|
|
5445
|
-
type: String,
|
|
5446
|
-
reflect: true
|
|
5447
|
-
},
|
|
5448
5492
|
validity: {
|
|
5449
5493
|
type: String,
|
|
5450
5494
|
reflect: true
|
|
@@ -5847,7 +5891,7 @@ class BaseInput extends r {
|
|
|
5847
5891
|
* @return {void}
|
|
5848
5892
|
*/
|
|
5849
5893
|
handleInput() {
|
|
5850
|
-
// Prevent non-
|
|
5894
|
+
// Prevent non-number characters from being entered on credit card fields.
|
|
5851
5895
|
if (this.type === 'credit-card') {
|
|
5852
5896
|
this.inputElement.value = this.inputElement.value.replace(/[\D]/gu, '');
|
|
5853
5897
|
}
|
|
@@ -5933,6 +5977,13 @@ class BaseInput extends r {
|
|
|
5933
5977
|
this.validation.validate(this);
|
|
5934
5978
|
}
|
|
5935
5979
|
|
|
5980
|
+
/**
|
|
5981
|
+
* Resets component to initial state.
|
|
5982
|
+
* @returns {void}
|
|
5983
|
+
*/
|
|
5984
|
+
reset() {
|
|
5985
|
+
this.validation.reset(this);
|
|
5986
|
+
}
|
|
5936
5987
|
|
|
5937
5988
|
/**
|
|
5938
5989
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
@@ -7312,8 +7363,7 @@ class AuroCombobox extends r$6 {
|
|
|
7312
7363
|
reflect: true
|
|
7313
7364
|
},
|
|
7314
7365
|
value: {
|
|
7315
|
-
type: String
|
|
7316
|
-
reflect: true
|
|
7366
|
+
type: String
|
|
7317
7367
|
},
|
|
7318
7368
|
checkmark: {
|
|
7319
7369
|
type: Boolean,
|
|
@@ -7626,7 +7676,7 @@ class AuroCombobox extends r$6 {
|
|
|
7626
7676
|
}
|
|
7627
7677
|
|
|
7628
7678
|
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
7629
|
-
if (this.input.value.length === 0) {
|
|
7679
|
+
if (this.input.value && this.input.value.length === 0) {
|
|
7630
7680
|
this.hideBib();
|
|
7631
7681
|
this.classList.remove('combobox-filled');
|
|
7632
7682
|
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
@@ -7787,6 +7837,18 @@ class AuroCombobox extends r$6 {
|
|
|
7787
7837
|
this.input.focus();
|
|
7788
7838
|
}
|
|
7789
7839
|
|
|
7840
|
+
/**
|
|
7841
|
+
* Resets component to initial state.
|
|
7842
|
+
* @returns {void}
|
|
7843
|
+
*/
|
|
7844
|
+
reset() {
|
|
7845
|
+
// Resets the help text of the combobox
|
|
7846
|
+
this.auroInputHelpText = undefined;
|
|
7847
|
+
|
|
7848
|
+
this.input.reset();
|
|
7849
|
+
this.validation.reset(this);
|
|
7850
|
+
}
|
|
7851
|
+
|
|
7790
7852
|
updated(changedProperties) {
|
|
7791
7853
|
// After the component is ready, send direct value changes to auro-menu.
|
|
7792
7854
|
if (changedProperties.has('value')) {
|
|
@@ -129,8 +129,7 @@ export class AuroCombobox extends LitElement {
|
|
|
129
129
|
reflect: true
|
|
130
130
|
},
|
|
131
131
|
value: {
|
|
132
|
-
type: String
|
|
133
|
-
reflect: true
|
|
132
|
+
type: String
|
|
134
133
|
},
|
|
135
134
|
checkmark: {
|
|
136
135
|
type: Boolean,
|
|
@@ -443,7 +442,7 @@ export class AuroCombobox extends LitElement {
|
|
|
443
442
|
}
|
|
444
443
|
|
|
445
444
|
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
446
|
-
if (this.input.value.length === 0) {
|
|
445
|
+
if (this.input.value && this.input.value.length === 0) {
|
|
447
446
|
this.hideBib();
|
|
448
447
|
this.classList.remove('combobox-filled');
|
|
449
448
|
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
@@ -604,6 +603,18 @@ export class AuroCombobox extends LitElement {
|
|
|
604
603
|
this.input.focus();
|
|
605
604
|
}
|
|
606
605
|
|
|
606
|
+
/**
|
|
607
|
+
* Resets component to initial state.
|
|
608
|
+
* @returns {void}
|
|
609
|
+
*/
|
|
610
|
+
reset() {
|
|
611
|
+
// Resets the help text of the combobox
|
|
612
|
+
this.auroInputHelpText = undefined;
|
|
613
|
+
|
|
614
|
+
this.input.reset();
|
|
615
|
+
this.validation.reset(this);
|
|
616
|
+
}
|
|
617
|
+
|
|
607
618
|
updated(changedProperties) {
|
|
608
619
|
// After the component is ready, send direct value changes to auro-menu.
|
|
609
620
|
if (changedProperties.has('value')) {
|