@aurodesignsystem/auro-formkit 2.0.0-beta.1 → 2.0.0-beta.10
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/026e4d886ba97e63-meta.json +1 -0
- package/.turbo/cache/026e4d886ba97e63.tar.zst +0 -0
- package/.turbo/cache/080ca6155e637d5d-meta.json +1 -0
- package/.turbo/cache/080ca6155e637d5d.tar.zst +0 -0
- package/.turbo/cache/0b115e30ff606299-meta.json +1 -0
- package/.turbo/cache/0b115e30ff606299.tar.zst +0 -0
- package/.turbo/cache/0c8124a987c1cc05-meta.json +1 -0
- package/.turbo/cache/0c8124a987c1cc05.tar.zst +0 -0
- package/.turbo/cache/18129dba20f51b6b-meta.json +1 -0
- package/.turbo/cache/18129dba20f51b6b.tar.zst +0 -0
- package/.turbo/cache/1c630fb3411e4a41-meta.json +1 -0
- package/.turbo/cache/1c630fb3411e4a41.tar.zst +0 -0
- package/.turbo/cache/24b19ac5895e5dd6-meta.json +1 -0
- package/.turbo/cache/24b19ac5895e5dd6.tar.zst +0 -0
- package/.turbo/cache/2787020e69f50af2-meta.json +1 -0
- package/.turbo/cache/2787020e69f50af2.tar.zst +0 -0
- package/.turbo/cache/29b72c73cbccb53d-meta.json +1 -0
- package/.turbo/cache/29b72c73cbccb53d.tar.zst +0 -0
- package/.turbo/cache/2c0d681132c153dd-meta.json +1 -0
- package/.turbo/cache/2c0d681132c153dd.tar.zst +0 -0
- package/.turbo/cache/3e647c5863d32e6f-meta.json +1 -0
- package/.turbo/cache/3e647c5863d32e6f.tar.zst +0 -0
- package/.turbo/cache/4006a206400d5c7b-meta.json +1 -0
- package/.turbo/cache/4006a206400d5c7b.tar.zst +0 -0
- package/.turbo/cache/43f5206cc4e69b44-meta.json +1 -0
- package/.turbo/cache/43f5206cc4e69b44.tar.zst +0 -0
- package/.turbo/cache/492dda333b8d15f1-meta.json +1 -0
- package/.turbo/cache/492dda333b8d15f1.tar.zst +0 -0
- package/.turbo/cache/4a85ec226b585fd5-meta.json +1 -0
- package/.turbo/cache/4a85ec226b585fd5.tar.zst +0 -0
- package/.turbo/cache/50993de942ec15a9-meta.json +1 -0
- package/.turbo/cache/50993de942ec15a9.tar.zst +0 -0
- package/.turbo/cache/50a29c70b93c57dd-meta.json +1 -0
- package/.turbo/cache/50a29c70b93c57dd.tar.zst +0 -0
- package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -0
- package/.turbo/cache/51eaa58d5c167de8.tar.zst +0 -0
- package/.turbo/cache/56455145cd768755-meta.json +1 -0
- package/.turbo/cache/56455145cd768755.tar.zst +0 -0
- package/.turbo/cache/5c06332cf9f132da-meta.json +1 -0
- package/.turbo/cache/5c06332cf9f132da.tar.zst +0 -0
- package/.turbo/cache/5e613afc6868d0e2-meta.json +1 -0
- package/.turbo/cache/5e613afc6868d0e2.tar.zst +0 -0
- package/.turbo/cache/6081837e8943b62e-meta.json +1 -0
- package/.turbo/cache/6081837e8943b62e.tar.zst +0 -0
- package/.turbo/cache/60ad74320c682a2b-meta.json +1 -0
- package/.turbo/cache/60ad74320c682a2b.tar.zst +0 -0
- package/.turbo/cache/61e218aba69cff58-meta.json +1 -0
- package/.turbo/cache/61e218aba69cff58.tar.zst +0 -0
- package/.turbo/cache/639dac15b979bedc-meta.json +1 -0
- package/.turbo/cache/639dac15b979bedc.tar.zst +0 -0
- package/.turbo/cache/664c2e08614fd212-meta.json +1 -0
- package/.turbo/cache/664c2e08614fd212.tar.zst +0 -0
- package/.turbo/cache/6c51b0ebfc086faa-meta.json +1 -0
- package/.turbo/cache/6c51b0ebfc086faa.tar.zst +0 -0
- package/.turbo/cache/7216d994164825fb-meta.json +1 -0
- package/.turbo/cache/7216d994164825fb.tar.zst +0 -0
- package/.turbo/cache/77da375a012de9d0-meta.json +1 -0
- package/.turbo/cache/77da375a012de9d0.tar.zst +0 -0
- package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -0
- package/.turbo/cache/7bf2b06a479d0b30.tar.zst +0 -0
- package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -0
- package/.turbo/cache/7c9ca6163e61285c.tar.zst +0 -0
- package/.turbo/cache/83a167e135cb431a-meta.json +1 -0
- package/.turbo/cache/83a167e135cb431a.tar.zst +0 -0
- package/.turbo/cache/8af27c076dc010c3-meta.json +1 -0
- package/.turbo/cache/8af27c076dc010c3.tar.zst +0 -0
- package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -0
- package/.turbo/cache/8bb856bd31b5b479.tar.zst +0 -0
- package/.turbo/cache/953c8216249d3509-meta.json +1 -0
- package/.turbo/cache/953c8216249d3509.tar.zst +0 -0
- package/.turbo/cache/95a5e76ffd8c5110-meta.json +1 -0
- package/.turbo/cache/95a5e76ffd8c5110.tar.zst +0 -0
- package/.turbo/cache/9ae99e8e7bd83d06-meta.json +1 -0
- package/.turbo/cache/9ae99e8e7bd83d06.tar.zst +0 -0
- package/.turbo/cache/a8b0fa0a9aa707c5-meta.json +1 -0
- package/.turbo/cache/a8b0fa0a9aa707c5.tar.zst +0 -0
- package/.turbo/cache/b22ca87b2f7f9cc2-meta.json +1 -0
- package/.turbo/cache/b22ca87b2f7f9cc2.tar.zst +0 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f.tar.zst +0 -0
- package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -0
- package/.turbo/cache/b6a202cc85cb61a0.tar.zst +0 -0
- package/.turbo/cache/b7bbe2e7d44b77f0-meta.json +1 -0
- package/.turbo/cache/b7bbe2e7d44b77f0.tar.zst +0 -0
- package/.turbo/cache/be0b95293ea517cc-meta.json +1 -0
- package/.turbo/cache/be0b95293ea517cc.tar.zst +0 -0
- package/.turbo/cache/c2b51643f886a493-meta.json +1 -0
- package/.turbo/cache/c2b51643f886a493.tar.zst +0 -0
- package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +1 -0
- package/.turbo/cache/c44efc9e4ddd8a0e.tar.zst +0 -0
- package/.turbo/cache/c6c6411199b68170-meta.json +1 -0
- package/.turbo/cache/c6c6411199b68170.tar.zst +0 -0
- package/.turbo/cache/c74d369a0475b124-meta.json +1 -0
- package/.turbo/cache/c74d369a0475b124.tar.zst +0 -0
- package/.turbo/cache/c7f5a276ddb73cf7-meta.json +1 -0
- package/.turbo/cache/c7f5a276ddb73cf7.tar.zst +0 -0
- package/.turbo/cache/c96933d40404e4c8-meta.json +1 -0
- package/.turbo/cache/c96933d40404e4c8.tar.zst +0 -0
- package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -0
- package/.turbo/cache/d5db503b2eaf239c.tar.zst +0 -0
- package/.turbo/cache/d775555355d6b8fc-meta.json +1 -0
- package/.turbo/cache/d775555355d6b8fc.tar.zst +0 -0
- package/.turbo/cache/d7c3007be148d2a1-meta.json +1 -0
- package/.turbo/cache/d7c3007be148d2a1.tar.zst +0 -0
- package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -0
- package/.turbo/cache/dad3d78b33edd9e4.tar.zst +0 -0
- package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -0
- package/.turbo/cache/e62cfee068e3ef36.tar.zst +0 -0
- package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -0
- package/.turbo/cache/e9e36823f6c98f07.tar.zst +0 -0
- package/.turbo/cache/eb1dbe885532c1dc-meta.json +1 -0
- package/.turbo/cache/eb1dbe885532c1dc.tar.zst +0 -0
- package/.turbo/cache/f1f6744948f1b18f-meta.json +1 -0
- package/.turbo/cache/f1f6744948f1b18f.tar.zst +0 -0
- package/.turbo/cache/feefbc25d550c1cd-meta.json +1 -0
- package/.turbo/cache/feefbc25d550c1cd.tar.zst +0 -0
- package/.turbo/cache/ff4dbfffc29255ab-meta.json +1 -0
- package/.turbo/cache/ff4dbfffc29255ab.tar.zst +0 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +109 -0
- package/README.md +59 -59
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +10 -10
- package/components/checkbox/.turbo/turbo-build.log +20 -21
- package/components/checkbox/.turbo/turbo-bundler.log +4 -4
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/checkbox/.turbo/turbo-types.log +1 -1
- package/components/checkbox/README.md +26 -34
- package/components/checkbox/demo/api.md +65 -65
- package/components/checkbox/demo/api.min.js +184 -84
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +184 -84
- package/components/checkbox/dist/auro-checkbox-group.d.ts +35 -16
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +20 -11
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +184 -84
- package/components/checkbox/package.json +1 -1
- package/components/checkbox/src/auro-checkbox-group.js +46 -17
- package/components/checkbox/src/auro-checkbox.js +29 -12
- package/components/combobox/.turbo/turbo-build$colon$sass.log +5 -5
- package/components/combobox/.turbo/turbo-build.log +22 -23
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/combobox/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/combobox/README.md +21 -26
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +754 -357
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +754 -357
- 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/dropdownVersion.d.ts +3 -0
- package/components/combobox/dist/dropdownVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.js +752 -355
- package/components/combobox/dist/inputVersion.d.ts +3 -0
- package/components/combobox/dist/inputVersion.d.ts.map +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/.husky/pre-commit +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/CHANGELOG.md +863 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/README.md +109 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/README.md +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/_auroElement.scss +45 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.js +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials+fv.css +110 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials.css +106 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css +8 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css +813 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/package.json +134 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/packageScripts/postinstall.mjs +39 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_animation.scss +30 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_blockquote.scss +46 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_breakpoints.scss +155 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_core.scss +25 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_essentials.scss +267 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_focus-visible.scss +36 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_fonts.scss +50 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_grids.scss +395 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_headings.scss +255 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_normalize.scss +663 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_picture.scss +31 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_utilityClasses.scss +22 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials+fv.scss +19 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleButton.scss +32 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleTab.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_containedButtons.scss +59 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_table.scss +54 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_tablist.scss +37 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/README.md +5 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/demoWrapper.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/elementDemoStyles.scss +123 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_deprecated.scss +16 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_manageScope.scss +42 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_displayProperties.scss +142 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_fontStyles.scss +151 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_inset.scss +188 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_layoutProperties.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_listProperties.scss +176 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_responsive.scss +249 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_typeProperties.scss +49 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_capitalize.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_contains.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_map-deep-get.scss +29 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleButton.scss +76 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleTab.scss +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_insetUtility.scss +9 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_layoutPropertiesGenerator.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_spacingUtility.scss +96 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_important.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_spacing-options.scss +13 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/README.md +293 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js +1377 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/index.js +1370 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/package.json +1 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/package.json +89 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/types/index.d.ts +115 -0
- package/components/combobox/node_modules/chalk/package.json +3 -3
- package/components/combobox/node_modules/chalk/readme.md +25 -53
- package/components/combobox/node_modules/chalk/source/index.d.ts +6 -1
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +6 -2
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +2 -2
- package/components/combobox/package.json +8 -8
- package/components/combobox/src/auro-combobox.js +75 -76
- package/components/combobox/src/dropdownVersion.js +1 -0
- package/components/combobox/src/inputVersion.js +1 -0
- package/components/counter/.turbo/turbo-build$colon$sass.log +179 -7
- package/components/counter/.turbo/turbo-build$colon$version.log +10 -0
- package/components/counter/.turbo/turbo-build.log +288 -14
- package/components/counter/.turbo/turbo-bundler.log +4 -4
- package/components/counter/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/counter/.turbo/turbo-sass$colon$render.log +39 -3
- package/components/counter/.turbo/turbo-types.log +1 -1
- 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/dropdownVersion.d.ts +3 -0
- package/components/counter/dist/dropdownVersion.d.ts.map +1 -0
- 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 +9 -3
- 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/dropdownVersion.js +1 -0
- 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$colon$sass.log +34 -34
- package/components/datepicker/.turbo/turbo-build.log +59 -59
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +10 -10
- package/components/datepicker/README.md +21 -26
- package/components/datepicker/demo/api.md +177 -131
- package/components/datepicker/demo/api.min.js +995 -559
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +995 -559
- package/components/datepicker/dist/auro-datepicker.d.ts +89 -78
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +995 -559
- package/components/datepicker/dist/inputVersion.d.ts +3 -0
- package/components/datepicker/dist/inputVersion.d.ts.map +1 -0
- package/components/datepicker/package.json +3 -3
- package/components/datepicker/src/auro-datepicker.js +142 -104
- package/components/datepicker/src/dropdownVersion.js +1 -0
- package/components/datepicker/src/inputVersion.js +1 -0
- package/components/datepicker/src/styles/color-cell-css.js +1 -1
- package/components/datepicker/src/styles/color-cell.css +1 -1
- package/components/datepicker/src/styles/color-cell.scss +1 -1
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +8 -8
- package/components/dropdown/.turbo/turbo-build$colon$version.log +1 -1
- package/components/dropdown/.turbo/turbo-build.log +19 -20
- package/components/dropdown/.turbo/turbo-bundler.log +4 -4
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/dropdown/.turbo/turbo-types.log +1 -1
- package/components/dropdown/README.md +18 -26
- package/components/dropdown/demo/api.md +4 -4
- package/components/dropdown/demo/api.min.js +205 -81
- package/components/dropdown/demo/index.min.js +205 -81
- package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +205 -81
- package/components/dropdown/package.json +1 -1
- package/components/dropdown/src/auro-dropdown.js +154 -39
- package/components/dropdown/src/auro-dropdownBib.js +12 -3
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +4 -0
- package/components/dropdown/src/styles/style.scss +5 -0
- package/components/form/.turbo/turbo-build$colon$sass.log +6 -6
- package/components/form/.turbo/turbo-build$colon$version.log +1 -1
- package/components/form/.turbo/turbo-build.log +17 -18
- package/components/form/.turbo/turbo-bundler.log +4 -4
- package/components/form/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/form/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/form/.turbo/turbo-types.log +1 -1
- package/components/form/README.md +18 -26
- package/components/form/demo/api.min.js +4 -4
- package/components/form/demo/index.min.js +4 -4
- package/components/form/dist/index.js +4 -4
- package/components/form/package.json +1 -1
- package/components/input/.turbo/turbo-build$colon$sass.log +66 -16
- package/components/input/.turbo/turbo-build$colon$version.log +1 -1
- package/components/input/.turbo/turbo-build.log +79 -32
- package/components/input/.turbo/turbo-bundler.log +4 -4
- package/components/input/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +15 -9
- package/components/input/.turbo/turbo-types.log +1 -1
- package/components/input/README.md +18 -28
- package/components/input/demo/api.md +146 -311
- package/components/input/demo/api.min.js +365 -145
- package/components/input/demo/index.md +11 -61
- package/components/input/demo/index.min.js +365 -145
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +155 -84
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +365 -145
- 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/package.json +1 -1
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +252 -85
- 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$colon$sass.log +9 -9
- package/components/menu/.turbo/turbo-build$colon$version.log +1 -1
- package/components/menu/.turbo/turbo-build.log +20 -21
- package/components/menu/.turbo/turbo-bundler.log +4 -4
- package/components/menu/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/menu/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/menu/.turbo/turbo-types.log +1 -1
- package/components/menu/README.md +18 -26
- package/components/menu/demo/api.min.js +7 -7
- package/components/menu/demo/index.min.js +7 -7
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +7 -7
- package/components/menu/package.json +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build$colon$sass.log +13 -13
- package/components/radio/.turbo/turbo-build.log +23 -24
- package/components/radio/.turbo/turbo-bundler.log +4 -4
- package/components/radio/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/radio/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/radio/.turbo/turbo-types.log +1 -1
- package/components/radio/README.md +18 -26
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +111 -57
- package/components/radio/demo/index.min.js +111 -57
- package/components/radio/dist/index.js +111 -57
- package/components/radio/package.json +1 -1
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +30 -33
- package/components/select/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/select/.turbo/turbo-sass$colon$render.log +4 -4
- package/components/select/README.md +21 -42
- package/components/select/demo/api.md +45 -110
- package/components/select/demo/api.min.js +434 -279
- package/components/select/demo/index.md +101 -59
- package/components/select/demo/index.min.js +434 -275
- package/components/select/dist/auro-select.d.ts +64 -51
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/dropdownVersion.d.ts +3 -0
- package/components/select/dist/dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.js +429 -257
- package/components/select/package.json +3 -3
- package/components/select/src/auro-select.js +101 -119
- package/components/select/src/dropdownVersion.js +1 -0
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +7 -0
- package/components/select/src/styles/style.scss +11 -1
- package/package.json +21 -21
- package/packages/build-tools/src/docProcessor.mjs +37 -8
- package/packages/form-validation/src/validation.js +104 -50
- 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.json +8 -8
- package/.turbo/cache/013a48308b893dac-meta.json +0 -1
- package/.turbo/cache/013a48308b893dac.tar.zst +0 -0
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +0 -1
- package/.turbo/cache/07ca42419b9f050c.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/0a2b0a4df8a0443f.tar.zst +0 -0
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +0 -1
- package/.turbo/cache/0cea4c1f34f3683b.tar.zst +0 -0
- 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/17259cf94d8f8925-meta.json +0 -1
- package/.turbo/cache/17259cf94d8f8925.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +0 -1
- package/.turbo/cache/1c99a949ec63ab35.tar.zst +0 -0
- package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
- package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +0 -1
- package/.turbo/cache/257a7a26ea72dbc5.tar.zst +0 -0
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +0 -1
- package/.turbo/cache/3bf45120d0cc9bd8.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +0 -1
- package/.turbo/cache/45035bf5c4147ccd.tar.zst +0 -0
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
- package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
- package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +0 -1
- package/.turbo/cache/5f304c0f37ef25f3.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/64de7a53e02db647-meta.json +0 -1
- package/.turbo/cache/64de7a53e02db647.tar.zst +0 -0
- package/.turbo/cache/691a74627ec57993-meta.json +0 -1
- package/.turbo/cache/691a74627ec57993.tar.zst +0 -0
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +0 -1
- package/.turbo/cache/69aae513b7ec6c7d.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +0 -1
- package/.turbo/cache/6dd7058e6703cb35.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/73e9073a5274616d-meta.json +0 -1
- package/.turbo/cache/73e9073a5274616d.tar.zst +0 -0
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +0 -1
- package/.turbo/cache/773edc0f83c8c5a5.tar.zst +0 -0
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +0 -1
- package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
- package/.turbo/cache/786a822763403879-meta.json +0 -1
- package/.turbo/cache/786a822763403879.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +0 -1
- package/.turbo/cache/80b5d974184a01df.tar.zst +0 -0
- package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +0 -1
- package/.turbo/cache/8954c6073396fadd.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +0 -1
- package/.turbo/cache/92daa6d7c389d548.tar.zst +0 -0
- package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
- package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
- package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
- package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
- package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +0 -1
- package/.turbo/cache/a77bc920ea508bb8.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/b54fc4f664a7a5a0-meta.json +0 -1
- package/.turbo/cache/b54fc4f664a7a5a0.tar.zst +0 -0
- package/.turbo/cache/ba4418918621fbcd-meta.json +0 -1
- package/.turbo/cache/ba4418918621fbcd.tar.zst +0 -0
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +0 -1
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +0 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +0 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +0 -1
- package/.turbo/cache/cc81de9c0b452a7c.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/dad1301ac69bcb85-meta.json +0 -1
- package/.turbo/cache/dad1301ac69bcb85.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +0 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +0 -1
- package/.turbo/cache/fa132b5b5f0e75f8.tar.zst +0 -0
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
- package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
|
@@ -26,33 +26,33 @@ function swapValueExample() {
|
|
|
26
26
|
* Copyright 2019 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const t$7=globalThis,e$9=t$7.ShadowRoot&&(
|
|
29
|
+
const t$7=globalThis,e$9=t$7.ShadowRoot&&(undefined===t$7.ShadyCSS||t$7.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$7=Symbol(),o$a=new WeakMap;let n$8 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$7)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$9&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$a.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$a.set(s,t));}return t}toString(){return this.cssText}};const r$9=t=>new n$8("string"==typeof t?t:t+"",undefined,s$7),i$c=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$8(o,t,s$7)},S$4=(s,o)=>{if(e$9)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$7.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$7=e$9?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$9(e)})(t):t;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const{is:i$b,defineProperty:e$8,getOwnPropertyDescriptor:r$8,getOwnPropertyNames:h$4,getOwnPropertySymbols:o$9,getPrototypeOf:n$7}=Object,a$6=globalThis,c$6=a$6.trustedTypes,l$6=c$6?c$6.emptyScript:"",p$5=a$6.reactiveElementPolyfillSupport,d$4=(t,s)=>t,u$8={toAttribute(t,s){switch(s){case Boolean:t=t?l$6:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$4=(t,s)=>!i$b(t,s),y$4={attribute
|
|
35
|
+
*/const{is:i$b,defineProperty:e$8,getOwnPropertyDescriptor:r$8,getOwnPropertyNames:h$4,getOwnPropertySymbols:o$9,getPrototypeOf:n$7}=Object,a$6=globalThis,c$6=a$6.trustedTypes,l$6=c$6?c$6.emptyScript:"",p$5=a$6.reactiveElementPolyfillSupport,d$4=(t,s)=>t,u$8={toAttribute(t,s){switch(s){case Boolean:t=t?l$6:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$4=(t,s)=>!i$b(t,s),y$4={attribute:true,type:String,converter:u$8,reflect:false,hasChanged:f$4};Symbol.metadata??=Symbol("metadata"),a$6.litPropertyMetadata??=new WeakMap;let b$2 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$4){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$8(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$8(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$4}static _$Ei(){if(this.hasOwnProperty(d$4("elementProperties")))return;const t=n$7(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$4("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$4("properties"))){const t=this.properties,s=[...h$4(t),...o$9(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$7(s));}else undefined!==s&&i.push(c$7(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?undefined:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():undefined}constructor(){super(),this._$Ep=undefined,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),undefined!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$4(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(undefined!==e&&true===i.reflect){const r=(undefined!==i.converter?.toAttribute?i.converter:u$8).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(undefined!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:undefined!==t.converter?.fromAttribute?t.converter:u$8;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(undefined!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$4)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=undefined;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||undefined===this[s]||this.P(s,this[s],i);}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=false,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$2.elementStyles=[],b$2.shadowRootOptions={mode:"open"},b$2[d$4("elementProperties")]=new Map,b$2[d$4("finalized")]=new Map,p$5?.({ReactiveElement:b$2}),(a$6.reactiveElementVersions??=[]).push("2.0.4");
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
const t$6=globalThis,i$a=t$6.trustedTypes,s$6=i$a?i$a.createPolicy("lit-html",{createHTML:t=>t}):
|
|
42
|
+
const t$6=globalThis,i$a=t$6.trustedTypes,s$6=i$a?i$a.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$7="$lit$",h$3=`lit$${Math.random().toFixed(9).slice(2)}$`,o$8="?"+h$3,n$6=`<${o$8}>`,r$7=document,l$5=()=>r$7.createComment(""),c$5=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$5=Array.isArray,u$7=t=>a$5(t)||"function"==typeof t?.[Symbol.iterator],d$3="[ \t\n\f\r]",f$3=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$3=/-->/g,_$2=/>/g,m$3=RegExp(`>|${d$3}(?:([^\\s"'>=/]+)(${d$3}*=${d$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$4=/'/g,g$2=/"/g,$$2=/^(?:script|style|textarea|title)$/i,y$3=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$2=y$3(1),T$2=Symbol.for("lit-noChange"),E$2=Symbol.for("lit-nothing"),A$2=new WeakMap,C$2=r$7.createTreeWalker(r$7,129);function P$2(t,i){if(!a$5(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$6?s$6.createHTML(i):i}const V$2=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$3;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$3?"!--"===u[1]?c=v$3:undefined!==u[1]?c=_$2:undefined!==u[2]?($$2.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$3):undefined!==u[3]&&(c=m$3):c===m$3?">"===u[0]?(c=r??f$3,d=-1):undefined===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=undefined===u[3]?m$3:'"'===u[3]?g$2:p$4):c===g$2||c===p$4?c=m$3:c===v$3||c===_$2?c=f$3:(c=m$3,r=undefined);const x=c===m$3&&t[i+1].startsWith("/>")?" ":"";l+=c===f$3?s+n$6:d>=0?(o.push(a),s.slice(0,d)+e$7+s.slice(d)+h$3+x):s+h$3+(-2===d?i:x);}return [P$2(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$2 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$2(t,s);if(this.el=N.createElement(f,n),C$2.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$2.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$7)){const i=v[a++],s=r.getAttribute(t).split(h$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$2:"?"===e[1]?I$2:"@"===e[1]?L$2:k$2}),r.removeAttribute(t);}else t.startsWith(h$3)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$2.test(r.tagName)){const t=r.textContent.split(h$3),s=t.length-1;if(s>0){r.textContent=i$a?i$a.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$5()),C$2.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$5());}}}else if(8===r.nodeType)if(r.data===o$8)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$3,t+1));)d.push({type:7,index:c}),t+=h$3.length-1;}c++;}}static createElement(t,i){const s=r$7.createElement("template");return s.innerHTML=t,s}};function S$3(t,i,s=t,e){if(i===T$2)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c$5(i)?undefined:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),undefined===o?h=undefined:(h=new o(t),h._$AT(t,s,e)),undefined!==e?(s._$Co??=[])[e]=h:s._$Cl=h),undefined!==h&&(i=S$3(t,h._$AS(t,i.values),h,e)),i}let M$3 = class M{constructor(t,i){this._$AV=[],this._$AN=undefined,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$7).importNode(i,true);C$2.currentNode=e;let h=C$2.nextNode(),o=0,n=0,l=s[0];for(;undefined!==l;){if(o===l.index){let i;2===l.type?i=new R$2(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$2(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$2.nextNode(),o++);}return C$2.currentNode=r$7,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$2 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$2,this._$AN=undefined,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return undefined!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$3(this,t,i),c$5(t)?t===E$2||null==t||""===t?(this._$AH!==E$2&&this._$AR(),this._$AH=E$2):t!==this._$AH&&t!==T$2&&this._(t):undefined!==t._$litType$?this.$(t):undefined!==t.nodeType?this.T(t):u$7(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$2&&c$5(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$7.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N$2.createElement(P$2(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$3(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$2.get(t.strings);return undefined===i&&A$2.set(t.strings,i=new N$2(t)),i}k(t){a$5(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$5()),this.O(l$5()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$2 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E$2,this._$AN=undefined,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E$2;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(undefined===h)t=S$3(this,t,i,0),o=!c$5(t)||t!==this._$AH&&t!==T$2,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$3(this,e[s+n],i,n),r===T$2&&(r=this._$AH[n]),o||=!c$5(r)||r!==this._$AH[n],r===E$2?t=E$2:t!==E$2&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$2?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$2 = class H extends k$2{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$2?undefined:t;}};let I$2 = class I extends k$2{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$2);}};let L$2 = class L extends k$2{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$3(this,t,i,0)??E$2)===T$2)return;const s=this._$AH,e=t===E$2&&s!==E$2||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$2&&(s===E$2||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let z$2 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=undefined,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$3(this,t);}};const j$2=t$6.litHtmlPolyfillSupport;j$2?.(N$2,R$2),(t$6.litHtmlVersions??=[]).push("3.2.1");const B$2=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(undefined===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$2(i.insertBefore(l$5(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/let r$6 = class r extends b$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
48
|
+
*/let r$6 = class r extends b$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=undefined;}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$2(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$2}};r$6._$litElement$=true,r$6["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$6});const i$9=globalThis.litElementPolyfillSupport;i$9?.({LitElement:r$6});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2020 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
54
|
*/
|
|
55
|
-
const a$4=Symbol.for(""),o$7=t=>{if(t?.r===a$4)return t?._$litStatic$},s$5=t=>({_$litStatic$:t,r:a$4}),i$8=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
55
|
+
const a$4=Symbol.for(""),o$7=t=>{if(t?.r===a$4)return t?._$litStatic$},s$5=t=>({_$litStatic$:t,r:a$4}),i$8=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$4}),l$4=new Map,n$5=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&undefined!==(i=e[$],s=o$7(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$4.get(t))&&(n.raw=n,l$4.set(t,r=n)),e=u;}return t(r,...e)},u$6=n$5(x$2);
|
|
56
56
|
|
|
57
57
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
58
58
|
// See LICENSE in the project root for license information.
|
|
@@ -198,30 +198,87 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* @param {
|
|
201
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
202
|
+
*
|
|
203
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
204
204
|
* @returns {void}
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
208
|
+
* validateElementAttributes(inputElement);
|
|
209
|
+
*
|
|
210
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
211
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
212
|
+
*
|
|
213
|
+
* Validation rules:
|
|
214
|
+
* - input:
|
|
215
|
+
* - length:
|
|
216
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
217
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
218
|
+
* - pattern:
|
|
219
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
220
|
+
* - counter:
|
|
221
|
+
* - range:
|
|
222
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
223
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
205
224
|
*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
225
|
+
validateElementAttributes(elem) {
|
|
226
|
+
const validationRules = {
|
|
227
|
+
input: {
|
|
228
|
+
length: [
|
|
229
|
+
{
|
|
230
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
231
|
+
validity: 'tooShort',
|
|
232
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
236
|
+
validity: 'tooLong',
|
|
237
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
pattern: [
|
|
241
|
+
{
|
|
242
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
243
|
+
validity: 'patternMismatch',
|
|
244
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
counter: {
|
|
249
|
+
range: [
|
|
250
|
+
{
|
|
251
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
252
|
+
validity: 'rangeOverflow',
|
|
253
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
257
|
+
validity: 'rangeUnderflow',
|
|
258
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
259
|
+
}
|
|
260
|
+
]
|
|
213
261
|
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
let elementType;
|
|
265
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
266
|
+
elementType = 'input';
|
|
267
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
268
|
+
elementType = 'counter';
|
|
214
269
|
}
|
|
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) {
|
|
218
|
-
elem.validity = 'tooShort';
|
|
219
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
220
|
-
}
|
|
221
270
|
|
|
222
|
-
if (
|
|
223
|
-
|
|
224
|
-
|
|
271
|
+
if (elementType) {
|
|
272
|
+
const rules = validationRules[elementType];
|
|
273
|
+
|
|
274
|
+
if (rules) {
|
|
275
|
+
Object.values(rules).flat().forEach(rule => {
|
|
276
|
+
if (rule.check(elem)) {
|
|
277
|
+
elem.validity = rule.validity;
|
|
278
|
+
elem.errorMessage = rule.message(elem);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
225
282
|
}
|
|
226
283
|
}
|
|
227
284
|
|
|
@@ -237,33 +294,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
237
294
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
238
295
|
|
|
239
296
|
if (!elem.value.match(emailRegex)) {
|
|
240
|
-
elem.validity = '
|
|
241
|
-
elem.
|
|
297
|
+
elem.validity = 'patternMismatch';
|
|
298
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
242
299
|
}
|
|
243
300
|
} else if (elem.type === 'credit-card') {
|
|
244
301
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
245
302
|
elem.validity = 'tooShort';
|
|
246
|
-
elem.
|
|
303
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
247
304
|
}
|
|
248
305
|
} else if (elem.type === 'number') {
|
|
249
306
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
250
307
|
elem.validity = 'rangeOverflow';
|
|
251
|
-
elem.
|
|
308
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
252
309
|
}
|
|
253
310
|
|
|
254
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
311
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
255
312
|
elem.validity = 'rangeUnderflow';
|
|
256
|
-
elem.
|
|
313
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
257
314
|
}
|
|
258
|
-
|
|
259
315
|
} else if (elem.type === 'month-day-year' ||
|
|
260
316
|
elem.type === 'month-year' ||
|
|
261
317
|
elem.type === 'month-fullYear' ||
|
|
262
318
|
elem.type === 'year-month-day'
|
|
263
319
|
) {
|
|
264
|
-
if (elem.value
|
|
320
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
265
321
|
elem.validity = 'tooShort';
|
|
266
|
-
elem.
|
|
322
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
267
323
|
} else {
|
|
268
324
|
const valueDate = new Date(elem.value);
|
|
269
325
|
|
|
@@ -273,7 +329,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
273
329
|
|
|
274
330
|
if (valueDate > maxDate) {
|
|
275
331
|
elem.validity = 'rangeOverflow';
|
|
276
|
-
elem.
|
|
332
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
277
333
|
}
|
|
278
334
|
}
|
|
279
335
|
|
|
@@ -283,7 +339,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
283
339
|
|
|
284
340
|
if (valueDate < minDate) {
|
|
285
341
|
elem.validity = 'rangeUnderflow';
|
|
286
|
-
elem.
|
|
342
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
287
343
|
}
|
|
288
344
|
}
|
|
289
345
|
}
|
|
@@ -306,10 +362,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
306
362
|
|
|
307
363
|
if (elem.hasAttribute('error')) {
|
|
308
364
|
elem.validity = 'customError';
|
|
309
|
-
elem.
|
|
365
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
310
366
|
} else if (validationShouldRun) {
|
|
311
367
|
elem.validity = 'valid';
|
|
312
|
-
elem.
|
|
368
|
+
elem.errorMessage = '';
|
|
313
369
|
|
|
314
370
|
/**
|
|
315
371
|
* Only validate once we interact with the datepicker
|
|
@@ -321,7 +377,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
321
377
|
let hasValue = elem.value && elem.value.length > 0;
|
|
322
378
|
|
|
323
379
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
324
|
-
if (this.auroInputElements
|
|
380
|
+
if (this.auroInputElements?.length === 2) {
|
|
325
381
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
326
382
|
hasValue = false;
|
|
327
383
|
}
|
|
@@ -329,31 +385,29 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
329
385
|
|
|
330
386
|
if (!hasValue && elem.required) {
|
|
331
387
|
elem.validity = 'valueMissing';
|
|
332
|
-
elem.
|
|
388
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
333
389
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
334
390
|
this.validateType(elem);
|
|
335
|
-
this.
|
|
391
|
+
this.validateElementAttributes(elem);
|
|
392
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
393
|
+
this.validateElementAttributes(elem);
|
|
336
394
|
}
|
|
337
395
|
}
|
|
338
396
|
|
|
339
|
-
if (this.auroInputElements
|
|
397
|
+
if (this.auroInputElements?.length > 0) {
|
|
340
398
|
elem.validity = this.auroInputElements[0].validity;
|
|
341
|
-
elem.
|
|
399
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
342
400
|
|
|
343
|
-
if (elem.validity === 'valid') {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
347
|
-
}
|
|
401
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
402
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
403
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
348
404
|
}
|
|
349
405
|
}
|
|
350
406
|
|
|
351
407
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
356
|
-
}
|
|
408
|
+
// Use the validity message override if it is declared
|
|
409
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
410
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
357
411
|
}
|
|
358
412
|
|
|
359
413
|
this.getErrorMessage(elem);
|
|
@@ -399,18 +453,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
399
453
|
if (elem.validity !== 'valid') {
|
|
400
454
|
if (elem.setCustomValidity) {
|
|
401
455
|
elem.errorMessage = elem.setCustomValidity;
|
|
402
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
456
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
403
457
|
const input = elem.renderRoot.querySelector('input');
|
|
404
458
|
|
|
405
459
|
if (input.validationMessage.length > 0) {
|
|
406
460
|
elem.errorMessage = input.validationMessage;
|
|
407
461
|
}
|
|
408
|
-
} else if (this.inputElements &&
|
|
462
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
409
463
|
const firstInput = this.inputElements[0];
|
|
410
464
|
|
|
411
465
|
if (firstInput.validationMessage.length > 0) {
|
|
412
466
|
elem.errorMessage = firstInput.validationMessage;
|
|
413
|
-
} else if (this.inputElements
|
|
467
|
+
} else if (this.inputElements?.length === 2) {
|
|
414
468
|
const secondInput = this.inputElements[1];
|
|
415
469
|
|
|
416
470
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -429,33 +483,33 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
429
483
|
* Copyright 2017 Google LLC
|
|
430
484
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
431
485
|
*/
|
|
432
|
-
const t$2$1=globalThis,i$5$1=t$2$1.trustedTypes,s$2$1=i$5$1?i$5$1.createPolicy("lit-html",{createHTML:t=>t}):
|
|
486
|
+
const t$2$1=globalThis,i$5$1=t$2$1.trustedTypes,s$2$1=i$5$1?i$5$1.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$4$1="$lit$",h$1$1=`lit$${Math.random().toFixed(9).slice(2)}$`,o$4$1="?"+h$1$1,n$3$1=`<${o$4$1}>`,r$3$1=document,l$2$1=()=>r$3$1.createComment(""),c$2$1=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2$1=Array.isArray,u$2$1=t=>a$2$1(t)||"function"==typeof t?.[Symbol.iterator],d$1$1="[ \t\n\f\r]",f$1$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$2=/-->/g,_$1=/>/g,m$2=RegExp(`>|${d$1$1}(?:([^\\s"'>=/]+)(${d$1$1}*=${d$1$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1$1=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$1$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$1$1(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$3$1.createTreeWalker(r$3$1,129);function P$1(t,i){if(!a$2$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$2$1?s$2$1.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1$1?"!--"===u[1]?c=v$2:undefined!==u[1]?c=_$1:undefined!==u[2]?($$1.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$2):undefined!==u[3]&&(c=m$2):c===m$2?">"===u[0]?(c=r??f$1$1,d=-1):undefined===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=undefined===u[3]?m$2:'"'===u[3]?g$1:p$1$1):c===g$1||c===p$1$1?c=m$2:c===v$2||c===_$1?c=f$1$1:(c=m$2,r=undefined);const x=c===m$2&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1$1?s+n$3$1:d>=0?(o.push(a),s.slice(0,d)+e$4$1+s.slice(d)+h$1$1+x):s+h$1$1+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$4$1)){const i=v[a++],s=r.getAttribute(t).split(h$1$1),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$1:"?"===e[1]?I$1:"@"===e[1]?L$1:k$1}),r.removeAttribute(t);}else t.startsWith(h$1$1)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$1$1),s=t.length-1;if(s>0){r.textContent=i$5$1?i$5$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$2$1()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$2$1());}}}else if(8===r.nodeType)if(r.data===o$4$1)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$1$1,t+1));)d.push({type:7,index:c}),t+=h$1$1.length-1;}c++;}}static createElement(t,i){const s=r$3$1.createElement("template");return s.innerHTML=t,s}};function S$1$1(t,i,s=t,e){if(i===T$1)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c$2$1(i)?undefined:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),undefined===o?h=undefined:(h=new o(t),h._$AT(t,s,e)),undefined!==e?(s._$Co??=[])[e]=h:s._$Cl=h),undefined!==h&&(i=S$1$1(t,h._$AS(t,i.values),h,e)),i}let M$2 = class M{constructor(t,i){this._$AV=[],this._$AN=undefined,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$3$1).importNode(i,true);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;undefined!==l;){if(o===l.index){let i;2===l.type?i=new R$1(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$1.nextNode(),o++);}return C$1.currentNode=r$3$1,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$1 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$1,this._$AN=undefined,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return undefined!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$1$1(this,t,i),c$2$1(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):undefined!==t._$litType$?this.$(t):undefined!==t.nodeType?this.T(t):u$2$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$1&&c$2$1(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N$1.createElement(P$1(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$2(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$1.get(t.strings);return undefined===i&&A$1.set(t.strings,i=new N$1(t)),i}k(t){a$2$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$2$1()),this.O(l$2$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$1 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E$1,this._$AN=undefined,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(undefined===h)t=S$1$1(this,t,i,0),o=!c$2$1(t)||t!==this._$AH&&t!==T$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$1$1(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$2$1(r)||r!==this._$AH[n],r===E$1?t=E$1:t!==E$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$1 = class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$1?undefined:t;}};let I$1 = class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$1);}};let L$1 = class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$1$1(this,t,i,0)??E$1)===T$1)return;const s=this._$AH,e=t===E$1&&s!==E$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$1&&(s===E$1||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let z$1 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=undefined,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$1$1(this,t);}};const j$1=t$2$1.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$2$1.litHtmlVersions??=[]).push("3.2.1");const B$1=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(undefined===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$1(i.insertBefore(l$2$1(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
433
487
|
|
|
434
488
|
/**
|
|
435
489
|
* @license
|
|
436
490
|
* Copyright 2020 Google LLC
|
|
437
491
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
438
492
|
*/
|
|
439
|
-
const a$1$1=Symbol.for(""),o$3$1=t=>{if(t?.r===a$1$1)return t?._$litStatic$},s$1$1=t=>({_$litStatic$:t,r:a$1$1}),i$4$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
493
|
+
const a$1$1=Symbol.for(""),o$3$1=t=>{if(t?.r===a$1$1)return t?._$litStatic$},s$1$1=t=>({_$litStatic$:t,r:a$1$1}),i$4$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$1$1}),l$1$1=new Map,n$2$1=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&undefined!==(i=e[$],s=o$3$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$1$1.get(t))&&(n.raw=n,l$1$1.set(t,r=n)),e=u;}return t(r,...e)},u$1$1=n$2$1(x$1);
|
|
440
494
|
|
|
441
495
|
/**
|
|
442
496
|
* @license
|
|
443
497
|
* Copyright 2019 Google LLC
|
|
444
498
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
445
499
|
*/
|
|
446
|
-
const t$1$1=globalThis,e$3$1=t$1$1.ShadowRoot&&(
|
|
500
|
+
const t$1$1=globalThis,e$3$1=t$1$1.ShadowRoot&&(undefined===t$1$1.ShadyCSS||t$1$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$4=Symbol(),o$2$1=new WeakMap;let n$1$1 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$4)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3$1&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$2$1.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2$1.set(s,t));}return t}toString(){return this.cssText}};const r$2$1=t=>new n$1$1("string"==typeof t?t:t+"",undefined,s$4),i$3$1=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$1$1(o,t,s$4)},S$2=(s,o)=>{if(e$3$1)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1$1.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1$1=e$3$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2$1(e)})(t):t;
|
|
447
501
|
|
|
448
502
|
/**
|
|
449
503
|
* @license
|
|
450
504
|
* Copyright 2017 Google LLC
|
|
451
505
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
452
|
-
*/const{is:i$2$1,defineProperty:e$2$1,getOwnPropertyDescriptor:r$1$1,getOwnPropertyNames:h$2,getOwnPropertySymbols:o$1$1,getPrototypeOf:n$4}=Object,a$3=globalThis,c$4=a$3.trustedTypes,l$3=c$4?c$4.emptyScript:"",p$3=a$3.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$5={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$2$1(t,s),y$2={attribute
|
|
506
|
+
*/const{is:i$2$1,defineProperty:e$2$1,getOwnPropertyDescriptor:r$1$1,getOwnPropertyNames:h$2,getOwnPropertySymbols:o$1$1,getPrototypeOf:n$4}=Object,a$3=globalThis,c$4=a$3.trustedTypes,l$3=c$4?c$4.emptyScript:"",p$3=a$3.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$5={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$2$1(t,s),y$2={attribute:true,type:String,converter:u$5,reflect:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$3.litPropertyMetadata??=new WeakMap;let b$1 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$2){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$2$1(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$1$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$2}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$4(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$2("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$2("properties"))){const t=this.properties,s=[...h$2(t),...o$1$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1$1(s));}else undefined!==s&&i.push(c$1$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?undefined:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():undefined}constructor(){super(),this._$Ep=undefined,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),undefined!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$2(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(undefined!==e&&true===i.reflect){const r=(undefined!==i.converter?.toAttribute?i.converter:u$5).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(undefined!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:undefined!==t.converter?.fromAttribute?t.converter:u$5;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(undefined!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$2)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=undefined;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||undefined===this[s]||this.P(s,this[s],i);}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=false,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$2("elementProperties")]=new Map,b$1[d$2("finalized")]=new Map,p$3?.({ReactiveElement:b$1}),(a$3.reactiveElementVersions??=[]).push("2.0.4");
|
|
453
507
|
|
|
454
508
|
/**
|
|
455
509
|
* @license
|
|
456
510
|
* Copyright 2017 Google LLC
|
|
457
511
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
458
|
-
*/let r$5 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
512
|
+
*/let r$5 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=undefined;}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$1(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$1}};r$5._$litElement$=true,r$5["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$5});const i$1$1=globalThis.litElementPolyfillSupport;i$1$1?.({LitElement:r$5});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
459
513
|
|
|
460
514
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
461
515
|
// See LICENSE in the project root for license information.
|
|
@@ -575,7 +629,7 @@ function getAlignmentAxis(placement) {
|
|
|
575
629
|
return getOppositeAxis(getSideAxis(placement));
|
|
576
630
|
}
|
|
577
631
|
function getAlignmentSides(placement, rects, rtl) {
|
|
578
|
-
if (rtl ===
|
|
632
|
+
if (rtl === undefined) {
|
|
579
633
|
rtl = false;
|
|
580
634
|
}
|
|
581
635
|
const alignment = getAlignment(placement);
|
|
@@ -732,7 +786,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
732
786
|
platform
|
|
733
787
|
} = config;
|
|
734
788
|
const validMiddleware = middleware.filter(Boolean);
|
|
735
|
-
const rtl = await (platform.isRTL == null ?
|
|
789
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
736
790
|
let rects = await platform.getElementRects({
|
|
737
791
|
reference,
|
|
738
792
|
floating,
|
|
@@ -818,7 +872,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
818
872
|
*/
|
|
819
873
|
async function detectOverflow(state, options) {
|
|
820
874
|
var _await$platform$isEle;
|
|
821
|
-
if (options ===
|
|
875
|
+
if (options === undefined) {
|
|
822
876
|
options = {};
|
|
823
877
|
}
|
|
824
878
|
const {
|
|
@@ -840,7 +894,7 @@ async function detectOverflow(state, options) {
|
|
|
840
894
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
841
895
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
842
896
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
843
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ?
|
|
897
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? undefined : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? undefined : platform.getDocumentElement(elements.floating))),
|
|
844
898
|
boundary,
|
|
845
899
|
rootBoundary,
|
|
846
900
|
strategy
|
|
@@ -851,8 +905,8 @@ async function detectOverflow(state, options) {
|
|
|
851
905
|
width: rects.floating.width,
|
|
852
906
|
height: rects.floating.height
|
|
853
907
|
} : rects.reference;
|
|
854
|
-
const offsetParent = await (platform.getOffsetParent == null ?
|
|
855
|
-
const offsetScale = (await (platform.isElement == null ?
|
|
908
|
+
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
909
|
+
const offsetScale = (await (platform.isElement == null ? undefined : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? undefined : platform.getScale(offsetParent))) || {
|
|
856
910
|
x: 1,
|
|
857
911
|
y: 1
|
|
858
912
|
} : {
|
|
@@ -889,7 +943,7 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
889
943
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
890
944
|
*/
|
|
891
945
|
const autoPlacement$1 = function (options) {
|
|
892
|
-
if (options ===
|
|
946
|
+
if (options === undefined) {
|
|
893
947
|
options = {};
|
|
894
948
|
}
|
|
895
949
|
return {
|
|
@@ -913,12 +967,12 @@ const autoPlacement$1 = function (options) {
|
|
|
913
967
|
} = evaluate(options, state);
|
|
914
968
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
915
969
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
916
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ?
|
|
970
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
917
971
|
const currentPlacement = placements$1[currentIndex];
|
|
918
972
|
if (currentPlacement == null) {
|
|
919
973
|
return {};
|
|
920
974
|
}
|
|
921
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ?
|
|
975
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
922
976
|
|
|
923
977
|
// Make `computeCoords` start from the right place.
|
|
924
978
|
if (placement !== currentPlacement) {
|
|
@@ -929,7 +983,7 @@ const autoPlacement$1 = function (options) {
|
|
|
929
983
|
};
|
|
930
984
|
}
|
|
931
985
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
932
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ?
|
|
986
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || []), {
|
|
933
987
|
placement: currentPlacement,
|
|
934
988
|
overflows: currentOverflows
|
|
935
989
|
}];
|
|
@@ -959,7 +1013,7 @@ const autoPlacement$1 = function (options) {
|
|
|
959
1013
|
// Aligned placements should not check their opposite crossAxis
|
|
960
1014
|
// side.
|
|
961
1015
|
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
962
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ?
|
|
1016
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
963
1017
|
if (resetPlacement !== placement) {
|
|
964
1018
|
return {
|
|
965
1019
|
data: {
|
|
@@ -983,7 +1037,7 @@ const autoPlacement$1 = function (options) {
|
|
|
983
1037
|
* @see https://floating-ui.com/docs/flip
|
|
984
1038
|
*/
|
|
985
1039
|
const flip$1 = function (options) {
|
|
986
|
-
if (options ===
|
|
1040
|
+
if (options === undefined) {
|
|
987
1041
|
options = {};
|
|
988
1042
|
}
|
|
989
1043
|
return {
|
|
@@ -1019,7 +1073,7 @@ const flip$1 = function (options) {
|
|
|
1019
1073
|
const side = getSide(placement);
|
|
1020
1074
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
1021
1075
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
1022
|
-
const rtl = await (platform.isRTL == null ?
|
|
1076
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1023
1077
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
1024
1078
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
1025
1079
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
@@ -1028,7 +1082,7 @@ const flip$1 = function (options) {
|
|
|
1028
1082
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
1029
1083
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1030
1084
|
const overflows = [];
|
|
1031
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ?
|
|
1085
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
1032
1086
|
if (checkMainAxis) {
|
|
1033
1087
|
overflows.push(overflow[side]);
|
|
1034
1088
|
}
|
|
@@ -1044,7 +1098,7 @@ const flip$1 = function (options) {
|
|
|
1044
1098
|
// One or more sides is overflowing.
|
|
1045
1099
|
if (!overflows.every(side => side <= 0)) {
|
|
1046
1100
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
1047
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ?
|
|
1101
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
1048
1102
|
const nextPlacement = placements[nextIndex];
|
|
1049
1103
|
if (nextPlacement) {
|
|
1050
1104
|
// Try next placement and re-run the lifecycle.
|
|
@@ -1061,7 +1115,7 @@ const flip$1 = function (options) {
|
|
|
1061
1115
|
|
|
1062
1116
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1063
1117
|
// then find the placement that fits the best on the main crossAxis side.
|
|
1064
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ?
|
|
1118
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? undefined : _overflowsData$filter.placement;
|
|
1065
1119
|
|
|
1066
1120
|
// Otherwise fallback.
|
|
1067
1121
|
if (!resetPlacement) {
|
|
@@ -1078,7 +1132,7 @@ const flip$1 = function (options) {
|
|
|
1078
1132
|
currentSideAxis === 'y';
|
|
1079
1133
|
}
|
|
1080
1134
|
return true;
|
|
1081
|
-
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ?
|
|
1135
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? undefined : _overflowsData$filter2[0];
|
|
1082
1136
|
if (placement) {
|
|
1083
1137
|
resetPlacement = placement;
|
|
1084
1138
|
}
|
|
@@ -1111,7 +1165,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1111
1165
|
platform,
|
|
1112
1166
|
elements
|
|
1113
1167
|
} = state;
|
|
1114
|
-
const rtl = await (platform.isRTL == null ?
|
|
1168
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1115
1169
|
const side = getSide(placement);
|
|
1116
1170
|
const alignment = getAlignment(placement);
|
|
1117
1171
|
const isVertical = getSideAxis(placement) === 'y';
|
|
@@ -1153,7 +1207,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1153
1207
|
* @see https://floating-ui.com/docs/offset
|
|
1154
1208
|
*/
|
|
1155
1209
|
const offset$1 = function (options) {
|
|
1156
|
-
if (options ===
|
|
1210
|
+
if (options === undefined) {
|
|
1157
1211
|
options = 0;
|
|
1158
1212
|
}
|
|
1159
1213
|
return {
|
|
@@ -1171,7 +1225,7 @@ const offset$1 = function (options) {
|
|
|
1171
1225
|
|
|
1172
1226
|
// If the placement is the same and the arrow caused an alignment offset
|
|
1173
1227
|
// then we don't need to change the positioning coordinates.
|
|
1174
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ?
|
|
1228
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1175
1229
|
return {};
|
|
1176
1230
|
}
|
|
1177
1231
|
return {
|
|
@@ -1200,11 +1254,11 @@ function getNodeName(node) {
|
|
|
1200
1254
|
}
|
|
1201
1255
|
function getWindow(node) {
|
|
1202
1256
|
var _node$ownerDocument;
|
|
1203
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ?
|
|
1257
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1204
1258
|
}
|
|
1205
1259
|
function getDocumentElement(node) {
|
|
1206
1260
|
var _ref;
|
|
1207
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ?
|
|
1261
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1208
1262
|
}
|
|
1209
1263
|
function isNode(value) {
|
|
1210
1264
|
if (!hasWindow()) {
|
|
@@ -1319,14 +1373,14 @@ function getNearestOverflowAncestor(node) {
|
|
|
1319
1373
|
}
|
|
1320
1374
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1321
1375
|
var _node$ownerDocument2;
|
|
1322
|
-
if (list ===
|
|
1376
|
+
if (list === undefined) {
|
|
1323
1377
|
list = [];
|
|
1324
1378
|
}
|
|
1325
|
-
if (traverseIframes ===
|
|
1379
|
+
if (traverseIframes === undefined) {
|
|
1326
1380
|
traverseIframes = true;
|
|
1327
1381
|
}
|
|
1328
1382
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1329
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ?
|
|
1383
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1330
1384
|
const win = getWindow(scrollableAncestor);
|
|
1331
1385
|
if (isBody) {
|
|
1332
1386
|
const frameElement = getFrameElement(win);
|
|
@@ -1403,7 +1457,7 @@ function getVisualOffsets(element) {
|
|
|
1403
1457
|
};
|
|
1404
1458
|
}
|
|
1405
1459
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1406
|
-
if (isFixed ===
|
|
1460
|
+
if (isFixed === undefined) {
|
|
1407
1461
|
isFixed = false;
|
|
1408
1462
|
}
|
|
1409
1463
|
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
@@ -1413,10 +1467,10 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1413
1467
|
}
|
|
1414
1468
|
|
|
1415
1469
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1416
|
-
if (includeScale ===
|
|
1470
|
+
if (includeScale === undefined) {
|
|
1417
1471
|
includeScale = false;
|
|
1418
1472
|
}
|
|
1419
|
-
if (isFixedStrategy ===
|
|
1473
|
+
if (isFixedStrategy === undefined) {
|
|
1420
1474
|
isFixedStrategy = false;
|
|
1421
1475
|
}
|
|
1422
1476
|
const clientRect = element.getBoundingClientRect();
|
|
@@ -1476,7 +1530,7 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1476
1530
|
}
|
|
1477
1531
|
|
|
1478
1532
|
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1479
|
-
if (ignoreScrollbarX ===
|
|
1533
|
+
if (ignoreScrollbarX === undefined) {
|
|
1480
1534
|
ignoreScrollbarX = false;
|
|
1481
1535
|
}
|
|
1482
1536
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
@@ -1826,10 +1880,10 @@ function observeMove(element, onMove) {
|
|
|
1826
1880
|
io = null;
|
|
1827
1881
|
}
|
|
1828
1882
|
function refresh(skip, threshold) {
|
|
1829
|
-
if (skip ===
|
|
1883
|
+
if (skip === undefined) {
|
|
1830
1884
|
skip = false;
|
|
1831
1885
|
}
|
|
1832
|
-
if (threshold ===
|
|
1886
|
+
if (threshold === undefined) {
|
|
1833
1887
|
threshold = 1;
|
|
1834
1888
|
}
|
|
1835
1889
|
cleanup();
|
|
@@ -1900,7 +1954,7 @@ function observeMove(element, onMove) {
|
|
|
1900
1954
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1901
1955
|
*/
|
|
1902
1956
|
function autoUpdate(reference, floating, update, options) {
|
|
1903
|
-
if (options ===
|
|
1957
|
+
if (options === undefined) {
|
|
1904
1958
|
options = {};
|
|
1905
1959
|
}
|
|
1906
1960
|
const {
|
|
@@ -2116,7 +2170,7 @@ class AuroFloatingUI {
|
|
|
2116
2170
|
// Compute the position of the bib
|
|
2117
2171
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2118
2172
|
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2119
|
-
middleware: middleware
|
|
2173
|
+
middleware: middleware
|
|
2120
2174
|
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2121
2175
|
Object.assign(this.element.bib.style, {
|
|
2122
2176
|
left: `${x}px`,
|
|
@@ -2460,7 +2514,7 @@ const t$5={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
|
2460
2514
|
* @license
|
|
2461
2515
|
* Copyright 2018 Google LLC
|
|
2462
2516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2463
|
-
*/const e$6=e$1$2(class extends i$7{constructor(t$1){if(super(t$1),t$1.type!==t$5.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(
|
|
2517
|
+
*/const e$6=e$1$2(class extends i$7{constructor(t$1){if(super(t$1),t$1.type!==t$5.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(undefined===this.st){this.st=new Set,undefined!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$1}});
|
|
2464
2518
|
|
|
2465
2519
|
/**
|
|
2466
2520
|
* @license
|
|
@@ -2828,7 +2882,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
2828
2882
|
|
|
2829
2883
|
var iconVersion$2 = '6.1.2';
|
|
2830
2884
|
|
|
2831
|
-
var styleCss$1$2 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2885
|
+
var styleCss$1$2 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2832
2886
|
|
|
2833
2887
|
var colorCss$1$2 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2834
2888
|
|
|
@@ -2852,9 +2906,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2852
2906
|
];
|
|
2853
2907
|
|
|
2854
2908
|
/**
|
|
2855
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
2856
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
2857
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
2858
2909
|
* @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2859
2910
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2860
2911
|
*/
|
|
@@ -2880,14 +2931,26 @@ class AuroDropdownBib extends r$5 {
|
|
|
2880
2931
|
|
|
2881
2932
|
static get properties() {
|
|
2882
2933
|
return {
|
|
2934
|
+
|
|
2935
|
+
/**
|
|
2936
|
+
* If declared, will apply all styles for the common theme.
|
|
2937
|
+
*/
|
|
2883
2938
|
common: {
|
|
2884
2939
|
type: Boolean,
|
|
2885
2940
|
reflect: true
|
|
2886
2941
|
},
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* If declared, will apply extra padding to bib content.
|
|
2945
|
+
*/
|
|
2887
2946
|
inset: {
|
|
2888
2947
|
type: Boolean,
|
|
2889
2948
|
reflect: true
|
|
2890
2949
|
},
|
|
2950
|
+
|
|
2951
|
+
/**
|
|
2952
|
+
* If declared, will apply border-radius to the bib.
|
|
2953
|
+
*/
|
|
2891
2954
|
rounded: {
|
|
2892
2955
|
type: Boolean,
|
|
2893
2956
|
reflect: true
|
|
@@ -2931,22 +2994,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2931
2994
|
|
|
2932
2995
|
|
|
2933
2996
|
/**
|
|
2934
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
2935
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
2936
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
2937
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
2938
2997
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
2939
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2940
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
2941
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
2942
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
2943
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
2944
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
2945
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
2946
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
2947
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
2948
|
-
* @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2949
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
2950
2998
|
* @slot - Default slot for the popover content.
|
|
2951
2999
|
* @slot label - Defines the content of the label.
|
|
2952
3000
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -2984,6 +3032,16 @@ class AuroDropdown extends r$5 {
|
|
|
2984
3032
|
this.tabIndex = 0;
|
|
2985
3033
|
this.noToggle = false;
|
|
2986
3034
|
|
|
3035
|
+
/**
|
|
3036
|
+
* @private
|
|
3037
|
+
*/
|
|
3038
|
+
this.hasTriggerContent = false;
|
|
3039
|
+
|
|
3040
|
+
/**
|
|
3041
|
+
* @private
|
|
3042
|
+
*/
|
|
3043
|
+
this.triggerContentSlot = undefined;
|
|
3044
|
+
|
|
2987
3045
|
/**
|
|
2988
3046
|
* @private
|
|
2989
3047
|
*/
|
|
@@ -3030,89 +3088,166 @@ class AuroDropdown extends r$5 {
|
|
|
3030
3088
|
// function to define props used within the scope of this component
|
|
3031
3089
|
static get properties() {
|
|
3032
3090
|
return {
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* If declared, applies a border around the trigger slot.
|
|
3094
|
+
*/
|
|
3033
3095
|
bordered: {
|
|
3034
3096
|
type: Boolean,
|
|
3035
3097
|
reflect: true
|
|
3036
3098
|
},
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3102
|
+
* @attr {Boolean} chevron
|
|
3103
|
+
*/
|
|
3037
3104
|
chevron: {
|
|
3038
3105
|
type: Boolean,
|
|
3039
3106
|
reflect: true
|
|
3040
3107
|
},
|
|
3041
|
-
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3111
|
+
*/
|
|
3112
|
+
common: {
|
|
3042
3113
|
type: Boolean,
|
|
3043
3114
|
reflect: true
|
|
3044
3115
|
},
|
|
3045
|
-
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* If declared, the dropdown is not interactive.
|
|
3119
|
+
*/
|
|
3120
|
+
disabled: {
|
|
3046
3121
|
type: Boolean,
|
|
3047
3122
|
reflect: true
|
|
3048
3123
|
},
|
|
3049
|
-
|
|
3124
|
+
|
|
3125
|
+
/**
|
|
3126
|
+
* @private
|
|
3127
|
+
*/
|
|
3128
|
+
dropdownWidth: {
|
|
3129
|
+
type: Number
|
|
3130
|
+
},
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3134
|
+
*/
|
|
3135
|
+
error: {
|
|
3050
3136
|
type: Boolean,
|
|
3051
|
-
reflect: true
|
|
3137
|
+
reflect: true
|
|
3052
3138
|
},
|
|
3139
|
+
|
|
3140
|
+
/**
|
|
3141
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3142
|
+
*/
|
|
3053
3143
|
focusShow: {
|
|
3054
3144
|
type: Boolean,
|
|
3055
3145
|
reflect: true
|
|
3056
3146
|
},
|
|
3057
|
-
|
|
3147
|
+
|
|
3148
|
+
/**
|
|
3149
|
+
* Makes the trigger to be full width of its parent container.
|
|
3150
|
+
*/
|
|
3151
|
+
fluid: {
|
|
3058
3152
|
type: Boolean,
|
|
3059
3153
|
reflect: true
|
|
3060
3154
|
},
|
|
3155
|
+
|
|
3156
|
+
/**
|
|
3157
|
+
* If declared, will apply padding around trigger slot content.
|
|
3158
|
+
*/
|
|
3061
3159
|
inset: {
|
|
3062
3160
|
type: Boolean,
|
|
3063
3161
|
reflect: true
|
|
3064
3162
|
},
|
|
3065
|
-
|
|
3163
|
+
|
|
3164
|
+
/**
|
|
3165
|
+
* If true, the dropdown bib is displayed.
|
|
3166
|
+
*/
|
|
3167
|
+
isPopoverVisible: {
|
|
3168
|
+
type: Boolean
|
|
3169
|
+
},
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3173
|
+
*/
|
|
3174
|
+
hoverToggle: {
|
|
3066
3175
|
type: Boolean,
|
|
3067
3176
|
reflect: true
|
|
3068
3177
|
},
|
|
3069
|
-
|
|
3070
|
-
|
|
3178
|
+
|
|
3179
|
+
/**
|
|
3180
|
+
* @private
|
|
3181
|
+
*/
|
|
3182
|
+
hasTriggerContent: {
|
|
3183
|
+
type: Boolean
|
|
3184
|
+
},
|
|
3185
|
+
|
|
3186
|
+
/**
|
|
3187
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
3188
|
+
*/
|
|
3189
|
+
mobileFullscreenBreakpoint: {
|
|
3190
|
+
type: String,
|
|
3071
3191
|
reflect: true
|
|
3072
3192
|
},
|
|
3073
|
-
|
|
3193
|
+
|
|
3194
|
+
/**
|
|
3195
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3196
|
+
*/
|
|
3197
|
+
matchWidth: {
|
|
3074
3198
|
type: Boolean,
|
|
3075
3199
|
reflect: true
|
|
3076
3200
|
},
|
|
3077
|
-
|
|
3201
|
+
|
|
3202
|
+
/**
|
|
3203
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3204
|
+
*/
|
|
3205
|
+
noHideOnThisFocusLoss: {
|
|
3078
3206
|
type: Boolean,
|
|
3079
3207
|
reflect: true
|
|
3080
3208
|
},
|
|
3081
|
-
|
|
3209
|
+
|
|
3210
|
+
/**
|
|
3211
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3212
|
+
*/
|
|
3213
|
+
noToggle: {
|
|
3082
3214
|
type: Boolean,
|
|
3083
3215
|
reflect: true
|
|
3084
3216
|
},
|
|
3085
|
-
|
|
3217
|
+
|
|
3086
3218
|
onSlotChange: {
|
|
3087
3219
|
type: Function,
|
|
3088
3220
|
reflect: false
|
|
3089
3221
|
},
|
|
3090
|
-
mobileFullscreenBreakpoint: {
|
|
3091
|
-
type: String,
|
|
3092
|
-
reflect: true,
|
|
3093
|
-
},
|
|
3094
3222
|
|
|
3095
3223
|
/**
|
|
3096
3224
|
* @private
|
|
3097
3225
|
*/
|
|
3098
|
-
|
|
3226
|
+
placement: {
|
|
3227
|
+
type: String
|
|
3228
|
+
},
|
|
3099
3229
|
|
|
3100
3230
|
/**
|
|
3101
|
-
*
|
|
3231
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3102
3232
|
*/
|
|
3103
|
-
|
|
3233
|
+
rounded: {
|
|
3234
|
+
type: Boolean,
|
|
3235
|
+
reflect: true
|
|
3236
|
+
},
|
|
3104
3237
|
|
|
3105
3238
|
/**
|
|
3106
3239
|
* @private
|
|
3107
3240
|
*/
|
|
3108
|
-
tabIndex: {
|
|
3241
|
+
tabIndex: {
|
|
3242
|
+
type: Number
|
|
3243
|
+
}
|
|
3109
3244
|
};
|
|
3110
3245
|
}
|
|
3111
3246
|
|
|
3112
3247
|
static get styles() {
|
|
3113
3248
|
return [
|
|
3114
|
-
styleCss$1$2,
|
|
3115
3249
|
colorCss$1$2,
|
|
3250
|
+
styleCss$1$2,
|
|
3116
3251
|
tokensCss$5
|
|
3117
3252
|
];
|
|
3118
3253
|
}
|
|
@@ -3143,6 +3278,12 @@ class AuroDropdown extends r$5 {
|
|
|
3143
3278
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3144
3279
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3145
3280
|
}
|
|
3281
|
+
|
|
3282
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3283
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3284
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3285
|
+
this.handleTriggerContentSlotChange();
|
|
3286
|
+
}
|
|
3146
3287
|
}
|
|
3147
3288
|
|
|
3148
3289
|
firstUpdated() {
|
|
@@ -3185,6 +3326,43 @@ class AuroDropdown extends r$5 {
|
|
|
3185
3326
|
return inCustomSlot;
|
|
3186
3327
|
}
|
|
3187
3328
|
|
|
3329
|
+
/**
|
|
3330
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3331
|
+
*
|
|
3332
|
+
* It first updates the floater settings
|
|
3333
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3334
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3335
|
+
*
|
|
3336
|
+
* @private
|
|
3337
|
+
* @method handleTriggerContentSlotChange
|
|
3338
|
+
* @param {Event} event - native slotchange event
|
|
3339
|
+
* @returns {void}
|
|
3340
|
+
*/
|
|
3341
|
+
handleTriggerContentSlotChange(event) {
|
|
3342
|
+
this.floater.handleTriggerTabIndex();
|
|
3343
|
+
|
|
3344
|
+
if (event) {
|
|
3345
|
+
this.triggerNode = event.target;
|
|
3346
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3347
|
+
}
|
|
3348
|
+
|
|
3349
|
+
if (this.triggerContentSlot) {
|
|
3350
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3351
|
+
if (slot.textContent.trim()) {
|
|
3352
|
+
return true;
|
|
3353
|
+
}
|
|
3354
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3355
|
+
if (!slotInSlot) {
|
|
3356
|
+
return false;
|
|
3357
|
+
}
|
|
3358
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3359
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3360
|
+
});
|
|
3361
|
+
} else {
|
|
3362
|
+
this.hasTriggerContent = false;
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3188
3366
|
/**
|
|
3189
3367
|
* Handles the default slot change event and updates the content.
|
|
3190
3368
|
*
|
|
@@ -3219,13 +3397,13 @@ class AuroDropdown extends r$5 {
|
|
|
3219
3397
|
tabindex="${this.tabIndex}"
|
|
3220
3398
|
>
|
|
3221
3399
|
<div class="triggerContentWrapper">
|
|
3222
|
-
<label class="label" id="triggerLabel">
|
|
3400
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3223
3401
|
<slot name="label"></slot>
|
|
3224
3402
|
</label>
|
|
3225
3403
|
<div class="triggerContent">
|
|
3226
3404
|
<slot
|
|
3227
3405
|
name="trigger"
|
|
3228
|
-
@slotchange="${() =>
|
|
3406
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
3229
3407
|
</div>
|
|
3230
3408
|
</div>
|
|
3231
3409
|
${this.chevron || this.common ? u$1$1`
|
|
@@ -3272,14 +3450,14 @@ var dropdownVersion = '3.0.0';
|
|
|
3272
3450
|
* Copyright 2017 Google LLC
|
|
3273
3451
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3274
3452
|
*/
|
|
3275
|
-
const t$3=globalThis,i$5=t$3.trustedTypes,s$3=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):
|
|
3453
|
+
const t$3=globalThis,i$5=t$3.trustedTypes,s$3=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$4="$lit$",h$1=`lit$${Math.random().toFixed(9).slice(2)}$`,o$4="?"+h$1,n$3=`<${o$4}>`,r$4=document,l$2=()=>r$4.createComment(""),c$3=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2=Array.isArray,u$4=t=>a$2(t)||"function"==typeof t?.[Symbol.iterator],d$1="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_=/>/g,m$1=RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y$1(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$4.createTreeWalker(r$4,129);function P(t,i){if(!a$2(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$3?s$3.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1?"!--"===u[1]?c=v$1:undefined!==u[1]?c=_:undefined!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):undefined!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):undefined===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=undefined===u[3]?m$1:'"'===u[3]?g:p$2):c===g||c===p$2?c=m$1:c===v$1||c===_?c=f$1:(c=m$1,r=undefined);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$3:d>=0?(o.push(a),s.slice(0,d)+e$4+s.slice(d)+h$1+x):s+h$1+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$4)){const i=v[a++],s=r.getAttribute(t).split(h$1),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h$1)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h$1),s=t.length-1;if(s>0){r.textContent=i$5?i$5.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$2()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$2());}}}else if(8===r.nodeType)if(r.data===o$4)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$1,t+1));)d.push({type:7,index:c}),t+=h$1.length-1;}c++;}}static createElement(t,i){const s=r$4.createElement("template");return s.innerHTML=t,s}}function S$1(t,i,s=t,e){if(i===T)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c$3(i)?undefined:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),undefined===o?h=undefined:(h=new o(t),h._$AT(t,s,e)),undefined!==e?(s._$Co??=[])[e]=h:s._$Cl=h),undefined!==h&&(i=S$1(t,h._$AS(t,i.values),h,e)),i}let M$1 = class M{constructor(t,i){this._$AV=[],this._$AN=undefined,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$4).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;undefined!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r$4,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=undefined,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return undefined!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$1(this,t,i),c$3(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):undefined!==t._$litType$?this.$(t):undefined!==t.nodeType?this.T(t):u$4(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c$3(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$4.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$1(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return undefined===i&&A.set(t.strings,i=new N(t)),i}k(t){a$2(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$2()),this.O(l$2()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=undefined,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(undefined===h)t=S$1(this,t,i,0),o=!c$3(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$1(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c$3(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?undefined:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$1(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=undefined,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$1(this,t);}}const Z={M:e$4,P:h$1,A:o$4,C:1,L:V,R:M$1,D:u$4,V:S$1,I:R,H:k,N:I,U:L,B:H,F:z},j=t$3.litHtmlPolyfillSupport;j?.(N,R),(t$3.litHtmlVersions??=[]).push("3.2.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(undefined===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$2(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
3276
3454
|
|
|
3277
3455
|
/**
|
|
3278
3456
|
* @license
|
|
3279
3457
|
* Copyright 2020 Google LLC
|
|
3280
3458
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3281
3459
|
*/
|
|
3282
|
-
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$2=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
3460
|
+
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$2=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$1}),l$1=new Map,n$2=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&undefined!==(i=e[$],s=o$3(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$2(x);
|
|
3283
3461
|
|
|
3284
3462
|
/**
|
|
3285
3463
|
* @license
|
|
@@ -3292,20 +3470,20 @@ const t$2={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
|
3292
3470
|
* @license
|
|
3293
3471
|
* Copyright 2020 Google LLC
|
|
3294
3472
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3295
|
-
*/const {I:t$1}=Z,s$1=()=>document.createComment(""),r$3=(o,i,n)=>{const e=o._$AA.parentNode,l=
|
|
3473
|
+
*/const {I:t$1}=Z,s$1=()=>document.createComment(""),r$3=(o,i,n)=>{const e=o._$AA.parentNode,l=undefined===i?o._$AB:i._$AA;if(undefined===n){const i=e.insertBefore(s$1(),l),c=e.insertBefore(s$1(),l);n=new t$1(i,c,o,o.options);}else {const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,undefined!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u$2={},m=(o,t=u$2)=>o._$AH=t,p$1=o=>o._$AH,M=o=>{o._$AP?.(false,true);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
|
|
3296
3474
|
|
|
3297
3475
|
/**
|
|
3298
3476
|
* @license
|
|
3299
3477
|
* Copyright 2017 Google LLC
|
|
3300
3478
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3301
3479
|
*/
|
|
3302
|
-
const u$1=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c$2=e$3(class extends i$3{constructor(e){if(super(e),e.type!==t$2.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;
|
|
3480
|
+
const u$1=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c$2=e$3(class extends i$3{constructor(e){if(super(e),e.type!==t$2.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;undefined===t?t=s:undefined!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=p$1(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v$1=[];let m$1,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v$1[k]=v(d[x],p[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p[w]),r$3(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p[k]),r$3(s,d[x],d[j]),j--,k++;else if(undefined===m$1&&(m$1=u$1(a,k,w),y=u$1(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=undefined!==e?d[e]:null;if(null===t){const e=r$3(s,d[x]);v(e,p[k]),v$1[k]=e;}else v$1[k]=v(t,p[k]),r$3(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r$3(s,v$1[w+1]);v(e,p[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
|
|
3303
3481
|
|
|
3304
3482
|
/**
|
|
3305
3483
|
* @license
|
|
3306
3484
|
* Copyright 2018 Google LLC
|
|
3307
3485
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3308
|
-
*/const e$2=e$3(class extends i$3{constructor(t){if(super(t),t.type!==t$2.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(
|
|
3486
|
+
*/const e$2=e$3(class extends i$3{constructor(t){if(super(t),t.type!==t$2.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(undefined===this.st){this.st=new Set,undefined!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
3309
3487
|
|
|
3310
3488
|
/**
|
|
3311
3489
|
* @license
|
|
@@ -3421,21 +3599,21 @@ function stopNotifyingOnLangChange(element) {
|
|
|
3421
3599
|
* Copyright 2019 Google LLC
|
|
3422
3600
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3423
3601
|
*/
|
|
3424
|
-
const t$4=globalThis,e$1$1=t$4.ShadowRoot&&(
|
|
3602
|
+
const t$4=globalThis,e$1$1=t$4.ShadowRoot&&(undefined===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$1=new WeakMap;let n$1 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$1$1&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$1.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$1.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$1("string"==typeof t?t:t+"",undefined,s),i$2=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$1(o,t,s)},S=(s,o)=>{if(e$1$1)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$4.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$1$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
3425
3603
|
|
|
3426
3604
|
/**
|
|
3427
3605
|
* @license
|
|
3428
3606
|
* Copyright 2017 Google LLC
|
|
3429
3607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3430
|
-
*/const{is:i$1,defineProperty:e$5,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$5,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),y={attribute
|
|
3608
|
+
*/const{is:i$1,defineProperty:e$5,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$5,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),y={attribute:true,type:String,converter:u,reflect:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$5(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...h(t),...o$5(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1(s));}else undefined!==s&&i.push(c$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?undefined:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():undefined}constructor(){super(),this._$Ep=undefined,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),undefined!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(undefined!==e&&true===i.reflect){const r=(undefined!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(undefined!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:undefined!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(undefined!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=undefined;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||undefined===this[s]||this.P(s,this[s],i);}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=false,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d("elementProperties")]=new Map,b[d("finalized")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push("2.0.4");
|
|
3431
3609
|
|
|
3432
3610
|
/**
|
|
3433
3611
|
* @license
|
|
3434
3612
|
* Copyright 2017 Google LLC
|
|
3435
3613
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3436
|
-
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
3614
|
+
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=undefined;}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(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}}r._$litElement$=true,r["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r});const i$6=globalThis.litElementPolyfillSupport;i$6?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3437
3615
|
|
|
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))}.
|
|
3616
|
+
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))}.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)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .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:1}: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{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;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{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);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;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)}`;
|
|
3439
3617
|
|
|
3440
3618
|
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)}`;
|
|
3441
3619
|
|
|
@@ -5102,30 +5280,87 @@ class AuroFormValidation {
|
|
|
5102
5280
|
}
|
|
5103
5281
|
|
|
5104
5282
|
/**
|
|
5105
|
-
*
|
|
5106
|
-
*
|
|
5107
|
-
* @param {
|
|
5283
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
5284
|
+
*
|
|
5285
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
5108
5286
|
* @returns {void}
|
|
5287
|
+
*
|
|
5288
|
+
* @example
|
|
5289
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
5290
|
+
* validateElementAttributes(inputElement);
|
|
5291
|
+
*
|
|
5292
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
5293
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
5294
|
+
*
|
|
5295
|
+
* Validation rules:
|
|
5296
|
+
* - input:
|
|
5297
|
+
* - length:
|
|
5298
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
5299
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
5300
|
+
* - pattern:
|
|
5301
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
5302
|
+
* - counter:
|
|
5303
|
+
* - range:
|
|
5304
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
5305
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
5109
5306
|
*/
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5307
|
+
validateElementAttributes(elem) {
|
|
5308
|
+
const validationRules = {
|
|
5309
|
+
input: {
|
|
5310
|
+
length: [
|
|
5311
|
+
{
|
|
5312
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
5313
|
+
validity: 'tooShort',
|
|
5314
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
5315
|
+
},
|
|
5316
|
+
{
|
|
5317
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
5318
|
+
validity: 'tooLong',
|
|
5319
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
5320
|
+
}
|
|
5321
|
+
],
|
|
5322
|
+
pattern: [
|
|
5323
|
+
{
|
|
5324
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
5325
|
+
validity: 'patternMismatch',
|
|
5326
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
5327
|
+
}
|
|
5328
|
+
]
|
|
5329
|
+
},
|
|
5330
|
+
counter: {
|
|
5331
|
+
range: [
|
|
5332
|
+
{
|
|
5333
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
5334
|
+
validity: 'rangeOverflow',
|
|
5335
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
5336
|
+
},
|
|
5337
|
+
{
|
|
5338
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
5339
|
+
validity: 'rangeUnderflow',
|
|
5340
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
5341
|
+
}
|
|
5342
|
+
]
|
|
5117
5343
|
}
|
|
5344
|
+
};
|
|
5345
|
+
|
|
5346
|
+
let elementType;
|
|
5347
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5348
|
+
elementType = 'input';
|
|
5349
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
5350
|
+
elementType = 'counter';
|
|
5118
5351
|
}
|
|
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) {
|
|
5122
|
-
elem.validity = 'tooShort';
|
|
5123
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
5124
|
-
}
|
|
5125
5352
|
|
|
5126
|
-
if (
|
|
5127
|
-
|
|
5128
|
-
|
|
5353
|
+
if (elementType) {
|
|
5354
|
+
const rules = validationRules[elementType];
|
|
5355
|
+
|
|
5356
|
+
if (rules) {
|
|
5357
|
+
Object.values(rules).flat().forEach(rule => {
|
|
5358
|
+
if (rule.check(elem)) {
|
|
5359
|
+
elem.validity = rule.validity;
|
|
5360
|
+
elem.errorMessage = rule.message(elem);
|
|
5361
|
+
}
|
|
5362
|
+
});
|
|
5363
|
+
}
|
|
5129
5364
|
}
|
|
5130
5365
|
}
|
|
5131
5366
|
|
|
@@ -5141,33 +5376,32 @@ class AuroFormValidation {
|
|
|
5141
5376
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
5142
5377
|
|
|
5143
5378
|
if (!elem.value.match(emailRegex)) {
|
|
5144
|
-
elem.validity = '
|
|
5145
|
-
elem.
|
|
5379
|
+
elem.validity = 'patternMismatch';
|
|
5380
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5146
5381
|
}
|
|
5147
5382
|
} else if (elem.type === 'credit-card') {
|
|
5148
5383
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
5149
5384
|
elem.validity = 'tooShort';
|
|
5150
|
-
elem.
|
|
5385
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5151
5386
|
}
|
|
5152
5387
|
} else if (elem.type === 'number') {
|
|
5153
5388
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
5154
5389
|
elem.validity = 'rangeOverflow';
|
|
5155
|
-
elem.
|
|
5390
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
5156
5391
|
}
|
|
5157
5392
|
|
|
5158
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
5393
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
5159
5394
|
elem.validity = 'rangeUnderflow';
|
|
5160
|
-
elem.
|
|
5395
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
5161
5396
|
}
|
|
5162
|
-
|
|
5163
5397
|
} else if (elem.type === 'month-day-year' ||
|
|
5164
5398
|
elem.type === 'month-year' ||
|
|
5165
5399
|
elem.type === 'month-fullYear' ||
|
|
5166
5400
|
elem.type === 'year-month-day'
|
|
5167
5401
|
) {
|
|
5168
|
-
if (elem.value
|
|
5402
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
5169
5403
|
elem.validity = 'tooShort';
|
|
5170
|
-
elem.
|
|
5404
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5171
5405
|
} else {
|
|
5172
5406
|
const valueDate = new Date(elem.value);
|
|
5173
5407
|
|
|
@@ -5177,7 +5411,7 @@ class AuroFormValidation {
|
|
|
5177
5411
|
|
|
5178
5412
|
if (valueDate > maxDate) {
|
|
5179
5413
|
elem.validity = 'rangeOverflow';
|
|
5180
|
-
elem.
|
|
5414
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
5181
5415
|
}
|
|
5182
5416
|
}
|
|
5183
5417
|
|
|
@@ -5187,7 +5421,7 @@ class AuroFormValidation {
|
|
|
5187
5421
|
|
|
5188
5422
|
if (valueDate < minDate) {
|
|
5189
5423
|
elem.validity = 'rangeUnderflow';
|
|
5190
|
-
elem.
|
|
5424
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
5191
5425
|
}
|
|
5192
5426
|
}
|
|
5193
5427
|
}
|
|
@@ -5210,10 +5444,10 @@ class AuroFormValidation {
|
|
|
5210
5444
|
|
|
5211
5445
|
if (elem.hasAttribute('error')) {
|
|
5212
5446
|
elem.validity = 'customError';
|
|
5213
|
-
elem.
|
|
5447
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
5214
5448
|
} else if (validationShouldRun) {
|
|
5215
5449
|
elem.validity = 'valid';
|
|
5216
|
-
elem.
|
|
5450
|
+
elem.errorMessage = '';
|
|
5217
5451
|
|
|
5218
5452
|
/**
|
|
5219
5453
|
* Only validate once we interact with the datepicker
|
|
@@ -5225,7 +5459,7 @@ class AuroFormValidation {
|
|
|
5225
5459
|
let hasValue = elem.value && elem.value.length > 0;
|
|
5226
5460
|
|
|
5227
5461
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
5228
|
-
if (this.auroInputElements
|
|
5462
|
+
if (this.auroInputElements?.length === 2) {
|
|
5229
5463
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
5230
5464
|
hasValue = false;
|
|
5231
5465
|
}
|
|
@@ -5233,31 +5467,29 @@ class AuroFormValidation {
|
|
|
5233
5467
|
|
|
5234
5468
|
if (!hasValue && elem.required) {
|
|
5235
5469
|
elem.validity = 'valueMissing';
|
|
5236
|
-
elem.
|
|
5470
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
5237
5471
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5238
5472
|
this.validateType(elem);
|
|
5239
|
-
this.
|
|
5473
|
+
this.validateElementAttributes(elem);
|
|
5474
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
5475
|
+
this.validateElementAttributes(elem);
|
|
5240
5476
|
}
|
|
5241
5477
|
}
|
|
5242
5478
|
|
|
5243
|
-
if (this.auroInputElements
|
|
5479
|
+
if (this.auroInputElements?.length > 0) {
|
|
5244
5480
|
elem.validity = this.auroInputElements[0].validity;
|
|
5245
|
-
elem.
|
|
5481
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
5246
5482
|
|
|
5247
|
-
if (elem.validity === 'valid') {
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
5251
|
-
}
|
|
5483
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
5484
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
5485
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
5252
5486
|
}
|
|
5253
5487
|
}
|
|
5254
5488
|
|
|
5255
5489
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
5260
|
-
}
|
|
5490
|
+
// Use the validity message override if it is declared
|
|
5491
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
5492
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
5261
5493
|
}
|
|
5262
5494
|
|
|
5263
5495
|
this.getErrorMessage(elem);
|
|
@@ -5303,18 +5535,18 @@ class AuroFormValidation {
|
|
|
5303
5535
|
if (elem.validity !== 'valid') {
|
|
5304
5536
|
if (elem.setCustomValidity) {
|
|
5305
5537
|
elem.errorMessage = elem.setCustomValidity;
|
|
5306
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5538
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
5307
5539
|
const input = elem.renderRoot.querySelector('input');
|
|
5308
5540
|
|
|
5309
5541
|
if (input.validationMessage.length > 0) {
|
|
5310
5542
|
elem.errorMessage = input.validationMessage;
|
|
5311
5543
|
}
|
|
5312
|
-
} else if (this.inputElements &&
|
|
5544
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
5313
5545
|
const firstInput = this.inputElements[0];
|
|
5314
5546
|
|
|
5315
5547
|
if (firstInput.validationMessage.length > 0) {
|
|
5316
5548
|
elem.errorMessage = firstInput.validationMessage;
|
|
5317
|
-
} else if (this.inputElements
|
|
5549
|
+
} else if (this.inputElements?.length === 2) {
|
|
5318
5550
|
const secondInput = this.inputElements[1];
|
|
5319
5551
|
|
|
5320
5552
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -5335,42 +5567,8 @@ class AuroFormValidation {
|
|
|
5335
5567
|
/**
|
|
5336
5568
|
* Auro-input provides users a way to enter data into a text field.
|
|
5337
5569
|
*
|
|
5338
|
-
* @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
|
|
5339
|
-
* @attr {String} autocapitalize - An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]
|
|
5340
|
-
* @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
5341
|
-
* @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
|
|
5342
5570
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
5343
5571
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
5344
|
-
* @attr {Boolean} disabled - If set, disables the input.
|
|
5345
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
5346
|
-
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
5347
|
-
* @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.
|
|
5348
|
-
* @attr {String} id - Sets the unique ID of the element.
|
|
5349
|
-
* @attr {String} lang - defines the language of an element.
|
|
5350
|
-
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5351
|
-
* @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.
|
|
5352
|
-
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5353
|
-
* @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`.
|
|
5354
|
-
* @attr {String} name - Populates the `name` attribute on the input.
|
|
5355
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
5356
|
-
* @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
|
|
5357
|
-
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
5358
|
-
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
5359
|
-
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
5360
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
5361
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
5362
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
5363
|
-
* @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
|
|
5364
|
-
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
5365
|
-
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
5366
|
-
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
5367
|
-
* @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
|
|
5368
|
-
* @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
|
|
5369
|
-
* @attr {String} spellcheck - An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
5370
|
-
* @attr {String} type - Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
|
|
5371
|
-
* @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
|
|
5372
|
-
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
5373
|
-
* @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5374
5572
|
*
|
|
5375
5573
|
* @slot helptext - Sets the help text displayed below the input.
|
|
5376
5574
|
* @slot label - Sets the label text for the input.
|
|
@@ -5462,71 +5660,272 @@ class BaseInput extends r {
|
|
|
5462
5660
|
.substring(idSubstrStart, idSubstrEnd);
|
|
5463
5661
|
}
|
|
5464
5662
|
|
|
5465
|
-
// function to define props used within the scope of this
|
|
5663
|
+
// function to define props used within the scope of this componentstatic
|
|
5466
5664
|
static get properties() {
|
|
5467
5665
|
return {
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5666
|
+
|
|
5667
|
+
/**
|
|
5668
|
+
* If set, the label will remain fixed in the active position.
|
|
5669
|
+
*/
|
|
5670
|
+
activeLabel: {
|
|
5671
|
+
type: Boolean,
|
|
5672
|
+
reflect: true
|
|
5673
|
+
},
|
|
5674
|
+
|
|
5675
|
+
/**
|
|
5676
|
+
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]
|
|
5677
|
+
*/
|
|
5678
|
+
autocapitalize: {
|
|
5679
|
+
type: String
|
|
5680
|
+
},
|
|
5681
|
+
|
|
5682
|
+
/**
|
|
5683
|
+
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
5684
|
+
*/
|
|
5685
|
+
autocomplete: {
|
|
5475
5686
|
type: String,
|
|
5476
5687
|
reflect: true
|
|
5477
5688
|
},
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5689
|
+
|
|
5690
|
+
/**
|
|
5691
|
+
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5692
|
+
*/
|
|
5693
|
+
autocorrect: {
|
|
5694
|
+
type: String
|
|
5695
|
+
},
|
|
5696
|
+
|
|
5697
|
+
/**
|
|
5698
|
+
* If set, disables the input.
|
|
5699
|
+
*/
|
|
5700
|
+
disabled: {
|
|
5701
|
+
type: Boolean
|
|
5702
|
+
},
|
|
5703
|
+
|
|
5704
|
+
error: {
|
|
5486
5705
|
type: String,
|
|
5487
5706
|
reflect: true
|
|
5488
5707
|
},
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5708
|
+
|
|
5709
|
+
/**
|
|
5710
|
+
* Contains the help text message for the current validity error.
|
|
5711
|
+
*/
|
|
5712
|
+
errorMessage: {
|
|
5713
|
+
type: String
|
|
5714
|
+
},
|
|
5715
|
+
|
|
5716
|
+
/**
|
|
5717
|
+
* 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.
|
|
5718
|
+
*/
|
|
5719
|
+
icon: {
|
|
5720
|
+
type: Boolean
|
|
5721
|
+
},
|
|
5722
|
+
|
|
5723
|
+
/**
|
|
5724
|
+
* Sets the unique ID of the element.
|
|
5725
|
+
*/
|
|
5726
|
+
id: {
|
|
5727
|
+
type: String
|
|
5728
|
+
},
|
|
5729
|
+
|
|
5730
|
+
/**
|
|
5731
|
+
* Defines the language of an element.
|
|
5732
|
+
*/
|
|
5733
|
+
lang: {
|
|
5734
|
+
type: String
|
|
5735
|
+
},
|
|
5736
|
+
|
|
5737
|
+
/**
|
|
5738
|
+
* The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5739
|
+
*/
|
|
5740
|
+
max: {
|
|
5741
|
+
type: String
|
|
5742
|
+
},
|
|
5743
|
+
|
|
5744
|
+
/**
|
|
5745
|
+
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5746
|
+
*/
|
|
5747
|
+
maxLength: {
|
|
5748
|
+
type: Number
|
|
5749
|
+
},
|
|
5750
|
+
|
|
5751
|
+
/**
|
|
5752
|
+
* The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5753
|
+
*/
|
|
5754
|
+
min: {
|
|
5755
|
+
type: String
|
|
5756
|
+
},
|
|
5757
|
+
|
|
5758
|
+
/**
|
|
5759
|
+
* The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
5760
|
+
*/
|
|
5761
|
+
minLength: {
|
|
5762
|
+
type: Number
|
|
5763
|
+
},
|
|
5764
|
+
|
|
5765
|
+
/**
|
|
5766
|
+
* Populates the `name` attribute on the input.
|
|
5767
|
+
*/
|
|
5768
|
+
name: {
|
|
5769
|
+
type: String
|
|
5770
|
+
},
|
|
5771
|
+
|
|
5772
|
+
/**
|
|
5773
|
+
* If set, disables auto-validation on blur.
|
|
5774
|
+
*/
|
|
5775
|
+
noValidate: {
|
|
5776
|
+
type: Boolean
|
|
5777
|
+
},
|
|
5778
|
+
|
|
5779
|
+
/**
|
|
5780
|
+
* Specifies a regular expression the form control's value should match.
|
|
5781
|
+
*/
|
|
5782
|
+
pattern: {
|
|
5783
|
+
type: String,
|
|
5492
5784
|
reflect: true
|
|
5493
5785
|
},
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5786
|
+
|
|
5787
|
+
/**
|
|
5788
|
+
* Define custom placeholder text, only supported by date input formats.
|
|
5789
|
+
*/
|
|
5790
|
+
placeholder: {
|
|
5791
|
+
type: String
|
|
5792
|
+
},
|
|
5793
|
+
|
|
5794
|
+
/**
|
|
5795
|
+
* Makes the input read-only, but can be set programmatically.
|
|
5796
|
+
*/
|
|
5797
|
+
readonly: {
|
|
5798
|
+
type: Boolean
|
|
5799
|
+
},
|
|
5800
|
+
|
|
5801
|
+
/**
|
|
5802
|
+
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
5803
|
+
*/
|
|
5804
|
+
required: {
|
|
5805
|
+
type: Boolean
|
|
5806
|
+
},
|
|
5498
5807
|
|
|
5499
5808
|
/**
|
|
5500
5809
|
* @ignore
|
|
5501
5810
|
*/
|
|
5502
|
-
showPassword:
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5811
|
+
showPassword: {
|
|
5812
|
+
state: true
|
|
5813
|
+
},
|
|
5814
|
+
|
|
5815
|
+
/**
|
|
5816
|
+
* Sets a custom help text message to display for all validityStates.
|
|
5817
|
+
*/
|
|
5818
|
+
setCustomValidity: {
|
|
5819
|
+
type: String
|
|
5820
|
+
},
|
|
5821
|
+
|
|
5822
|
+
/**
|
|
5823
|
+
* Custom help text message to display when validity = `badInput`.
|
|
5824
|
+
*/
|
|
5825
|
+
setCustomValidityBadInput: {
|
|
5826
|
+
type: String
|
|
5827
|
+
},
|
|
5828
|
+
|
|
5829
|
+
/**
|
|
5830
|
+
* Custom help text message to display when validity = `customError`.
|
|
5831
|
+
*/
|
|
5832
|
+
setCustomValidityCustomError: {
|
|
5833
|
+
type: String
|
|
5834
|
+
},
|
|
5835
|
+
|
|
5836
|
+
/**
|
|
5837
|
+
* Custom help text message to display for the declared element `type` and type validity fails.
|
|
5838
|
+
*/
|
|
5839
|
+
setCustomValidityForType: {
|
|
5840
|
+
type: String
|
|
5841
|
+
},
|
|
5842
|
+
|
|
5843
|
+
/**
|
|
5844
|
+
* Custom help text message to display when validity = `rangeOverflow`.
|
|
5845
|
+
*/
|
|
5846
|
+
setCustomValidityRangeOverflow: {
|
|
5847
|
+
type: String
|
|
5848
|
+
},
|
|
5849
|
+
|
|
5850
|
+
/**
|
|
5851
|
+
* Custom help text message to display when validity = `rangeUnderflow`.
|
|
5852
|
+
*/
|
|
5853
|
+
setCustomValidityRangeUnderflow: {
|
|
5854
|
+
type: String
|
|
5855
|
+
},
|
|
5856
|
+
|
|
5857
|
+
/**
|
|
5858
|
+
* Custom help text message to display when validity = `tooLong`.
|
|
5859
|
+
*/
|
|
5860
|
+
setCustomValidityTooLong: {
|
|
5861
|
+
type: String
|
|
5862
|
+
},
|
|
5863
|
+
|
|
5864
|
+
/**
|
|
5865
|
+
* Custom help text message to display when validity = `tooShort`.
|
|
5866
|
+
*/
|
|
5867
|
+
setCustomValidityTooShort: {
|
|
5868
|
+
type: String
|
|
5869
|
+
},
|
|
5870
|
+
|
|
5871
|
+
/**
|
|
5872
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
5873
|
+
*/
|
|
5874
|
+
setCustomValidityValueMissing: {
|
|
5875
|
+
type: String
|
|
5876
|
+
},
|
|
5877
|
+
|
|
5878
|
+
/**
|
|
5879
|
+
* Custom help text message for email type validity.
|
|
5880
|
+
*/
|
|
5881
|
+
customValidityTypeEmail: {
|
|
5882
|
+
type: String
|
|
5883
|
+
},
|
|
5884
|
+
|
|
5885
|
+
/**
|
|
5886
|
+
* An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
5887
|
+
*/
|
|
5888
|
+
spellcheck: {
|
|
5889
|
+
type: String
|
|
5890
|
+
},
|
|
5891
|
+
|
|
5892
|
+
/**
|
|
5893
|
+
* Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
|
|
5894
|
+
*/
|
|
5895
|
+
type: {
|
|
5506
5896
|
type: String,
|
|
5507
5897
|
reflect: true
|
|
5508
5898
|
},
|
|
5509
|
-
|
|
5510
|
-
|
|
5899
|
+
|
|
5900
|
+
/**
|
|
5901
|
+
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5902
|
+
*/
|
|
5903
|
+
value: {
|
|
5904
|
+
type: String
|
|
5905
|
+
},
|
|
5906
|
+
|
|
5907
|
+
/**
|
|
5908
|
+
* Sets validation mode to re-eval with each input.
|
|
5909
|
+
*/
|
|
5910
|
+
validateOnInput: {
|
|
5911
|
+
type: Boolean
|
|
5912
|
+
},
|
|
5913
|
+
|
|
5914
|
+
/**
|
|
5915
|
+
* Specifies the `validityState` this element is in.
|
|
5916
|
+
*/
|
|
5917
|
+
validity: {
|
|
5511
5918
|
type: String,
|
|
5512
5919
|
reflect: true
|
|
5513
|
-
}
|
|
5514
|
-
setCustomValidity: { type: String },
|
|
5515
|
-
setCustomValidityCustomError: { type: String },
|
|
5516
|
-
setCustomValidityValueMissing: { type: String },
|
|
5517
|
-
setCustomValidityBadInput: { type: String },
|
|
5518
|
-
setCustomValidityTooShort: { type: String },
|
|
5519
|
-
setCustomValidityTooLong: { type: String },
|
|
5520
|
-
setCustomValidityRangeOverflow: { type: String},
|
|
5521
|
-
setCustomValidityRangeUnderflow: { type: String},
|
|
5522
|
-
customValidityTypeEmail: { type: String }
|
|
5920
|
+
}
|
|
5523
5921
|
};
|
|
5524
5922
|
}
|
|
5525
5923
|
|
|
5924
|
+
|
|
5526
5925
|
static get styles() {
|
|
5527
5926
|
return [
|
|
5528
|
-
i$2`${styleCss$3$1}`,
|
|
5529
5927
|
i$2`${colorCss$3}`,
|
|
5928
|
+
i$2`${styleCss$3$1}`,
|
|
5530
5929
|
i$2`${tokensCss$3}`
|
|
5531
5930
|
];
|
|
5532
5931
|
}
|
|
@@ -6147,7 +6546,7 @@ class BaseInput extends r {
|
|
|
6147
6546
|
this.maxLength = card.formatLength;
|
|
6148
6547
|
this.minLength = card.formatMinLength;
|
|
6149
6548
|
|
|
6150
|
-
this.
|
|
6549
|
+
this.errorMessage = card.errorMessage;
|
|
6151
6550
|
|
|
6152
6551
|
if (this.icon) {
|
|
6153
6552
|
this.inputIconName = card.cardIcon;
|
|
@@ -6167,63 +6566,63 @@ class BaseInput extends r {
|
|
|
6167
6566
|
name: 'Airlines',
|
|
6168
6567
|
regex: /^(?<num>1|2)\d{0}/u,
|
|
6169
6568
|
formatMinLength: 17,
|
|
6170
|
-
|
|
6569
|
+
errorMessage: CreditCardValidationMessage,
|
|
6171
6570
|
cardIcon: 'credit-card'
|
|
6172
6571
|
},
|
|
6173
6572
|
{
|
|
6174
6573
|
name: 'Commercial',
|
|
6175
6574
|
regex: /^(?<num>2)\d{0}/u,
|
|
6176
6575
|
formatMinLength: 8,
|
|
6177
|
-
|
|
6576
|
+
errorMessage: CreditCardValidationMessage,
|
|
6178
6577
|
cardIcon: 'credit-card'
|
|
6179
6578
|
},
|
|
6180
6579
|
{
|
|
6181
6580
|
name: 'Alaska Commercial',
|
|
6182
6581
|
regex: /^(?<num>27)\d{0}/u,
|
|
6183
6582
|
formatMinLength: 8,
|
|
6184
|
-
|
|
6583
|
+
errorMessage: CreditCardValidationMessage,
|
|
6185
6584
|
cardIcon: 'cc-alaska'
|
|
6186
6585
|
},
|
|
6187
6586
|
{
|
|
6188
6587
|
name: 'American Express',
|
|
6189
6588
|
regex: /^(?<num>34|37)\d{0}/u,
|
|
6190
6589
|
formatLength: 17,
|
|
6191
|
-
|
|
6590
|
+
errorMessage: CreditCardValidationMessage,
|
|
6192
6591
|
cardIcon: 'cc-amex'
|
|
6193
6592
|
},
|
|
6194
6593
|
{
|
|
6195
6594
|
name: 'Diners club',
|
|
6196
6595
|
regex: /^(?<num>36|38)\d{0}/u,
|
|
6197
6596
|
formatLength: 16,
|
|
6198
|
-
|
|
6597
|
+
errorMessage: CreditCardValidationMessage,
|
|
6199
6598
|
cardIcon: 'credit-card'
|
|
6200
6599
|
},
|
|
6201
6600
|
{
|
|
6202
6601
|
name: 'Visa',
|
|
6203
6602
|
regex: /^(?<num>4)\d{0}/u,
|
|
6204
6603
|
formatLength: 19,
|
|
6205
|
-
|
|
6604
|
+
errorMessage: CreditCardValidationMessage,
|
|
6206
6605
|
cardIcon: 'cc-visa'
|
|
6207
6606
|
},
|
|
6208
6607
|
{
|
|
6209
6608
|
name: 'Alaska Airlines Visa',
|
|
6210
6609
|
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
6211
6610
|
formatLength: 19,
|
|
6212
|
-
|
|
6611
|
+
errorMessage: CreditCardValidationMessage,
|
|
6213
6612
|
cardIcon: 'cc-alaska'
|
|
6214
6613
|
},
|
|
6215
6614
|
{
|
|
6216
6615
|
name: 'Master Card',
|
|
6217
6616
|
regex: /^(?<num>5)\d{0}/u,
|
|
6218
6617
|
formatLength: 19,
|
|
6219
|
-
|
|
6618
|
+
errorMessage: CreditCardValidationMessage,
|
|
6220
6619
|
cardIcon: 'cc-mastercard'
|
|
6221
6620
|
},
|
|
6222
6621
|
{
|
|
6223
6622
|
name: 'Discover Card',
|
|
6224
6623
|
regex: /^(?<num>6)\d{0}/u,
|
|
6225
6624
|
formatLength: 19,
|
|
6226
|
-
|
|
6625
|
+
errorMessage: CreditCardValidationMessage,
|
|
6227
6626
|
cardIcon: 'cc-discover'
|
|
6228
6627
|
}
|
|
6229
6628
|
];
|
|
@@ -6231,7 +6630,7 @@ class BaseInput extends r {
|
|
|
6231
6630
|
let type = {
|
|
6232
6631
|
name: 'Default Card',
|
|
6233
6632
|
formatLength: 19,
|
|
6234
|
-
|
|
6633
|
+
errorMessage: CreditCardValidationMessage,
|
|
6235
6634
|
cardIcon: 'credit-card'
|
|
6236
6635
|
};
|
|
6237
6636
|
|
|
@@ -7256,7 +7655,6 @@ class AuroInput extends BaseInput {
|
|
|
7256
7655
|
<p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7257
7656
|
${this.errorMessage}
|
|
7258
7657
|
</p>`
|
|
7259
|
-
|
|
7260
7658
|
}
|
|
7261
7659
|
`;
|
|
7262
7660
|
}
|
|
@@ -7277,9 +7675,11 @@ var styleCss$3 = i$c`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
7277
7675
|
* @prop {Object} optionSelected - Specifies the current selected option.
|
|
7278
7676
|
* @prop {String} value - Value selected for the dropdown menu.
|
|
7279
7677
|
* @prop {Boolean} checkmark - When attribute is present auro-menu will apply checkmarks to selected options.
|
|
7280
|
-
* @attr {
|
|
7678
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
7281
7679
|
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
7282
7680
|
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
7681
|
+
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
7682
|
+
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
7283
7683
|
* @attr {Boolean} disabled - If set, disables the combobox.
|
|
7284
7684
|
* @attr {Boolean} noFilter - If set, combobox will not filter menuoptions based in input.
|
|
7285
7685
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
@@ -7345,12 +7745,17 @@ class AuroCombobox extends r$6 {
|
|
|
7345
7745
|
return {
|
|
7346
7746
|
// ...super.properties,
|
|
7347
7747
|
error: {
|
|
7348
|
-
type:
|
|
7748
|
+
type: String,
|
|
7349
7749
|
reflect: true
|
|
7350
7750
|
},
|
|
7351
7751
|
setCustomValidity: {
|
|
7352
|
-
type: String
|
|
7353
|
-
|
|
7752
|
+
type: String
|
|
7753
|
+
},
|
|
7754
|
+
setCustomValidityCustomError: {
|
|
7755
|
+
type: String
|
|
7756
|
+
},
|
|
7757
|
+
setCustomValidityValueMissing: {
|
|
7758
|
+
type: String
|
|
7354
7759
|
},
|
|
7355
7760
|
validity: {
|
|
7356
7761
|
type: String,
|
|
@@ -7588,9 +7993,6 @@ class AuroCombobox extends r$6 {
|
|
|
7588
7993
|
|
|
7589
7994
|
// handle the menu event for an option selection
|
|
7590
7995
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
7591
|
-
// dropdown bib should hide when making a selection
|
|
7592
|
-
this.hideBib();
|
|
7593
|
-
|
|
7594
7996
|
if (this.menu.optionSelected) {
|
|
7595
7997
|
if (this.optionSelected !== this.menu.optionSelected) {
|
|
7596
7998
|
this.optionSelected = this.menu.optionSelected;
|
|
@@ -7619,6 +8021,9 @@ class AuroCombobox extends r$6 {
|
|
|
7619
8021
|
composed: true,
|
|
7620
8022
|
}));
|
|
7621
8023
|
}
|
|
8024
|
+
|
|
8025
|
+
// dropdown bib should hide when making a selection
|
|
8026
|
+
this.hideBib();
|
|
7622
8027
|
});
|
|
7623
8028
|
|
|
7624
8029
|
this.menu.addEventListener('auroMenu-customEventFired', () => {
|
|
@@ -7634,9 +8039,7 @@ class AuroCombobox extends r$6 {
|
|
|
7634
8039
|
});
|
|
7635
8040
|
|
|
7636
8041
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
7637
|
-
this.
|
|
7638
|
-
this.value = undefined;
|
|
7639
|
-
this.validation.validate(this);
|
|
8042
|
+
this.reset();
|
|
7640
8043
|
});
|
|
7641
8044
|
}
|
|
7642
8045
|
|
|
@@ -7665,56 +8068,8 @@ class AuroCombobox extends r$6 {
|
|
|
7665
8068
|
}
|
|
7666
8069
|
});
|
|
7667
8070
|
|
|
7668
|
-
this.input.addEventListener('input', () => {
|
|
7669
|
-
this.menu.matchWord = this.input.value;
|
|
7670
|
-
this.optionActive = null;
|
|
7671
|
-
|
|
7672
|
-
if (this.value !== this.input.value) {
|
|
7673
|
-
this.value = this.input.value;
|
|
7674
|
-
}
|
|
7675
|
-
|
|
7676
|
-
if (this.value !== this.menu.value) {
|
|
7677
|
-
this.menu.value = this.value;
|
|
7678
|
-
}
|
|
7679
|
-
|
|
7680
|
-
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
7681
|
-
this.optionSelected = undefined;
|
|
7682
|
-
}
|
|
7683
|
-
|
|
7684
|
-
this.menu.resetOptionsStates();
|
|
7685
|
-
|
|
7686
|
-
this.handleMenuOptions();
|
|
7687
|
-
|
|
7688
|
-
this.handleInputValueChange();
|
|
7689
|
-
// validate only if the value was set programmatically
|
|
7690
|
-
if (document.activeElement !== this) {
|
|
7691
|
-
this.validation.validate(this);
|
|
7692
|
-
}
|
|
7693
|
-
|
|
7694
|
-
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
7695
|
-
if (this.input.value && this.input.value.length === 0) {
|
|
7696
|
-
this.hideBib();
|
|
7697
|
-
this.classList.remove('combobox-filled');
|
|
7698
|
-
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
7699
|
-
const hasFocus = this.contains(document.activeElement);
|
|
7700
|
-
|
|
7701
|
-
// if the focus is within the combobox, then show the bib
|
|
7702
|
-
// this will prevent the bib from being shown while loading & presetting the value
|
|
7703
|
-
if (hasFocus) {
|
|
7704
|
-
this.showBib();
|
|
7705
|
-
}
|
|
7706
|
-
|
|
7707
|
-
this.classList.add('combobox-filled');
|
|
7708
|
-
}
|
|
7709
|
-
|
|
7710
|
-
// force the dropdown bib to hide if the input value has no matching suggestions
|
|
7711
|
-
if (!this.availableOptions || this.availableOptions.length === 0) {
|
|
7712
|
-
this.hideBib();
|
|
7713
|
-
}
|
|
7714
|
-
});
|
|
7715
|
-
|
|
7716
8071
|
this.input.addEventListener('auroFormElement-validated', (evt) => {
|
|
7717
|
-
this.
|
|
8072
|
+
this.errorMessage = evt.detail.message;
|
|
7718
8073
|
});
|
|
7719
8074
|
}
|
|
7720
8075
|
|
|
@@ -7747,8 +8102,14 @@ class AuroCombobox extends r$6 {
|
|
|
7747
8102
|
* @returns {void}
|
|
7748
8103
|
*/
|
|
7749
8104
|
handleInputValueChange() {
|
|
8105
|
+
this.menu.matchWord = this.input.value;
|
|
8106
|
+
this.optionActive = null;
|
|
8107
|
+
|
|
8108
|
+
let hasChange = false;
|
|
8109
|
+
|
|
7750
8110
|
if (this.value !== this.input.value) {
|
|
7751
8111
|
this.value = this.input.value;
|
|
8112
|
+
hasChange = true;
|
|
7752
8113
|
|
|
7753
8114
|
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
7754
8115
|
bubbles: true,
|
|
@@ -7757,10 +8118,48 @@ class AuroCombobox extends r$6 {
|
|
|
7757
8118
|
}));
|
|
7758
8119
|
}
|
|
7759
8120
|
|
|
7760
|
-
|
|
7761
|
-
|
|
8121
|
+
if (this.value !== this.menu.value) {
|
|
8122
|
+
this.menu.value = this.value;
|
|
8123
|
+
hasChange = true;
|
|
8124
|
+
}
|
|
8125
|
+
|
|
8126
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
8127
|
+
this.optionSelected = undefined;
|
|
8128
|
+
hasChange = true;
|
|
8129
|
+
}
|
|
8130
|
+
|
|
8131
|
+
if (!hasChange) {
|
|
8132
|
+
return;
|
|
8133
|
+
}
|
|
8134
|
+
|
|
8135
|
+
this.menu.resetOptionsStates();
|
|
8136
|
+
this.handleMenuOptions();
|
|
8137
|
+
|
|
8138
|
+
// validate if the value was set programmatically
|
|
8139
|
+
if (document.activeElement !== this) {
|
|
7762
8140
|
this.validation.validate(this);
|
|
7763
8141
|
}
|
|
8142
|
+
|
|
8143
|
+
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
8144
|
+
if (this.input.value && this.input.value.length === 0) {
|
|
8145
|
+
this.hideBib();
|
|
8146
|
+
this.classList.remove('combobox-filled');
|
|
8147
|
+
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
8148
|
+
const hasFocus = this.contains(document.activeElement);
|
|
8149
|
+
|
|
8150
|
+
// if the focus is within the combobox, then show the bib
|
|
8151
|
+
// this will prevent the bib from being shown while loading & presetting the value
|
|
8152
|
+
if (hasFocus) {
|
|
8153
|
+
this.showBib();
|
|
8154
|
+
}
|
|
8155
|
+
|
|
8156
|
+
this.classList.add('combobox-filled');
|
|
8157
|
+
}
|
|
8158
|
+
|
|
8159
|
+
// force the dropdown bib to hide if the input value has no matching suggestions
|
|
8160
|
+
if (!this.availableOptions || this.availableOptions.length === 0) {
|
|
8161
|
+
this.hideBib();
|
|
8162
|
+
}
|
|
7764
8163
|
}
|
|
7765
8164
|
|
|
7766
8165
|
/**
|
|
@@ -7858,9 +8257,6 @@ class AuroCombobox extends r$6 {
|
|
|
7858
8257
|
* @returns {void}
|
|
7859
8258
|
*/
|
|
7860
8259
|
reset() {
|
|
7861
|
-
// Resets the help text of the combobox
|
|
7862
|
-
this.auroInputHelpText = undefined;
|
|
7863
|
-
|
|
7864
8260
|
this.input.reset();
|
|
7865
8261
|
this.validation.reset(this);
|
|
7866
8262
|
}
|
|
@@ -7893,10 +8289,6 @@ class AuroCombobox extends r$6 {
|
|
|
7893
8289
|
this.input.setAttribute('error', this.getAttribute('error'));
|
|
7894
8290
|
this.validation.validate(this);
|
|
7895
8291
|
}
|
|
7896
|
-
|
|
7897
|
-
if (changedProperties.has('setCustomValidity')) {
|
|
7898
|
-
this.input.setAttribute('setCustomValidity', this.setCustomValidity);
|
|
7899
|
-
}
|
|
7900
8292
|
}
|
|
7901
8293
|
|
|
7902
8294
|
/**
|
|
@@ -7950,19 +8342,24 @@ class AuroCombobox extends r$6 {
|
|
|
7950
8342
|
?noValidate="${this.noValidate}"
|
|
7951
8343
|
?disabled="${this.disabled}"
|
|
7952
8344
|
?icon="${this.triggerIcon}"
|
|
7953
|
-
|
|
8345
|
+
setCustomValidity="${this.setCustomValidity}"
|
|
8346
|
+
setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
|
|
8347
|
+
setCustomValidityCustomError="${this.setCustomValidityCustomError}"
|
|
8348
|
+
.type="${this.type}"
|
|
8349
|
+
@input="${this.handleInputValueChange}">
|
|
7954
8350
|
<slot name="label" slot="label"></slot>
|
|
7955
8351
|
</${this.inputTag}>
|
|
7956
8352
|
<div class="menuWrapper">
|
|
7957
8353
|
</div>
|
|
7958
8354
|
<span slot="helpText">
|
|
7959
|
-
|
|
8355
|
+
<!-- Help text and error message template -->
|
|
8356
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7960
8357
|
? u$6`
|
|
7961
|
-
${this.auroInputHelpText}
|
|
7962
|
-
`
|
|
7963
|
-
: u$6`
|
|
7964
8358
|
<slot name="helpText"></slot>
|
|
7965
|
-
`
|
|
8359
|
+
` : u$6`
|
|
8360
|
+
<p role="alert" aria-live="assertive" part="helpText">
|
|
8361
|
+
${this.errorMessage}
|
|
8362
|
+
</p>`
|
|
7966
8363
|
}
|
|
7967
8364
|
</span>
|
|
7968
8365
|
</${this.dropdownTag}>
|
|
@@ -7994,8 +8391,8 @@ var tokensCss$1 = i$c`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
7994
8391
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
7995
8392
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7996
8393
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
7997
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
7998
8394
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
8395
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
7999
8396
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
8000
8397
|
* @slot loadingText - Text to show while loading attribute is set
|
|
8001
8398
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -8521,7 +8918,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
|
|
8521
8918
|
* @license
|
|
8522
8919
|
* Copyright 2018 Google LLC
|
|
8523
8920
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8524
|
-
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(
|
|
8921
|
+
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(undefined===this.st){this.st=new Set,undefined!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$2}});
|
|
8525
8922
|
|
|
8526
8923
|
/**
|
|
8527
8924
|
* @license
|