@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,46 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$
|
|
6
|
+
const t$5=globalThis,e$9=t$5.ShadowRoot&&(undefined===t$5.ShadyCSS||t$5.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$5=Symbol(),o$8=new WeakMap;let n$7 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$5)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$9&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$8.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$8.set(s,t));}return t}toString(){return this.cssText}};const r$7=t=>new n$7("string"==typeof t?t:t+"",undefined,s$5),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$7(o,t,s$5)},S$3=(s,o)=>{if(e$9)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$5.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$5=e$9?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$7(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$
|
|
12
|
+
*/const{is:i$a,defineProperty:e$8,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$3,getOwnPropertySymbols:o$7,getPrototypeOf:n$6}=Object,a$5=globalThis,c$4=a$5.trustedTypes,l$5=c$4?c$4.emptyScript:"",p$3=a$5.reactiveElementPolyfillSupport,d$3=(t,s)=>t,u$5={toAttribute(t,s){switch(s){case Boolean:t=t?l$5: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$3=(t,s)=>!i$a(t,s),y$3={attribute:true,type:String,converter:u$5,reflect:false,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$5.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$3){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$8(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$6(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$3}static _$Ei(){if(this.hasOwnProperty(d$3("elementProperties")))return;const t=n$6(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$3("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$3("properties"))){const t=this.properties,s=[...h$3(t),...o$7(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$5(s));}else undefined!==s&&i.push(c$5(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$3(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$3)(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$3("elementProperties")]=new Map,b$1[d$3("finalized")]=new Map,p$3?.({ReactiveElement:b$1}),(a$5.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$
|
|
19
|
+
const t$4=globalThis,i$9=t$4.trustedTypes,s$4=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$7="$lit$",h$2=`lit$${Math.random().toFixed(9).slice(2)}$`,o$6="?"+h$2,n$5=`<${o$6}>`,r$5=document,l$4=()=>r$5.createComment(""),c$3=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$4=Array.isArray,u$4=t=>a$4(t)||"function"==typeof t?.[Symbol.iterator],d$2="[ \t\n\f\r]",f$2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_$1=/>/g,m$1=RegExp(`>|${d$2}(?:([^\\s"'>=/]+)(${d$2}*=${d$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$2=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$2(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$5.createTreeWalker(r$5,129);function P$1(t,i){if(!a$4(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$4?s$4.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$2;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$2?"!--"===u[1]?c=v$1:undefined!==u[1]?c=_$1:undefined!==u[2]?($$1.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$2,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$1:p$2):c===g$1||c===p$2?c=m$1:c===v$1||c===_$1?c=f$2:(c=m$1,r=undefined);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$2?s+n$5:d>=0?(o.push(a),s.slice(0,d)+e$7+s.slice(d)+h$2+x):s+h$2+(-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$7)){const i=v[a++],s=r.getAttribute(t).split(h$2),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$2)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$2),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$4()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$4());}}}else if(8===r.nodeType)if(r.data===o$6)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$2,t+1));)d.push({type:7,index:c}),t+=h$2.length-1;}c++;}}static createElement(t,i){const s=r$5.createElement("template");return s.innerHTML=t,s}};function S$2(t,i,s=t,e){if(i===T$1)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$2(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$5).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$5,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$2(this,t,i),c$3(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$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$1&&c$3(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$5.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$1(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$4(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$4()),this.O(l$4()),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$2(this,t,i,0),o=!c$3(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$2(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$3(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$2(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$2(this,t);}};const j$1=t$4.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$4.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$4(),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$4 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
25
|
+
*/let r$4 = 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$4._$litElement$=true,r$4["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$4});const i$8=globalThis.litElementPolyfillSupport;i$8?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2017 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/
|
|
32
|
+
const t$3={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$6=t=>(...e)=>({_$litDirective$:t,values:e});let i$7 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2018 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/const e$5=e$6(class extends i$7{constructor(t){if(super(t),t.type!==t$3.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$1}});
|
|
26
39
|
|
|
27
40
|
/**
|
|
28
41
|
* @license
|
|
29
42
|
* Copyright 2020 Google LLC
|
|
30
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
44
|
*/
|
|
32
|
-
const a$3=Symbol.for(""),o$5=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$3}),i$6=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
45
|
+
const a$3=Symbol.for(""),o$5=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$3}),i$6=(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$3}),l$3=new Map,n$4=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$5(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$3.get(t))&&(n.raw=n,l$3.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$4(x$1);
|
|
33
46
|
|
|
34
47
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
35
48
|
// See LICENSE in the project root for license information.
|
|
@@ -111,25 +124,111 @@ class AuroFormValidation {
|
|
|
111
124
|
}
|
|
112
125
|
|
|
113
126
|
/**
|
|
114
|
-
*
|
|
127
|
+
* Resets the element to its initial state.
|
|
115
128
|
* @private
|
|
116
|
-
* @param {object} elem - HTML element to
|
|
129
|
+
* @param {object} elem - HTML element to reset.
|
|
117
130
|
* @returns {void}
|
|
118
131
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
132
|
+
reset(elem) {
|
|
133
|
+
elem.validity = undefined;
|
|
134
|
+
elem.value = undefined;
|
|
122
135
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
// Resets the second value of the datepicker in range state
|
|
137
|
+
if (elem.valueEnd) {
|
|
138
|
+
elem.valueEnd = undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Resets selected option of element
|
|
142
|
+
if (elem.optionSelected) {
|
|
143
|
+
elem.optionSelected = undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Runs validation to handle error attribute
|
|
147
|
+
this.validate(elem);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
152
|
+
*
|
|
153
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
154
|
+
* @returns {void}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
158
|
+
* validateElementAttributes(inputElement);
|
|
159
|
+
*
|
|
160
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
161
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
162
|
+
*
|
|
163
|
+
* Validation rules:
|
|
164
|
+
* - input:
|
|
165
|
+
* - length:
|
|
166
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
167
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
168
|
+
* - pattern:
|
|
169
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
170
|
+
* - counter:
|
|
171
|
+
* - range:
|
|
172
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
173
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
174
|
+
*/
|
|
175
|
+
validateElementAttributes(elem) {
|
|
176
|
+
const validationRules = {
|
|
177
|
+
input: {
|
|
178
|
+
length: [
|
|
179
|
+
{
|
|
180
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
181
|
+
validity: 'tooShort',
|
|
182
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
186
|
+
validity: 'tooLong',
|
|
187
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
pattern: [
|
|
191
|
+
{
|
|
192
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
193
|
+
validity: 'patternMismatch',
|
|
194
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
counter: {
|
|
199
|
+
range: [
|
|
200
|
+
{
|
|
201
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
202
|
+
validity: 'rangeOverflow',
|
|
203
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
207
|
+
validity: 'rangeUnderflow',
|
|
208
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
let elementType;
|
|
215
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
216
|
+
elementType = 'input';
|
|
217
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
218
|
+
elementType = 'counter';
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (elementType) {
|
|
222
|
+
const rules = validationRules[elementType];
|
|
223
|
+
|
|
224
|
+
if (rules) {
|
|
225
|
+
Object.values(rules).flat().forEach(rule => {
|
|
226
|
+
if (rule.check(elem)) {
|
|
227
|
+
elem.validity = rule.validity;
|
|
228
|
+
elem.errorMessage = rule.message(elem);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
126
231
|
}
|
|
127
|
-
} else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
|
|
128
|
-
elem.validity = 'tooShort';
|
|
129
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
130
|
-
} else if (elem.value && elem.value.length > elem.maxLength) {
|
|
131
|
-
elem.validity = 'tooLong';
|
|
132
|
-
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
133
232
|
}
|
|
134
233
|
}
|
|
135
234
|
|
|
@@ -145,33 +244,32 @@ class AuroFormValidation {
|
|
|
145
244
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
146
245
|
|
|
147
246
|
if (!elem.value.match(emailRegex)) {
|
|
148
|
-
elem.validity = '
|
|
149
|
-
elem.
|
|
247
|
+
elem.validity = 'patternMismatch';
|
|
248
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
150
249
|
}
|
|
151
250
|
} else if (elem.type === 'credit-card') {
|
|
152
251
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
153
252
|
elem.validity = 'tooShort';
|
|
154
|
-
elem.
|
|
253
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
155
254
|
}
|
|
156
|
-
} else if (elem.type === 'number'
|
|
255
|
+
} else if (elem.type === 'number') {
|
|
157
256
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
158
257
|
elem.validity = 'rangeOverflow';
|
|
159
|
-
elem.
|
|
258
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
160
259
|
}
|
|
161
260
|
|
|
162
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
261
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
163
262
|
elem.validity = 'rangeUnderflow';
|
|
164
|
-
elem.
|
|
263
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
165
264
|
}
|
|
166
|
-
|
|
167
265
|
} else if (elem.type === 'month-day-year' ||
|
|
168
266
|
elem.type === 'month-year' ||
|
|
169
267
|
elem.type === 'month-fullYear' ||
|
|
170
268
|
elem.type === 'year-month-day'
|
|
171
269
|
) {
|
|
172
|
-
if (elem.value
|
|
270
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
173
271
|
elem.validity = 'tooShort';
|
|
174
|
-
elem.
|
|
272
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
175
273
|
} else {
|
|
176
274
|
const valueDate = new Date(elem.value);
|
|
177
275
|
|
|
@@ -181,7 +279,7 @@ class AuroFormValidation {
|
|
|
181
279
|
|
|
182
280
|
if (valueDate > maxDate) {
|
|
183
281
|
elem.validity = 'rangeOverflow';
|
|
184
|
-
elem.
|
|
282
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
185
283
|
}
|
|
186
284
|
}
|
|
187
285
|
|
|
@@ -191,7 +289,7 @@ class AuroFormValidation {
|
|
|
191
289
|
|
|
192
290
|
if (valueDate < minDate) {
|
|
193
291
|
elem.validity = 'rangeUnderflow';
|
|
194
|
-
elem.
|
|
292
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
195
293
|
}
|
|
196
294
|
}
|
|
197
295
|
}
|
|
@@ -214,10 +312,10 @@ class AuroFormValidation {
|
|
|
214
312
|
|
|
215
313
|
if (elem.hasAttribute('error')) {
|
|
216
314
|
elem.validity = 'customError';
|
|
217
|
-
elem.
|
|
315
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
218
316
|
} else if (validationShouldRun) {
|
|
219
317
|
elem.validity = 'valid';
|
|
220
|
-
elem.
|
|
318
|
+
elem.errorMessage = '';
|
|
221
319
|
|
|
222
320
|
/**
|
|
223
321
|
* Only validate once we interact with the datepicker
|
|
@@ -229,7 +327,7 @@ class AuroFormValidation {
|
|
|
229
327
|
let hasValue = elem.value && elem.value.length > 0;
|
|
230
328
|
|
|
231
329
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
232
|
-
if (this.auroInputElements
|
|
330
|
+
if (this.auroInputElements?.length === 2) {
|
|
233
331
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
234
332
|
hasValue = false;
|
|
235
333
|
}
|
|
@@ -237,35 +335,29 @@ class AuroFormValidation {
|
|
|
237
335
|
|
|
238
336
|
if (!hasValue && elem.required) {
|
|
239
337
|
elem.validity = 'valueMissing';
|
|
240
|
-
elem.
|
|
338
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
241
339
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
242
340
|
this.validateType(elem);
|
|
243
|
-
this.
|
|
341
|
+
this.validateElementAttributes(elem);
|
|
342
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
343
|
+
this.validateElementAttributes(elem);
|
|
244
344
|
}
|
|
245
345
|
}
|
|
246
346
|
|
|
247
|
-
if (this.auroInputElements
|
|
347
|
+
if (this.auroInputElements?.length > 0) {
|
|
248
348
|
elem.validity = this.auroInputElements[0].validity;
|
|
249
|
-
elem.
|
|
349
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
250
350
|
|
|
251
|
-
if (elem.validity === 'valid') {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
255
|
-
}
|
|
351
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
352
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
353
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
256
354
|
}
|
|
257
355
|
}
|
|
258
356
|
|
|
259
357
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
// Use the validity message override if it is declared
|
|
264
|
-
if (elem.ValidityMessageOverride) {
|
|
265
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
266
|
-
}
|
|
267
|
-
} else {
|
|
268
|
-
elem.isValid = true;
|
|
358
|
+
// Use the validity message override if it is declared
|
|
359
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
360
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
269
361
|
}
|
|
270
362
|
|
|
271
363
|
this.getErrorMessage(elem);
|
|
@@ -311,18 +403,18 @@ class AuroFormValidation {
|
|
|
311
403
|
if (elem.validity !== 'valid') {
|
|
312
404
|
if (elem.setCustomValidity) {
|
|
313
405
|
elem.errorMessage = elem.setCustomValidity;
|
|
314
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
406
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
315
407
|
const input = elem.renderRoot.querySelector('input');
|
|
316
408
|
|
|
317
409
|
if (input.validationMessage.length > 0) {
|
|
318
410
|
elem.errorMessage = input.validationMessage;
|
|
319
411
|
}
|
|
320
|
-
} else if (this.inputElements &&
|
|
412
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
321
413
|
const firstInput = this.inputElements[0];
|
|
322
414
|
|
|
323
415
|
if (firstInput.validationMessage.length > 0) {
|
|
324
416
|
elem.errorMessage = firstInput.validationMessage;
|
|
325
|
-
} else if (this.inputElements
|
|
417
|
+
} else if (this.inputElements?.length === 2) {
|
|
326
418
|
const secondInput = this.inputElements[1];
|
|
327
419
|
|
|
328
420
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -381,33 +473,33 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
381
473
|
* Copyright 2017 Google LLC
|
|
382
474
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
383
475
|
*/
|
|
384
|
-
const t$2=globalThis,i$5=t$2.trustedTypes,s$2=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):
|
|
476
|
+
const t$2=globalThis,i$5=t$2.trustedTypes,s$2=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$3=document,l$2=()=>r$3.createComment(""),c$2=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2=Array.isArray,u$2=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=/-->/g,_=/>/g,m=RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1=/'/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$3.createTreeWalker(r$3,129);function P(t,i){if(!a$2(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$2?s$2.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:undefined!==u[1]?c=_:undefined!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):undefined!==u[3]&&(c=m):c===m?">"===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:'"'===u[3]?g:p$1):c===g||c===p$1?c=m:c===v||c===_?c=f$1:(c=m,r=undefined);const x=c===m&&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$3.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$2(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}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).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$3,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$2(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$2(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$2(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.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(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$2(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$2(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 j=t$2.litHtmlPolyfillSupport;j?.(N,R),(t$2.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};
|
|
385
477
|
|
|
386
478
|
/**
|
|
387
479
|
* @license
|
|
388
480
|
* Copyright 2020 Google LLC
|
|
389
481
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
390
482
|
*/
|
|
391
|
-
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$1=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
483
|
+
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$1=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$1=n$2(x);
|
|
392
484
|
|
|
393
485
|
/**
|
|
394
486
|
* @license
|
|
395
487
|
* Copyright 2019 Google LLC
|
|
396
488
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
397
489
|
*/
|
|
398
|
-
const t$1=globalThis,e$3=t$1.ShadowRoot&&(
|
|
490
|
+
const t$1=globalThis,e$3=t$1.ShadowRoot&&(undefined===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$2=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$3&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$2.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$1("string"==typeof t?t:t+"",undefined,s),i$3=(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$3)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.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
399
491
|
|
|
400
492
|
/**
|
|
401
493
|
* @license
|
|
402
494
|
* Copyright 2017 Google LLC
|
|
403
495
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
404
|
-
*/const{is:i$2,defineProperty:e$2,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$1,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$2(t,s),y={attribute
|
|
496
|
+
*/const{is:i$2,defineProperty:e$2,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$1,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$2(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$2(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$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(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");
|
|
405
497
|
|
|
406
498
|
/**
|
|
407
499
|
* @license
|
|
408
500
|
* Copyright 2017 Google LLC
|
|
409
501
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
410
|
-
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
502
|
+
*/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$1=globalThis.litElementPolyfillSupport;i$1?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
411
503
|
|
|
412
504
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
413
505
|
// See LICENSE in the project root for license information.
|
|
@@ -527,7 +619,7 @@ function getAlignmentAxis(placement) {
|
|
|
527
619
|
return getOppositeAxis(getSideAxis(placement));
|
|
528
620
|
}
|
|
529
621
|
function getAlignmentSides(placement, rects, rtl) {
|
|
530
|
-
if (rtl ===
|
|
622
|
+
if (rtl === undefined) {
|
|
531
623
|
rtl = false;
|
|
532
624
|
}
|
|
533
625
|
const alignment = getAlignment(placement);
|
|
@@ -684,7 +776,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
684
776
|
platform
|
|
685
777
|
} = config;
|
|
686
778
|
const validMiddleware = middleware.filter(Boolean);
|
|
687
|
-
const rtl = await (platform.isRTL == null ?
|
|
779
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
688
780
|
let rects = await platform.getElementRects({
|
|
689
781
|
reference,
|
|
690
782
|
floating,
|
|
@@ -770,7 +862,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
770
862
|
*/
|
|
771
863
|
async function detectOverflow(state, options) {
|
|
772
864
|
var _await$platform$isEle;
|
|
773
|
-
if (options ===
|
|
865
|
+
if (options === undefined) {
|
|
774
866
|
options = {};
|
|
775
867
|
}
|
|
776
868
|
const {
|
|
@@ -792,7 +884,7 @@ async function detectOverflow(state, options) {
|
|
|
792
884
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
793
885
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
794
886
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
795
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ?
|
|
887
|
+
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
888
|
boundary,
|
|
797
889
|
rootBoundary,
|
|
798
890
|
strategy
|
|
@@ -803,8 +895,8 @@ async function detectOverflow(state, options) {
|
|
|
803
895
|
width: rects.floating.width,
|
|
804
896
|
height: rects.floating.height
|
|
805
897
|
} : rects.reference;
|
|
806
|
-
const offsetParent = await (platform.getOffsetParent == null ?
|
|
807
|
-
const offsetScale = (await (platform.isElement == null ?
|
|
898
|
+
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
899
|
+
const offsetScale = (await (platform.isElement == null ? undefined : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? undefined : platform.getScale(offsetParent))) || {
|
|
808
900
|
x: 1,
|
|
809
901
|
y: 1
|
|
810
902
|
} : {
|
|
@@ -841,7 +933,7 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
841
933
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
842
934
|
*/
|
|
843
935
|
const autoPlacement$1 = function (options) {
|
|
844
|
-
if (options ===
|
|
936
|
+
if (options === undefined) {
|
|
845
937
|
options = {};
|
|
846
938
|
}
|
|
847
939
|
return {
|
|
@@ -865,12 +957,12 @@ const autoPlacement$1 = function (options) {
|
|
|
865
957
|
} = evaluate(options, state);
|
|
866
958
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
867
959
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
868
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ?
|
|
960
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
869
961
|
const currentPlacement = placements$1[currentIndex];
|
|
870
962
|
if (currentPlacement == null) {
|
|
871
963
|
return {};
|
|
872
964
|
}
|
|
873
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ?
|
|
965
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
874
966
|
|
|
875
967
|
// Make `computeCoords` start from the right place.
|
|
876
968
|
if (placement !== currentPlacement) {
|
|
@@ -881,7 +973,7 @@ const autoPlacement$1 = function (options) {
|
|
|
881
973
|
};
|
|
882
974
|
}
|
|
883
975
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
884
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ?
|
|
976
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || []), {
|
|
885
977
|
placement: currentPlacement,
|
|
886
978
|
overflows: currentOverflows
|
|
887
979
|
}];
|
|
@@ -911,7 +1003,7 @@ const autoPlacement$1 = function (options) {
|
|
|
911
1003
|
// Aligned placements should not check their opposite crossAxis
|
|
912
1004
|
// side.
|
|
913
1005
|
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
914
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ?
|
|
1006
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
915
1007
|
if (resetPlacement !== placement) {
|
|
916
1008
|
return {
|
|
917
1009
|
data: {
|
|
@@ -935,7 +1027,7 @@ const autoPlacement$1 = function (options) {
|
|
|
935
1027
|
* @see https://floating-ui.com/docs/flip
|
|
936
1028
|
*/
|
|
937
1029
|
const flip$1 = function (options) {
|
|
938
|
-
if (options ===
|
|
1030
|
+
if (options === undefined) {
|
|
939
1031
|
options = {};
|
|
940
1032
|
}
|
|
941
1033
|
return {
|
|
@@ -971,7 +1063,7 @@ const flip$1 = function (options) {
|
|
|
971
1063
|
const side = getSide(placement);
|
|
972
1064
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
973
1065
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
974
|
-
const rtl = await (platform.isRTL == null ?
|
|
1066
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
975
1067
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
976
1068
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
977
1069
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
@@ -980,7 +1072,7 @@ const flip$1 = function (options) {
|
|
|
980
1072
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
981
1073
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
982
1074
|
const overflows = [];
|
|
983
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ?
|
|
1075
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
984
1076
|
if (checkMainAxis) {
|
|
985
1077
|
overflows.push(overflow[side]);
|
|
986
1078
|
}
|
|
@@ -996,7 +1088,7 @@ const flip$1 = function (options) {
|
|
|
996
1088
|
// One or more sides is overflowing.
|
|
997
1089
|
if (!overflows.every(side => side <= 0)) {
|
|
998
1090
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
999
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ?
|
|
1091
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
1000
1092
|
const nextPlacement = placements[nextIndex];
|
|
1001
1093
|
if (nextPlacement) {
|
|
1002
1094
|
// Try next placement and re-run the lifecycle.
|
|
@@ -1013,7 +1105,7 @@ const flip$1 = function (options) {
|
|
|
1013
1105
|
|
|
1014
1106
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1015
1107
|
// 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 ?
|
|
1108
|
+
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
1109
|
|
|
1018
1110
|
// Otherwise fallback.
|
|
1019
1111
|
if (!resetPlacement) {
|
|
@@ -1030,7 +1122,7 @@ const flip$1 = function (options) {
|
|
|
1030
1122
|
currentSideAxis === 'y';
|
|
1031
1123
|
}
|
|
1032
1124
|
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 ?
|
|
1125
|
+
}).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
1126
|
if (placement) {
|
|
1035
1127
|
resetPlacement = placement;
|
|
1036
1128
|
}
|
|
@@ -1063,7 +1155,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1063
1155
|
platform,
|
|
1064
1156
|
elements
|
|
1065
1157
|
} = state;
|
|
1066
|
-
const rtl = await (platform.isRTL == null ?
|
|
1158
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1067
1159
|
const side = getSide(placement);
|
|
1068
1160
|
const alignment = getAlignment(placement);
|
|
1069
1161
|
const isVertical = getSideAxis(placement) === 'y';
|
|
@@ -1105,7 +1197,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1105
1197
|
* @see https://floating-ui.com/docs/offset
|
|
1106
1198
|
*/
|
|
1107
1199
|
const offset$1 = function (options) {
|
|
1108
|
-
if (options ===
|
|
1200
|
+
if (options === undefined) {
|
|
1109
1201
|
options = 0;
|
|
1110
1202
|
}
|
|
1111
1203
|
return {
|
|
@@ -1123,7 +1215,7 @@ const offset$1 = function (options) {
|
|
|
1123
1215
|
|
|
1124
1216
|
// If the placement is the same and the arrow caused an alignment offset
|
|
1125
1217
|
// then we don't need to change the positioning coordinates.
|
|
1126
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ?
|
|
1218
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1127
1219
|
return {};
|
|
1128
1220
|
}
|
|
1129
1221
|
return {
|
|
@@ -1152,11 +1244,11 @@ function getNodeName(node) {
|
|
|
1152
1244
|
}
|
|
1153
1245
|
function getWindow(node) {
|
|
1154
1246
|
var _node$ownerDocument;
|
|
1155
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ?
|
|
1247
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1156
1248
|
}
|
|
1157
1249
|
function getDocumentElement(node) {
|
|
1158
1250
|
var _ref;
|
|
1159
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ?
|
|
1251
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1160
1252
|
}
|
|
1161
1253
|
function isNode(value) {
|
|
1162
1254
|
if (!hasWindow()) {
|
|
@@ -1271,14 +1363,14 @@ function getNearestOverflowAncestor(node) {
|
|
|
1271
1363
|
}
|
|
1272
1364
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1273
1365
|
var _node$ownerDocument2;
|
|
1274
|
-
if (list ===
|
|
1366
|
+
if (list === undefined) {
|
|
1275
1367
|
list = [];
|
|
1276
1368
|
}
|
|
1277
|
-
if (traverseIframes ===
|
|
1369
|
+
if (traverseIframes === undefined) {
|
|
1278
1370
|
traverseIframes = true;
|
|
1279
1371
|
}
|
|
1280
1372
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1281
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ?
|
|
1373
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1282
1374
|
const win = getWindow(scrollableAncestor);
|
|
1283
1375
|
if (isBody) {
|
|
1284
1376
|
const frameElement = getFrameElement(win);
|
|
@@ -1355,7 +1447,7 @@ function getVisualOffsets(element) {
|
|
|
1355
1447
|
};
|
|
1356
1448
|
}
|
|
1357
1449
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1358
|
-
if (isFixed ===
|
|
1450
|
+
if (isFixed === undefined) {
|
|
1359
1451
|
isFixed = false;
|
|
1360
1452
|
}
|
|
1361
1453
|
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
@@ -1365,10 +1457,10 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1365
1457
|
}
|
|
1366
1458
|
|
|
1367
1459
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1368
|
-
if (includeScale ===
|
|
1460
|
+
if (includeScale === undefined) {
|
|
1369
1461
|
includeScale = false;
|
|
1370
1462
|
}
|
|
1371
|
-
if (isFixedStrategy ===
|
|
1463
|
+
if (isFixedStrategy === undefined) {
|
|
1372
1464
|
isFixedStrategy = false;
|
|
1373
1465
|
}
|
|
1374
1466
|
const clientRect = element.getBoundingClientRect();
|
|
@@ -1428,7 +1520,7 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1428
1520
|
}
|
|
1429
1521
|
|
|
1430
1522
|
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1431
|
-
if (ignoreScrollbarX ===
|
|
1523
|
+
if (ignoreScrollbarX === undefined) {
|
|
1432
1524
|
ignoreScrollbarX = false;
|
|
1433
1525
|
}
|
|
1434
1526
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
@@ -1778,10 +1870,10 @@ function observeMove(element, onMove) {
|
|
|
1778
1870
|
io = null;
|
|
1779
1871
|
}
|
|
1780
1872
|
function refresh(skip, threshold) {
|
|
1781
|
-
if (skip ===
|
|
1873
|
+
if (skip === undefined) {
|
|
1782
1874
|
skip = false;
|
|
1783
1875
|
}
|
|
1784
|
-
if (threshold ===
|
|
1876
|
+
if (threshold === undefined) {
|
|
1785
1877
|
threshold = 1;
|
|
1786
1878
|
}
|
|
1787
1879
|
cleanup();
|
|
@@ -1852,7 +1944,7 @@ function observeMove(element, onMove) {
|
|
|
1852
1944
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1853
1945
|
*/
|
|
1854
1946
|
function autoUpdate(reference, floating, update, options) {
|
|
1855
|
-
if (options ===
|
|
1947
|
+
if (options === undefined) {
|
|
1856
1948
|
options = {};
|
|
1857
1949
|
}
|
|
1858
1950
|
const {
|
|
@@ -1979,6 +2071,11 @@ class AuroFloatingUI {
|
|
|
1979
2071
|
this.focusHandler = null;
|
|
1980
2072
|
this.clickHandler = null;
|
|
1981
2073
|
this.keyDownHandler = null;
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* @private
|
|
2077
|
+
*/
|
|
2078
|
+
this.eventPrefix = undefined;
|
|
1982
2079
|
}
|
|
1983
2080
|
|
|
1984
2081
|
/**
|
|
@@ -1995,22 +2092,24 @@ class AuroFloatingUI {
|
|
|
1995
2092
|
*/
|
|
1996
2093
|
mirrorSize(fullscreen) {
|
|
1997
2094
|
// mirror the boxsize from bibSizer
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2095
|
+
if (this.element.bibSizer) {
|
|
2096
|
+
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2097
|
+
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2098
|
+
if (fullscreen) {
|
|
2099
|
+
bibContent.style.width = '';
|
|
2100
|
+
bibContent.style.height = '';
|
|
2101
|
+
bibContent.style.maxWidth = '';
|
|
2102
|
+
bibContent.style.maxHeight = '';
|
|
2103
|
+
} else {
|
|
2104
|
+
if (sizerStyle.width !== '0px') {
|
|
2105
|
+
bibContent.style.width = sizerStyle.width;
|
|
2106
|
+
}
|
|
2107
|
+
if (sizerStyle.height !== '0px') {
|
|
2108
|
+
bibContent.style.height = sizerStyle.height;
|
|
2109
|
+
}
|
|
2110
|
+
bibContent.style.maxWidth = sizerStyle.maxWidth;
|
|
2111
|
+
bibContent.style.maxHeight = sizerStyle.maxHeight;
|
|
2011
2112
|
}
|
|
2012
|
-
bibContent.style.maxWidth = sizerStyle.maxWidth;
|
|
2013
|
-
bibContent.style.maxHeight = sizerStyle.maxHeight;
|
|
2014
2113
|
}
|
|
2015
2114
|
}
|
|
2016
2115
|
|
|
@@ -2061,7 +2160,7 @@ class AuroFloatingUI {
|
|
|
2061
2160
|
// Compute the position of the bib
|
|
2062
2161
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2063
2162
|
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2064
|
-
middleware: middleware
|
|
2163
|
+
middleware: middleware
|
|
2065
2164
|
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2066
2165
|
Object.assign(this.element.bib.style, {
|
|
2067
2166
|
left: `${x}px`,
|
|
@@ -2217,7 +2316,7 @@ class AuroFloatingUI {
|
|
|
2217
2316
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
2218
2317
|
*/
|
|
2219
2318
|
dispatchEventDropdownToggle() {
|
|
2220
|
-
const event = new CustomEvent(
|
|
2319
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
2221
2320
|
detail: {
|
|
2222
2321
|
expanded: this.isPopoverVisible,
|
|
2223
2322
|
},
|
|
@@ -2234,7 +2333,7 @@ class AuroFloatingUI {
|
|
|
2234
2333
|
this.showBib();
|
|
2235
2334
|
}
|
|
2236
2335
|
|
|
2237
|
-
const event = new CustomEvent(
|
|
2336
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-triggerClick` : "triggerClick", {
|
|
2238
2337
|
composed: true,
|
|
2239
2338
|
details: {
|
|
2240
2339
|
expanded: this.element.isPopoverVisible
|
|
@@ -2278,6 +2377,9 @@ class AuroFloatingUI {
|
|
|
2278
2377
|
this.handleFocusLoss();
|
|
2279
2378
|
break;
|
|
2280
2379
|
case 'click':
|
|
2380
|
+
if (document.activeElement === document.body) {
|
|
2381
|
+
event.currentTarget.focus();
|
|
2382
|
+
}
|
|
2281
2383
|
this.handleClick();
|
|
2282
2384
|
break;
|
|
2283
2385
|
// Do nothing
|
|
@@ -2315,7 +2417,8 @@ class AuroFloatingUI {
|
|
|
2315
2417
|
});
|
|
2316
2418
|
}
|
|
2317
2419
|
|
|
2318
|
-
configure(elem) {
|
|
2420
|
+
configure(elem, eventPrefix) {
|
|
2421
|
+
this.eventPrefix = eventPrefix;
|
|
2319
2422
|
this.element = elem;
|
|
2320
2423
|
this.element.trigger = this.element.shadowRoot.querySelector('#trigger');
|
|
2321
2424
|
this.element.bib = this.element.shadowRoot.querySelector('#bib');
|
|
@@ -2401,7 +2504,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
|
|
2401
2504
|
* @license
|
|
2402
2505
|
* Copyright 2018 Google LLC
|
|
2403
2506
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2404
|
-
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(
|
|
2507
|
+
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(undefined===this.st){this.st=new Set,undefined!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
2405
2508
|
|
|
2406
2509
|
/**
|
|
2407
2510
|
* @license
|
|
@@ -2475,7 +2578,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
2475
2578
|
return _fetchMap.get(uri);
|
|
2476
2579
|
};
|
|
2477
2580
|
|
|
2478
|
-
var styleCss$2 = i$3`*,*: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}`;
|
|
2581
|
+
var styleCss$2 = i$3`*,*: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
2582
|
|
|
2480
2583
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2481
2584
|
// See LICENSE in the project root for license information.
|
|
@@ -2742,7 +2845,8 @@ class AuroIcon extends BaseIcon {
|
|
|
2742
2845
|
};
|
|
2743
2846
|
|
|
2744
2847
|
const classes = {
|
|
2745
|
-
'label': this.label
|
|
2848
|
+
'label': this.label,
|
|
2849
|
+
'wrapper': true,
|
|
2746
2850
|
};
|
|
2747
2851
|
|
|
2748
2852
|
return x`
|
|
@@ -2766,15 +2870,15 @@ class AuroIcon extends BaseIcon {
|
|
|
2766
2870
|
}
|
|
2767
2871
|
}
|
|
2768
2872
|
|
|
2769
|
-
var iconVersion = '6.1.
|
|
2873
|
+
var iconVersion = '6.1.2';
|
|
2770
2874
|
|
|
2771
|
-
var styleCss$1 = i$3`: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)}`;
|
|
2875
|
+
var styleCss$1 = i$3`: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
2876
|
|
|
2773
|
-
var colorCss$1 = i$3`.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);
|
|
2877
|
+
var colorCss$1 = i$3`.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
2878
|
|
|
2775
2879
|
var tokensCss$2 = i$3`: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
2880
|
|
|
2777
|
-
var styleCss$3 = i$3`: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]
|
|
2881
|
+
var styleCss$3 = i$3`: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
2882
|
|
|
2779
2883
|
var colorCss$3 = i$3`.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
2884
|
|
|
@@ -2792,9 +2896,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2792
2896
|
];
|
|
2793
2897
|
|
|
2794
2898
|
/**
|
|
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
2899
|
* @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
2900
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2800
2901
|
*/
|
|
@@ -2820,14 +2921,26 @@ class AuroDropdownBib extends r {
|
|
|
2820
2921
|
|
|
2821
2922
|
static get properties() {
|
|
2822
2923
|
return {
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* If declared, will apply all styles for the common theme.
|
|
2927
|
+
*/
|
|
2823
2928
|
common: {
|
|
2824
2929
|
type: Boolean,
|
|
2825
2930
|
reflect: true
|
|
2826
2931
|
},
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* If declared, will apply extra padding to bib content.
|
|
2935
|
+
*/
|
|
2827
2936
|
inset: {
|
|
2828
2937
|
type: Boolean,
|
|
2829
2938
|
reflect: true
|
|
2830
2939
|
},
|
|
2940
|
+
|
|
2941
|
+
/**
|
|
2942
|
+
* If declared, will apply border-radius to the bib.
|
|
2943
|
+
*/
|
|
2831
2944
|
rounded: {
|
|
2832
2945
|
type: Boolean,
|
|
2833
2946
|
reflect: true
|
|
@@ -2871,22 +2984,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2871
2984
|
|
|
2872
2985
|
|
|
2873
2986
|
/**
|
|
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
2987
|
* @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
2988
|
* @slot - Default slot for the popover content.
|
|
2891
2989
|
* @slot label - Defines the content of the label.
|
|
2892
2990
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -2924,6 +3022,16 @@ class AuroDropdown extends r {
|
|
|
2924
3022
|
this.tabIndex = 0;
|
|
2925
3023
|
this.noToggle = false;
|
|
2926
3024
|
|
|
3025
|
+
/**
|
|
3026
|
+
* @private
|
|
3027
|
+
*/
|
|
3028
|
+
this.hasTriggerContent = false;
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* @private
|
|
3032
|
+
*/
|
|
3033
|
+
this.triggerContentSlot = undefined;
|
|
3034
|
+
|
|
2927
3035
|
/**
|
|
2928
3036
|
* @private
|
|
2929
3037
|
*/
|
|
@@ -2970,89 +3078,166 @@ class AuroDropdown extends r {
|
|
|
2970
3078
|
// function to define props used within the scope of this component
|
|
2971
3079
|
static get properties() {
|
|
2972
3080
|
return {
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* If declared, applies a border around the trigger slot.
|
|
3084
|
+
*/
|
|
2973
3085
|
bordered: {
|
|
2974
3086
|
type: Boolean,
|
|
2975
3087
|
reflect: true
|
|
2976
3088
|
},
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3092
|
+
* @attr {Boolean} chevron
|
|
3093
|
+
*/
|
|
2977
3094
|
chevron: {
|
|
2978
3095
|
type: Boolean,
|
|
2979
3096
|
reflect: true
|
|
2980
3097
|
},
|
|
2981
|
-
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3101
|
+
*/
|
|
3102
|
+
common: {
|
|
2982
3103
|
type: Boolean,
|
|
2983
3104
|
reflect: true
|
|
2984
3105
|
},
|
|
2985
|
-
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* If declared, the dropdown is not interactive.
|
|
3109
|
+
*/
|
|
3110
|
+
disabled: {
|
|
2986
3111
|
type: Boolean,
|
|
2987
3112
|
reflect: true
|
|
2988
3113
|
},
|
|
2989
|
-
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* @private
|
|
3117
|
+
*/
|
|
3118
|
+
dropdownWidth: {
|
|
3119
|
+
type: Number
|
|
3120
|
+
},
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3124
|
+
*/
|
|
3125
|
+
error: {
|
|
2990
3126
|
type: Boolean,
|
|
2991
|
-
reflect: true
|
|
3127
|
+
reflect: true
|
|
2992
3128
|
},
|
|
3129
|
+
|
|
3130
|
+
/**
|
|
3131
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3132
|
+
*/
|
|
2993
3133
|
focusShow: {
|
|
2994
3134
|
type: Boolean,
|
|
2995
3135
|
reflect: true
|
|
2996
3136
|
},
|
|
2997
|
-
|
|
3137
|
+
|
|
3138
|
+
/**
|
|
3139
|
+
* Makes the trigger to be full width of its parent container.
|
|
3140
|
+
*/
|
|
3141
|
+
fluid: {
|
|
2998
3142
|
type: Boolean,
|
|
2999
3143
|
reflect: true
|
|
3000
3144
|
},
|
|
3145
|
+
|
|
3146
|
+
/**
|
|
3147
|
+
* If declared, will apply padding around trigger slot content.
|
|
3148
|
+
*/
|
|
3001
3149
|
inset: {
|
|
3002
3150
|
type: Boolean,
|
|
3003
3151
|
reflect: true
|
|
3004
3152
|
},
|
|
3005
|
-
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* If true, the dropdown bib is displayed.
|
|
3156
|
+
*/
|
|
3157
|
+
isPopoverVisible: {
|
|
3158
|
+
type: Boolean
|
|
3159
|
+
},
|
|
3160
|
+
|
|
3161
|
+
/**
|
|
3162
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3163
|
+
*/
|
|
3164
|
+
hoverToggle: {
|
|
3006
3165
|
type: Boolean,
|
|
3007
3166
|
reflect: true
|
|
3008
3167
|
},
|
|
3009
|
-
|
|
3010
|
-
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* @private
|
|
3171
|
+
*/
|
|
3172
|
+
hasTriggerContent: {
|
|
3173
|
+
type: Boolean
|
|
3174
|
+
},
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* 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.
|
|
3178
|
+
*/
|
|
3179
|
+
mobileFullscreenBreakpoint: {
|
|
3180
|
+
type: String,
|
|
3011
3181
|
reflect: true
|
|
3012
3182
|
},
|
|
3013
|
-
|
|
3183
|
+
|
|
3184
|
+
/**
|
|
3185
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3186
|
+
*/
|
|
3187
|
+
matchWidth: {
|
|
3014
3188
|
type: Boolean,
|
|
3015
3189
|
reflect: true
|
|
3016
3190
|
},
|
|
3017
|
-
|
|
3191
|
+
|
|
3192
|
+
/**
|
|
3193
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3194
|
+
*/
|
|
3195
|
+
noHideOnThisFocusLoss: {
|
|
3018
3196
|
type: Boolean,
|
|
3019
3197
|
reflect: true
|
|
3020
3198
|
},
|
|
3021
|
-
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3202
|
+
*/
|
|
3203
|
+
noToggle: {
|
|
3022
3204
|
type: Boolean,
|
|
3023
3205
|
reflect: true
|
|
3024
3206
|
},
|
|
3025
|
-
|
|
3207
|
+
|
|
3026
3208
|
onSlotChange: {
|
|
3027
3209
|
type: Function,
|
|
3028
3210
|
reflect: false
|
|
3029
3211
|
},
|
|
3030
|
-
mobileFullscreenBreakpoint: {
|
|
3031
|
-
type: String,
|
|
3032
|
-
reflect: true,
|
|
3033
|
-
},
|
|
3034
3212
|
|
|
3035
3213
|
/**
|
|
3036
3214
|
* @private
|
|
3037
3215
|
*/
|
|
3038
|
-
|
|
3216
|
+
placement: {
|
|
3217
|
+
type: String
|
|
3218
|
+
},
|
|
3039
3219
|
|
|
3040
3220
|
/**
|
|
3041
|
-
*
|
|
3221
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3042
3222
|
*/
|
|
3043
|
-
|
|
3223
|
+
rounded: {
|
|
3224
|
+
type: Boolean,
|
|
3225
|
+
reflect: true
|
|
3226
|
+
},
|
|
3044
3227
|
|
|
3045
3228
|
/**
|
|
3046
3229
|
* @private
|
|
3047
3230
|
*/
|
|
3048
|
-
tabIndex: {
|
|
3231
|
+
tabIndex: {
|
|
3232
|
+
type: Number
|
|
3233
|
+
}
|
|
3049
3234
|
};
|
|
3050
3235
|
}
|
|
3051
3236
|
|
|
3052
3237
|
static get styles() {
|
|
3053
3238
|
return [
|
|
3054
|
-
styleCss$1,
|
|
3055
3239
|
colorCss$1,
|
|
3240
|
+
styleCss$1,
|
|
3056
3241
|
tokensCss$2
|
|
3057
3242
|
];
|
|
3058
3243
|
}
|
|
@@ -3083,10 +3268,16 @@ class AuroDropdown extends r {
|
|
|
3083
3268
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3084
3269
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3085
3270
|
}
|
|
3271
|
+
|
|
3272
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3273
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3274
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3275
|
+
this.handleTriggerContentSlotChange();
|
|
3276
|
+
}
|
|
3086
3277
|
}
|
|
3087
3278
|
|
|
3088
3279
|
firstUpdated() {
|
|
3089
|
-
this.floater.configure(this);
|
|
3280
|
+
this.floater.configure(this, 'auroDropdown');
|
|
3090
3281
|
this.bibContent = this.floater.element.bib;
|
|
3091
3282
|
|
|
3092
3283
|
// Add the tag name as an attribute if it is different than the component name
|
|
@@ -3125,6 +3316,43 @@ class AuroDropdown extends r {
|
|
|
3125
3316
|
return inCustomSlot;
|
|
3126
3317
|
}
|
|
3127
3318
|
|
|
3319
|
+
/**
|
|
3320
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3321
|
+
*
|
|
3322
|
+
* It first updates the floater settings
|
|
3323
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3324
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3325
|
+
*
|
|
3326
|
+
* @private
|
|
3327
|
+
* @method handleTriggerContentSlotChange
|
|
3328
|
+
* @param {Event} event - native slotchange event
|
|
3329
|
+
* @returns {void}
|
|
3330
|
+
*/
|
|
3331
|
+
handleTriggerContentSlotChange(event) {
|
|
3332
|
+
this.floater.handleTriggerTabIndex();
|
|
3333
|
+
|
|
3334
|
+
if (event) {
|
|
3335
|
+
this.triggerNode = event.target;
|
|
3336
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
if (this.triggerContentSlot) {
|
|
3340
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3341
|
+
if (slot.textContent.trim()) {
|
|
3342
|
+
return true;
|
|
3343
|
+
}
|
|
3344
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3345
|
+
if (!slotInSlot) {
|
|
3346
|
+
return false;
|
|
3347
|
+
}
|
|
3348
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3349
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3350
|
+
});
|
|
3351
|
+
} else {
|
|
3352
|
+
this.hasTriggerContent = false;
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3128
3356
|
/**
|
|
3129
3357
|
* Handles the default slot change event and updates the content.
|
|
3130
3358
|
*
|
|
@@ -3159,13 +3387,13 @@ class AuroDropdown extends r {
|
|
|
3159
3387
|
tabindex="${this.tabIndex}"
|
|
3160
3388
|
>
|
|
3161
3389
|
<div class="triggerContentWrapper">
|
|
3162
|
-
<label class="label" id="triggerLabel">
|
|
3390
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3163
3391
|
<slot name="label"></slot>
|
|
3164
3392
|
</label>
|
|
3165
3393
|
<div class="triggerContent">
|
|
3166
3394
|
<slot
|
|
3167
3395
|
name="trigger"
|
|
3168
|
-
@slotchange="${() =>
|
|
3396
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
3169
3397
|
</div>
|
|
3170
3398
|
</div>
|
|
3171
3399
|
${this.chevron || this.common ? u$1`
|
|
@@ -3207,11 +3435,11 @@ AuroDropdown.register();
|
|
|
3207
3435
|
|
|
3208
3436
|
var dropdownVersion = '3.0.0';
|
|
3209
3437
|
|
|
3210
|
-
var styleCss = i$
|
|
3438
|
+
var styleCss = i$b`*,*: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{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{padding:0;pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}.selectElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:1rem}`;
|
|
3211
3439
|
|
|
3212
|
-
var colorCss = i$
|
|
3440
|
+
var colorCss = i$b`*,*: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{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host [auro-dropdown]::part(trigger):hover{--ds-auro-dropdown-trigger-container-color: rgba(0 0 0 / 0.06)}:host([disabled]) *{color:var(--ds-color-text-ui-disabled-default, #adadad)}.placeholder{color:var(--ds-auro-select-placeholder-text-color)}`;
|
|
3213
3441
|
|
|
3214
|
-
var tokensCss = i$
|
|
3442
|
+
var tokensCss = i$b`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
|
|
3215
3443
|
|
|
3216
3444
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3217
3445
|
// See LICENSE in the project root for license information.
|
|
@@ -3221,22 +3449,10 @@ var tokensCss = i$a`:host{--ds-auro-select-placeholder-text-color: var(--ds-colo
|
|
|
3221
3449
|
/**
|
|
3222
3450
|
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
3223
3451
|
*
|
|
3224
|
-
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
3225
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
3226
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
3227
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
3228
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3229
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
3230
|
-
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
3231
|
-
* @attr {Boolean} flexMenuWidth - If set, makes dropdown bib width match the size of the content, rather than the width of the trigger.
|
|
3232
|
-
* @prop {String} placeholder - Define placeholder text to display before a value is manually selected.
|
|
3233
|
-
* @prop {String} value - Value selected for the component.
|
|
3234
|
-
* @prop {Boolean} disabled - When attribute is present element shows disabled state.
|
|
3235
|
-
* @prop {Boolean} noCheckmark - When true, checkmark on selected option will no longer be present.
|
|
3236
|
-
* @attr {Object} optionSelected - Specifies the current selected menuOption.
|
|
3237
3452
|
* @slot - Default slot for the menu content.
|
|
3238
3453
|
* @slot label - Defines the content of the label.
|
|
3239
3454
|
* @slot helpText - Defines the content of the helpText.
|
|
3455
|
+
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
3240
3456
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
3241
3457
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
3242
3458
|
* @csspart helpText - Apply CSS to the help text.
|
|
@@ -3247,7 +3463,6 @@ class AuroSelect extends r$4 {
|
|
|
3247
3463
|
constructor() {
|
|
3248
3464
|
super();
|
|
3249
3465
|
|
|
3250
|
-
this.placeholder = 'Please select option';
|
|
3251
3466
|
this.optionSelected = undefined;
|
|
3252
3467
|
this.validity = undefined;
|
|
3253
3468
|
|
|
@@ -3302,69 +3517,118 @@ class AuroSelect extends r$4 {
|
|
|
3302
3517
|
// to understand how to use reflected attributes with your property settings.
|
|
3303
3518
|
static get properties() {
|
|
3304
3519
|
return {
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* When attribute is present, element shows disabled state.
|
|
3523
|
+
*/
|
|
3524
|
+
disabled: {
|
|
3525
|
+
type: Boolean,
|
|
3526
|
+
reflect: true
|
|
3308
3527
|
},
|
|
3309
|
-
|
|
3310
|
-
|
|
3528
|
+
|
|
3529
|
+
/**
|
|
3530
|
+
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
3531
|
+
*/
|
|
3532
|
+
flexMenuWidth: {
|
|
3533
|
+
type: Boolean,
|
|
3534
|
+
reflect: true
|
|
3535
|
+
},
|
|
3536
|
+
|
|
3537
|
+
/**
|
|
3538
|
+
* When true, checkmark on selected option will no longer be present.
|
|
3539
|
+
*/
|
|
3540
|
+
noCheckmark: {
|
|
3541
|
+
type: Boolean,
|
|
3311
3542
|
reflect: true
|
|
3312
3543
|
},
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* If set, disables auto-validation on blur.
|
|
3547
|
+
*/
|
|
3313
3548
|
noValidate: {
|
|
3314
3549
|
type: Boolean,
|
|
3315
3550
|
reflect: true
|
|
3316
3551
|
},
|
|
3552
|
+
|
|
3553
|
+
/**
|
|
3554
|
+
* @private
|
|
3555
|
+
*/
|
|
3556
|
+
optionActive: {
|
|
3557
|
+
type: Object
|
|
3558
|
+
},
|
|
3559
|
+
|
|
3560
|
+
/**
|
|
3561
|
+
* Specifies the current selected menuOption.
|
|
3562
|
+
*/
|
|
3563
|
+
optionSelected: {
|
|
3564
|
+
type: Object
|
|
3565
|
+
},
|
|
3566
|
+
|
|
3567
|
+
/**
|
|
3568
|
+
* @private
|
|
3569
|
+
*/
|
|
3570
|
+
options: {
|
|
3571
|
+
type: Array
|
|
3572
|
+
},
|
|
3573
|
+
|
|
3574
|
+
/**
|
|
3575
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
3576
|
+
*/
|
|
3317
3577
|
required: {
|
|
3318
3578
|
type: Boolean,
|
|
3319
3579
|
reflect: true
|
|
3320
3580
|
},
|
|
3581
|
+
|
|
3582
|
+
/**
|
|
3583
|
+
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3584
|
+
*/
|
|
3321
3585
|
error: {
|
|
3322
3586
|
type: String,
|
|
3323
3587
|
reflect: true
|
|
3324
3588
|
},
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* Sets a custom help text message to display for all validityStates.
|
|
3592
|
+
*/
|
|
3325
3593
|
setCustomValidity: {
|
|
3326
3594
|
type: String
|
|
3327
3595
|
},
|
|
3596
|
+
|
|
3597
|
+
/**
|
|
3598
|
+
* Custom help text message to display when validity = `customError`.
|
|
3599
|
+
*/
|
|
3328
3600
|
setCustomValidityCustomError: {
|
|
3329
3601
|
type: String
|
|
3330
3602
|
},
|
|
3603
|
+
|
|
3604
|
+
/**
|
|
3605
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
3606
|
+
*/
|
|
3331
3607
|
setCustomValidityValueMissing: {
|
|
3332
3608
|
type: String
|
|
3333
3609
|
},
|
|
3610
|
+
|
|
3611
|
+
/**
|
|
3612
|
+
* Specifies the `validityState` this element is in.
|
|
3613
|
+
*/
|
|
3334
3614
|
validity: {
|
|
3335
3615
|
type: String,
|
|
3336
3616
|
reflect: true
|
|
3337
3617
|
},
|
|
3338
|
-
disabled: {
|
|
3339
|
-
type: Boolean,
|
|
3340
|
-
reflect: true
|
|
3341
|
-
},
|
|
3342
|
-
noCheckmark: {
|
|
3343
|
-
type: Boolean,
|
|
3344
|
-
reflect: true
|
|
3345
|
-
},
|
|
3346
|
-
flexMenuWidth: {
|
|
3347
|
-
type: Boolean,
|
|
3348
|
-
reflect: true
|
|
3349
|
-
},
|
|
3350
|
-
placeholder: { type: String },
|
|
3351
3618
|
|
|
3352
3619
|
/**
|
|
3353
|
-
*
|
|
3620
|
+
* Value selected for the component.
|
|
3354
3621
|
*/
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
* @private
|
|
3359
|
-
*/
|
|
3360
|
-
optionActive: { type: Object },
|
|
3622
|
+
value: {
|
|
3623
|
+
type: String
|
|
3624
|
+
}
|
|
3361
3625
|
};
|
|
3362
3626
|
}
|
|
3363
3627
|
|
|
3364
3628
|
static get styles() {
|
|
3365
3629
|
return [
|
|
3366
|
-
styleCss,
|
|
3367
3630
|
colorCss,
|
|
3631
|
+
styleCss,
|
|
3368
3632
|
tokensCss
|
|
3369
3633
|
];
|
|
3370
3634
|
}
|
|
@@ -3399,36 +3663,30 @@ class AuroSelect extends r$4 {
|
|
|
3399
3663
|
}
|
|
3400
3664
|
|
|
3401
3665
|
/**
|
|
3402
|
-
* Updates the displayed value in an Auro dropdown component based on
|
|
3403
|
-
* @param {string|HTMLElement} option - The option to display. If a string, a new span element with the value string is created. If an HTMLElement, the selected option is cloned and non-styling attributes are removed.
|
|
3666
|
+
* Updates the displayed value in an Auro dropdown component based on optionSelected
|
|
3404
3667
|
* @private
|
|
3405
3668
|
* @returns {void}
|
|
3406
3669
|
*/
|
|
3407
|
-
updateDisplayedValue(
|
|
3670
|
+
updateDisplayedValue() {
|
|
3408
3671
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
3409
3672
|
|
|
3410
3673
|
// remove all existing rendered value(s)
|
|
3411
|
-
triggerContentEl.querySelectorAll('auro-menuoption, [
|
|
3674
|
+
triggerContentEl.querySelectorAll('auro-menuoption, [auro-menuoption]').forEach((elm) => {
|
|
3412
3675
|
elm.remove();
|
|
3413
3676
|
});
|
|
3414
3677
|
|
|
3415
|
-
if (
|
|
3416
|
-
// create a new span element with the value string
|
|
3417
|
-
const valueElem = document.createElement('span');
|
|
3418
|
-
valueElem.setAttribute('valuestr', true);
|
|
3419
|
-
valueElem.textContent = option;
|
|
3420
|
-
|
|
3421
|
-
// append the new element into the trigger content
|
|
3422
|
-
triggerContentEl.appendChild(valueElem);
|
|
3423
|
-
} else if (typeof option === 'object') {
|
|
3678
|
+
if (this.optionSelected) {
|
|
3424
3679
|
// clone the selected option and remove attributes that style it
|
|
3425
|
-
const clone =
|
|
3680
|
+
const clone = this.optionSelected.cloneNode(true);
|
|
3426
3681
|
clone.removeAttribute('selected');
|
|
3427
3682
|
clone.removeAttribute('class');
|
|
3428
3683
|
|
|
3429
3684
|
// insert the non-styled clone into the trigger
|
|
3430
3685
|
triggerContentEl.appendChild(clone);
|
|
3431
3686
|
}
|
|
3687
|
+
|
|
3688
|
+
// notify dropdown as trigger content is changed
|
|
3689
|
+
this.dropdown.requestUpdate();
|
|
3432
3690
|
}
|
|
3433
3691
|
|
|
3434
3692
|
/**
|
|
@@ -3438,7 +3696,7 @@ class AuroSelect extends r$4 {
|
|
|
3438
3696
|
*/
|
|
3439
3697
|
configureMenu() {
|
|
3440
3698
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
3441
|
-
|
|
3699
|
+
|
|
3442
3700
|
// racing condition on custom-select with custom-menu
|
|
3443
3701
|
if (!this.menu) {
|
|
3444
3702
|
setTimeout(() => {
|
|
@@ -3447,20 +3705,19 @@ class AuroSelect extends r$4 {
|
|
|
3447
3705
|
return;
|
|
3448
3706
|
}
|
|
3449
3707
|
|
|
3708
|
+
this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
|
|
3450
3709
|
this.menu.setAttribute('aria-hidden', 'true');
|
|
3451
3710
|
|
|
3452
3711
|
this.generateOptionsArray();
|
|
3453
3712
|
|
|
3454
|
-
this.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
3713
|
+
this.menu.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
3455
3714
|
this.optionActive = evt.detail;
|
|
3456
3715
|
});
|
|
3457
3716
|
|
|
3458
|
-
this.menu.addEventListener('selectedOption', () => {
|
|
3717
|
+
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
3459
3718
|
this.optionSelected = this.menu.optionSelected;
|
|
3460
3719
|
this.value = this.optionSelected.value;
|
|
3461
3720
|
|
|
3462
|
-
this.updateDisplayedValue(this.optionSelected);
|
|
3463
|
-
|
|
3464
3721
|
if (this.dropdown.isPopoverVisible) {
|
|
3465
3722
|
this.dropdown.hide();
|
|
3466
3723
|
}
|
|
@@ -3474,25 +3731,11 @@ class AuroSelect extends r$4 {
|
|
|
3474
3731
|
* with `auro-select.value`.
|
|
3475
3732
|
*/
|
|
3476
3733
|
this.menu.addEventListener('auroMenu-selectValueFailure', () => {
|
|
3477
|
-
this.
|
|
3478
|
-
this.optionSelected = this.menu.optionSelected;
|
|
3479
|
-
|
|
3480
|
-
this.validity = 'badInput';
|
|
3481
|
-
|
|
3482
|
-
// Capitalizes the first letter of each word in this.value string
|
|
3483
|
-
const valueStr = this.value.replace(/(^\w{1})|(\s+\w{1})/gu, (letter) => letter.toUpperCase());
|
|
3484
|
-
|
|
3485
|
-
// Pass the new string to the trigger content
|
|
3486
|
-
this.updateDisplayedValue(valueStr);
|
|
3734
|
+
this.reset();
|
|
3487
3735
|
});
|
|
3488
3736
|
|
|
3489
3737
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
3490
|
-
|
|
3491
|
-
this.updateDisplayedValue(this.placeholder);
|
|
3492
|
-
|
|
3493
|
-
this.optionSelected = undefined;
|
|
3494
|
-
this.value = undefined;
|
|
3495
|
-
|
|
3738
|
+
this.optionSelected = this.menu.optionSelected;
|
|
3496
3739
|
this.validation.validate(this);
|
|
3497
3740
|
});
|
|
3498
3741
|
}
|
|
@@ -3544,8 +3787,6 @@ class AuroSelect extends r$4 {
|
|
|
3544
3787
|
this.addEventListener('blur', () => {
|
|
3545
3788
|
this.validation.validate(this);
|
|
3546
3789
|
});
|
|
3547
|
-
|
|
3548
|
-
this.labelForSr();
|
|
3549
3790
|
}
|
|
3550
3791
|
|
|
3551
3792
|
/**
|
|
@@ -3664,50 +3905,21 @@ class AuroSelect extends r$4 {
|
|
|
3664
3905
|
}));
|
|
3665
3906
|
}
|
|
3666
3907
|
|
|
3908
|
+
if (changedProperties.has('optionSelected')) {
|
|
3909
|
+
this.updateDisplayedValue();
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3667
3912
|
if (changedProperties.has('error')) {
|
|
3668
3913
|
this.validation.validate(this, true);
|
|
3669
3914
|
}
|
|
3670
3915
|
}
|
|
3671
3916
|
|
|
3672
3917
|
/**
|
|
3673
|
-
*
|
|
3674
|
-
* @private
|
|
3918
|
+
* Resets component to initial state.
|
|
3675
3919
|
* @returns {void}
|
|
3676
3920
|
*/
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
const textId = "label";
|
|
3680
|
-
|
|
3681
|
-
placeholderLabel.setAttribute("id", textId);
|
|
3682
|
-
placeholderLabel.setAttribute("aria-live", "polite");
|
|
3683
|
-
|
|
3684
|
-
const styles = {
|
|
3685
|
-
position: 'absolute',
|
|
3686
|
-
overflow: 'hidden',
|
|
3687
|
-
clipPath: 'inset(1px, 1px, 1px, 1px)',
|
|
3688
|
-
width: '1px',
|
|
3689
|
-
height: '1px',
|
|
3690
|
-
padding: '0',
|
|
3691
|
-
border: '0'
|
|
3692
|
-
};
|
|
3693
|
-
|
|
3694
|
-
Object.assign(placeholderLabel.style, styles);
|
|
3695
|
-
|
|
3696
|
-
this.addEventListener('focus', () => {
|
|
3697
|
-
document.body.appendChild(placeholderLabel);
|
|
3698
|
-
|
|
3699
|
-
if (!this.optionSelected) {
|
|
3700
|
-
document.getElementById(textId).innerHTML = this.placeholder;
|
|
3701
|
-
} else {
|
|
3702
|
-
document.getElementById(textId).innerHTML = `${this.optionSelected.innerText}, ${this.placeholder}`;
|
|
3703
|
-
}
|
|
3704
|
-
});
|
|
3705
|
-
|
|
3706
|
-
this.addEventListener('blur', () => {
|
|
3707
|
-
if (document.contains(placeholderLabel)) {
|
|
3708
|
-
document.body.removeChild(placeholderLabel);
|
|
3709
|
-
}
|
|
3710
|
-
});
|
|
3921
|
+
reset() {
|
|
3922
|
+
this.validation.reset(this);
|
|
3711
3923
|
}
|
|
3712
3924
|
|
|
3713
3925
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
@@ -3715,6 +3927,10 @@ class AuroSelect extends r$4 {
|
|
|
3715
3927
|
|
|
3716
3928
|
// function that renders the HTML and CSS into the scope of the component
|
|
3717
3929
|
render() {
|
|
3930
|
+
const placeholderClass = {
|
|
3931
|
+
hidden: this.value,
|
|
3932
|
+
};
|
|
3933
|
+
|
|
3718
3934
|
return u$3`
|
|
3719
3935
|
<div class="outerWrapper">
|
|
3720
3936
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -3741,7 +3957,7 @@ class AuroSelect extends r$4 {
|
|
|
3741
3957
|
chevron
|
|
3742
3958
|
part="dropdown">
|
|
3743
3959
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
3744
|
-
|
|
3960
|
+
<span id="placeholder" class="${e$5(placeholderClass)}"><slot name="placeholder"></slot></span>
|
|
3745
3961
|
</span>
|
|
3746
3962
|
<div class="menuWrapper">
|
|
3747
3963
|
</div>
|
|
@@ -3754,7 +3970,7 @@ class AuroSelect extends r$4 {
|
|
|
3754
3970
|
</p>`
|
|
3755
3971
|
: u$3`
|
|
3756
3972
|
<p class="selectElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
3757
|
-
${this.
|
|
3973
|
+
${this.errorMessage}
|
|
3758
3974
|
</p>`
|
|
3759
3975
|
}
|
|
3760
3976
|
</span>
|