@aurodesignsystem/auro-formkit 2.0.0-beta.1 → 2.0.0-beta.3
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/02244170c798a2bd-meta.json +1 -0
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1ab37ce15d9be440-meta.json +1 -0
- package/.turbo/cache/1ab37ce15d9be440.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1de15d89eed2d760-meta.json +1 -1
- package/.turbo/cache/2110a4d14e0d11b2-meta.json +1 -0
- package/.turbo/cache/2110a4d14e0d11b2.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/2fd056afdf4eb39d-meta.json +1 -0
- package/.turbo/cache/2fd056afdf4eb39d.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3e12285c614db539-meta.json +1 -0
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -1
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- 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/6dd67d179191bda8-meta.json +1 -0
- package/.turbo/cache/6dd67d179191bda8.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/784c03fe9fd5ac05-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +1 -0
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/993dff2edb7b6766-meta.json +1 -1
- package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
- package/.turbo/cache/a63cbfecf0f78586-meta.json +1 -0
- package/.turbo/cache/a63cbfecf0f78586.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/b2c66328fdd78093-meta.json +1 -0
- package/.turbo/cache/b2c66328fdd78093.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
- package/.turbo/cache/bffc7582905c2a5e.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/d39e6ef95ebc4cc0-meta.json +1 -0
- package/.turbo/cache/d39e6ef95ebc4cc0.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +1 -0
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f411e2deb0676959-meta.json +1 -0
- package/.turbo/cache/f411e2deb0676959.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
- package/CHANGELOG.md +34 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/README.md +8 -8
- package/components/checkbox/demo/api.md +53 -51
- package/components/checkbox/demo/api.min.js +32 -37
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +32 -37
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +1 -1
- package/components/checkbox/dist/index.js +32 -37
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/checkbox/src/auro-checkbox.js +1 -1
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +104 -116
- package/components/combobox/demo/index.min.js +104 -116
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +103 -115
- package/components/combobox/src/auro-combobox.js +22 -20
- 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 +9 -8
- package/components/datepicker/demo/api.md +107 -87
- package/components/datepicker/demo/api.min.js +96 -130
- package/components/datepicker/demo/index.min.js +96 -130
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +96 -130
- package/components/datepicker/src/auro-datepicker.js +15 -35
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- 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 +51 -1
- package/components/input/.turbo/turbo-build.log +56 -6
- package/components/input/.turbo/turbo-bundler.log +2 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -83
- package/components/input/demo/api.min.js +52 -61
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +52 -61
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +5 -12
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +52 -61
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +22 -25
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- 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 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +30 -35
- package/components/radio/demo/index.min.js +30 -35
- package/components/radio/dist/index.js +30 -35
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/demo/api.md +7 -11
- package/components/select/demo/api.min.js +33 -60
- package/components/select/demo/index.min.js +33 -56
- package/components/select/dist/auro-select.d.ts +2 -2
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +32 -55
- package/components/select/src/auro-select.js +3 -21
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +29 -34
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/141bb7d9a95e288b-meta.json +0 -1
- package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +0 -1
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/cd845bb6102c589a-meta.json +0 -1
- package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
|
@@ -133,7 +133,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
133
133
|
* @attr {Boolean} error - If set to true, sets an error state on the checkbox.
|
|
134
134
|
* @attr {String} id - Sets the individual `id` per element.
|
|
135
135
|
* @attr {String} name - Accepts any string, `DOMString` representing the value of the input.
|
|
136
|
-
* @attr {String} value - Sets the element's input value.
|
|
136
|
+
* @attr {String} value - Sets the element's input value. Must be unique within an auro-checkbox-group element.
|
|
137
137
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
138
138
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
139
139
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -346,20 +346,20 @@ class AuroFormValidation {
|
|
|
346
346
|
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
347
347
|
|
|
348
348
|
if (!pattern.test(elem.value)) {
|
|
349
|
-
elem.validity = '
|
|
350
|
-
elem.
|
|
349
|
+
elem.validity = 'patternMismatch';
|
|
350
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
355
355
|
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
356
356
|
elem.validity = 'tooShort';
|
|
357
|
-
elem.
|
|
357
|
+
elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
if (elem.value?.length > elem.maxLength) {
|
|
361
361
|
elem.validity = 'tooLong';
|
|
362
|
-
elem.
|
|
362
|
+
elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
|
|
@@ -375,33 +375,32 @@ class AuroFormValidation {
|
|
|
375
375
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
376
376
|
|
|
377
377
|
if (!elem.value.match(emailRegex)) {
|
|
378
|
-
elem.validity = '
|
|
379
|
-
elem.
|
|
378
|
+
elem.validity = 'patternMismatch';
|
|
379
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
380
380
|
}
|
|
381
381
|
} else if (elem.type === 'credit-card') {
|
|
382
382
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
383
383
|
elem.validity = 'tooShort';
|
|
384
|
-
elem.
|
|
384
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
385
385
|
}
|
|
386
386
|
} else if (elem.type === 'number') {
|
|
387
387
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
388
388
|
elem.validity = 'rangeOverflow';
|
|
389
|
-
elem.
|
|
389
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
392
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
393
393
|
elem.validity = 'rangeUnderflow';
|
|
394
|
-
elem.
|
|
394
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
395
395
|
}
|
|
396
|
-
|
|
397
396
|
} else if (elem.type === 'month-day-year' ||
|
|
398
397
|
elem.type === 'month-year' ||
|
|
399
398
|
elem.type === 'month-fullYear' ||
|
|
400
399
|
elem.type === 'year-month-day'
|
|
401
400
|
) {
|
|
402
|
-
if (elem.value
|
|
401
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
403
402
|
elem.validity = 'tooShort';
|
|
404
|
-
elem.
|
|
403
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
405
404
|
} else {
|
|
406
405
|
const valueDate = new Date(elem.value);
|
|
407
406
|
|
|
@@ -411,7 +410,7 @@ class AuroFormValidation {
|
|
|
411
410
|
|
|
412
411
|
if (valueDate > maxDate) {
|
|
413
412
|
elem.validity = 'rangeOverflow';
|
|
414
|
-
elem.
|
|
413
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
415
414
|
}
|
|
416
415
|
}
|
|
417
416
|
|
|
@@ -421,7 +420,7 @@ class AuroFormValidation {
|
|
|
421
420
|
|
|
422
421
|
if (valueDate < minDate) {
|
|
423
422
|
elem.validity = 'rangeUnderflow';
|
|
424
|
-
elem.
|
|
423
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
425
424
|
}
|
|
426
425
|
}
|
|
427
426
|
}
|
|
@@ -444,10 +443,10 @@ class AuroFormValidation {
|
|
|
444
443
|
|
|
445
444
|
if (elem.hasAttribute('error')) {
|
|
446
445
|
elem.validity = 'customError';
|
|
447
|
-
elem.
|
|
446
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
448
447
|
} else if (validationShouldRun) {
|
|
449
448
|
elem.validity = 'valid';
|
|
450
|
-
elem.
|
|
449
|
+
elem.errorMessage = '';
|
|
451
450
|
|
|
452
451
|
/**
|
|
453
452
|
* Only validate once we interact with the datepicker
|
|
@@ -459,7 +458,7 @@ class AuroFormValidation {
|
|
|
459
458
|
let hasValue = elem.value && elem.value.length > 0;
|
|
460
459
|
|
|
461
460
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
462
|
-
if (this.auroInputElements
|
|
461
|
+
if (this.auroInputElements?.length === 2) {
|
|
463
462
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
464
463
|
hasValue = false;
|
|
465
464
|
}
|
|
@@ -467,31 +466,27 @@ class AuroFormValidation {
|
|
|
467
466
|
|
|
468
467
|
if (!hasValue && elem.required) {
|
|
469
468
|
elem.validity = 'valueMissing';
|
|
470
|
-
elem.
|
|
469
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
471
470
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
472
471
|
this.validateType(elem);
|
|
473
472
|
this.validateAttributes(elem);
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
475
|
|
|
477
|
-
if (this.auroInputElements
|
|
476
|
+
if (this.auroInputElements?.length > 0) {
|
|
478
477
|
elem.validity = this.auroInputElements[0].validity;
|
|
479
|
-
elem.
|
|
478
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
480
479
|
|
|
481
|
-
if (elem.validity === 'valid') {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
485
|
-
}
|
|
480
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
481
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
482
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
486
483
|
}
|
|
487
484
|
}
|
|
488
485
|
|
|
489
486
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
494
|
-
}
|
|
487
|
+
// Use the validity message override if it is declared
|
|
488
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
489
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
495
490
|
}
|
|
496
491
|
|
|
497
492
|
this.getErrorMessage(elem);
|
|
@@ -537,18 +532,18 @@ class AuroFormValidation {
|
|
|
537
532
|
if (elem.validity !== 'valid') {
|
|
538
533
|
if (elem.setCustomValidity) {
|
|
539
534
|
elem.errorMessage = elem.setCustomValidity;
|
|
540
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
535
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
541
536
|
const input = elem.renderRoot.querySelector('input');
|
|
542
537
|
|
|
543
538
|
if (input.validationMessage.length > 0) {
|
|
544
539
|
elem.errorMessage = input.validationMessage;
|
|
545
540
|
}
|
|
546
|
-
} else if (this.inputElements &&
|
|
541
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
547
542
|
const firstInput = this.inputElements[0];
|
|
548
543
|
|
|
549
544
|
if (firstInput.validationMessage.length > 0) {
|
|
550
545
|
elem.errorMessage = firstInput.validationMessage;
|
|
551
|
-
} else if (this.inputElements
|
|
546
|
+
} else if (this.inputElements?.length === 2) {
|
|
552
547
|
const secondInput = this.inputElements[1];
|
|
553
548
|
|
|
554
549
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -577,7 +572,7 @@ var colorCss = i$4`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([d
|
|
|
577
572
|
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
578
573
|
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
579
574
|
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
580
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets
|
|
575
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validity message to the attribute value.
|
|
581
576
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
582
577
|
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
583
578
|
* @attr {Boolean} horizontal - If set, checkboxes will be aligned horizontally.
|
|
@@ -877,7 +872,7 @@ class AuroCheckboxGroup extends r {
|
|
|
877
872
|
</p>`
|
|
878
873
|
: x`
|
|
879
874
|
<p class="checkboxGroupElement-helpText" role="alert" aria-live="assertive" part="helpText">
|
|
880
|
-
${this.
|
|
875
|
+
${this.errorMessage}
|
|
881
876
|
</p>`
|
|
882
877
|
}
|
|
883
878
|
`;
|
|
@@ -23,7 +23,7 @@ import tokensCss from "./styles/tokens-css.js";
|
|
|
23
23
|
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
24
24
|
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
25
25
|
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
26
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets
|
|
26
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validity message to the attribute value.
|
|
27
27
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
28
28
|
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
29
29
|
* @attr {Boolean} horizontal - If set, checkboxes will be aligned horizontally.
|
|
@@ -323,7 +323,7 @@ export class AuroCheckboxGroup extends LitElement {
|
|
|
323
323
|
</p>`
|
|
324
324
|
: html`
|
|
325
325
|
<p class="checkboxGroupElement-helpText" role="alert" aria-live="assertive" part="helpText">
|
|
326
|
-
${this.
|
|
326
|
+
${this.errorMessage}
|
|
327
327
|
</p>`
|
|
328
328
|
}
|
|
329
329
|
`;
|
|
@@ -23,7 +23,7 @@ import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/util
|
|
|
23
23
|
* @attr {Boolean} error - If set to true, sets an error state on the checkbox.
|
|
24
24
|
* @attr {String} id - Sets the individual `id` per element.
|
|
25
25
|
* @attr {String} name - Accepts any string, `DOMString` representing the value of the input.
|
|
26
|
-
* @attr {String} value - Sets the element's input value.
|
|
26
|
+
* @attr {String} value - Sets the element's input value. Must be unique within an auro-checkbox-group element.
|
|
27
27
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
28
28
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
29
29
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -64,13 +64,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
64
64
|
|
|
65
65
|
[36m
|
|
66
66
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
67
|
-
[32mcreated [1mdist[22m in [
|
|
67
|
+
[32mcreated [1mdist[22m in [1m888ms[22m[39m
|
|
68
68
|
[36m
|
|
69
69
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
70
|
-
[32mcreated [1m./demo/[22m in [
|
|
70
|
+
[32mcreated [1m./demo/[22m in [1m672ms[22m[39m
|
|
71
71
|
[36m
|
|
72
72
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
73
|
-
[32mcreated [1m./demo/[22m in [
|
|
73
|
+
[32mcreated [1m./demo/[22m in [1m548ms[22m[39m
|
|
74
74
|
|
|
75
75
|
> @auro-formkit/auro-combobox@2.1.4 build:docs
|
|
76
76
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component combobox
|
|
@@ -5,20 +5,22 @@
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property
|
|
9
|
-
|
|
10
|
-
| [checkmark](#checkmark)
|
|
11
|
-
| [disabled](#disabled)
|
|
12
|
-
| [error](#error)
|
|
13
|
-
| [noFilter](#noFilter)
|
|
14
|
-
| [noValidate](#noValidate)
|
|
15
|
-
| [optionSelected](#optionSelected)
|
|
16
|
-
| [required](#required)
|
|
17
|
-
| [setCustomValidity](#setCustomValidity)
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------------------------|---------------------------------|-----------|-------------|--------------------------------------------------|
|
|
10
|
+
| [checkmark](#checkmark) | `checkmark` | `Boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
11
|
+
| [disabled](#disabled) | `disabled` | `Boolean` | | If set, disables the combobox. |
|
|
12
|
+
| [error](#error) | `error` | `String` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
13
|
+
| [noFilter](#noFilter) | `noFilter` | `Boolean` | false | If set, combobox will not filter menuoptions based in input. |
|
|
14
|
+
| [noValidate](#noValidate) | `noValidate` | `Boolean` | | If set, disables auto-validation on blur. |
|
|
15
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `Object` | null | Specifies the current selected option. |
|
|
16
|
+
| [required](#required) | `required` | `Boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
17
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `String` | | Sets a custom help text message to display for all validityStates. |
|
|
18
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `String` | | Custom help text message to display when validity = `customError`. |
|
|
19
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `String` | | Custom help text message to display when validity = `valueMissing`. |
|
|
20
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | `Boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
21
|
+
| [type](#type) | `type` | `String` | | Applies the defined value as the type attribute on auro-input. |
|
|
22
|
+
| [validity](#validity) | `validity` | `String` | "undefined" | Specifies the `validityState` this element is in. |
|
|
23
|
+
| [value](#value) | `value` | `String` | null | Value selected for the dropdown menu. |
|
|
22
24
|
|
|
23
25
|
## Methods
|
|
24
26
|
|
|
@@ -294,7 +296,7 @@ Sets a persistent error state (e.g. an error state returned from the server).
|
|
|
294
296
|
</auro-menu>
|
|
295
297
|
</auro-combobox>
|
|
296
298
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
297
|
-
</div>
|
|
299
|
+
</div>
|
|
298
300
|
<auro-accordion alignRight>
|
|
299
301
|
<span slot="trigger">See code</span>
|
|
300
302
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.html) -->
|