@aurodesignsystem/auro-formkit 1.6.0-beta.9 → 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 +175 -0
- package/README.md +59 -59
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +10 -10
- package/components/checkbox/.turbo/turbo-build.log +23 -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.html +6 -1
- package/components/checkbox/demo/api.js +16 -0
- package/components/checkbox/demo/api.md +120 -61
- package/components/checkbox/demo/api.min.js +261 -90
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +236 -90
- package/components/checkbox/dist/auro-checkbox-group.d.ts +41 -17
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +25 -11
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +236 -90
- package/components/checkbox/package.json +1 -1
- package/components/checkbox/src/auro-checkbox-group.js +64 -23
- package/components/checkbox/src/auro-checkbox.js +38 -12
- package/components/combobox/.turbo/turbo-build$colon$sass.log +5 -5
- package/components/combobox/.turbo/turbo-build.log +25 -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.js +4 -2
- package/components/combobox/demo/api.md +77 -16
- package/components/combobox/demo/api.min.js +890 -447
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +881 -447
- package/components/combobox/dist/auro-combobox.d.ts +16 -5
- 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 +874 -408
- 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 +85 -75
- 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 +62 -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.js +2 -0
- package/components/datepicker/demo/api.md +216 -125
- package/components/datepicker/demo/api.min.js +1111 -598
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +1102 -598
- package/components/datepicker/dist/auro-datepicker.d.ts +94 -80
- 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 +1102 -598
- package/components/datepicker/dist/inputVersion.d.ts +3 -0
- package/components/datepicker/dist/inputVersion.d.ts.map +1 -0
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/package.json +4 -4
- package/components/datepicker/src/auro-datepicker.js +154 -106
- package/components/datepicker/src/dropdownVersion.js +1 -0
- package/components/datepicker/src/inputVersion.js +1 -0
- package/components/datepicker/src/popoverVersion.js +1 -1
- 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 +241 -105
- package/components/dropdown/demo/index.min.js +241 -105
- 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/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +241 -105
- package/components/dropdown/package.json +2 -2
- package/components/dropdown/src/auro-dropdown.js +156 -41
- package/components/dropdown/src/auro-dropdownBib.js +12 -3
- package/components/dropdown/src/iconVersion.js +1 -1
- package/components/dropdown/src/styles/bibStyles-css.js +1 -1
- package/components/dropdown/src/styles/bibStyles.css +0 -5
- package/components/dropdown/src/styles/bibStyles.scss +0 -7
- package/components/dropdown/src/styles/color-css.js +1 -1
- package/components/dropdown/src/styles/color.css +6 -7
- package/components/dropdown/src/styles/color.scss +7 -7
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +5 -0
- package/components/dropdown/src/styles/style.scss +6 -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 +68 -18
- package/components/input/.turbo/turbo-build$colon$version.log +1 -1
- package/components/input/.turbo/turbo-build.log +90 -40
- 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.js +2 -0
- package/components/input/demo/api.md +234 -351
- package/components/input/demo/api.min.js +428 -178
- package/components/input/demo/index.md +11 -61
- package/components/input/demo/index.min.js +416 -175
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +158 -97
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +416 -175
- 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 +3 -3
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +272 -111
- package/components/input/src/buttonVersion.js +1 -1
- package/components/input/src/iconVersion.js +1 -1
- 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 +14 -1
- package/components/input/src/styles/input.scss +25 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +4 -4
- package/components/input/src/styles/label.scss +4 -8
- 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 -5
- package/components/input/src/styles/notificationIcons.scss +17 -11
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +31 -13
- 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.md +1 -5
- package/components/menu/demo/api.min.js +12 -44
- package/components/menu/demo/index.min.js +12 -44
- package/components/menu/dist/auro-menu.d.ts +1 -5
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/auro-menuoption.d.ts +0 -1
- package/components/menu/dist/auro-menuoption.d.ts.map +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +12 -44
- package/components/menu/package.json +2 -2
- package/components/menu/src/auro-menu.js +1 -33
- package/components/menu/src/auro-menuoption.js +1 -2
- package/components/menu/src/iconVersion.js +1 -1
- package/components/radio/.turbo/turbo-build$colon$sass.log +13 -13
- package/components/radio/.turbo/turbo-build.log +26 -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.html +1 -0
- package/components/radio/demo/api.js +2 -0
- package/components/radio/demo/api.md +60 -4
- package/components/radio/demo/api.min.js +159 -62
- package/components/radio/demo/index.min.js +150 -62
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +5 -0
- package/components/radio/dist/auro-radio.d.ts.map +1 -1
- package/components/radio/dist/index.js +150 -62
- package/components/radio/package.json +1 -1
- package/components/radio/src/auro-radio-group.js +6 -6
- package/components/radio/src/auro-radio.js +9 -0
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +37 -37
- 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.js +6 -2
- package/components/select/demo/api.md +165 -163
- package/components/select/demo/api.min.js +524 -337
- package/components/select/demo/index.md +101 -59
- package/components/select/demo/index.min.js +504 -333
- package/components/select/dist/auro-select.d.ts +65 -48
- 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 +494 -278
- package/components/select/package.json +3 -3
- package/components/select/src/auro-select.js +105 -116
- 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 +129 -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/0008b92c8752bf75-meta.json +0 -1
- package/.turbo/cache/0008b92c8752bf75.tar.zst +0 -0
- package/.turbo/cache/00cb38bef1105dac-meta.json +0 -1
- package/.turbo/cache/00cb38bef1105dac.tar.zst +0 -0
- package/.turbo/cache/0157ec8abdaf2a9c-meta.json +0 -1
- package/.turbo/cache/0157ec8abdaf2a9c.tar.zst +0 -0
- package/.turbo/cache/0636e9cedc83238b-meta.json +0 -1
- package/.turbo/cache/0636e9cedc83238b.tar.zst +0 -0
- package/.turbo/cache/06f476671015e973-meta.json +0 -1
- package/.turbo/cache/06f476671015e973.tar.zst +0 -0
- package/.turbo/cache/09df74d672102662-meta.json +0 -1
- package/.turbo/cache/09df74d672102662.tar.zst +0 -0
- package/.turbo/cache/0cd109fb3183c2e6-meta.json +0 -1
- package/.turbo/cache/0cd109fb3183c2e6.tar.zst +0 -0
- package/.turbo/cache/17c429ade621ffcb-meta.json +0 -1
- package/.turbo/cache/17c429ade621ffcb.tar.zst +0 -0
- package/.turbo/cache/1c47128a0e12fcfa-meta.json +0 -1
- package/.turbo/cache/1c47128a0e12fcfa.tar.zst +0 -0
- package/.turbo/cache/1db02f756ce85784-meta.json +0 -1
- package/.turbo/cache/1db02f756ce85784.tar.zst +0 -0
- package/.turbo/cache/21705fa179d5f820-meta.json +0 -1
- package/.turbo/cache/21705fa179d5f820.tar.zst +0 -0
- package/.turbo/cache/249d9ba3ee6aa1cb-meta.json +0 -1
- package/.turbo/cache/249d9ba3ee6aa1cb.tar.zst +0 -0
- package/.turbo/cache/2666b96bfcf4e9cd-meta.json +0 -1
- package/.turbo/cache/2666b96bfcf4e9cd.tar.zst +0 -0
- package/.turbo/cache/2778d5e895240cd1-meta.json +0 -1
- package/.turbo/cache/2778d5e895240cd1.tar.zst +0 -0
- package/.turbo/cache/300b59df2de12b46-meta.json +0 -1
- package/.turbo/cache/300b59df2de12b46.tar.zst +0 -0
- package/.turbo/cache/31729e74fccaafb0-meta.json +0 -1
- package/.turbo/cache/31729e74fccaafb0.tar.zst +0 -0
- package/.turbo/cache/32702694d62a08ac-meta.json +0 -1
- package/.turbo/cache/32702694d62a08ac.tar.zst +0 -0
- package/.turbo/cache/3482a3cba9a51c2d-meta.json +0 -1
- package/.turbo/cache/3482a3cba9a51c2d.tar.zst +0 -0
- package/.turbo/cache/3a9d73752f23a40a-meta.json +0 -1
- package/.turbo/cache/3a9d73752f23a40a.tar.zst +0 -0
- package/.turbo/cache/3afe2e6f714a4fcb-meta.json +0 -1
- package/.turbo/cache/3afe2e6f714a4fcb.tar.zst +0 -0
- package/.turbo/cache/408ea1754276298c-meta.json +0 -1
- package/.turbo/cache/408ea1754276298c.tar.zst +0 -0
- package/.turbo/cache/42066c793c3816f3-meta.json +0 -1
- package/.turbo/cache/42066c793c3816f3.tar.zst +0 -0
- package/.turbo/cache/4bec46ffff6fd2e8-meta.json +0 -1
- package/.turbo/cache/4bec46ffff6fd2e8.tar.zst +0 -0
- package/.turbo/cache/50b275350abe14dd-meta.json +0 -1
- package/.turbo/cache/50b275350abe14dd.tar.zst +0 -0
- package/.turbo/cache/51078a087b52c65e-meta.json +0 -1
- package/.turbo/cache/51078a087b52c65e.tar.zst +0 -0
- package/.turbo/cache/593ddf689673e305-meta.json +0 -1
- package/.turbo/cache/593ddf689673e305.tar.zst +0 -0
- package/.turbo/cache/64e4f18395bd4461-meta.json +0 -1
- package/.turbo/cache/64e4f18395bd4461.tar.zst +0 -0
- package/.turbo/cache/68843ecab6e09320-meta.json +0 -1
- package/.turbo/cache/68843ecab6e09320.tar.zst +0 -0
- package/.turbo/cache/7419ef01dc18b433-meta.json +0 -1
- package/.turbo/cache/7419ef01dc18b433.tar.zst +0 -0
- package/.turbo/cache/748faca09d14fea7-meta.json +0 -1
- package/.turbo/cache/748faca09d14fea7.tar.zst +0 -0
- package/.turbo/cache/75495b0bbd6c06a7-meta.json +0 -1
- package/.turbo/cache/75495b0bbd6c06a7.tar.zst +0 -0
- package/.turbo/cache/7a6a8af4392c4b05-meta.json +0 -1
- package/.turbo/cache/7a6a8af4392c4b05.tar.zst +0 -0
- package/.turbo/cache/7e81141e0140dd3a-meta.json +0 -1
- package/.turbo/cache/7e81141e0140dd3a.tar.zst +0 -0
- package/.turbo/cache/7eb50d96639e6dd4-meta.json +0 -1
- package/.turbo/cache/7eb50d96639e6dd4.tar.zst +0 -0
- package/.turbo/cache/83bb78fec13808d0-meta.json +0 -1
- package/.turbo/cache/83bb78fec13808d0.tar.zst +0 -0
- package/.turbo/cache/8605f60efb7d3957-meta.json +0 -1
- package/.turbo/cache/8605f60efb7d3957.tar.zst +0 -0
- package/.turbo/cache/892a90b62716ded5-meta.json +0 -1
- package/.turbo/cache/892a90b62716ded5.tar.zst +0 -0
- package/.turbo/cache/8cac06ca809bd2b1-meta.json +0 -1
- package/.turbo/cache/8cac06ca809bd2b1.tar.zst +0 -0
- package/.turbo/cache/9a908bf8f82c84a6-meta.json +0 -1
- package/.turbo/cache/9a908bf8f82c84a6.tar.zst +0 -0
- package/.turbo/cache/9ed3089ffd7d0c00-meta.json +0 -1
- package/.turbo/cache/9ed3089ffd7d0c00.tar.zst +0 -0
- package/.turbo/cache/a3a879aea25debf8-meta.json +0 -1
- package/.turbo/cache/a3a879aea25debf8.tar.zst +0 -0
- package/.turbo/cache/a8dbafaf6177f677-meta.json +0 -1
- package/.turbo/cache/a8dbafaf6177f677.tar.zst +0 -0
- package/.turbo/cache/a8f6418b830ef0ba-meta.json +0 -1
- package/.turbo/cache/a8f6418b830ef0ba.tar.zst +0 -0
- package/.turbo/cache/b37b0eb5597e160f-meta.json +0 -1
- package/.turbo/cache/b37b0eb5597e160f.tar.zst +0 -0
- package/.turbo/cache/b7e7a8c425673f7c-meta.json +0 -1
- package/.turbo/cache/b7e7a8c425673f7c.tar.zst +0 -0
- package/.turbo/cache/bc8eed3d7216f5b7-meta.json +0 -1
- package/.turbo/cache/bc8eed3d7216f5b7.tar.zst +0 -0
- package/.turbo/cache/bde11c3029373459-meta.json +0 -1
- package/.turbo/cache/bde11c3029373459.tar.zst +0 -0
- package/.turbo/cache/c8e5fe6aec4479f5-meta.json +0 -1
- package/.turbo/cache/c8e5fe6aec4479f5.tar.zst +0 -0
- package/.turbo/cache/d0e874a9a71c9468-meta.json +0 -1
- package/.turbo/cache/d0e874a9a71c9468.tar.zst +0 -0
- package/.turbo/cache/d61b4e1bde4c0a12-meta.json +0 -1
- package/.turbo/cache/d61b4e1bde4c0a12.tar.zst +0 -0
- package/.turbo/cache/db6dedc0e7a12575-meta.json +0 -1
- package/.turbo/cache/db6dedc0e7a12575.tar.zst +0 -0
- package/.turbo/cache/de9737607345ec54-meta.json +0 -1
- package/.turbo/cache/de9737607345ec54.tar.zst +0 -0
- package/.turbo/cache/e234aa902b2c5b30-meta.json +0 -1
- package/.turbo/cache/e234aa902b2c5b30.tar.zst +0 -0
- package/.turbo/cache/e541225f46f7cf86-meta.json +0 -1
- package/.turbo/cache/e541225f46f7cf86.tar.zst +0 -0
- package/.turbo/cache/e67ac30b07d9e800-meta.json +0 -1
- package/.turbo/cache/e67ac30b07d9e800.tar.zst +0 -0
- package/.turbo/cache/e7244fdd3397eba7-meta.json +0 -1
- package/.turbo/cache/e7244fdd3397eba7.tar.zst +0 -0
- package/.turbo/cache/e7cf2cc625bd92b3-meta.json +0 -1
- package/.turbo/cache/e7cf2cc625bd92b3.tar.zst +0 -0
- package/.turbo/cache/e89a401ebdda3fc2-meta.json +0 -1
- package/.turbo/cache/e89a401ebdda3fc2.tar.zst +0 -0
- package/components/dropdown/dist/floatingUI.d.mts +0 -68
- package/components/dropdown/dist/floatingUI.d.mts.map +0 -1
- package/components/dropdown/src/floatingUI.mjs +0 -381
- package/components/select/demo/alertValue.js +0 -6
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$6=globalThis,e$8=t$6.ShadowRoot&&(
|
|
6
|
+
const t$6=globalThis,e$8=t$6.ShadowRoot&&(undefined===t$6.ShadyCSS||t$6.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$7=Symbol(),o$9=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$8&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$9.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$9.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$b=(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$8)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$6.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$7=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$9(e)})(t):t;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$a,defineProperty:e$7,getOwnPropertyDescriptor:r$8,getOwnPropertyNames:h$4,getOwnPropertySymbols:o$8,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$a(t,s),y$4={attribute
|
|
12
|
+
*/const{is:i$a,defineProperty:e$7,getOwnPropertyDescriptor:r$8,getOwnPropertyNames:h$4,getOwnPropertySymbols:o$8,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$a(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$7(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$8(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");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const t$5=globalThis,i$9=t$5.trustedTypes,s$6=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):
|
|
19
|
+
const t$5=globalThis,i$9=t$5.trustedTypes,s$6=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$6="$lit$",h$3=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$3,n$6=`<${o$7}>`,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$6+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$6)){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$9?i$9.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$7)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$5.litHtmlPolyfillSupport;j$2?.(N$2,R$2),(t$5.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};
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/let r$6 = class r extends b$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
25
|
+
*/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$8=globalThis.litElementPolyfillSupport;i$8?.({LitElement:r$6});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
31
|
*/
|
|
32
|
-
const a$4=Symbol.for(""),o$6=t=>{if(t?.r===a$4)return t?._$litStatic$},s$5=t=>({_$litStatic$:t,r:a$4}),i$7=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
32
|
+
const a$4=Symbol.for(""),o$6=t=>{if(t?.r===a$4)return t?._$litStatic$},s$5=t=>({_$litStatic$:t,r:a$4}),i$7=(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$6(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);
|
|
33
33
|
|
|
34
34
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
35
35
|
// See LICENSE in the project root for license information.
|
|
@@ -151,25 +151,111 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
154
|
+
* Resets the element to its initial state.
|
|
155
155
|
* @private
|
|
156
|
-
* @param {object} elem - HTML element to
|
|
156
|
+
* @param {object} elem - HTML element to reset.
|
|
157
157
|
* @returns {void}
|
|
158
158
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
reset(elem) {
|
|
160
|
+
elem.validity = undefined;
|
|
161
|
+
elem.value = undefined;
|
|
162
|
+
|
|
163
|
+
// Resets the second value of the datepicker in range state
|
|
164
|
+
if (elem.valueEnd) {
|
|
165
|
+
elem.valueEnd = undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Resets selected option of element
|
|
169
|
+
if (elem.optionSelected) {
|
|
170
|
+
elem.optionSelected = undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Runs validation to handle error attribute
|
|
174
|
+
this.validate(elem);
|
|
175
|
+
}
|
|
162
176
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
179
|
+
*
|
|
180
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
181
|
+
* @returns {void}
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
185
|
+
* validateElementAttributes(inputElement);
|
|
186
|
+
*
|
|
187
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
188
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
189
|
+
*
|
|
190
|
+
* Validation rules:
|
|
191
|
+
* - input:
|
|
192
|
+
* - length:
|
|
193
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
194
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
195
|
+
* - pattern:
|
|
196
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
197
|
+
* - counter:
|
|
198
|
+
* - range:
|
|
199
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
200
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
201
|
+
*/
|
|
202
|
+
validateElementAttributes(elem) {
|
|
203
|
+
const validationRules = {
|
|
204
|
+
input: {
|
|
205
|
+
length: [
|
|
206
|
+
{
|
|
207
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
208
|
+
validity: 'tooShort',
|
|
209
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
213
|
+
validity: 'tooLong',
|
|
214
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
pattern: [
|
|
218
|
+
{
|
|
219
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
220
|
+
validity: 'patternMismatch',
|
|
221
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
counter: {
|
|
226
|
+
range: [
|
|
227
|
+
{
|
|
228
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
229
|
+
validity: 'rangeOverflow',
|
|
230
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
234
|
+
validity: 'rangeUnderflow',
|
|
235
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
let elementType;
|
|
242
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
243
|
+
elementType = 'input';
|
|
244
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
245
|
+
elementType = 'counter';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (elementType) {
|
|
249
|
+
const rules = validationRules[elementType];
|
|
250
|
+
|
|
251
|
+
if (rules) {
|
|
252
|
+
Object.values(rules).flat().forEach(rule => {
|
|
253
|
+
if (rule.check(elem)) {
|
|
254
|
+
elem.validity = rule.validity;
|
|
255
|
+
elem.errorMessage = rule.message(elem);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
166
258
|
}
|
|
167
|
-
} else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
|
|
168
|
-
elem.validity = 'tooShort';
|
|
169
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
170
|
-
} else if (elem.value && elem.value.length > elem.maxLength) {
|
|
171
|
-
elem.validity = 'tooLong';
|
|
172
|
-
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
173
259
|
}
|
|
174
260
|
}
|
|
175
261
|
|
|
@@ -185,33 +271,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
185
271
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
186
272
|
|
|
187
273
|
if (!elem.value.match(emailRegex)) {
|
|
188
|
-
elem.validity = '
|
|
189
|
-
elem.
|
|
274
|
+
elem.validity = 'patternMismatch';
|
|
275
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
190
276
|
}
|
|
191
277
|
} else if (elem.type === 'credit-card') {
|
|
192
278
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
193
279
|
elem.validity = 'tooShort';
|
|
194
|
-
elem.
|
|
280
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
195
281
|
}
|
|
196
|
-
} else if (elem.type === 'number'
|
|
282
|
+
} else if (elem.type === 'number') {
|
|
197
283
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
198
284
|
elem.validity = 'rangeOverflow';
|
|
199
|
-
elem.
|
|
285
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
200
286
|
}
|
|
201
287
|
|
|
202
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
288
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
203
289
|
elem.validity = 'rangeUnderflow';
|
|
204
|
-
elem.
|
|
290
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
205
291
|
}
|
|
206
|
-
|
|
207
292
|
} else if (elem.type === 'month-day-year' ||
|
|
208
293
|
elem.type === 'month-year' ||
|
|
209
294
|
elem.type === 'month-fullYear' ||
|
|
210
295
|
elem.type === 'year-month-day'
|
|
211
296
|
) {
|
|
212
|
-
if (elem.value
|
|
297
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
213
298
|
elem.validity = 'tooShort';
|
|
214
|
-
elem.
|
|
299
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
215
300
|
} else {
|
|
216
301
|
const valueDate = new Date(elem.value);
|
|
217
302
|
|
|
@@ -221,7 +306,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
221
306
|
|
|
222
307
|
if (valueDate > maxDate) {
|
|
223
308
|
elem.validity = 'rangeOverflow';
|
|
224
|
-
elem.
|
|
309
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
225
310
|
}
|
|
226
311
|
}
|
|
227
312
|
|
|
@@ -231,7 +316,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
231
316
|
|
|
232
317
|
if (valueDate < minDate) {
|
|
233
318
|
elem.validity = 'rangeUnderflow';
|
|
234
|
-
elem.
|
|
319
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
235
320
|
}
|
|
236
321
|
}
|
|
237
322
|
}
|
|
@@ -254,10 +339,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
254
339
|
|
|
255
340
|
if (elem.hasAttribute('error')) {
|
|
256
341
|
elem.validity = 'customError';
|
|
257
|
-
elem.
|
|
342
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
258
343
|
} else if (validationShouldRun) {
|
|
259
344
|
elem.validity = 'valid';
|
|
260
|
-
elem.
|
|
345
|
+
elem.errorMessage = '';
|
|
261
346
|
|
|
262
347
|
/**
|
|
263
348
|
* Only validate once we interact with the datepicker
|
|
@@ -269,7 +354,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
269
354
|
let hasValue = elem.value && elem.value.length > 0;
|
|
270
355
|
|
|
271
356
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
272
|
-
if (this.auroInputElements
|
|
357
|
+
if (this.auroInputElements?.length === 2) {
|
|
273
358
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
274
359
|
hasValue = false;
|
|
275
360
|
}
|
|
@@ -277,35 +362,29 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
277
362
|
|
|
278
363
|
if (!hasValue && elem.required) {
|
|
279
364
|
elem.validity = 'valueMissing';
|
|
280
|
-
elem.
|
|
365
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
281
366
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
282
367
|
this.validateType(elem);
|
|
283
|
-
this.
|
|
368
|
+
this.validateElementAttributes(elem);
|
|
369
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
370
|
+
this.validateElementAttributes(elem);
|
|
284
371
|
}
|
|
285
372
|
}
|
|
286
373
|
|
|
287
|
-
if (this.auroInputElements
|
|
374
|
+
if (this.auroInputElements?.length > 0) {
|
|
288
375
|
elem.validity = this.auroInputElements[0].validity;
|
|
289
|
-
elem.
|
|
376
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
290
377
|
|
|
291
|
-
if (elem.validity === 'valid') {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
295
|
-
}
|
|
378
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
379
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
380
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
296
381
|
}
|
|
297
382
|
}
|
|
298
383
|
|
|
299
384
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
// Use the validity message override if it is declared
|
|
304
|
-
if (elem.ValidityMessageOverride) {
|
|
305
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
306
|
-
}
|
|
307
|
-
} else {
|
|
308
|
-
elem.isValid = true;
|
|
385
|
+
// Use the validity message override if it is declared
|
|
386
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
387
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
309
388
|
}
|
|
310
389
|
|
|
311
390
|
this.getErrorMessage(elem);
|
|
@@ -351,18 +430,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
351
430
|
if (elem.validity !== 'valid') {
|
|
352
431
|
if (elem.setCustomValidity) {
|
|
353
432
|
elem.errorMessage = elem.setCustomValidity;
|
|
354
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
433
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
355
434
|
const input = elem.renderRoot.querySelector('input');
|
|
356
435
|
|
|
357
436
|
if (input.validationMessage.length > 0) {
|
|
358
437
|
elem.errorMessage = input.validationMessage;
|
|
359
438
|
}
|
|
360
|
-
} else if (this.inputElements &&
|
|
439
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
361
440
|
const firstInput = this.inputElements[0];
|
|
362
441
|
|
|
363
442
|
if (firstInput.validationMessage.length > 0) {
|
|
364
443
|
elem.errorMessage = firstInput.validationMessage;
|
|
365
|
-
} else if (this.inputElements
|
|
444
|
+
} else if (this.inputElements?.length === 2) {
|
|
366
445
|
const secondInput = this.inputElements[1];
|
|
367
446
|
|
|
368
447
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -381,33 +460,33 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
381
460
|
* Copyright 2017 Google LLC
|
|
382
461
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
383
462
|
*/
|
|
384
|
-
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}):
|
|
463
|
+
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};
|
|
385
464
|
|
|
386
465
|
/**
|
|
387
466
|
* @license
|
|
388
467
|
* Copyright 2020 Google LLC
|
|
389
468
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
390
469
|
*/
|
|
391
|
-
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(
|
|
470
|
+
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);
|
|
392
471
|
|
|
393
472
|
/**
|
|
394
473
|
* @license
|
|
395
474
|
* Copyright 2019 Google LLC
|
|
396
475
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
397
476
|
*/
|
|
398
|
-
const t$1$1=globalThis,e$3$1=t$1$1.ShadowRoot&&(
|
|
477
|
+
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;
|
|
399
478
|
|
|
400
479
|
/**
|
|
401
480
|
* @license
|
|
402
481
|
* Copyright 2017 Google LLC
|
|
403
482
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
404
|
-
*/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
|
|
483
|
+
*/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");
|
|
405
484
|
|
|
406
485
|
/**
|
|
407
486
|
* @license
|
|
408
487
|
* Copyright 2017 Google LLC
|
|
409
488
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
410
|
-
*/let r$5 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
489
|
+
*/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");
|
|
411
490
|
|
|
412
491
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
413
492
|
// See LICENSE in the project root for license information.
|
|
@@ -527,7 +606,7 @@ function getAlignmentAxis(placement) {
|
|
|
527
606
|
return getOppositeAxis(getSideAxis(placement));
|
|
528
607
|
}
|
|
529
608
|
function getAlignmentSides(placement, rects, rtl) {
|
|
530
|
-
if (rtl ===
|
|
609
|
+
if (rtl === undefined) {
|
|
531
610
|
rtl = false;
|
|
532
611
|
}
|
|
533
612
|
const alignment = getAlignment(placement);
|
|
@@ -684,7 +763,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
684
763
|
platform
|
|
685
764
|
} = config;
|
|
686
765
|
const validMiddleware = middleware.filter(Boolean);
|
|
687
|
-
const rtl = await (platform.isRTL == null ?
|
|
766
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
688
767
|
let rects = await platform.getElementRects({
|
|
689
768
|
reference,
|
|
690
769
|
floating,
|
|
@@ -770,7 +849,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
770
849
|
*/
|
|
771
850
|
async function detectOverflow(state, options) {
|
|
772
851
|
var _await$platform$isEle;
|
|
773
|
-
if (options ===
|
|
852
|
+
if (options === undefined) {
|
|
774
853
|
options = {};
|
|
775
854
|
}
|
|
776
855
|
const {
|
|
@@ -792,7 +871,7 @@ async function detectOverflow(state, options) {
|
|
|
792
871
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
793
872
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
794
873
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
795
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ?
|
|
874
|
+
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))),
|
|
796
875
|
boundary,
|
|
797
876
|
rootBoundary,
|
|
798
877
|
strategy
|
|
@@ -803,8 +882,8 @@ async function detectOverflow(state, options) {
|
|
|
803
882
|
width: rects.floating.width,
|
|
804
883
|
height: rects.floating.height
|
|
805
884
|
} : rects.reference;
|
|
806
|
-
const offsetParent = await (platform.getOffsetParent == null ?
|
|
807
|
-
const offsetScale = (await (platform.isElement == null ?
|
|
885
|
+
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
886
|
+
const offsetScale = (await (platform.isElement == null ? undefined : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? undefined : platform.getScale(offsetParent))) || {
|
|
808
887
|
x: 1,
|
|
809
888
|
y: 1
|
|
810
889
|
} : {
|
|
@@ -841,7 +920,7 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
841
920
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
842
921
|
*/
|
|
843
922
|
const autoPlacement$1 = function (options) {
|
|
844
|
-
if (options ===
|
|
923
|
+
if (options === undefined) {
|
|
845
924
|
options = {};
|
|
846
925
|
}
|
|
847
926
|
return {
|
|
@@ -865,12 +944,12 @@ const autoPlacement$1 = function (options) {
|
|
|
865
944
|
} = evaluate(options, state);
|
|
866
945
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
867
946
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
868
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ?
|
|
947
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
869
948
|
const currentPlacement = placements$1[currentIndex];
|
|
870
949
|
if (currentPlacement == null) {
|
|
871
950
|
return {};
|
|
872
951
|
}
|
|
873
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ?
|
|
952
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
874
953
|
|
|
875
954
|
// Make `computeCoords` start from the right place.
|
|
876
955
|
if (placement !== currentPlacement) {
|
|
@@ -881,7 +960,7 @@ const autoPlacement$1 = function (options) {
|
|
|
881
960
|
};
|
|
882
961
|
}
|
|
883
962
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
884
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ?
|
|
963
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || []), {
|
|
885
964
|
placement: currentPlacement,
|
|
886
965
|
overflows: currentOverflows
|
|
887
966
|
}];
|
|
@@ -911,7 +990,7 @@ const autoPlacement$1 = function (options) {
|
|
|
911
990
|
// Aligned placements should not check their opposite crossAxis
|
|
912
991
|
// side.
|
|
913
992
|
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
914
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ?
|
|
993
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
915
994
|
if (resetPlacement !== placement) {
|
|
916
995
|
return {
|
|
917
996
|
data: {
|
|
@@ -935,7 +1014,7 @@ const autoPlacement$1 = function (options) {
|
|
|
935
1014
|
* @see https://floating-ui.com/docs/flip
|
|
936
1015
|
*/
|
|
937
1016
|
const flip$1 = function (options) {
|
|
938
|
-
if (options ===
|
|
1017
|
+
if (options === undefined) {
|
|
939
1018
|
options = {};
|
|
940
1019
|
}
|
|
941
1020
|
return {
|
|
@@ -971,7 +1050,7 @@ const flip$1 = function (options) {
|
|
|
971
1050
|
const side = getSide(placement);
|
|
972
1051
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
973
1052
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
974
|
-
const rtl = await (platform.isRTL == null ?
|
|
1053
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
975
1054
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
976
1055
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
977
1056
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
@@ -980,7 +1059,7 @@ const flip$1 = function (options) {
|
|
|
980
1059
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
981
1060
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
982
1061
|
const overflows = [];
|
|
983
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ?
|
|
1062
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
984
1063
|
if (checkMainAxis) {
|
|
985
1064
|
overflows.push(overflow[side]);
|
|
986
1065
|
}
|
|
@@ -996,7 +1075,7 @@ const flip$1 = function (options) {
|
|
|
996
1075
|
// One or more sides is overflowing.
|
|
997
1076
|
if (!overflows.every(side => side <= 0)) {
|
|
998
1077
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
999
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ?
|
|
1078
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
1000
1079
|
const nextPlacement = placements[nextIndex];
|
|
1001
1080
|
if (nextPlacement) {
|
|
1002
1081
|
// Try next placement and re-run the lifecycle.
|
|
@@ -1013,7 +1092,7 @@ const flip$1 = function (options) {
|
|
|
1013
1092
|
|
|
1014
1093
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1015
1094
|
// then find the placement that fits the best on the main crossAxis side.
|
|
1016
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ?
|
|
1095
|
+
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;
|
|
1017
1096
|
|
|
1018
1097
|
// Otherwise fallback.
|
|
1019
1098
|
if (!resetPlacement) {
|
|
@@ -1030,7 +1109,7 @@ const flip$1 = function (options) {
|
|
|
1030
1109
|
currentSideAxis === 'y';
|
|
1031
1110
|
}
|
|
1032
1111
|
return true;
|
|
1033
|
-
}).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 ?
|
|
1112
|
+
}).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];
|
|
1034
1113
|
if (placement) {
|
|
1035
1114
|
resetPlacement = placement;
|
|
1036
1115
|
}
|
|
@@ -1063,7 +1142,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1063
1142
|
platform,
|
|
1064
1143
|
elements
|
|
1065
1144
|
} = state;
|
|
1066
|
-
const rtl = await (platform.isRTL == null ?
|
|
1145
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1067
1146
|
const side = getSide(placement);
|
|
1068
1147
|
const alignment = getAlignment(placement);
|
|
1069
1148
|
const isVertical = getSideAxis(placement) === 'y';
|
|
@@ -1105,7 +1184,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1105
1184
|
* @see https://floating-ui.com/docs/offset
|
|
1106
1185
|
*/
|
|
1107
1186
|
const offset$1 = function (options) {
|
|
1108
|
-
if (options ===
|
|
1187
|
+
if (options === undefined) {
|
|
1109
1188
|
options = 0;
|
|
1110
1189
|
}
|
|
1111
1190
|
return {
|
|
@@ -1123,7 +1202,7 @@ const offset$1 = function (options) {
|
|
|
1123
1202
|
|
|
1124
1203
|
// If the placement is the same and the arrow caused an alignment offset
|
|
1125
1204
|
// then we don't need to change the positioning coordinates.
|
|
1126
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ?
|
|
1205
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1127
1206
|
return {};
|
|
1128
1207
|
}
|
|
1129
1208
|
return {
|
|
@@ -1152,11 +1231,11 @@ function getNodeName(node) {
|
|
|
1152
1231
|
}
|
|
1153
1232
|
function getWindow(node) {
|
|
1154
1233
|
var _node$ownerDocument;
|
|
1155
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ?
|
|
1234
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1156
1235
|
}
|
|
1157
1236
|
function getDocumentElement(node) {
|
|
1158
1237
|
var _ref;
|
|
1159
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ?
|
|
1238
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1160
1239
|
}
|
|
1161
1240
|
function isNode(value) {
|
|
1162
1241
|
if (!hasWindow()) {
|
|
@@ -1271,14 +1350,14 @@ function getNearestOverflowAncestor(node) {
|
|
|
1271
1350
|
}
|
|
1272
1351
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1273
1352
|
var _node$ownerDocument2;
|
|
1274
|
-
if (list ===
|
|
1353
|
+
if (list === undefined) {
|
|
1275
1354
|
list = [];
|
|
1276
1355
|
}
|
|
1277
|
-
if (traverseIframes ===
|
|
1356
|
+
if (traverseIframes === undefined) {
|
|
1278
1357
|
traverseIframes = true;
|
|
1279
1358
|
}
|
|
1280
1359
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1281
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ?
|
|
1360
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1282
1361
|
const win = getWindow(scrollableAncestor);
|
|
1283
1362
|
if (isBody) {
|
|
1284
1363
|
const frameElement = getFrameElement(win);
|
|
@@ -1355,7 +1434,7 @@ function getVisualOffsets(element) {
|
|
|
1355
1434
|
};
|
|
1356
1435
|
}
|
|
1357
1436
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1358
|
-
if (isFixed ===
|
|
1437
|
+
if (isFixed === undefined) {
|
|
1359
1438
|
isFixed = false;
|
|
1360
1439
|
}
|
|
1361
1440
|
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
@@ -1365,10 +1444,10 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1365
1444
|
}
|
|
1366
1445
|
|
|
1367
1446
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1368
|
-
if (includeScale ===
|
|
1447
|
+
if (includeScale === undefined) {
|
|
1369
1448
|
includeScale = false;
|
|
1370
1449
|
}
|
|
1371
|
-
if (isFixedStrategy ===
|
|
1450
|
+
if (isFixedStrategy === undefined) {
|
|
1372
1451
|
isFixedStrategy = false;
|
|
1373
1452
|
}
|
|
1374
1453
|
const clientRect = element.getBoundingClientRect();
|
|
@@ -1428,7 +1507,7 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1428
1507
|
}
|
|
1429
1508
|
|
|
1430
1509
|
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1431
|
-
if (ignoreScrollbarX ===
|
|
1510
|
+
if (ignoreScrollbarX === undefined) {
|
|
1432
1511
|
ignoreScrollbarX = false;
|
|
1433
1512
|
}
|
|
1434
1513
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
@@ -1778,10 +1857,10 @@ function observeMove(element, onMove) {
|
|
|
1778
1857
|
io = null;
|
|
1779
1858
|
}
|
|
1780
1859
|
function refresh(skip, threshold) {
|
|
1781
|
-
if (skip ===
|
|
1860
|
+
if (skip === undefined) {
|
|
1782
1861
|
skip = false;
|
|
1783
1862
|
}
|
|
1784
|
-
if (threshold ===
|
|
1863
|
+
if (threshold === undefined) {
|
|
1785
1864
|
threshold = 1;
|
|
1786
1865
|
}
|
|
1787
1866
|
cleanup();
|
|
@@ -1852,7 +1931,7 @@ function observeMove(element, onMove) {
|
|
|
1852
1931
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1853
1932
|
*/
|
|
1854
1933
|
function autoUpdate(reference, floating, update, options) {
|
|
1855
|
-
if (options ===
|
|
1934
|
+
if (options === undefined) {
|
|
1856
1935
|
options = {};
|
|
1857
1936
|
}
|
|
1858
1937
|
const {
|
|
@@ -1979,6 +2058,11 @@ class AuroFloatingUI {
|
|
|
1979
2058
|
this.focusHandler = null;
|
|
1980
2059
|
this.clickHandler = null;
|
|
1981
2060
|
this.keyDownHandler = null;
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* @private
|
|
2064
|
+
*/
|
|
2065
|
+
this.eventPrefix = undefined;
|
|
1982
2066
|
}
|
|
1983
2067
|
|
|
1984
2068
|
/**
|
|
@@ -1995,22 +2079,24 @@ class AuroFloatingUI {
|
|
|
1995
2079
|
*/
|
|
1996
2080
|
mirrorSize(fullscreen) {
|
|
1997
2081
|
// mirror the boxsize from bibSizer
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2082
|
+
if (this.element.bibSizer) {
|
|
2083
|
+
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2084
|
+
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2085
|
+
if (fullscreen) {
|
|
2086
|
+
bibContent.style.width = '';
|
|
2087
|
+
bibContent.style.height = '';
|
|
2088
|
+
bibContent.style.maxWidth = '';
|
|
2089
|
+
bibContent.style.maxHeight = '';
|
|
2090
|
+
} else {
|
|
2091
|
+
if (sizerStyle.width !== '0px') {
|
|
2092
|
+
bibContent.style.width = sizerStyle.width;
|
|
2093
|
+
}
|
|
2094
|
+
if (sizerStyle.height !== '0px') {
|
|
2095
|
+
bibContent.style.height = sizerStyle.height;
|
|
2096
|
+
}
|
|
2097
|
+
bibContent.style.maxWidth = sizerStyle.maxWidth;
|
|
2098
|
+
bibContent.style.maxHeight = sizerStyle.maxHeight;
|
|
2011
2099
|
}
|
|
2012
|
-
bibContent.style.maxWidth = sizerStyle.maxWidth;
|
|
2013
|
-
bibContent.style.maxHeight = sizerStyle.maxHeight;
|
|
2014
2100
|
}
|
|
2015
2101
|
}
|
|
2016
2102
|
|
|
@@ -2061,7 +2147,7 @@ class AuroFloatingUI {
|
|
|
2061
2147
|
// Compute the position of the bib
|
|
2062
2148
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2063
2149
|
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2064
|
-
middleware: middleware
|
|
2150
|
+
middleware: middleware
|
|
2065
2151
|
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2066
2152
|
Object.assign(this.element.bib.style, {
|
|
2067
2153
|
left: `${x}px`,
|
|
@@ -2217,7 +2303,7 @@ class AuroFloatingUI {
|
|
|
2217
2303
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
2218
2304
|
*/
|
|
2219
2305
|
dispatchEventDropdownToggle() {
|
|
2220
|
-
const event = new CustomEvent(
|
|
2306
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
2221
2307
|
detail: {
|
|
2222
2308
|
expanded: this.isPopoverVisible,
|
|
2223
2309
|
},
|
|
@@ -2234,7 +2320,7 @@ class AuroFloatingUI {
|
|
|
2234
2320
|
this.showBib();
|
|
2235
2321
|
}
|
|
2236
2322
|
|
|
2237
|
-
const event = new CustomEvent(
|
|
2323
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-triggerClick` : "triggerClick", {
|
|
2238
2324
|
composed: true,
|
|
2239
2325
|
details: {
|
|
2240
2326
|
expanded: this.element.isPopoverVisible
|
|
@@ -2278,6 +2364,9 @@ class AuroFloatingUI {
|
|
|
2278
2364
|
this.handleFocusLoss();
|
|
2279
2365
|
break;
|
|
2280
2366
|
case 'click':
|
|
2367
|
+
if (document.activeElement === document.body) {
|
|
2368
|
+
event.currentTarget.focus();
|
|
2369
|
+
}
|
|
2281
2370
|
this.handleClick();
|
|
2282
2371
|
break;
|
|
2283
2372
|
// Do nothing
|
|
@@ -2315,7 +2404,8 @@ class AuroFloatingUI {
|
|
|
2315
2404
|
});
|
|
2316
2405
|
}
|
|
2317
2406
|
|
|
2318
|
-
configure(elem) {
|
|
2407
|
+
configure(elem, eventPrefix) {
|
|
2408
|
+
this.eventPrefix = eventPrefix;
|
|
2319
2409
|
this.element = elem;
|
|
2320
2410
|
this.element.trigger = this.element.shadowRoot.querySelector('#trigger');
|
|
2321
2411
|
this.element.bib = this.element.shadowRoot.querySelector('#bib');
|
|
@@ -2401,7 +2491,7 @@ const t$4={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
|
2401
2491
|
* @license
|
|
2402
2492
|
* Copyright 2018 Google LLC
|
|
2403
2493
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2404
|
-
*/const e$5=e$1$1(class extends i$6{constructor(t$1){if(super(t$1),t$1.type!==t$4.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(
|
|
2494
|
+
*/const e$5=e$1$1(class extends i$6{constructor(t$1){if(super(t$1),t$1.type!==t$4.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}});
|
|
2405
2495
|
|
|
2406
2496
|
/**
|
|
2407
2497
|
* @license
|
|
@@ -2475,7 +2565,7 @@ const cacheFetch$1 = (uri, options = {}) => {
|
|
|
2475
2565
|
return _fetchMap$1.get(uri);
|
|
2476
2566
|
};
|
|
2477
2567
|
|
|
2478
|
-
var styleCss$2$1 = i$3$1`*,*: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}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.labelContainer{line-height:1.8}`;
|
|
2568
|
+
var styleCss$2$1 = i$3$1`*,*: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}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
|
|
2479
2569
|
|
|
2480
2570
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2481
2571
|
// See LICENSE in the project root for license information.
|
|
@@ -2742,7 +2832,8 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
2742
2832
|
};
|
|
2743
2833
|
|
|
2744
2834
|
const classes = {
|
|
2745
|
-
'label': this.label
|
|
2835
|
+
'label': this.label,
|
|
2836
|
+
'wrapper': true,
|
|
2746
2837
|
};
|
|
2747
2838
|
|
|
2748
2839
|
return x$1`
|
|
@@ -2766,15 +2857,15 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
2766
2857
|
}
|
|
2767
2858
|
};
|
|
2768
2859
|
|
|
2769
|
-
var iconVersion$1 = '6.1.
|
|
2860
|
+
var iconVersion$1 = '6.1.2';
|
|
2770
2861
|
|
|
2771
|
-
var styleCss$1$1 = 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;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)}`;
|
|
2862
|
+
var styleCss$1$1 = 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)}`;
|
|
2772
2863
|
|
|
2773
|
-
var colorCss$1$1 = 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);
|
|
2864
|
+
var colorCss$1$1 = 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)}`;
|
|
2774
2865
|
|
|
2775
2866
|
var tokensCss$4 = i$3$1`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
2776
2867
|
|
|
2777
|
-
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common]
|
|
2868
|
+
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
2778
2869
|
|
|
2779
2870
|
var colorCss$4 = i$3$1`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2780
2871
|
|
|
@@ -2792,9 +2883,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2792
2883
|
];
|
|
2793
2884
|
|
|
2794
2885
|
/**
|
|
2795
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
2796
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
2797
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
2798
2886
|
* @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.
|
|
2799
2887
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2800
2888
|
*/
|
|
@@ -2820,14 +2908,26 @@ class AuroDropdownBib extends r$5 {
|
|
|
2820
2908
|
|
|
2821
2909
|
static get properties() {
|
|
2822
2910
|
return {
|
|
2911
|
+
|
|
2912
|
+
/**
|
|
2913
|
+
* If declared, will apply all styles for the common theme.
|
|
2914
|
+
*/
|
|
2823
2915
|
common: {
|
|
2824
2916
|
type: Boolean,
|
|
2825
2917
|
reflect: true
|
|
2826
2918
|
},
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* If declared, will apply extra padding to bib content.
|
|
2922
|
+
*/
|
|
2827
2923
|
inset: {
|
|
2828
2924
|
type: Boolean,
|
|
2829
2925
|
reflect: true
|
|
2830
2926
|
},
|
|
2927
|
+
|
|
2928
|
+
/**
|
|
2929
|
+
* If declared, will apply border-radius to the bib.
|
|
2930
|
+
*/
|
|
2831
2931
|
rounded: {
|
|
2832
2932
|
type: Boolean,
|
|
2833
2933
|
reflect: true
|
|
@@ -2871,22 +2971,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2871
2971
|
|
|
2872
2972
|
|
|
2873
2973
|
/**
|
|
2874
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
2875
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
2876
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
2877
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
2878
2974
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
2879
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2880
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
2881
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
2882
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
2883
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
2884
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
2885
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
2886
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
2887
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
2888
|
-
* @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.
|
|
2889
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
2890
2975
|
* @slot - Default slot for the popover content.
|
|
2891
2976
|
* @slot label - Defines the content of the label.
|
|
2892
2977
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -2924,6 +3009,16 @@ class AuroDropdown extends r$5 {
|
|
|
2924
3009
|
this.tabIndex = 0;
|
|
2925
3010
|
this.noToggle = false;
|
|
2926
3011
|
|
|
3012
|
+
/**
|
|
3013
|
+
* @private
|
|
3014
|
+
*/
|
|
3015
|
+
this.hasTriggerContent = false;
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* @private
|
|
3019
|
+
*/
|
|
3020
|
+
this.triggerContentSlot = undefined;
|
|
3021
|
+
|
|
2927
3022
|
/**
|
|
2928
3023
|
* @private
|
|
2929
3024
|
*/
|
|
@@ -2970,89 +3065,166 @@ class AuroDropdown extends r$5 {
|
|
|
2970
3065
|
// function to define props used within the scope of this component
|
|
2971
3066
|
static get properties() {
|
|
2972
3067
|
return {
|
|
3068
|
+
|
|
3069
|
+
/**
|
|
3070
|
+
* If declared, applies a border around the trigger slot.
|
|
3071
|
+
*/
|
|
2973
3072
|
bordered: {
|
|
2974
3073
|
type: Boolean,
|
|
2975
3074
|
reflect: true
|
|
2976
3075
|
},
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3079
|
+
* @attr {Boolean} chevron
|
|
3080
|
+
*/
|
|
2977
3081
|
chevron: {
|
|
2978
3082
|
type: Boolean,
|
|
2979
3083
|
reflect: true
|
|
2980
3084
|
},
|
|
2981
|
-
|
|
3085
|
+
|
|
3086
|
+
/**
|
|
3087
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3088
|
+
*/
|
|
3089
|
+
common: {
|
|
2982
3090
|
type: Boolean,
|
|
2983
3091
|
reflect: true
|
|
2984
3092
|
},
|
|
2985
|
-
|
|
3093
|
+
|
|
3094
|
+
/**
|
|
3095
|
+
* If declared, the dropdown is not interactive.
|
|
3096
|
+
*/
|
|
3097
|
+
disabled: {
|
|
2986
3098
|
type: Boolean,
|
|
2987
3099
|
reflect: true
|
|
2988
3100
|
},
|
|
2989
|
-
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* @private
|
|
3104
|
+
*/
|
|
3105
|
+
dropdownWidth: {
|
|
3106
|
+
type: Number
|
|
3107
|
+
},
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3111
|
+
*/
|
|
3112
|
+
error: {
|
|
2990
3113
|
type: Boolean,
|
|
2991
|
-
reflect: true
|
|
3114
|
+
reflect: true
|
|
2992
3115
|
},
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3119
|
+
*/
|
|
2993
3120
|
focusShow: {
|
|
2994
3121
|
type: Boolean,
|
|
2995
3122
|
reflect: true
|
|
2996
3123
|
},
|
|
2997
|
-
|
|
3124
|
+
|
|
3125
|
+
/**
|
|
3126
|
+
* Makes the trigger to be full width of its parent container.
|
|
3127
|
+
*/
|
|
3128
|
+
fluid: {
|
|
2998
3129
|
type: Boolean,
|
|
2999
3130
|
reflect: true
|
|
3000
3131
|
},
|
|
3132
|
+
|
|
3133
|
+
/**
|
|
3134
|
+
* If declared, will apply padding around trigger slot content.
|
|
3135
|
+
*/
|
|
3001
3136
|
inset: {
|
|
3002
3137
|
type: Boolean,
|
|
3003
3138
|
reflect: true
|
|
3004
3139
|
},
|
|
3005
|
-
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* If true, the dropdown bib is displayed.
|
|
3143
|
+
*/
|
|
3144
|
+
isPopoverVisible: {
|
|
3145
|
+
type: Boolean
|
|
3146
|
+
},
|
|
3147
|
+
|
|
3148
|
+
/**
|
|
3149
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3150
|
+
*/
|
|
3151
|
+
hoverToggle: {
|
|
3006
3152
|
type: Boolean,
|
|
3007
3153
|
reflect: true
|
|
3008
3154
|
},
|
|
3009
|
-
|
|
3010
|
-
|
|
3155
|
+
|
|
3156
|
+
/**
|
|
3157
|
+
* @private
|
|
3158
|
+
*/
|
|
3159
|
+
hasTriggerContent: {
|
|
3160
|
+
type: Boolean
|
|
3161
|
+
},
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* 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.
|
|
3165
|
+
*/
|
|
3166
|
+
mobileFullscreenBreakpoint: {
|
|
3167
|
+
type: String,
|
|
3011
3168
|
reflect: true
|
|
3012
3169
|
},
|
|
3013
|
-
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3173
|
+
*/
|
|
3174
|
+
matchWidth: {
|
|
3014
3175
|
type: Boolean,
|
|
3015
3176
|
reflect: true
|
|
3016
3177
|
},
|
|
3017
|
-
|
|
3178
|
+
|
|
3179
|
+
/**
|
|
3180
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3181
|
+
*/
|
|
3182
|
+
noHideOnThisFocusLoss: {
|
|
3018
3183
|
type: Boolean,
|
|
3019
3184
|
reflect: true
|
|
3020
3185
|
},
|
|
3021
|
-
|
|
3186
|
+
|
|
3187
|
+
/**
|
|
3188
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3189
|
+
*/
|
|
3190
|
+
noToggle: {
|
|
3022
3191
|
type: Boolean,
|
|
3023
3192
|
reflect: true
|
|
3024
3193
|
},
|
|
3025
|
-
|
|
3194
|
+
|
|
3026
3195
|
onSlotChange: {
|
|
3027
3196
|
type: Function,
|
|
3028
3197
|
reflect: false
|
|
3029
3198
|
},
|
|
3030
|
-
mobileFullscreenBreakpoint: {
|
|
3031
|
-
type: String,
|
|
3032
|
-
reflect: true,
|
|
3033
|
-
},
|
|
3034
3199
|
|
|
3035
3200
|
/**
|
|
3036
3201
|
* @private
|
|
3037
3202
|
*/
|
|
3038
|
-
|
|
3203
|
+
placement: {
|
|
3204
|
+
type: String
|
|
3205
|
+
},
|
|
3039
3206
|
|
|
3040
3207
|
/**
|
|
3041
|
-
*
|
|
3208
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3042
3209
|
*/
|
|
3043
|
-
|
|
3210
|
+
rounded: {
|
|
3211
|
+
type: Boolean,
|
|
3212
|
+
reflect: true
|
|
3213
|
+
},
|
|
3044
3214
|
|
|
3045
3215
|
/**
|
|
3046
3216
|
* @private
|
|
3047
3217
|
*/
|
|
3048
|
-
tabIndex: {
|
|
3218
|
+
tabIndex: {
|
|
3219
|
+
type: Number
|
|
3220
|
+
}
|
|
3049
3221
|
};
|
|
3050
3222
|
}
|
|
3051
3223
|
|
|
3052
3224
|
static get styles() {
|
|
3053
3225
|
return [
|
|
3054
|
-
styleCss$1$1,
|
|
3055
3226
|
colorCss$1$1,
|
|
3227
|
+
styleCss$1$1,
|
|
3056
3228
|
tokensCss$4
|
|
3057
3229
|
];
|
|
3058
3230
|
}
|
|
@@ -3083,10 +3255,16 @@ class AuroDropdown extends r$5 {
|
|
|
3083
3255
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3084
3256
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3085
3257
|
}
|
|
3258
|
+
|
|
3259
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3260
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3261
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3262
|
+
this.handleTriggerContentSlotChange();
|
|
3263
|
+
}
|
|
3086
3264
|
}
|
|
3087
3265
|
|
|
3088
3266
|
firstUpdated() {
|
|
3089
|
-
this.floater.configure(this);
|
|
3267
|
+
this.floater.configure(this, 'auroDropdown');
|
|
3090
3268
|
this.bibContent = this.floater.element.bib;
|
|
3091
3269
|
|
|
3092
3270
|
// Add the tag name as an attribute if it is different than the component name
|
|
@@ -3125,6 +3303,43 @@ class AuroDropdown extends r$5 {
|
|
|
3125
3303
|
return inCustomSlot;
|
|
3126
3304
|
}
|
|
3127
3305
|
|
|
3306
|
+
/**
|
|
3307
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3308
|
+
*
|
|
3309
|
+
* It first updates the floater settings
|
|
3310
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3311
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3312
|
+
*
|
|
3313
|
+
* @private
|
|
3314
|
+
* @method handleTriggerContentSlotChange
|
|
3315
|
+
* @param {Event} event - native slotchange event
|
|
3316
|
+
* @returns {void}
|
|
3317
|
+
*/
|
|
3318
|
+
handleTriggerContentSlotChange(event) {
|
|
3319
|
+
this.floater.handleTriggerTabIndex();
|
|
3320
|
+
|
|
3321
|
+
if (event) {
|
|
3322
|
+
this.triggerNode = event.target;
|
|
3323
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
if (this.triggerContentSlot) {
|
|
3327
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3328
|
+
if (slot.textContent.trim()) {
|
|
3329
|
+
return true;
|
|
3330
|
+
}
|
|
3331
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3332
|
+
if (!slotInSlot) {
|
|
3333
|
+
return false;
|
|
3334
|
+
}
|
|
3335
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3336
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3337
|
+
});
|
|
3338
|
+
} else {
|
|
3339
|
+
this.hasTriggerContent = false;
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3128
3343
|
/**
|
|
3129
3344
|
* Handles the default slot change event and updates the content.
|
|
3130
3345
|
*
|
|
@@ -3159,13 +3374,13 @@ class AuroDropdown extends r$5 {
|
|
|
3159
3374
|
tabindex="${this.tabIndex}"
|
|
3160
3375
|
>
|
|
3161
3376
|
<div class="triggerContentWrapper">
|
|
3162
|
-
<label class="label" id="triggerLabel">
|
|
3377
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3163
3378
|
<slot name="label"></slot>
|
|
3164
3379
|
</label>
|
|
3165
3380
|
<div class="triggerContent">
|
|
3166
3381
|
<slot
|
|
3167
3382
|
name="trigger"
|
|
3168
|
-
@slotchange="${() =>
|
|
3383
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
3169
3384
|
</div>
|
|
3170
3385
|
</div>
|
|
3171
3386
|
${this.chevron || this.common ? u$1$1`
|
|
@@ -3212,14 +3427,14 @@ var dropdownVersion = '3.0.0';
|
|
|
3212
3427
|
* Copyright 2017 Google LLC
|
|
3213
3428
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3214
3429
|
*/
|
|
3215
|
-
const t$3=globalThis,i$5=t$3.trustedTypes,s$3=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):
|
|
3430
|
+
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};
|
|
3216
3431
|
|
|
3217
3432
|
/**
|
|
3218
3433
|
* @license
|
|
3219
3434
|
* Copyright 2020 Google LLC
|
|
3220
3435
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3221
3436
|
*/
|
|
3222
|
-
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(
|
|
3437
|
+
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);
|
|
3223
3438
|
|
|
3224
3439
|
/**
|
|
3225
3440
|
* @license
|
|
@@ -3232,20 +3447,20 @@ const t$2={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
|
3232
3447
|
* @license
|
|
3233
3448
|
* Copyright 2020 Google LLC
|
|
3234
3449
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3235
|
-
*/const {I:t$1}=Z,s$1=()=>document.createComment(""),r$3=(o,i,n)=>{const e=o._$AA.parentNode,l=
|
|
3450
|
+
*/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;}};
|
|
3236
3451
|
|
|
3237
3452
|
/**
|
|
3238
3453
|
* @license
|
|
3239
3454
|
* Copyright 2017 Google LLC
|
|
3240
3455
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3241
3456
|
*/
|
|
3242
|
-
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;
|
|
3457
|
+
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}});
|
|
3243
3458
|
|
|
3244
3459
|
/**
|
|
3245
3460
|
* @license
|
|
3246
3461
|
* Copyright 2018 Google LLC
|
|
3247
3462
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3248
|
-
*/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(
|
|
3463
|
+
*/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}});
|
|
3249
3464
|
|
|
3250
3465
|
/**
|
|
3251
3466
|
* @license
|
|
@@ -3361,21 +3576,21 @@ function stopNotifyingOnLangChange(element) {
|
|
|
3361
3576
|
* Copyright 2019 Google LLC
|
|
3362
3577
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3363
3578
|
*/
|
|
3364
|
-
const t=globalThis,e$1=t.ShadowRoot&&(
|
|
3579
|
+
const t=globalThis,e$1=t.ShadowRoot&&(undefined===t.ShadyCSS||t.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&&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)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$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;
|
|
3365
3580
|
|
|
3366
3581
|
/**
|
|
3367
3582
|
* @license
|
|
3368
3583
|
* Copyright 2017 Google LLC
|
|
3369
3584
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3370
|
-
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o,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
|
|
3585
|
+
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o,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(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(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");
|
|
3371
3586
|
|
|
3372
3587
|
/**
|
|
3373
3588
|
* @license
|
|
3374
3589
|
* Copyright 2017 Google LLC
|
|
3375
3590
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3376
|
-
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
3591
|
+
*/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=globalThis.litElementPolyfillSupport;i?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3377
3592
|
|
|
3378
|
-
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.
|
|
3593
|
+
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.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)}`;
|
|
3379
3594
|
|
|
3380
3595
|
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)}`;
|
|
3381
3596
|
|
|
@@ -5018,25 +5233,111 @@ class AuroFormValidation {
|
|
|
5018
5233
|
}
|
|
5019
5234
|
|
|
5020
5235
|
/**
|
|
5021
|
-
*
|
|
5236
|
+
* Resets the element to its initial state.
|
|
5022
5237
|
* @private
|
|
5023
|
-
* @param {object} elem - HTML element to
|
|
5238
|
+
* @param {object} elem - HTML element to reset.
|
|
5024
5239
|
* @returns {void}
|
|
5025
5240
|
*/
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5241
|
+
reset(elem) {
|
|
5242
|
+
elem.validity = undefined;
|
|
5243
|
+
elem.value = undefined;
|
|
5029
5244
|
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5245
|
+
// Resets the second value of the datepicker in range state
|
|
5246
|
+
if (elem.valueEnd) {
|
|
5247
|
+
elem.valueEnd = undefined;
|
|
5248
|
+
}
|
|
5249
|
+
|
|
5250
|
+
// Resets selected option of element
|
|
5251
|
+
if (elem.optionSelected) {
|
|
5252
|
+
elem.optionSelected = undefined;
|
|
5253
|
+
}
|
|
5254
|
+
|
|
5255
|
+
// Runs validation to handle error attribute
|
|
5256
|
+
this.validate(elem);
|
|
5257
|
+
}
|
|
5258
|
+
|
|
5259
|
+
/**
|
|
5260
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
5261
|
+
*
|
|
5262
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
5263
|
+
* @returns {void}
|
|
5264
|
+
*
|
|
5265
|
+
* @example
|
|
5266
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
5267
|
+
* validateElementAttributes(inputElement);
|
|
5268
|
+
*
|
|
5269
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
5270
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
5271
|
+
*
|
|
5272
|
+
* Validation rules:
|
|
5273
|
+
* - input:
|
|
5274
|
+
* - length:
|
|
5275
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
5276
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
5277
|
+
* - pattern:
|
|
5278
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
5279
|
+
* - counter:
|
|
5280
|
+
* - range:
|
|
5281
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
5282
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
5283
|
+
*/
|
|
5284
|
+
validateElementAttributes(elem) {
|
|
5285
|
+
const validationRules = {
|
|
5286
|
+
input: {
|
|
5287
|
+
length: [
|
|
5288
|
+
{
|
|
5289
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
5290
|
+
validity: 'tooShort',
|
|
5291
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
5295
|
+
validity: 'tooLong',
|
|
5296
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
5297
|
+
}
|
|
5298
|
+
],
|
|
5299
|
+
pattern: [
|
|
5300
|
+
{
|
|
5301
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
5302
|
+
validity: 'patternMismatch',
|
|
5303
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
5304
|
+
}
|
|
5305
|
+
]
|
|
5306
|
+
},
|
|
5307
|
+
counter: {
|
|
5308
|
+
range: [
|
|
5309
|
+
{
|
|
5310
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
5311
|
+
validity: 'rangeOverflow',
|
|
5312
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
5313
|
+
},
|
|
5314
|
+
{
|
|
5315
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
5316
|
+
validity: 'rangeUnderflow',
|
|
5317
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
5318
|
+
}
|
|
5319
|
+
]
|
|
5320
|
+
}
|
|
5321
|
+
};
|
|
5322
|
+
|
|
5323
|
+
let elementType;
|
|
5324
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5325
|
+
elementType = 'input';
|
|
5326
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
5327
|
+
elementType = 'counter';
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
if (elementType) {
|
|
5331
|
+
const rules = validationRules[elementType];
|
|
5332
|
+
|
|
5333
|
+
if (rules) {
|
|
5334
|
+
Object.values(rules).flat().forEach(rule => {
|
|
5335
|
+
if (rule.check(elem)) {
|
|
5336
|
+
elem.validity = rule.validity;
|
|
5337
|
+
elem.errorMessage = rule.message(elem);
|
|
5338
|
+
}
|
|
5339
|
+
});
|
|
5033
5340
|
}
|
|
5034
|
-
} else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
|
|
5035
|
-
elem.validity = 'tooShort';
|
|
5036
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
5037
|
-
} else if (elem.value && elem.value.length > elem.maxLength) {
|
|
5038
|
-
elem.validity = 'tooLong';
|
|
5039
|
-
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
5040
5341
|
}
|
|
5041
5342
|
}
|
|
5042
5343
|
|
|
@@ -5052,33 +5353,32 @@ class AuroFormValidation {
|
|
|
5052
5353
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
5053
5354
|
|
|
5054
5355
|
if (!elem.value.match(emailRegex)) {
|
|
5055
|
-
elem.validity = '
|
|
5056
|
-
elem.
|
|
5356
|
+
elem.validity = 'patternMismatch';
|
|
5357
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5057
5358
|
}
|
|
5058
5359
|
} else if (elem.type === 'credit-card') {
|
|
5059
5360
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
5060
5361
|
elem.validity = 'tooShort';
|
|
5061
|
-
elem.
|
|
5362
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5062
5363
|
}
|
|
5063
|
-
} else if (elem.type === 'number'
|
|
5364
|
+
} else if (elem.type === 'number') {
|
|
5064
5365
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
5065
5366
|
elem.validity = 'rangeOverflow';
|
|
5066
|
-
elem.
|
|
5367
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
5067
5368
|
}
|
|
5068
5369
|
|
|
5069
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
5370
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
5070
5371
|
elem.validity = 'rangeUnderflow';
|
|
5071
|
-
elem.
|
|
5372
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
5072
5373
|
}
|
|
5073
|
-
|
|
5074
5374
|
} else if (elem.type === 'month-day-year' ||
|
|
5075
5375
|
elem.type === 'month-year' ||
|
|
5076
5376
|
elem.type === 'month-fullYear' ||
|
|
5077
5377
|
elem.type === 'year-month-day'
|
|
5078
5378
|
) {
|
|
5079
|
-
if (elem.value
|
|
5379
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
5080
5380
|
elem.validity = 'tooShort';
|
|
5081
|
-
elem.
|
|
5381
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
5082
5382
|
} else {
|
|
5083
5383
|
const valueDate = new Date(elem.value);
|
|
5084
5384
|
|
|
@@ -5088,7 +5388,7 @@ class AuroFormValidation {
|
|
|
5088
5388
|
|
|
5089
5389
|
if (valueDate > maxDate) {
|
|
5090
5390
|
elem.validity = 'rangeOverflow';
|
|
5091
|
-
elem.
|
|
5391
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
5092
5392
|
}
|
|
5093
5393
|
}
|
|
5094
5394
|
|
|
@@ -5098,7 +5398,7 @@ class AuroFormValidation {
|
|
|
5098
5398
|
|
|
5099
5399
|
if (valueDate < minDate) {
|
|
5100
5400
|
elem.validity = 'rangeUnderflow';
|
|
5101
|
-
elem.
|
|
5401
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
5102
5402
|
}
|
|
5103
5403
|
}
|
|
5104
5404
|
}
|
|
@@ -5121,10 +5421,10 @@ class AuroFormValidation {
|
|
|
5121
5421
|
|
|
5122
5422
|
if (elem.hasAttribute('error')) {
|
|
5123
5423
|
elem.validity = 'customError';
|
|
5124
|
-
elem.
|
|
5424
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
5125
5425
|
} else if (validationShouldRun) {
|
|
5126
5426
|
elem.validity = 'valid';
|
|
5127
|
-
elem.
|
|
5427
|
+
elem.errorMessage = '';
|
|
5128
5428
|
|
|
5129
5429
|
/**
|
|
5130
5430
|
* Only validate once we interact with the datepicker
|
|
@@ -5136,7 +5436,7 @@ class AuroFormValidation {
|
|
|
5136
5436
|
let hasValue = elem.value && elem.value.length > 0;
|
|
5137
5437
|
|
|
5138
5438
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
5139
|
-
if (this.auroInputElements
|
|
5439
|
+
if (this.auroInputElements?.length === 2) {
|
|
5140
5440
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
5141
5441
|
hasValue = false;
|
|
5142
5442
|
}
|
|
@@ -5144,35 +5444,29 @@ class AuroFormValidation {
|
|
|
5144
5444
|
|
|
5145
5445
|
if (!hasValue && elem.required) {
|
|
5146
5446
|
elem.validity = 'valueMissing';
|
|
5147
|
-
elem.
|
|
5447
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
5148
5448
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5149
5449
|
this.validateType(elem);
|
|
5150
|
-
this.
|
|
5450
|
+
this.validateElementAttributes(elem);
|
|
5451
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
5452
|
+
this.validateElementAttributes(elem);
|
|
5151
5453
|
}
|
|
5152
5454
|
}
|
|
5153
5455
|
|
|
5154
|
-
if (this.auroInputElements
|
|
5456
|
+
if (this.auroInputElements?.length > 0) {
|
|
5155
5457
|
elem.validity = this.auroInputElements[0].validity;
|
|
5156
|
-
elem.
|
|
5458
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
5157
5459
|
|
|
5158
|
-
if (elem.validity === 'valid') {
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
5162
|
-
}
|
|
5460
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
5461
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
5462
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
5163
5463
|
}
|
|
5164
5464
|
}
|
|
5165
5465
|
|
|
5166
5466
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
// Use the validity message override if it is declared
|
|
5171
|
-
if (elem.ValidityMessageOverride) {
|
|
5172
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
5173
|
-
}
|
|
5174
|
-
} else {
|
|
5175
|
-
elem.isValid = true;
|
|
5467
|
+
// Use the validity message override if it is declared
|
|
5468
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
5469
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
5176
5470
|
}
|
|
5177
5471
|
|
|
5178
5472
|
this.getErrorMessage(elem);
|
|
@@ -5218,18 +5512,18 @@ class AuroFormValidation {
|
|
|
5218
5512
|
if (elem.validity !== 'valid') {
|
|
5219
5513
|
if (elem.setCustomValidity) {
|
|
5220
5514
|
elem.errorMessage = elem.setCustomValidity;
|
|
5221
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
5515
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
5222
5516
|
const input = elem.renderRoot.querySelector('input');
|
|
5223
5517
|
|
|
5224
5518
|
if (input.validationMessage.length > 0) {
|
|
5225
5519
|
elem.errorMessage = input.validationMessage;
|
|
5226
5520
|
}
|
|
5227
|
-
} else if (this.inputElements &&
|
|
5521
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
5228
5522
|
const firstInput = this.inputElements[0];
|
|
5229
5523
|
|
|
5230
5524
|
if (firstInput.validationMessage.length > 0) {
|
|
5231
5525
|
elem.errorMessage = firstInput.validationMessage;
|
|
5232
|
-
} else if (this.inputElements
|
|
5526
|
+
} else if (this.inputElements?.length === 2) {
|
|
5233
5527
|
const secondInput = this.inputElements[1];
|
|
5234
5528
|
|
|
5235
5529
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -5250,45 +5544,8 @@ class AuroFormValidation {
|
|
|
5250
5544
|
/**
|
|
5251
5545
|
* Auro-input provides users a way to enter data into a text field.
|
|
5252
5546
|
*
|
|
5253
|
-
* @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
|
|
5254
|
-
* @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]
|
|
5255
|
-
* @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
5256
|
-
* @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
|
|
5257
5547
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
5258
5548
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
5259
|
-
* @attr {Boolean} disabled - If set, disables the input.
|
|
5260
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
5261
|
-
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
5262
|
-
* @attr {String} helpText - Deprecated, see `slot`.
|
|
5263
|
-
* @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.
|
|
5264
|
-
* @attr {String} id - Sets the unique ID of the element.
|
|
5265
|
-
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
|
|
5266
|
-
* @attr {String} label - Deprecated, see `slot`.
|
|
5267
|
-
* @attr {String} lang - defines the language of an element.
|
|
5268
|
-
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
|
|
5269
|
-
* @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.
|
|
5270
|
-
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
|
|
5271
|
-
* @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`.
|
|
5272
|
-
* @attr {String} name - Populates the `name` attribute on the input.
|
|
5273
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
5274
|
-
* @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
|
|
5275
|
-
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
5276
|
-
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
5277
|
-
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
5278
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
5279
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
5280
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
5281
|
-
* @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
|
|
5282
|
-
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
5283
|
-
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
5284
|
-
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
5285
|
-
* @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
|
|
5286
|
-
* @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
|
|
5287
|
-
* @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`.
|
|
5288
|
-
* @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`.
|
|
5289
|
-
* @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
|
|
5290
|
-
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
5291
|
-
* @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5292
5549
|
*
|
|
5293
5550
|
* @slot helptext - Sets the help text displayed below the input.
|
|
5294
5551
|
* @slot label - Sets the label text for the input.
|
|
@@ -5307,8 +5564,6 @@ class BaseInput extends r {
|
|
|
5307
5564
|
constructor() {
|
|
5308
5565
|
super();
|
|
5309
5566
|
|
|
5310
|
-
this.isValid = false;
|
|
5311
|
-
|
|
5312
5567
|
this.icon = false;
|
|
5313
5568
|
this.disabled = false;
|
|
5314
5569
|
this.required = false;
|
|
@@ -5317,9 +5572,7 @@ class BaseInput extends r {
|
|
|
5317
5572
|
this.min = undefined;
|
|
5318
5573
|
this.maxLength = undefined;
|
|
5319
5574
|
this.minLength = undefined;
|
|
5320
|
-
this.label = 'Input label is undefined';
|
|
5321
5575
|
this.activeLabel = false;
|
|
5322
|
-
|
|
5323
5576
|
this.setCustomValidityForType = undefined;
|
|
5324
5577
|
}
|
|
5325
5578
|
|
|
@@ -5334,9 +5587,11 @@ class BaseInput extends r {
|
|
|
5334
5587
|
this.showPassword = false;
|
|
5335
5588
|
this.validationCCLength = undefined;
|
|
5336
5589
|
this.hasValue = false;
|
|
5590
|
+
this.label = 'Input label is undefined';
|
|
5337
5591
|
|
|
5338
5592
|
this.allowedInputTypes = [
|
|
5339
5593
|
"text",
|
|
5594
|
+
"number",
|
|
5340
5595
|
"email",
|
|
5341
5596
|
"password",
|
|
5342
5597
|
"credit-card",
|
|
@@ -5382,77 +5637,272 @@ class BaseInput extends r {
|
|
|
5382
5637
|
.substring(idSubstrStart, idSubstrEnd);
|
|
5383
5638
|
}
|
|
5384
5639
|
|
|
5385
|
-
// function to define props used within the scope of this
|
|
5640
|
+
// function to define props used within the scope of this componentstatic
|
|
5386
5641
|
static get properties() {
|
|
5387
5642
|
return {
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
lang: { type: String },
|
|
5395
|
-
pattern: {
|
|
5396
|
-
type: String,
|
|
5643
|
+
|
|
5644
|
+
/**
|
|
5645
|
+
* If set, the label will remain fixed in the active position.
|
|
5646
|
+
*/
|
|
5647
|
+
activeLabel: {
|
|
5648
|
+
type: Boolean,
|
|
5397
5649
|
reflect: true
|
|
5398
5650
|
},
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5651
|
+
|
|
5652
|
+
/**
|
|
5653
|
+
* 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]
|
|
5654
|
+
*/
|
|
5655
|
+
autocapitalize: {
|
|
5656
|
+
type: String
|
|
5657
|
+
},
|
|
5658
|
+
|
|
5659
|
+
/**
|
|
5660
|
+
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
5661
|
+
*/
|
|
5662
|
+
autocomplete: {
|
|
5408
5663
|
type: String,
|
|
5409
5664
|
reflect: true
|
|
5410
5665
|
},
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5666
|
+
|
|
5667
|
+
/**
|
|
5668
|
+
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5669
|
+
*/
|
|
5670
|
+
autocorrect: {
|
|
5671
|
+
type: String
|
|
5415
5672
|
},
|
|
5416
|
-
max: { type: String },
|
|
5417
|
-
min: { type: String },
|
|
5418
|
-
maxLength: { type: Number },
|
|
5419
|
-
minLength: { type: Number },
|
|
5420
5673
|
|
|
5421
5674
|
/**
|
|
5422
|
-
*
|
|
5675
|
+
* If set, disables the input.
|
|
5423
5676
|
*/
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5677
|
+
disabled: {
|
|
5678
|
+
type: Boolean
|
|
5679
|
+
},
|
|
5680
|
+
|
|
5681
|
+
error: {
|
|
5428
5682
|
type: String,
|
|
5429
5683
|
reflect: true
|
|
5430
5684
|
},
|
|
5431
|
-
|
|
5432
|
-
|
|
5685
|
+
|
|
5686
|
+
/**
|
|
5687
|
+
* Contains the help text message for the current validity error.
|
|
5688
|
+
*/
|
|
5689
|
+
errorMessage: {
|
|
5690
|
+
type: String
|
|
5691
|
+
},
|
|
5692
|
+
|
|
5693
|
+
/**
|
|
5694
|
+
* 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.
|
|
5695
|
+
*/
|
|
5696
|
+
icon: {
|
|
5697
|
+
type: Boolean
|
|
5698
|
+
},
|
|
5699
|
+
|
|
5700
|
+
/**
|
|
5701
|
+
* Sets the unique ID of the element.
|
|
5702
|
+
*/
|
|
5703
|
+
id: {
|
|
5704
|
+
type: String
|
|
5705
|
+
},
|
|
5706
|
+
|
|
5707
|
+
/**
|
|
5708
|
+
* Defines the language of an element.
|
|
5709
|
+
*/
|
|
5710
|
+
lang: {
|
|
5711
|
+
type: String
|
|
5712
|
+
},
|
|
5713
|
+
|
|
5714
|
+
/**
|
|
5715
|
+
* The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5716
|
+
*/
|
|
5717
|
+
max: {
|
|
5718
|
+
type: String
|
|
5719
|
+
},
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5723
|
+
*/
|
|
5724
|
+
maxLength: {
|
|
5725
|
+
type: Number
|
|
5726
|
+
},
|
|
5727
|
+
|
|
5728
|
+
/**
|
|
5729
|
+
* The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
5730
|
+
*/
|
|
5731
|
+
min: {
|
|
5732
|
+
type: String
|
|
5733
|
+
},
|
|
5734
|
+
|
|
5735
|
+
/**
|
|
5736
|
+
* 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`.
|
|
5737
|
+
*/
|
|
5738
|
+
minLength: {
|
|
5739
|
+
type: Number
|
|
5740
|
+
},
|
|
5741
|
+
|
|
5742
|
+
/**
|
|
5743
|
+
* Populates the `name` attribute on the input.
|
|
5744
|
+
*/
|
|
5745
|
+
name: {
|
|
5746
|
+
type: String
|
|
5747
|
+
},
|
|
5748
|
+
|
|
5749
|
+
/**
|
|
5750
|
+
* If set, disables auto-validation on blur.
|
|
5751
|
+
*/
|
|
5752
|
+
noValidate: {
|
|
5753
|
+
type: Boolean
|
|
5754
|
+
},
|
|
5755
|
+
|
|
5756
|
+
/**
|
|
5757
|
+
* Specifies a regular expression the form control's value should match.
|
|
5758
|
+
*/
|
|
5759
|
+
pattern: {
|
|
5433
5760
|
type: String,
|
|
5434
5761
|
reflect: true
|
|
5435
5762
|
},
|
|
5436
|
-
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* Define custom placeholder text, only supported by date input formats.
|
|
5766
|
+
*/
|
|
5767
|
+
placeholder: {
|
|
5768
|
+
type: String
|
|
5769
|
+
},
|
|
5770
|
+
|
|
5771
|
+
/**
|
|
5772
|
+
* Makes the input read-only, but can be set programmatically.
|
|
5773
|
+
*/
|
|
5774
|
+
readonly: {
|
|
5775
|
+
type: Boolean
|
|
5776
|
+
},
|
|
5777
|
+
|
|
5778
|
+
/**
|
|
5779
|
+
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
5780
|
+
*/
|
|
5781
|
+
required: {
|
|
5782
|
+
type: Boolean
|
|
5783
|
+
},
|
|
5784
|
+
|
|
5785
|
+
/**
|
|
5786
|
+
* @ignore
|
|
5787
|
+
*/
|
|
5788
|
+
showPassword: {
|
|
5789
|
+
state: true
|
|
5790
|
+
},
|
|
5791
|
+
|
|
5792
|
+
/**
|
|
5793
|
+
* Sets a custom help text message to display for all validityStates.
|
|
5794
|
+
*/
|
|
5795
|
+
setCustomValidity: {
|
|
5796
|
+
type: String
|
|
5797
|
+
},
|
|
5798
|
+
|
|
5799
|
+
/**
|
|
5800
|
+
* Custom help text message to display when validity = `badInput`.
|
|
5801
|
+
*/
|
|
5802
|
+
setCustomValidityBadInput: {
|
|
5803
|
+
type: String
|
|
5804
|
+
},
|
|
5805
|
+
|
|
5806
|
+
/**
|
|
5807
|
+
* Custom help text message to display when validity = `customError`.
|
|
5808
|
+
*/
|
|
5809
|
+
setCustomValidityCustomError: {
|
|
5810
|
+
type: String
|
|
5811
|
+
},
|
|
5812
|
+
|
|
5813
|
+
/**
|
|
5814
|
+
* Custom help text message to display for the declared element `type` and type validity fails.
|
|
5815
|
+
*/
|
|
5816
|
+
setCustomValidityForType: {
|
|
5817
|
+
type: String
|
|
5818
|
+
},
|
|
5819
|
+
|
|
5820
|
+
/**
|
|
5821
|
+
* Custom help text message to display when validity = `rangeOverflow`.
|
|
5822
|
+
*/
|
|
5823
|
+
setCustomValidityRangeOverflow: {
|
|
5824
|
+
type: String
|
|
5825
|
+
},
|
|
5826
|
+
|
|
5827
|
+
/**
|
|
5828
|
+
* Custom help text message to display when validity = `rangeUnderflow`.
|
|
5829
|
+
*/
|
|
5830
|
+
setCustomValidityRangeUnderflow: {
|
|
5831
|
+
type: String
|
|
5832
|
+
},
|
|
5833
|
+
|
|
5834
|
+
/**
|
|
5835
|
+
* Custom help text message to display when validity = `tooLong`.
|
|
5836
|
+
*/
|
|
5837
|
+
setCustomValidityTooLong: {
|
|
5838
|
+
type: String
|
|
5839
|
+
},
|
|
5840
|
+
|
|
5841
|
+
/**
|
|
5842
|
+
* Custom help text message to display when validity = `tooShort`.
|
|
5843
|
+
*/
|
|
5844
|
+
setCustomValidityTooShort: {
|
|
5845
|
+
type: String
|
|
5846
|
+
},
|
|
5847
|
+
|
|
5848
|
+
/**
|
|
5849
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
5850
|
+
*/
|
|
5851
|
+
setCustomValidityValueMissing: {
|
|
5852
|
+
type: String
|
|
5853
|
+
},
|
|
5854
|
+
|
|
5855
|
+
/**
|
|
5856
|
+
* Custom help text message for email type validity.
|
|
5857
|
+
*/
|
|
5858
|
+
customValidityTypeEmail: {
|
|
5859
|
+
type: String
|
|
5860
|
+
},
|
|
5861
|
+
|
|
5862
|
+
/**
|
|
5863
|
+
* 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`.
|
|
5864
|
+
*/
|
|
5865
|
+
spellcheck: {
|
|
5866
|
+
type: String
|
|
5867
|
+
},
|
|
5868
|
+
|
|
5869
|
+
/**
|
|
5870
|
+
* 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`.
|
|
5871
|
+
*/
|
|
5872
|
+
type: {
|
|
5437
5873
|
type: String,
|
|
5438
5874
|
reflect: true
|
|
5439
5875
|
},
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5876
|
+
|
|
5877
|
+
/**
|
|
5878
|
+
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5879
|
+
*/
|
|
5880
|
+
value: {
|
|
5881
|
+
type: String
|
|
5882
|
+
},
|
|
5883
|
+
|
|
5884
|
+
/**
|
|
5885
|
+
* Sets validation mode to re-eval with each input.
|
|
5886
|
+
*/
|
|
5887
|
+
validateOnInput: {
|
|
5888
|
+
type: Boolean
|
|
5889
|
+
},
|
|
5890
|
+
|
|
5891
|
+
/**
|
|
5892
|
+
* Specifies the `validityState` this element is in.
|
|
5893
|
+
*/
|
|
5894
|
+
validity: {
|
|
5895
|
+
type: String,
|
|
5896
|
+
reflect: true
|
|
5897
|
+
}
|
|
5449
5898
|
};
|
|
5450
5899
|
}
|
|
5451
5900
|
|
|
5901
|
+
|
|
5452
5902
|
static get styles() {
|
|
5453
5903
|
return [
|
|
5454
|
-
i$2`${styleCss$3}`,
|
|
5455
5904
|
i$2`${colorCss$3}`,
|
|
5905
|
+
i$2`${styleCss$3}`,
|
|
5456
5906
|
i$2`${tokensCss$3}`
|
|
5457
5907
|
];
|
|
5458
5908
|
}
|
|
@@ -5835,7 +6285,7 @@ class BaseInput extends r {
|
|
|
5835
6285
|
* @return {void}
|
|
5836
6286
|
*/
|
|
5837
6287
|
handleInput() {
|
|
5838
|
-
// Prevent non-
|
|
6288
|
+
// Prevent non-number characters from being entered on credit card fields.
|
|
5839
6289
|
if (this.type === 'credit-card') {
|
|
5840
6290
|
this.inputElement.value = this.inputElement.value.replace(/[\D]/gu, '');
|
|
5841
6291
|
}
|
|
@@ -5921,6 +6371,13 @@ class BaseInput extends r {
|
|
|
5921
6371
|
this.validation.validate(this);
|
|
5922
6372
|
}
|
|
5923
6373
|
|
|
6374
|
+
/**
|
|
6375
|
+
* Resets component to initial state.
|
|
6376
|
+
* @returns {void}
|
|
6377
|
+
*/
|
|
6378
|
+
reset() {
|
|
6379
|
+
this.validation.reset(this);
|
|
6380
|
+
}
|
|
5924
6381
|
|
|
5925
6382
|
/**
|
|
5926
6383
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
@@ -5963,30 +6420,28 @@ class BaseInput extends r {
|
|
|
5963
6420
|
*/
|
|
5964
6421
|
getHelpText(type) {
|
|
5965
6422
|
if (type === 'password') {
|
|
5966
|
-
|
|
6423
|
+
return i18n(this.lang, 'password');
|
|
5967
6424
|
} else if (type === 'email') {
|
|
5968
|
-
|
|
6425
|
+
return i18n(this.lang, 'email');
|
|
5969
6426
|
} else if (type === 'credit-card') {
|
|
5970
|
-
|
|
6427
|
+
return i18n(this.lang, 'creditcard');
|
|
5971
6428
|
} else if (type === 'month-day-year') {
|
|
5972
|
-
|
|
6429
|
+
return i18n(this.lang, 'dateMMDDYYYY');
|
|
5973
6430
|
} else if (type === 'month-year') {
|
|
5974
|
-
|
|
6431
|
+
return i18n(this.lang, 'dateMMYY');
|
|
5975
6432
|
} else if (type === 'month-fullyear') {
|
|
5976
|
-
|
|
6433
|
+
return i18n(this.lang, 'dateMMYYYY');
|
|
5977
6434
|
} else if (type === 'year-month-day') {
|
|
5978
|
-
|
|
6435
|
+
return i18n(this.lang, 'dateYYYYMMDD');
|
|
5979
6436
|
} else if (type === 'month') {
|
|
5980
|
-
|
|
6437
|
+
return i18n(this.lang, 'dateMM');
|
|
5981
6438
|
} else if (type === 'year') {
|
|
5982
|
-
|
|
6439
|
+
return i18n(this.lang, 'dateYY');
|
|
5983
6440
|
} else if (type === 'fullYear') {
|
|
5984
|
-
|
|
5985
|
-
} else {
|
|
5986
|
-
this.helpText = '';
|
|
6441
|
+
return i18n(this.lang, 'dateYYYY');
|
|
5987
6442
|
}
|
|
5988
6443
|
|
|
5989
|
-
return
|
|
6444
|
+
return '';
|
|
5990
6445
|
}
|
|
5991
6446
|
|
|
5992
6447
|
/**
|
|
@@ -6068,7 +6523,7 @@ class BaseInput extends r {
|
|
|
6068
6523
|
this.maxLength = card.formatLength;
|
|
6069
6524
|
this.minLength = card.formatMinLength;
|
|
6070
6525
|
|
|
6071
|
-
this.
|
|
6526
|
+
this.errorMessage = card.errorMessage;
|
|
6072
6527
|
|
|
6073
6528
|
if (this.icon) {
|
|
6074
6529
|
this.inputIconName = card.cardIcon;
|
|
@@ -6088,63 +6543,63 @@ class BaseInput extends r {
|
|
|
6088
6543
|
name: 'Airlines',
|
|
6089
6544
|
regex: /^(?<num>1|2)\d{0}/u,
|
|
6090
6545
|
formatMinLength: 17,
|
|
6091
|
-
|
|
6546
|
+
errorMessage: CreditCardValidationMessage,
|
|
6092
6547
|
cardIcon: 'credit-card'
|
|
6093
6548
|
},
|
|
6094
6549
|
{
|
|
6095
6550
|
name: 'Commercial',
|
|
6096
6551
|
regex: /^(?<num>2)\d{0}/u,
|
|
6097
6552
|
formatMinLength: 8,
|
|
6098
|
-
|
|
6553
|
+
errorMessage: CreditCardValidationMessage,
|
|
6099
6554
|
cardIcon: 'credit-card'
|
|
6100
6555
|
},
|
|
6101
6556
|
{
|
|
6102
6557
|
name: 'Alaska Commercial',
|
|
6103
6558
|
regex: /^(?<num>27)\d{0}/u,
|
|
6104
6559
|
formatMinLength: 8,
|
|
6105
|
-
|
|
6560
|
+
errorMessage: CreditCardValidationMessage,
|
|
6106
6561
|
cardIcon: 'cc-alaska'
|
|
6107
6562
|
},
|
|
6108
6563
|
{
|
|
6109
6564
|
name: 'American Express',
|
|
6110
6565
|
regex: /^(?<num>34|37)\d{0}/u,
|
|
6111
6566
|
formatLength: 17,
|
|
6112
|
-
|
|
6567
|
+
errorMessage: CreditCardValidationMessage,
|
|
6113
6568
|
cardIcon: 'cc-amex'
|
|
6114
6569
|
},
|
|
6115
6570
|
{
|
|
6116
6571
|
name: 'Diners club',
|
|
6117
6572
|
regex: /^(?<num>36|38)\d{0}/u,
|
|
6118
6573
|
formatLength: 16,
|
|
6119
|
-
|
|
6574
|
+
errorMessage: CreditCardValidationMessage,
|
|
6120
6575
|
cardIcon: 'credit-card'
|
|
6121
6576
|
},
|
|
6122
6577
|
{
|
|
6123
6578
|
name: 'Visa',
|
|
6124
6579
|
regex: /^(?<num>4)\d{0}/u,
|
|
6125
6580
|
formatLength: 19,
|
|
6126
|
-
|
|
6581
|
+
errorMessage: CreditCardValidationMessage,
|
|
6127
6582
|
cardIcon: 'cc-visa'
|
|
6128
6583
|
},
|
|
6129
6584
|
{
|
|
6130
6585
|
name: 'Alaska Airlines Visa',
|
|
6131
6586
|
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
6132
6587
|
formatLength: 19,
|
|
6133
|
-
|
|
6588
|
+
errorMessage: CreditCardValidationMessage,
|
|
6134
6589
|
cardIcon: 'cc-alaska'
|
|
6135
6590
|
},
|
|
6136
6591
|
{
|
|
6137
6592
|
name: 'Master Card',
|
|
6138
6593
|
regex: /^(?<num>5)\d{0}/u,
|
|
6139
6594
|
formatLength: 19,
|
|
6140
|
-
|
|
6595
|
+
errorMessage: CreditCardValidationMessage,
|
|
6141
6596
|
cardIcon: 'cc-mastercard'
|
|
6142
6597
|
},
|
|
6143
6598
|
{
|
|
6144
6599
|
name: 'Discover Card',
|
|
6145
6600
|
regex: /^(?<num>6)\d{0}/u,
|
|
6146
6601
|
formatLength: 19,
|
|
6147
|
-
|
|
6602
|
+
errorMessage: CreditCardValidationMessage,
|
|
6148
6603
|
cardIcon: 'cc-discover'
|
|
6149
6604
|
}
|
|
6150
6605
|
];
|
|
@@ -6152,7 +6607,7 @@ class BaseInput extends r {
|
|
|
6152
6607
|
let type = {
|
|
6153
6608
|
name: 'Default Card',
|
|
6154
6609
|
formatLength: 19,
|
|
6155
|
-
|
|
6610
|
+
errorMessage: CreditCardValidationMessage,
|
|
6156
6611
|
cardIcon: 'credit-card'
|
|
6157
6612
|
};
|
|
6158
6613
|
|
|
@@ -6274,7 +6729,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
6274
6729
|
return _fetchMap.get(uri);
|
|
6275
6730
|
};
|
|
6276
6731
|
|
|
6277
|
-
var styleCss$2 = 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}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.labelContainer{line-height:1.8}`;
|
|
6732
|
+
var styleCss$2 = 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}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
|
|
6278
6733
|
|
|
6279
6734
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6280
6735
|
// See LICENSE in the project root for license information.
|
|
@@ -6541,7 +6996,8 @@ class AuroIcon extends BaseIcon {
|
|
|
6541
6996
|
};
|
|
6542
6997
|
|
|
6543
6998
|
const classes = {
|
|
6544
|
-
'label': this.label
|
|
6999
|
+
'label': this.label,
|
|
7000
|
+
'wrapper': true,
|
|
6545
7001
|
};
|
|
6546
7002
|
|
|
6547
7003
|
return x`
|
|
@@ -6565,7 +7021,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6565
7021
|
}
|
|
6566
7022
|
}
|
|
6567
7023
|
|
|
6568
|
-
var iconVersion = '6.1.
|
|
7024
|
+
var iconVersion = '6.1.2';
|
|
6569
7025
|
|
|
6570
7026
|
var styleCss$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_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-text-body-size-default, 1rem);font-weight:var(--ds-text-body-default-weight, 500);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]):after{display:block;content:"";height:calc(100% - 2px);width:calc(100% - 2px);position:absolute;top:1px;left:1px;border-radius:4px;border-style:solid;border-width:2px}.auro-button:focus-visible[variant=secondary]:after,.auro-button:focus-visible[variant=tertiary]:after{display:block;content:"";height:100%;width:100%;position:absolute;top:0;left:0;border-radius:var(--ds-border-radius, 0.375rem);border-style:solid;border-width:2px}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=flat]{height:unset;width:unset;min-height:unset;max-height:unset;min-width:unset;max-width:unset;border:0;border-radius:unset;gap:unset;padding:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{padding:var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);font-size:var(--ds-text-body-size-sm, 0.875rem);min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-50, $ds-size-50))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:all 300ms ease-out}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
6571
7027
|
|
|
@@ -6917,6 +7373,7 @@ class AuroButton extends r {
|
|
|
6917
7373
|
const classes = {
|
|
6918
7374
|
'util_insetLg--squish': true,
|
|
6919
7375
|
'auro-button': true,
|
|
7376
|
+
'auroButton': true,
|
|
6920
7377
|
'auro-button--rounded': this.rounded,
|
|
6921
7378
|
'auro-button--slim': this.slim,
|
|
6922
7379
|
'auro-button--iconOnly': this.iconOnly,
|
|
@@ -6956,7 +7413,7 @@ class AuroButton extends r {
|
|
|
6956
7413
|
}
|
|
6957
7414
|
}
|
|
6958
7415
|
|
|
6959
|
-
var buttonVersion = '8.2.
|
|
7416
|
+
var buttonVersion = '8.2.2';
|
|
6960
7417
|
|
|
6961
7418
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6962
7419
|
// See LICENSE in the project root for license information.
|
|
@@ -7175,7 +7632,6 @@ class AuroInput extends BaseInput {
|
|
|
7175
7632
|
<p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7176
7633
|
${this.errorMessage}
|
|
7177
7634
|
</p>`
|
|
7178
|
-
|
|
7179
7635
|
}
|
|
7180
7636
|
`;
|
|
7181
7637
|
}
|
|
@@ -7196,9 +7652,11 @@ var styleCss = i$b`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
7196
7652
|
* @prop {Object} optionSelected - Specifies the current selected option.
|
|
7197
7653
|
* @prop {String} value - Value selected for the dropdown menu.
|
|
7198
7654
|
* @prop {Boolean} checkmark - When attribute is present auro-menu will apply checkmarks to selected options.
|
|
7199
|
-
* @attr {
|
|
7655
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
7200
7656
|
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
7201
7657
|
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
7658
|
+
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
7659
|
+
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
7202
7660
|
* @attr {Boolean} disabled - If set, disables the combobox.
|
|
7203
7661
|
* @attr {Boolean} noFilter - If set, combobox will not filter menuoptions based in input.
|
|
7204
7662
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
@@ -7264,12 +7722,17 @@ class AuroCombobox extends r$6 {
|
|
|
7264
7722
|
return {
|
|
7265
7723
|
// ...super.properties,
|
|
7266
7724
|
error: {
|
|
7267
|
-
type:
|
|
7725
|
+
type: String,
|
|
7268
7726
|
reflect: true
|
|
7269
7727
|
},
|
|
7270
7728
|
setCustomValidity: {
|
|
7271
|
-
type: String
|
|
7272
|
-
|
|
7729
|
+
type: String
|
|
7730
|
+
},
|
|
7731
|
+
setCustomValidityCustomError: {
|
|
7732
|
+
type: String
|
|
7733
|
+
},
|
|
7734
|
+
setCustomValidityValueMissing: {
|
|
7735
|
+
type: String
|
|
7273
7736
|
},
|
|
7274
7737
|
validity: {
|
|
7275
7738
|
type: String,
|
|
@@ -7298,8 +7761,7 @@ class AuroCombobox extends r$6 {
|
|
|
7298
7761
|
reflect: true
|
|
7299
7762
|
},
|
|
7300
7763
|
value: {
|
|
7301
|
-
type: String
|
|
7302
|
-
reflect: true
|
|
7764
|
+
type: String
|
|
7303
7765
|
},
|
|
7304
7766
|
checkmark: {
|
|
7305
7767
|
type: Boolean,
|
|
@@ -7508,9 +7970,6 @@ class AuroCombobox extends r$6 {
|
|
|
7508
7970
|
|
|
7509
7971
|
// handle the menu event for an option selection
|
|
7510
7972
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
7511
|
-
// dropdown bib should hide when making a selection
|
|
7512
|
-
this.hideBib();
|
|
7513
|
-
|
|
7514
7973
|
if (this.menu.optionSelected) {
|
|
7515
7974
|
if (this.optionSelected !== this.menu.optionSelected) {
|
|
7516
7975
|
this.optionSelected = this.menu.optionSelected;
|
|
@@ -7539,6 +7998,9 @@ class AuroCombobox extends r$6 {
|
|
|
7539
7998
|
composed: true,
|
|
7540
7999
|
}));
|
|
7541
8000
|
}
|
|
8001
|
+
|
|
8002
|
+
// dropdown bib should hide when making a selection
|
|
8003
|
+
this.hideBib();
|
|
7542
8004
|
});
|
|
7543
8005
|
|
|
7544
8006
|
this.menu.addEventListener('auroMenu-customEventFired', () => {
|
|
@@ -7554,9 +8016,7 @@ class AuroCombobox extends r$6 {
|
|
|
7554
8016
|
});
|
|
7555
8017
|
|
|
7556
8018
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
7557
|
-
this.
|
|
7558
|
-
this.value = undefined;
|
|
7559
|
-
this.validation.validate(this);
|
|
8019
|
+
this.reset();
|
|
7560
8020
|
});
|
|
7561
8021
|
}
|
|
7562
8022
|
|
|
@@ -7585,56 +8045,8 @@ class AuroCombobox extends r$6 {
|
|
|
7585
8045
|
}
|
|
7586
8046
|
});
|
|
7587
8047
|
|
|
7588
|
-
this.input.addEventListener('input', () => {
|
|
7589
|
-
this.menu.matchWord = this.input.value;
|
|
7590
|
-
this.optionActive = null;
|
|
7591
|
-
|
|
7592
|
-
if (this.value !== this.input.value) {
|
|
7593
|
-
this.value = this.input.value;
|
|
7594
|
-
}
|
|
7595
|
-
|
|
7596
|
-
if (this.value !== this.menu.value) {
|
|
7597
|
-
this.menu.value = this.value;
|
|
7598
|
-
}
|
|
7599
|
-
|
|
7600
|
-
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
7601
|
-
this.optionSelected = undefined;
|
|
7602
|
-
}
|
|
7603
|
-
|
|
7604
|
-
this.menu.resetOptionsStates();
|
|
7605
|
-
|
|
7606
|
-
this.handleMenuOptions();
|
|
7607
|
-
|
|
7608
|
-
this.handleInputValueChange();
|
|
7609
|
-
// validate only if the value was set programmatically
|
|
7610
|
-
if (document.activeElement !== this) {
|
|
7611
|
-
this.validation.validate(this);
|
|
7612
|
-
}
|
|
7613
|
-
|
|
7614
|
-
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
7615
|
-
if (this.input.value.length === 0) {
|
|
7616
|
-
this.hideBib();
|
|
7617
|
-
this.classList.remove('combobox-filled');
|
|
7618
|
-
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
7619
|
-
const hasFocus = this.contains(document.activeElement);
|
|
7620
|
-
|
|
7621
|
-
// if the focus is within the combobox, then show the bib
|
|
7622
|
-
// this will prevent the bib from being shown while loading & presetting the value
|
|
7623
|
-
if (hasFocus) {
|
|
7624
|
-
this.showBib();
|
|
7625
|
-
}
|
|
7626
|
-
|
|
7627
|
-
this.classList.add('combobox-filled');
|
|
7628
|
-
}
|
|
7629
|
-
|
|
7630
|
-
// force the dropdown bib to hide if the input value has no matching suggestions
|
|
7631
|
-
if (!this.availableOptions || this.availableOptions.length === 0) {
|
|
7632
|
-
this.hideBib();
|
|
7633
|
-
}
|
|
7634
|
-
});
|
|
7635
|
-
|
|
7636
8048
|
this.input.addEventListener('auroFormElement-validated', (evt) => {
|
|
7637
|
-
this.
|
|
8049
|
+
this.errorMessage = evt.detail.message;
|
|
7638
8050
|
});
|
|
7639
8051
|
}
|
|
7640
8052
|
|
|
@@ -7667,8 +8079,14 @@ class AuroCombobox extends r$6 {
|
|
|
7667
8079
|
* @returns {void}
|
|
7668
8080
|
*/
|
|
7669
8081
|
handleInputValueChange() {
|
|
8082
|
+
this.menu.matchWord = this.input.value;
|
|
8083
|
+
this.optionActive = null;
|
|
8084
|
+
|
|
8085
|
+
let hasChange = false;
|
|
8086
|
+
|
|
7670
8087
|
if (this.value !== this.input.value) {
|
|
7671
8088
|
this.value = this.input.value;
|
|
8089
|
+
hasChange = true;
|
|
7672
8090
|
|
|
7673
8091
|
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
7674
8092
|
bubbles: true,
|
|
@@ -7677,10 +8095,48 @@ class AuroCombobox extends r$6 {
|
|
|
7677
8095
|
}));
|
|
7678
8096
|
}
|
|
7679
8097
|
|
|
7680
|
-
|
|
7681
|
-
|
|
8098
|
+
if (this.value !== this.menu.value) {
|
|
8099
|
+
this.menu.value = this.value;
|
|
8100
|
+
hasChange = true;
|
|
8101
|
+
}
|
|
8102
|
+
|
|
8103
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
8104
|
+
this.optionSelected = undefined;
|
|
8105
|
+
hasChange = true;
|
|
8106
|
+
}
|
|
8107
|
+
|
|
8108
|
+
if (!hasChange) {
|
|
8109
|
+
return;
|
|
8110
|
+
}
|
|
8111
|
+
|
|
8112
|
+
this.menu.resetOptionsStates();
|
|
8113
|
+
this.handleMenuOptions();
|
|
8114
|
+
|
|
8115
|
+
// validate if the value was set programmatically
|
|
8116
|
+
if (document.activeElement !== this) {
|
|
7682
8117
|
this.validation.validate(this);
|
|
7683
8118
|
}
|
|
8119
|
+
|
|
8120
|
+
// hide the menu if the value is empty otherwise show if there are available suggestions
|
|
8121
|
+
if (this.input.value && this.input.value.length === 0) {
|
|
8122
|
+
this.hideBib();
|
|
8123
|
+
this.classList.remove('combobox-filled');
|
|
8124
|
+
} else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
|
|
8125
|
+
const hasFocus = this.contains(document.activeElement);
|
|
8126
|
+
|
|
8127
|
+
// if the focus is within the combobox, then show the bib
|
|
8128
|
+
// this will prevent the bib from being shown while loading & presetting the value
|
|
8129
|
+
if (hasFocus) {
|
|
8130
|
+
this.showBib();
|
|
8131
|
+
}
|
|
8132
|
+
|
|
8133
|
+
this.classList.add('combobox-filled');
|
|
8134
|
+
}
|
|
8135
|
+
|
|
8136
|
+
// force the dropdown bib to hide if the input value has no matching suggestions
|
|
8137
|
+
if (!this.availableOptions || this.availableOptions.length === 0) {
|
|
8138
|
+
this.hideBib();
|
|
8139
|
+
}
|
|
7684
8140
|
}
|
|
7685
8141
|
|
|
7686
8142
|
/**
|
|
@@ -7773,6 +8229,15 @@ class AuroCombobox extends r$6 {
|
|
|
7773
8229
|
this.input.focus();
|
|
7774
8230
|
}
|
|
7775
8231
|
|
|
8232
|
+
/**
|
|
8233
|
+
* Resets component to initial state.
|
|
8234
|
+
* @returns {void}
|
|
8235
|
+
*/
|
|
8236
|
+
reset() {
|
|
8237
|
+
this.input.reset();
|
|
8238
|
+
this.validation.reset(this);
|
|
8239
|
+
}
|
|
8240
|
+
|
|
7776
8241
|
updated(changedProperties) {
|
|
7777
8242
|
// After the component is ready, send direct value changes to auro-menu.
|
|
7778
8243
|
if (changedProperties.has('value')) {
|
|
@@ -7801,10 +8266,6 @@ class AuroCombobox extends r$6 {
|
|
|
7801
8266
|
this.input.setAttribute('error', this.getAttribute('error'));
|
|
7802
8267
|
this.validation.validate(this);
|
|
7803
8268
|
}
|
|
7804
|
-
|
|
7805
|
-
if (changedProperties.has('setCustomValidity')) {
|
|
7806
|
-
this.input.setAttribute('setCustomValidity', this.setCustomValidity);
|
|
7807
|
-
}
|
|
7808
8269
|
}
|
|
7809
8270
|
|
|
7810
8271
|
/**
|
|
@@ -7858,19 +8319,24 @@ class AuroCombobox extends r$6 {
|
|
|
7858
8319
|
?noValidate="${this.noValidate}"
|
|
7859
8320
|
?disabled="${this.disabled}"
|
|
7860
8321
|
?icon="${this.triggerIcon}"
|
|
7861
|
-
|
|
8322
|
+
setCustomValidity="${this.setCustomValidity}"
|
|
8323
|
+
setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
|
|
8324
|
+
setCustomValidityCustomError="${this.setCustomValidityCustomError}"
|
|
8325
|
+
.type="${this.type}"
|
|
8326
|
+
@input="${this.handleInputValueChange}">
|
|
7862
8327
|
<slot name="label" slot="label"></slot>
|
|
7863
8328
|
</${this.inputTag}>
|
|
7864
8329
|
<div class="menuWrapper">
|
|
7865
8330
|
</div>
|
|
7866
8331
|
<span slot="helpText">
|
|
7867
|
-
|
|
8332
|
+
<!-- Help text and error message template -->
|
|
8333
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7868
8334
|
? u$6`
|
|
7869
|
-
${this.auroInputHelpText}
|
|
7870
|
-
`
|
|
7871
|
-
: u$6`
|
|
7872
8335
|
<slot name="helpText"></slot>
|
|
7873
|
-
`
|
|
8336
|
+
` : u$6`
|
|
8337
|
+
<p role="alert" aria-live="assertive" part="helpText">
|
|
8338
|
+
${this.errorMessage}
|
|
8339
|
+
</p>`
|
|
7874
8340
|
}
|
|
7875
8341
|
</span>
|
|
7876
8342
|
</${this.dropdownTag}>
|