@aurodesignsystem/auro-formkit 2.0.0-beta.7 → 2.0.0-beta.9
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/012997da408d7381-meta.json +1 -0
- package/.turbo/cache/0c8124a987c1cc05-meta.json +1 -1
- package/.turbo/cache/114f70925d97840c-meta.json +1 -0
- package/.turbo/cache/114f70925d97840c.tar.zst +0 -0
- package/.turbo/cache/144803363093af6b-meta.json +1 -0
- package/.turbo/cache/18129dba20f51b6b-meta.json +1 -1
- package/.turbo/cache/19afa09c8e45c25d-meta.json +1 -0
- package/.turbo/cache/19afa09c8e45c25d.tar.zst +0 -0
- package/.turbo/cache/20a17be1e896dc95-meta.json +1 -0
- package/.turbo/cache/20a17be1e896dc95.tar.zst +0 -0
- package/.turbo/cache/2624bedf18a03ab1-meta.json +1 -0
- package/.turbo/cache/2624bedf18a03ab1.tar.zst +0 -0
- package/.turbo/cache/2706814699cff63a-meta.json +1 -0
- package/.turbo/cache/2787020e69f50af2-meta.json +1 -1
- package/.turbo/cache/29d704afd7578cda-meta.json +1 -0
- package/.turbo/cache/29d704afd7578cda.tar.zst +0 -0
- package/.turbo/cache/2edcc8b31cd713fc-meta.json +1 -0
- package/.turbo/cache/2edcc8b31cd713fc.tar.zst +0 -0
- package/.turbo/cache/318a9085a92f2d32-meta.json +1 -0
- package/.turbo/cache/326d9e4692d61af1-meta.json +1 -0
- package/.turbo/cache/326d9e4692d61af1.tar.zst +0 -0
- package/.turbo/cache/36962b1c4c89a3a2-meta.json +1 -0
- package/.turbo/cache/36962b1c4c89a3a2.tar.zst +0 -0
- package/.turbo/cache/3cd8fc5f388323db-meta.json +1 -1
- package/.turbo/cache/3f8ea42b850fd7b1-meta.json +1 -0
- package/.turbo/cache/{c114d428251f56a5.tar.zst → 3f8ea42b850fd7b1.tar.zst} +0 -0
- package/.turbo/cache/4006a206400d5c7b-meta.json +1 -1
- package/.turbo/cache/457af7906413d2ff-meta.json +1 -0
- package/.turbo/cache/492dda333b8d15f1-meta.json +1 -1
- package/.turbo/cache/508f2fcc60e5046f-meta.json +1 -0
- package/.turbo/cache/508f2fcc60e5046f.tar.zst +0 -0
- package/.turbo/cache/50993de942ec15a9-meta.json +1 -1
- package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -1
- package/.turbo/cache/5567d6b2fdae56a9-meta.json +1 -0
- package/.turbo/cache/5a6290b52b84f5ef-meta.json +1 -0
- package/.turbo/cache/5a6290b52b84f5ef.tar.zst +0 -0
- package/.turbo/cache/5aadae8d3f94202e-meta.json +1 -1
- package/.turbo/cache/6081837e8943b62e-meta.json +1 -0
- package/.turbo/cache/6081837e8943b62e.tar.zst +0 -0
- package/.turbo/cache/60ad74320c682a2b-meta.json +1 -1
- package/.turbo/cache/61e218aba69cff58-meta.json +1 -1
- package/.turbo/cache/64ac8d6a4669ba20-meta.json +1 -0
- package/.turbo/cache/64ac8d6a4669ba20.tar.zst +0 -0
- package/.turbo/cache/706649b429184693-meta.json +1 -0
- package/.turbo/cache/706649b429184693.tar.zst +0 -0
- package/.turbo/cache/71dbeaf0706c12fe-meta.json +1 -1
- package/.turbo/cache/7445df6e7feed2a7-meta.json +1 -1
- package/.turbo/cache/769652d1b874d7cf-meta.json +1 -0
- package/.turbo/cache/77da375a012de9d0-meta.json +1 -1
- package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -1
- package/.turbo/cache/7c4645de5001b034-meta.json +1 -0
- package/.turbo/cache/7c4645de5001b034.tar.zst +0 -0
- package/.turbo/cache/7e3244d67de2d977-meta.json +1 -0
- package/.turbo/cache/7e3244d67de2d977.tar.zst +0 -0
- package/.turbo/cache/7f3b42ddf36d0158-meta.json +1 -1
- package/.turbo/cache/804ad767c7ba2fc3-meta.json +1 -0
- package/.turbo/cache/804ad767c7ba2fc3.tar.zst +0 -0
- package/.turbo/cache/8366405184d123d2-meta.json +1 -0
- package/.turbo/cache/{a3db8f78e018a955.tar.zst → 8366405184d123d2.tar.zst} +0 -0
- package/.turbo/cache/85cc23a2de6b1009-meta.json +1 -0
- package/.turbo/cache/99936b010f1533f9-meta.json +1 -0
- package/.turbo/cache/{dc6fbe2a8d5b9d9b.tar.zst → 99936b010f1533f9.tar.zst} +0 -0
- package/.turbo/cache/9a9b4e449cd84be4-meta.json +1 -1
- package/.turbo/cache/9ae99e8e7bd83d06-meta.json +1 -1
- package/.turbo/cache/a275406512608e45-meta.json +1 -1
- package/.turbo/cache/a54b4d75b5d265de-meta.json +1 -0
- package/.turbo/cache/b280ed4daaf15dcb-meta.json +1 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -1
- package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -1
- package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +1 -1
- package/.turbo/cache/c47b8032d18fc452-meta.json +1 -0
- package/.turbo/cache/c47b8032d18fc452.tar.zst +0 -0
- package/.turbo/cache/c6c6411199b68170-meta.json +1 -1
- package/.turbo/cache/d3a05e38449c9b24-meta.json +1 -1
- package/.turbo/cache/d44acd685455b288-meta.json +1 -0
- package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -1
- package/.turbo/cache/d683a7d23b0d7073-meta.json +1 -0
- package/.turbo/cache/d683a7d23b0d7073.tar.zst +0 -0
- package/.turbo/cache/d7caaacb8114772f-meta.json +1 -0
- package/.turbo/cache/d7caaacb8114772f.tar.zst +0 -0
- package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -0
- package/.turbo/cache/dad3d78b33edd9e4.tar.zst +0 -0
- package/.turbo/cache/db4ea5071b44ee8c-meta.json +1 -1
- package/.turbo/cache/de44707e76bdd80c-meta.json +1 -0
- package/.turbo/cache/de44707e76bdd80c.tar.zst +0 -0
- package/.turbo/cache/e03997efe5adad43-meta.json +1 -0
- package/.turbo/cache/e1aa836f0cc2d7c5-meta.json +1 -0
- package/.turbo/cache/e1aa836f0cc2d7c5.tar.zst +0 -0
- package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -1
- package/.turbo/cache/e820cc8f220a05f3-meta.json +1 -0
- package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -0
- package/.turbo/cache/e9e36823f6c98f07.tar.zst +0 -0
- package/.turbo/cache/f3f4ddfd3230e489-meta.json +1 -0
- package/.turbo/cache/f3f4ddfd3230e489.tar.zst +0 -0
- package/.turbo/cache/fdaf484b1ec4b5ed-meta.json +1 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +27 -0
- package/components/checkbox/.turbo/turbo-build.log +2 -2
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +79 -20
- package/components/checkbox/demo/index.min.js +79 -20
- package/components/checkbox/dist/index.js +79 -20
- package/components/combobox/.turbo/turbo-build.log +2 -2
- package/components/combobox/.turbo/turbo-bundler.log +3 -3
- package/components/combobox/README.md +4 -4
- package/components/combobox/demo/api.min.js +160 -42
- package/components/combobox/demo/index.min.js +160 -42
- package/components/combobox/dist/index.js +158 -40
- package/components/counter/.turbo/turbo-build$colon$sass.log +172 -0
- package/components/counter/.turbo/turbo-build$colon$version.log +10 -0
- package/components/counter/.turbo/turbo-build.log +278 -4
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/counter/.turbo/turbo-sass$colon$render.log +36 -0
- package/components/counter/README.md +188 -0
- package/components/counter/demo/api.md +98 -1016
- package/components/counter/demo/api.min.js +1670 -32
- package/components/counter/demo/index.js +2 -1
- package/components/counter/demo/index.md +194 -0
- package/components/counter/demo/index.min.js +1702 -19
- package/components/counter/dist/auro-counter-button.d.ts +13 -0
- package/components/counter/dist/auro-counter-button.d.ts.map +1 -0
- package/components/counter/dist/auro-counter-group.d.ts +77 -6
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -1
- package/components/counter/dist/auro-counter.d.ts +78 -0
- package/components/counter/dist/auro-counter.d.ts.map +1 -1
- package/components/counter/dist/formkit/auro-dropdownVersion.d.ts +3 -0
- package/components/counter/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
- package/components/counter/dist/iconVersion.d.ts +3 -0
- package/components/counter/dist/iconVersion.d.ts.map +1 -0
- package/components/counter/dist/index.js +1670 -32
- package/components/counter/dist/styles/color-css.d.ts +3 -0
- package/components/counter/dist/styles/color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-group-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-group-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/counter/package.json +8 -2
- package/components/counter/src/auro-counter-button.js +42 -0
- package/components/counter/src/auro-counter-group.js +150 -21
- package/components/counter/src/auro-counter.js +272 -12
- package/components/counter/src/formkit/auro-dropdownVersion.js +1 -0
- package/components/counter/src/iconVersion.js +1 -0
- package/components/counter/src/index.js +1 -1
- package/components/counter/src/styles/color-css.js +2 -0
- package/components/counter/src/styles/color.css +25 -0
- package/components/counter/src/styles/color.scss +44 -0
- package/components/counter/src/styles/counter-button-color-css.js +2 -0
- package/components/counter/src/styles/counter-button-color.css +14 -0
- package/components/counter/src/styles/counter-button-color.scss +29 -0
- package/components/counter/src/styles/counter-button-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens.css +7 -0
- package/components/counter/src/styles/counter-button-tokens.scss +9 -0
- package/components/counter/src/styles/counter-button.css +187 -0
- package/components/counter/src/styles/counter-button.scss +83 -0
- package/components/counter/src/styles/counter-group-color-css.js +2 -0
- package/components/counter/src/styles/counter-group-color.css +4 -0
- package/components/counter/src/styles/counter-group-color.scss +19 -0
- package/components/counter/src/styles/counter-group-css.js +1 -1
- package/components/counter/src/styles/counter-group.css +13 -1
- package/components/counter/src/styles/counter-group.scss +14 -1
- package/components/counter/src/styles/style-css.js +1 -1
- package/components/counter/src/styles/style.css +43 -1
- package/components/counter/src/styles/style.scss +48 -2
- package/components/counter/src/styles/tokens-css.js +2 -0
- package/components/counter/src/styles/tokens.css +11 -0
- package/components/counter/src/styles/tokens.scss +24 -0
- package/components/datepicker/.turbo/turbo-build.log +2 -2
- package/components/datepicker/.turbo/turbo-bundler.log +2 -2
- package/components/datepicker/README.md +4 -4
- package/components/datepicker/demo/api.min.js +160 -41
- package/components/datepicker/demo/index.min.js +160 -41
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +160 -41
- package/components/datepicker/src/auro-datepicker.js +2 -1
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +3 -3
- package/components/dropdown/README.md +1 -1
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/form/README.md +1 -1
- package/components/input/.turbo/turbo-build.log +3 -3
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +79 -20
- package/components/input/demo/index.min.js +79 -20
- package/components/input/dist/index.js +79 -20
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/README.md +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +79 -20
- package/components/radio/demo/index.min.js +79 -20
- package/components/radio/dist/index.js +79 -20
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/.turbo/turbo-bundler.log +3 -3
- package/components/select/README.md +3 -3
- package/components/select/demo/api.min.js +79 -20
- package/components/select/demo/index.min.js +79 -20
- package/components/select/dist/index.js +79 -20
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +79 -20
- package/packages/utils/package.json +12 -0
- package/packages/utils/src/iconUtil.js +25 -0
- package/packages/utils/src/index.js +1 -0
- package/.turbo/cache/06845874cc82b186-meta.json +0 -1
- package/.turbo/cache/06845874cc82b186.tar.zst +0 -0
- package/.turbo/cache/0a96f136af026d57-meta.json +0 -1
- package/.turbo/cache/0a96f136af026d57.tar.zst +0 -0
- package/.turbo/cache/0c9ee13a7c863709-meta.json +0 -1
- package/.turbo/cache/0ca9c5ccf3e90704-meta.json +0 -1
- package/.turbo/cache/0ca9c5ccf3e90704.tar.zst +0 -0
- package/.turbo/cache/1a8d6e4cab38121a-meta.json +0 -1
- package/.turbo/cache/2ec1b6d23563659e-meta.json +0 -1
- package/.turbo/cache/3afc5b2ea7c1bf51-meta.json +0 -1
- package/.turbo/cache/3afc5b2ea7c1bf51.tar.zst +0 -0
- package/.turbo/cache/40de011abc31c0cf-meta.json +0 -1
- package/.turbo/cache/40de011abc31c0cf.tar.zst +0 -0
- package/.turbo/cache/426c825f57054f5f-meta.json +0 -1
- package/.turbo/cache/426c825f57054f5f.tar.zst +0 -0
- package/.turbo/cache/4524aae614598308-meta.json +0 -1
- package/.turbo/cache/4524aae614598308.tar.zst +0 -0
- package/.turbo/cache/45ea3e30ae949d53-meta.json +0 -1
- package/.turbo/cache/45ea3e30ae949d53.tar.zst +0 -0
- package/.turbo/cache/577d86e4072c01f5-meta.json +0 -1
- package/.turbo/cache/577d86e4072c01f5.tar.zst +0 -0
- package/.turbo/cache/5d770c787aa78d4d-meta.json +0 -1
- package/.turbo/cache/5d770c787aa78d4d.tar.zst +0 -0
- package/.turbo/cache/624bf5350aacae42-meta.json +0 -1
- package/.turbo/cache/66333b75c8f57565-meta.json +0 -1
- package/.turbo/cache/66333b75c8f57565.tar.zst +0 -0
- package/.turbo/cache/66e9cca767930b1d-meta.json +0 -1
- package/.turbo/cache/66e9cca767930b1d.tar.zst +0 -0
- package/.turbo/cache/68060c79df03f45a-meta.json +0 -1
- package/.turbo/cache/68060c79df03f45a.tar.zst +0 -0
- package/.turbo/cache/68e3afb31feab4e9-meta.json +0 -1
- package/.turbo/cache/6a1c28febca6163f-meta.json +0 -1
- package/.turbo/cache/6bc4e2d881af6ffb-meta.json +0 -1
- package/.turbo/cache/6bc4e2d881af6ffb.tar.zst +0 -0
- package/.turbo/cache/6c8ea74dc3b07640-meta.json +0 -1
- package/.turbo/cache/7a6ef918375d4010-meta.json +0 -1
- package/.turbo/cache/7a6ef918375d4010.tar.zst +0 -0
- package/.turbo/cache/83e1029b14af6545-meta.json +0 -1
- package/.turbo/cache/98936c69a55361fc-meta.json +0 -1
- package/.turbo/cache/a3db8f78e018a955-meta.json +0 -1
- package/.turbo/cache/ad2b775dd9172ae8-meta.json +0 -1
- package/.turbo/cache/ad2b775dd9172ae8.tar.zst +0 -0
- package/.turbo/cache/b91d2888e699c76a-meta.json +0 -1
- package/.turbo/cache/b91d2888e699c76a.tar.zst +0 -0
- package/.turbo/cache/bdc6aadfdbb6feb9-meta.json +0 -1
- package/.turbo/cache/be128506a9bcaa65-meta.json +0 -1
- package/.turbo/cache/be128506a9bcaa65.tar.zst +0 -0
- package/.turbo/cache/c114d428251f56a5-meta.json +0 -1
- package/.turbo/cache/c7338727efbc457a-meta.json +0 -1
- package/.turbo/cache/c7338727efbc457a.tar.zst +0 -0
- package/.turbo/cache/cf235df1ef8d90b0-meta.json +0 -1
- package/.turbo/cache/d1d1a072ee099992-meta.json +0 -1
- package/.turbo/cache/d9331772756d3d94-meta.json +0 -1
- package/.turbo/cache/d9331772756d3d94.tar.zst +0 -0
- package/.turbo/cache/dc6fbe2a8d5b9d9b-meta.json +0 -1
- package/.turbo/cache/e1e2582a7131011f-meta.json +0 -1
- package/.turbo/cache/e6271174c00888fe-meta.json +0 -1
- package/.turbo/cache/e8485d2a584b5f08-meta.json +0 -1
- package/.turbo/cache/e8485d2a584b5f08.tar.zst +0 -0
- package/.turbo/cache/e86451b8f88594b2-meta.json +0 -1
- package/.turbo/cache/e86451b8f88594b2.tar.zst +0 -0
- package/.turbo/cache/e9872ba002963dd3-meta.json +0 -1
- package/.turbo/cache/e9872ba002963dd3.tar.zst +0 -0
- /package/.turbo/cache/{e6271174c00888fe.tar.zst → 012997da408d7381.tar.zst} +0 -0
- /package/.turbo/cache/{6a1c28febca6163f.tar.zst → 144803363093af6b.tar.zst} +0 -0
- /package/.turbo/cache/{0c9ee13a7c863709.tar.zst → 2706814699cff63a.tar.zst} +0 -0
- /package/.turbo/cache/{68e3afb31feab4e9.tar.zst → 318a9085a92f2d32.tar.zst} +0 -0
- /package/.turbo/cache/{1a8d6e4cab38121a.tar.zst → 457af7906413d2ff.tar.zst} +0 -0
- /package/.turbo/cache/{6c8ea74dc3b07640.tar.zst → 5567d6b2fdae56a9.tar.zst} +0 -0
- /package/.turbo/cache/{d1d1a072ee099992.tar.zst → 769652d1b874d7cf.tar.zst} +0 -0
- /package/.turbo/cache/{bdc6aadfdbb6feb9.tar.zst → 85cc23a2de6b1009.tar.zst} +0 -0
- /package/.turbo/cache/{e1e2582a7131011f.tar.zst → a54b4d75b5d265de.tar.zst} +0 -0
- /package/.turbo/cache/{83e1029b14af6545.tar.zst → b280ed4daaf15dcb.tar.zst} +0 -0
- /package/.turbo/cache/{624bf5350aacae42.tar.zst → d44acd685455b288.tar.zst} +0 -0
- /package/.turbo/cache/{cf235df1ef8d90b0.tar.zst → e03997efe5adad43.tar.zst} +0 -0
- /package/.turbo/cache/{2ec1b6d23563659e.tar.zst → e820cc8f220a05f3.tar.zst} +0 -0
- /package/.turbo/cache/{98936c69a55361fc.tar.zst → fdaf484b1ec4b5ed.tar.zst} +0 -0
|
@@ -1833,30 +1833,87 @@ class AuroFormValidation {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
|
|
1835
1835
|
/**
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1838
|
-
* @param {
|
|
1836
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
1837
|
+
*
|
|
1838
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
1839
1839
|
* @returns {void}
|
|
1840
|
+
*
|
|
1841
|
+
* @example
|
|
1842
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
1843
|
+
* validateElementAttributes(inputElement);
|
|
1844
|
+
*
|
|
1845
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
1846
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
1847
|
+
*
|
|
1848
|
+
* Validation rules:
|
|
1849
|
+
* - input:
|
|
1850
|
+
* - length:
|
|
1851
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
1852
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
1853
|
+
* - pattern:
|
|
1854
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
1855
|
+
* - counter:
|
|
1856
|
+
* - range:
|
|
1857
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
1858
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
1840
1859
|
*/
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1860
|
+
validateElementAttributes(elem) {
|
|
1861
|
+
const validationRules = {
|
|
1862
|
+
input: {
|
|
1863
|
+
length: [
|
|
1864
|
+
{
|
|
1865
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
1866
|
+
validity: 'tooShort',
|
|
1867
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
1871
|
+
validity: 'tooLong',
|
|
1872
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
1873
|
+
}
|
|
1874
|
+
],
|
|
1875
|
+
pattern: [
|
|
1876
|
+
{
|
|
1877
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
1878
|
+
validity: 'patternMismatch',
|
|
1879
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
1880
|
+
}
|
|
1881
|
+
]
|
|
1882
|
+
},
|
|
1883
|
+
counter: {
|
|
1884
|
+
range: [
|
|
1885
|
+
{
|
|
1886
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
1887
|
+
validity: 'rangeOverflow',
|
|
1888
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
1892
|
+
validity: 'rangeUnderflow',
|
|
1893
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
1894
|
+
}
|
|
1895
|
+
]
|
|
1848
1896
|
}
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
if (
|
|
1853
|
-
|
|
1854
|
-
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
let elementType;
|
|
1900
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1901
|
+
elementType = 'input';
|
|
1902
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
1903
|
+
elementType = 'counter';
|
|
1855
1904
|
}
|
|
1856
1905
|
|
|
1857
|
-
if (
|
|
1858
|
-
|
|
1859
|
-
|
|
1906
|
+
if (elementType) {
|
|
1907
|
+
const rules = validationRules[elementType];
|
|
1908
|
+
|
|
1909
|
+
if (rules) {
|
|
1910
|
+
Object.values(rules).flat().forEach(rule => {
|
|
1911
|
+
if (rule.check(elem)) {
|
|
1912
|
+
elem.validity = rule.validity;
|
|
1913
|
+
elem.errorMessage = rule.message(elem);
|
|
1914
|
+
}
|
|
1915
|
+
});
|
|
1916
|
+
}
|
|
1860
1917
|
}
|
|
1861
1918
|
}
|
|
1862
1919
|
|
|
@@ -1966,7 +2023,9 @@ class AuroFormValidation {
|
|
|
1966
2023
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1967
2024
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1968
2025
|
this.validateType(elem);
|
|
1969
|
-
this.
|
|
2026
|
+
this.validateElementAttributes(elem);
|
|
2027
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
2028
|
+
this.validateElementAttributes(elem);
|
|
1970
2029
|
}
|
|
1971
2030
|
}
|
|
1972
2031
|
|
|
@@ -101,13 +101,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
101
101
|
|
|
102
102
|
[36m
|
|
103
103
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
104
|
-
[32mcreated [1mdist[22m in [1m1.
|
|
104
|
+
[32mcreated [1mdist[22m in [1m1.3s[22m[39m
|
|
105
105
|
[36m
|
|
106
106
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
107
|
-
[32mcreated [1m./demo/[22m in [
|
|
107
|
+
[32mcreated [1m./demo/[22m in [1m819ms[22m[39m
|
|
108
108
|
[36m
|
|
109
109
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
110
|
-
[32mcreated [1m./demo/[22m in [
|
|
110
|
+
[32mcreated [1m./demo/[22m in [1m826ms[22m[39m
|
|
111
111
|
|
|
112
112
|
> @aurodesignsystem/auro-menu@4.1.4 build:docs
|
|
113
113
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
7
|
-
[32mcreated [1mdist[22m in [1m1.
|
|
7
|
+
[32mcreated [1mdist[22m in [1m1.4s[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
10
|
-
[32mcreated [1m./demo/[22m in [
|
|
10
|
+
[32mcreated [1m./demo/[22m in [1m932ms[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
13
|
-
[32mcreated [1m./demo/[22m in [
|
|
13
|
+
[32mcreated [1m./demo/[22m in [1m759ms[22m[39m
|
|
@@ -100,7 +100,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
100
100
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
101
101
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
|
|
102
102
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.8/dist/auro-menu__bundled.js" type="module"></script>
|
|
104
104
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
105
|
|
|
106
106
|
## auro-menu use cases
|
|
@@ -138,13 +138,13 @@ Run in verbose mode to see all warnings.
|
|
|
138
138
|
|
|
139
139
|
[36m
|
|
140
140
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
141
|
-
[32mcreated [1mdist[22m in [
|
|
141
|
+
[32mcreated [1mdist[22m in [1m1.2s[22m[39m
|
|
142
142
|
[36m
|
|
143
143
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
144
|
-
[32mcreated [1m./demo/[22m in [
|
|
144
|
+
[32mcreated [1m./demo/[22m in [1m726ms[22m[39m
|
|
145
145
|
[36m
|
|
146
146
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
147
|
-
[32mcreated [1m./demo/[22m in [
|
|
147
|
+
[32mcreated [1m./demo/[22m in [1m689ms[22m[39m
|
|
148
148
|
|
|
149
149
|
> @aurodesignsystem/auro-radio@4.1.1 build:docs
|
|
150
150
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component radio
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
7
|
-
[32mcreated [1mdist[22m in [1m1.
|
|
7
|
+
[32mcreated [1mdist[22m in [1m1.3s[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
10
|
-
[32mcreated [1m./demo/[22m in [
|
|
10
|
+
[32mcreated [1m./demo/[22m in [1m815ms[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
13
|
-
[32mcreated [1m./demo/[22m in [
|
|
13
|
+
[32mcreated [1m./demo/[22m in [1m600ms[22m[39m
|
|
@@ -90,7 +90,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
90
90
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
91
91
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.2/dist/tokens/CSSCustomProperties.css" />
|
|
92
92
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
93
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.
|
|
93
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.8/dist/auro-radio__bundled.js" type="module"></script>
|
|
94
94
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
95
95
|
|
|
96
96
|
## auro-radio use cases
|
|
@@ -426,30 +426,87 @@ class AuroFormValidation {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* @param {
|
|
429
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
430
|
+
*
|
|
431
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
432
432
|
* @returns {void}
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
436
|
+
* validateElementAttributes(inputElement);
|
|
437
|
+
*
|
|
438
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
439
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
440
|
+
*
|
|
441
|
+
* Validation rules:
|
|
442
|
+
* - input:
|
|
443
|
+
* - length:
|
|
444
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
445
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
446
|
+
* - pattern:
|
|
447
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
448
|
+
* - counter:
|
|
449
|
+
* - range:
|
|
450
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
451
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
433
452
|
*/
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
453
|
+
validateElementAttributes(elem) {
|
|
454
|
+
const validationRules = {
|
|
455
|
+
input: {
|
|
456
|
+
length: [
|
|
457
|
+
{
|
|
458
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
459
|
+
validity: 'tooShort',
|
|
460
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
464
|
+
validity: 'tooLong',
|
|
465
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
pattern: [
|
|
469
|
+
{
|
|
470
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
471
|
+
validity: 'patternMismatch',
|
|
472
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
counter: {
|
|
477
|
+
range: [
|
|
478
|
+
{
|
|
479
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
480
|
+
validity: 'rangeOverflow',
|
|
481
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
485
|
+
validity: 'rangeUnderflow',
|
|
486
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
487
|
+
}
|
|
488
|
+
]
|
|
441
489
|
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (
|
|
446
|
-
|
|
447
|
-
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
let elementType;
|
|
493
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
494
|
+
elementType = 'input';
|
|
495
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
496
|
+
elementType = 'counter';
|
|
448
497
|
}
|
|
449
498
|
|
|
450
|
-
if (
|
|
451
|
-
|
|
452
|
-
|
|
499
|
+
if (elementType) {
|
|
500
|
+
const rules = validationRules[elementType];
|
|
501
|
+
|
|
502
|
+
if (rules) {
|
|
503
|
+
Object.values(rules).flat().forEach(rule => {
|
|
504
|
+
if (rule.check(elem)) {
|
|
505
|
+
elem.validity = rule.validity;
|
|
506
|
+
elem.errorMessage = rule.message(elem);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
453
510
|
}
|
|
454
511
|
}
|
|
455
512
|
|
|
@@ -559,7 +616,9 @@ class AuroFormValidation {
|
|
|
559
616
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
560
617
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
561
618
|
this.validateType(elem);
|
|
562
|
-
this.
|
|
619
|
+
this.validateElementAttributes(elem);
|
|
620
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
621
|
+
this.validateElementAttributes(elem);
|
|
563
622
|
}
|
|
564
623
|
}
|
|
565
624
|
|
|
@@ -401,30 +401,87 @@ class AuroFormValidation {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* @param {
|
|
404
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
405
|
+
*
|
|
406
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
407
407
|
* @returns {void}
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
411
|
+
* validateElementAttributes(inputElement);
|
|
412
|
+
*
|
|
413
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
414
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
415
|
+
*
|
|
416
|
+
* Validation rules:
|
|
417
|
+
* - input:
|
|
418
|
+
* - length:
|
|
419
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
420
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
421
|
+
* - pattern:
|
|
422
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
423
|
+
* - counter:
|
|
424
|
+
* - range:
|
|
425
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
426
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
408
427
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
428
|
+
validateElementAttributes(elem) {
|
|
429
|
+
const validationRules = {
|
|
430
|
+
input: {
|
|
431
|
+
length: [
|
|
432
|
+
{
|
|
433
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
434
|
+
validity: 'tooShort',
|
|
435
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
439
|
+
validity: 'tooLong',
|
|
440
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
pattern: [
|
|
444
|
+
{
|
|
445
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
446
|
+
validity: 'patternMismatch',
|
|
447
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
448
|
+
}
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
counter: {
|
|
452
|
+
range: [
|
|
453
|
+
{
|
|
454
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
455
|
+
validity: 'rangeOverflow',
|
|
456
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
460
|
+
validity: 'rangeUnderflow',
|
|
461
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
462
|
+
}
|
|
463
|
+
]
|
|
416
464
|
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
let elementType;
|
|
468
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
469
|
+
elementType = 'input';
|
|
470
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
471
|
+
elementType = 'counter';
|
|
423
472
|
}
|
|
424
473
|
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
474
|
+
if (elementType) {
|
|
475
|
+
const rules = validationRules[elementType];
|
|
476
|
+
|
|
477
|
+
if (rules) {
|
|
478
|
+
Object.values(rules).flat().forEach(rule => {
|
|
479
|
+
if (rule.check(elem)) {
|
|
480
|
+
elem.validity = rule.validity;
|
|
481
|
+
elem.errorMessage = rule.message(elem);
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
}
|
|
428
485
|
}
|
|
429
486
|
}
|
|
430
487
|
|
|
@@ -534,7 +591,9 @@ class AuroFormValidation {
|
|
|
534
591
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
535
592
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
536
593
|
this.validateType(elem);
|
|
537
|
-
this.
|
|
594
|
+
this.validateElementAttributes(elem);
|
|
595
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
596
|
+
this.validateElementAttributes(elem);
|
|
538
597
|
}
|
|
539
598
|
}
|
|
540
599
|
|
|
@@ -401,30 +401,87 @@ class AuroFormValidation {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* @param {
|
|
404
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
405
|
+
*
|
|
406
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
407
407
|
* @returns {void}
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
411
|
+
* validateElementAttributes(inputElement);
|
|
412
|
+
*
|
|
413
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
414
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
415
|
+
*
|
|
416
|
+
* Validation rules:
|
|
417
|
+
* - input:
|
|
418
|
+
* - length:
|
|
419
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
420
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
421
|
+
* - pattern:
|
|
422
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
423
|
+
* - counter:
|
|
424
|
+
* - range:
|
|
425
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
426
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
408
427
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
428
|
+
validateElementAttributes(elem) {
|
|
429
|
+
const validationRules = {
|
|
430
|
+
input: {
|
|
431
|
+
length: [
|
|
432
|
+
{
|
|
433
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
434
|
+
validity: 'tooShort',
|
|
435
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
439
|
+
validity: 'tooLong',
|
|
440
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
pattern: [
|
|
444
|
+
{
|
|
445
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
446
|
+
validity: 'patternMismatch',
|
|
447
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
448
|
+
}
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
counter: {
|
|
452
|
+
range: [
|
|
453
|
+
{
|
|
454
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
455
|
+
validity: 'rangeOverflow',
|
|
456
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
460
|
+
validity: 'rangeUnderflow',
|
|
461
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
462
|
+
}
|
|
463
|
+
]
|
|
416
464
|
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
let elementType;
|
|
468
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
469
|
+
elementType = 'input';
|
|
470
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
471
|
+
elementType = 'counter';
|
|
423
472
|
}
|
|
424
473
|
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
474
|
+
if (elementType) {
|
|
475
|
+
const rules = validationRules[elementType];
|
|
476
|
+
|
|
477
|
+
if (rules) {
|
|
478
|
+
Object.values(rules).flat().forEach(rule => {
|
|
479
|
+
if (rule.check(elem)) {
|
|
480
|
+
elem.validity = rule.validity;
|
|
481
|
+
elem.errorMessage = rule.message(elem);
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
}
|
|
428
485
|
}
|
|
429
486
|
}
|
|
430
487
|
|
|
@@ -534,7 +591,9 @@ class AuroFormValidation {
|
|
|
534
591
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
535
592
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
536
593
|
this.validateType(elem);
|
|
537
|
-
this.
|
|
594
|
+
this.validateElementAttributes(elem);
|
|
595
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
596
|
+
this.validateElementAttributes(elem);
|
|
538
597
|
}
|
|
539
598
|
}
|
|
540
599
|
|
|
@@ -137,13 +137,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
137
137
|
|
|
138
138
|
[36m
|
|
139
139
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
140
|
-
[32mcreated [1mdist[22m in [1m2.
|
|
140
|
+
[32mcreated [1mdist[22m in [1m2.1s[22m[39m
|
|
141
141
|
[36m
|
|
142
142
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
143
|
-
[32mcreated [1m./demo/[22m in [
|
|
143
|
+
[32mcreated [1m./demo/[22m in [1m1.5s[22m[39m
|
|
144
144
|
[36m
|
|
145
145
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
146
|
-
[32mcreated [1m./demo/[22m in [1m1.
|
|
146
|
+
[32mcreated [1m./demo/[22m in [1m1.5s[22m[39m
|
|
147
147
|
|
|
148
148
|
> @aurodesignsystem/auro-select@3.3.0 build:docs
|
|
149
149
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component select
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
8
8
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
9
9
|
[1m@auro-formkit/auro-dropdown[22m (imported by "src/auro-select.js")
|
|
10
|
-
[32mcreated [1mdist[22m in [
|
|
10
|
+
[32mcreated [1mdist[22m in [1m1s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
13
13
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
14
14
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
15
15
|
[1m@auro-formkit/auro-dropdown[22m (imported by "src/auro-select.js")
|
|
16
|
-
[32mcreated [1m./demo/[22m in [
|
|
16
|
+
[32mcreated [1m./demo/[22m in [1m1.1s[22m[39m
|
|
17
17
|
[36m
|
|
18
18
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
19
19
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
20
20
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
21
21
|
[1m@auro-formkit/auro-dropdown[22m (imported by "src/auro-select.js")
|
|
22
|
-
[32mcreated [1m./demo/[22m in [
|
|
22
|
+
[32mcreated [1m./demo/[22m in [1m1s[22m[39m
|
|
@@ -99,9 +99,9 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
99
99
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
100
100
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
|
|
101
101
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
102
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.
|
|
104
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.
|
|
102
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.8/dist/auro-dropdown__bundled.js" type="module"></script>
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.8/dist/auro-menu__bundled.js" type="module"></script>
|
|
104
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.8/dist/auro-select__bundled.js" type="module"></script>
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
107
107
|
## auro-select use cases
|