@aurodesignsystem/auro-formkit 2.0.0-beta.1 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/cache/026e4d886ba97e63-meta.json +1 -0
- package/.turbo/cache/026e4d886ba97e63.tar.zst +0 -0
- package/.turbo/cache/080ca6155e637d5d-meta.json +1 -0
- package/.turbo/cache/080ca6155e637d5d.tar.zst +0 -0
- package/.turbo/cache/0b115e30ff606299-meta.json +1 -0
- package/.turbo/cache/0b115e30ff606299.tar.zst +0 -0
- package/.turbo/cache/0c8124a987c1cc05-meta.json +1 -0
- package/.turbo/cache/0c8124a987c1cc05.tar.zst +0 -0
- package/.turbo/cache/18129dba20f51b6b-meta.json +1 -0
- package/.turbo/cache/18129dba20f51b6b.tar.zst +0 -0
- package/.turbo/cache/1c630fb3411e4a41-meta.json +1 -0
- package/.turbo/cache/1c630fb3411e4a41.tar.zst +0 -0
- package/.turbo/cache/24b19ac5895e5dd6-meta.json +1 -0
- package/.turbo/cache/24b19ac5895e5dd6.tar.zst +0 -0
- package/.turbo/cache/2787020e69f50af2-meta.json +1 -0
- package/.turbo/cache/2787020e69f50af2.tar.zst +0 -0
- package/.turbo/cache/29b72c73cbccb53d-meta.json +1 -0
- package/.turbo/cache/29b72c73cbccb53d.tar.zst +0 -0
- package/.turbo/cache/2c0d681132c153dd-meta.json +1 -0
- package/.turbo/cache/2c0d681132c153dd.tar.zst +0 -0
- package/.turbo/cache/3e647c5863d32e6f-meta.json +1 -0
- package/.turbo/cache/3e647c5863d32e6f.tar.zst +0 -0
- package/.turbo/cache/4006a206400d5c7b-meta.json +1 -0
- package/.turbo/cache/4006a206400d5c7b.tar.zst +0 -0
- package/.turbo/cache/43f5206cc4e69b44-meta.json +1 -0
- package/.turbo/cache/43f5206cc4e69b44.tar.zst +0 -0
- package/.turbo/cache/492dda333b8d15f1-meta.json +1 -0
- package/.turbo/cache/492dda333b8d15f1.tar.zst +0 -0
- package/.turbo/cache/4a85ec226b585fd5-meta.json +1 -0
- package/.turbo/cache/4a85ec226b585fd5.tar.zst +0 -0
- package/.turbo/cache/50993de942ec15a9-meta.json +1 -0
- package/.turbo/cache/50993de942ec15a9.tar.zst +0 -0
- package/.turbo/cache/50a29c70b93c57dd-meta.json +1 -0
- package/.turbo/cache/50a29c70b93c57dd.tar.zst +0 -0
- package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -0
- package/.turbo/cache/51eaa58d5c167de8.tar.zst +0 -0
- package/.turbo/cache/56455145cd768755-meta.json +1 -0
- package/.turbo/cache/56455145cd768755.tar.zst +0 -0
- package/.turbo/cache/5c06332cf9f132da-meta.json +1 -0
- package/.turbo/cache/5c06332cf9f132da.tar.zst +0 -0
- package/.turbo/cache/5e613afc6868d0e2-meta.json +1 -0
- package/.turbo/cache/5e613afc6868d0e2.tar.zst +0 -0
- package/.turbo/cache/6081837e8943b62e-meta.json +1 -0
- package/.turbo/cache/6081837e8943b62e.tar.zst +0 -0
- package/.turbo/cache/60ad74320c682a2b-meta.json +1 -0
- package/.turbo/cache/60ad74320c682a2b.tar.zst +0 -0
- package/.turbo/cache/61e218aba69cff58-meta.json +1 -0
- package/.turbo/cache/61e218aba69cff58.tar.zst +0 -0
- package/.turbo/cache/639dac15b979bedc-meta.json +1 -0
- package/.turbo/cache/639dac15b979bedc.tar.zst +0 -0
- package/.turbo/cache/664c2e08614fd212-meta.json +1 -0
- package/.turbo/cache/664c2e08614fd212.tar.zst +0 -0
- package/.turbo/cache/6c51b0ebfc086faa-meta.json +1 -0
- package/.turbo/cache/6c51b0ebfc086faa.tar.zst +0 -0
- package/.turbo/cache/7216d994164825fb-meta.json +1 -0
- package/.turbo/cache/7216d994164825fb.tar.zst +0 -0
- package/.turbo/cache/77da375a012de9d0-meta.json +1 -0
- package/.turbo/cache/77da375a012de9d0.tar.zst +0 -0
- package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -0
- package/.turbo/cache/7bf2b06a479d0b30.tar.zst +0 -0
- package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -0
- package/.turbo/cache/7c9ca6163e61285c.tar.zst +0 -0
- package/.turbo/cache/83a167e135cb431a-meta.json +1 -0
- package/.turbo/cache/83a167e135cb431a.tar.zst +0 -0
- package/.turbo/cache/8af27c076dc010c3-meta.json +1 -0
- package/.turbo/cache/8af27c076dc010c3.tar.zst +0 -0
- package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -0
- package/.turbo/cache/8bb856bd31b5b479.tar.zst +0 -0
- package/.turbo/cache/953c8216249d3509-meta.json +1 -0
- package/.turbo/cache/953c8216249d3509.tar.zst +0 -0
- package/.turbo/cache/95a5e76ffd8c5110-meta.json +1 -0
- package/.turbo/cache/95a5e76ffd8c5110.tar.zst +0 -0
- package/.turbo/cache/9ae99e8e7bd83d06-meta.json +1 -0
- package/.turbo/cache/9ae99e8e7bd83d06.tar.zst +0 -0
- package/.turbo/cache/a8b0fa0a9aa707c5-meta.json +1 -0
- package/.turbo/cache/a8b0fa0a9aa707c5.tar.zst +0 -0
- package/.turbo/cache/b22ca87b2f7f9cc2-meta.json +1 -0
- package/.turbo/cache/b22ca87b2f7f9cc2.tar.zst +0 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f.tar.zst +0 -0
- package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -0
- package/.turbo/cache/b6a202cc85cb61a0.tar.zst +0 -0
- package/.turbo/cache/b7bbe2e7d44b77f0-meta.json +1 -0
- package/.turbo/cache/b7bbe2e7d44b77f0.tar.zst +0 -0
- package/.turbo/cache/be0b95293ea517cc-meta.json +1 -0
- package/.turbo/cache/be0b95293ea517cc.tar.zst +0 -0
- package/.turbo/cache/c2b51643f886a493-meta.json +1 -0
- package/.turbo/cache/c2b51643f886a493.tar.zst +0 -0
- package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +1 -0
- package/.turbo/cache/c44efc9e4ddd8a0e.tar.zst +0 -0
- package/.turbo/cache/c6c6411199b68170-meta.json +1 -0
- package/.turbo/cache/c6c6411199b68170.tar.zst +0 -0
- package/.turbo/cache/c74d369a0475b124-meta.json +1 -0
- package/.turbo/cache/c74d369a0475b124.tar.zst +0 -0
- package/.turbo/cache/c7f5a276ddb73cf7-meta.json +1 -0
- package/.turbo/cache/c7f5a276ddb73cf7.tar.zst +0 -0
- package/.turbo/cache/c96933d40404e4c8-meta.json +1 -0
- package/.turbo/cache/c96933d40404e4c8.tar.zst +0 -0
- package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -0
- package/.turbo/cache/d5db503b2eaf239c.tar.zst +0 -0
- package/.turbo/cache/d775555355d6b8fc-meta.json +1 -0
- package/.turbo/cache/d775555355d6b8fc.tar.zst +0 -0
- package/.turbo/cache/d7c3007be148d2a1-meta.json +1 -0
- package/.turbo/cache/d7c3007be148d2a1.tar.zst +0 -0
- package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -0
- package/.turbo/cache/dad3d78b33edd9e4.tar.zst +0 -0
- package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -0
- package/.turbo/cache/e62cfee068e3ef36.tar.zst +0 -0
- package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -0
- package/.turbo/cache/e9e36823f6c98f07.tar.zst +0 -0
- package/.turbo/cache/eb1dbe885532c1dc-meta.json +1 -0
- package/.turbo/cache/eb1dbe885532c1dc.tar.zst +0 -0
- package/.turbo/cache/f1f6744948f1b18f-meta.json +1 -0
- package/.turbo/cache/f1f6744948f1b18f.tar.zst +0 -0
- package/.turbo/cache/feefbc25d550c1cd-meta.json +1 -0
- package/.turbo/cache/feefbc25d550c1cd.tar.zst +0 -0
- package/.turbo/cache/ff4dbfffc29255ab-meta.json +1 -0
- package/.turbo/cache/ff4dbfffc29255ab.tar.zst +0 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +109 -0
- package/README.md +59 -59
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +10 -10
- package/components/checkbox/.turbo/turbo-build.log +20 -21
- package/components/checkbox/.turbo/turbo-bundler.log +4 -4
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/checkbox/.turbo/turbo-types.log +1 -1
- package/components/checkbox/README.md +26 -34
- package/components/checkbox/demo/api.md +65 -65
- package/components/checkbox/demo/api.min.js +184 -84
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +184 -84
- package/components/checkbox/dist/auro-checkbox-group.d.ts +35 -16
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +20 -11
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +184 -84
- package/components/checkbox/package.json +1 -1
- package/components/checkbox/src/auro-checkbox-group.js +46 -17
- package/components/checkbox/src/auro-checkbox.js +29 -12
- package/components/combobox/.turbo/turbo-build$colon$sass.log +5 -5
- package/components/combobox/.turbo/turbo-build.log +22 -23
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/combobox/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/combobox/README.md +21 -26
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +754 -357
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +754 -357
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/dropdownVersion.d.ts +3 -0
- package/components/combobox/dist/dropdownVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.js +752 -355
- package/components/combobox/dist/inputVersion.d.ts +3 -0
- package/components/combobox/dist/inputVersion.d.ts.map +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/.husky/pre-commit +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/CHANGELOG.md +863 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/README.md +109 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/README.md +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/_auroElement.scss +45 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.js +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials+fv.css +110 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials.css +106 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css +8 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css +813 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/package.json +134 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/packageScripts/postinstall.mjs +39 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_animation.scss +30 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_blockquote.scss +46 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_breakpoints.scss +155 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_core.scss +25 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_essentials.scss +267 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_focus-visible.scss +36 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_fonts.scss +50 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_grids.scss +395 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_headings.scss +255 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_normalize.scss +663 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_picture.scss +31 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_utilityClasses.scss +22 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials+fv.scss +19 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleButton.scss +32 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleTab.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_containedButtons.scss +59 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_table.scss +54 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_tablist.scss +37 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/README.md +5 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/demoWrapper.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/elementDemoStyles.scss +123 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_deprecated.scss +16 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_manageScope.scss +42 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_displayProperties.scss +142 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_fontStyles.scss +151 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_inset.scss +188 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_layoutProperties.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_listProperties.scss +176 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_responsive.scss +249 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_typeProperties.scss +49 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_capitalize.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_contains.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_map-deep-get.scss +29 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleButton.scss +76 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleTab.scss +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_insetUtility.scss +9 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_layoutPropertiesGenerator.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_spacingUtility.scss +96 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_important.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_spacing-options.scss +13 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/README.md +293 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js +1377 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/index.js +1370 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/package.json +1 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/package.json +89 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/types/index.d.ts +115 -0
- package/components/combobox/node_modules/chalk/package.json +3 -3
- package/components/combobox/node_modules/chalk/readme.md +25 -53
- package/components/combobox/node_modules/chalk/source/index.d.ts +6 -1
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +6 -2
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +2 -2
- package/components/combobox/package.json +8 -8
- package/components/combobox/src/auro-combobox.js +75 -76
- package/components/combobox/src/dropdownVersion.js +1 -0
- package/components/combobox/src/inputVersion.js +1 -0
- package/components/counter/.turbo/turbo-build$colon$sass.log +179 -7
- package/components/counter/.turbo/turbo-build$colon$version.log +10 -0
- package/components/counter/.turbo/turbo-build.log +288 -14
- package/components/counter/.turbo/turbo-bundler.log +4 -4
- package/components/counter/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/counter/.turbo/turbo-sass$colon$render.log +39 -3
- package/components/counter/.turbo/turbo-types.log +1 -1
- package/components/counter/README.md +188 -0
- package/components/counter/demo/api.md +98 -1016
- package/components/counter/demo/api.min.js +1670 -32
- package/components/counter/demo/index.js +2 -1
- package/components/counter/demo/index.md +194 -0
- package/components/counter/demo/index.min.js +1702 -19
- package/components/counter/dist/auro-counter-button.d.ts +13 -0
- package/components/counter/dist/auro-counter-button.d.ts.map +1 -0
- package/components/counter/dist/auro-counter-group.d.ts +77 -6
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -1
- package/components/counter/dist/auro-counter.d.ts +78 -0
- package/components/counter/dist/auro-counter.d.ts.map +1 -1
- package/components/counter/dist/dropdownVersion.d.ts +3 -0
- package/components/counter/dist/dropdownVersion.d.ts.map +1 -0
- package/components/counter/dist/formkit/auro-dropdownVersion.d.ts +3 -0
- package/components/counter/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
- package/components/counter/dist/iconVersion.d.ts +3 -0
- package/components/counter/dist/iconVersion.d.ts.map +1 -0
- package/components/counter/dist/index.js +1670 -32
- package/components/counter/dist/styles/color-css.d.ts +3 -0
- package/components/counter/dist/styles/color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-group-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-group-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/counter/package.json +9 -3
- package/components/counter/src/auro-counter-button.js +42 -0
- package/components/counter/src/auro-counter-group.js +150 -21
- package/components/counter/src/auro-counter.js +272 -12
- package/components/counter/src/dropdownVersion.js +1 -0
- package/components/counter/src/formkit/auro-dropdownVersion.js +1 -0
- package/components/counter/src/iconVersion.js +1 -0
- package/components/counter/src/index.js +1 -1
- package/components/counter/src/styles/color-css.js +2 -0
- package/components/counter/src/styles/color.css +25 -0
- package/components/counter/src/styles/color.scss +44 -0
- package/components/counter/src/styles/counter-button-color-css.js +2 -0
- package/components/counter/src/styles/counter-button-color.css +14 -0
- package/components/counter/src/styles/counter-button-color.scss +29 -0
- package/components/counter/src/styles/counter-button-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens.css +7 -0
- package/components/counter/src/styles/counter-button-tokens.scss +9 -0
- package/components/counter/src/styles/counter-button.css +187 -0
- package/components/counter/src/styles/counter-button.scss +83 -0
- package/components/counter/src/styles/counter-group-color-css.js +2 -0
- package/components/counter/src/styles/counter-group-color.css +4 -0
- package/components/counter/src/styles/counter-group-color.scss +19 -0
- package/components/counter/src/styles/counter-group-css.js +1 -1
- package/components/counter/src/styles/counter-group.css +13 -1
- package/components/counter/src/styles/counter-group.scss +14 -1
- package/components/counter/src/styles/style-css.js +1 -1
- package/components/counter/src/styles/style.css +43 -1
- package/components/counter/src/styles/style.scss +48 -2
- package/components/counter/src/styles/tokens-css.js +2 -0
- package/components/counter/src/styles/tokens.css +11 -0
- package/components/counter/src/styles/tokens.scss +24 -0
- package/components/datepicker/.turbo/turbo-build$colon$sass.log +34 -34
- package/components/datepicker/.turbo/turbo-build.log +59 -59
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +10 -10
- package/components/datepicker/README.md +21 -26
- package/components/datepicker/demo/api.md +177 -131
- package/components/datepicker/demo/api.min.js +995 -559
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +995 -559
- package/components/datepicker/dist/auro-datepicker.d.ts +89 -78
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +995 -559
- package/components/datepicker/dist/inputVersion.d.ts +3 -0
- package/components/datepicker/dist/inputVersion.d.ts.map +1 -0
- package/components/datepicker/package.json +3 -3
- package/components/datepicker/src/auro-datepicker.js +142 -104
- package/components/datepicker/src/dropdownVersion.js +1 -0
- package/components/datepicker/src/inputVersion.js +1 -0
- package/components/datepicker/src/styles/color-cell-css.js +1 -1
- package/components/datepicker/src/styles/color-cell.css +1 -1
- package/components/datepicker/src/styles/color-cell.scss +1 -1
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +8 -8
- package/components/dropdown/.turbo/turbo-build$colon$version.log +1 -1
- package/components/dropdown/.turbo/turbo-build.log +19 -20
- package/components/dropdown/.turbo/turbo-bundler.log +4 -4
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/dropdown/.turbo/turbo-types.log +1 -1
- package/components/dropdown/README.md +18 -26
- package/components/dropdown/demo/api.md +4 -4
- package/components/dropdown/demo/api.min.js +205 -81
- package/components/dropdown/demo/index.min.js +205 -81
- package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +205 -81
- package/components/dropdown/package.json +1 -1
- package/components/dropdown/src/auro-dropdown.js +154 -39
- package/components/dropdown/src/auro-dropdownBib.js +12 -3
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +4 -0
- package/components/dropdown/src/styles/style.scss +5 -0
- package/components/form/.turbo/turbo-build$colon$sass.log +6 -6
- package/components/form/.turbo/turbo-build$colon$version.log +1 -1
- package/components/form/.turbo/turbo-build.log +17 -18
- package/components/form/.turbo/turbo-bundler.log +4 -4
- package/components/form/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/form/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/form/.turbo/turbo-types.log +1 -1
- package/components/form/README.md +18 -26
- package/components/form/demo/api.min.js +4 -4
- package/components/form/demo/index.min.js +4 -4
- package/components/form/dist/index.js +4 -4
- package/components/form/package.json +1 -1
- package/components/input/.turbo/turbo-build$colon$sass.log +66 -16
- package/components/input/.turbo/turbo-build$colon$version.log +1 -1
- package/components/input/.turbo/turbo-build.log +79 -32
- package/components/input/.turbo/turbo-bundler.log +4 -4
- package/components/input/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +15 -9
- package/components/input/.turbo/turbo-types.log +1 -1
- package/components/input/README.md +18 -28
- package/components/input/demo/api.md +146 -311
- package/components/input/demo/api.min.js +365 -145
- package/components/input/demo/index.md +11 -61
- package/components/input/demo/index.min.js +365 -145
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +155 -84
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +365 -145
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/package.json +1 -1
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +252 -85
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- package/components/menu/.turbo/turbo-build$colon$sass.log +9 -9
- package/components/menu/.turbo/turbo-build$colon$version.log +1 -1
- package/components/menu/.turbo/turbo-build.log +20 -21
- package/components/menu/.turbo/turbo-bundler.log +4 -4
- package/components/menu/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/menu/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/menu/.turbo/turbo-types.log +1 -1
- package/components/menu/README.md +18 -26
- package/components/menu/demo/api.min.js +7 -7
- package/components/menu/demo/index.min.js +7 -7
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +7 -7
- package/components/menu/package.json +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build$colon$sass.log +13 -13
- package/components/radio/.turbo/turbo-build.log +23 -24
- package/components/radio/.turbo/turbo-bundler.log +4 -4
- package/components/radio/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/radio/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/radio/.turbo/turbo-types.log +1 -1
- package/components/radio/README.md +18 -26
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +111 -57
- package/components/radio/demo/index.min.js +111 -57
- package/components/radio/dist/index.js +111 -57
- package/components/radio/package.json +1 -1
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +30 -33
- package/components/select/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/select/.turbo/turbo-sass$colon$render.log +4 -4
- package/components/select/README.md +21 -42
- package/components/select/demo/api.md +45 -110
- package/components/select/demo/api.min.js +434 -279
- package/components/select/demo/index.md +101 -59
- package/components/select/demo/index.min.js +434 -275
- package/components/select/dist/auro-select.d.ts +64 -51
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/dropdownVersion.d.ts +3 -0
- package/components/select/dist/dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.js +429 -257
- package/components/select/package.json +3 -3
- package/components/select/src/auro-select.js +101 -119
- package/components/select/src/dropdownVersion.js +1 -0
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +7 -0
- package/components/select/src/styles/style.scss +11 -1
- package/package.json +21 -21
- package/packages/build-tools/src/docProcessor.mjs +37 -8
- package/packages/form-validation/src/validation.js +104 -50
- package/packages/utils/package.json +12 -0
- package/packages/utils/src/iconUtil.js +25 -0
- package/packages/utils/src/index.js +1 -0
- package/turbo.json +8 -8
- package/.turbo/cache/013a48308b893dac-meta.json +0 -1
- package/.turbo/cache/013a48308b893dac.tar.zst +0 -0
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +0 -1
- package/.turbo/cache/07ca42419b9f050c.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/0a2b0a4df8a0443f.tar.zst +0 -0
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +0 -1
- package/.turbo/cache/0cea4c1f34f3683b.tar.zst +0 -0
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/141bb7d9a95e288b-meta.json +0 -1
- package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +0 -1
- package/.turbo/cache/17259cf94d8f8925.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +0 -1
- package/.turbo/cache/1c99a949ec63ab35.tar.zst +0 -0
- package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
- package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +0 -1
- package/.turbo/cache/257a7a26ea72dbc5.tar.zst +0 -0
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +0 -1
- package/.turbo/cache/3bf45120d0cc9bd8.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +0 -1
- package/.turbo/cache/45035bf5c4147ccd.tar.zst +0 -0
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
- package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
- package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +0 -1
- package/.turbo/cache/5f304c0f37ef25f3.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/64de7a53e02db647-meta.json +0 -1
- package/.turbo/cache/64de7a53e02db647.tar.zst +0 -0
- package/.turbo/cache/691a74627ec57993-meta.json +0 -1
- package/.turbo/cache/691a74627ec57993.tar.zst +0 -0
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +0 -1
- package/.turbo/cache/69aae513b7ec6c7d.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +0 -1
- package/.turbo/cache/6dd7058e6703cb35.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/73e9073a5274616d-meta.json +0 -1
- package/.turbo/cache/73e9073a5274616d.tar.zst +0 -0
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +0 -1
- package/.turbo/cache/773edc0f83c8c5a5.tar.zst +0 -0
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +0 -1
- package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
- package/.turbo/cache/786a822763403879-meta.json +0 -1
- package/.turbo/cache/786a822763403879.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +0 -1
- package/.turbo/cache/80b5d974184a01df.tar.zst +0 -0
- package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +0 -1
- package/.turbo/cache/8954c6073396fadd.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +0 -1
- package/.turbo/cache/92daa6d7c389d548.tar.zst +0 -0
- package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
- package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
- package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
- package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
- package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +0 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +0 -1
- package/.turbo/cache/b54fc4f664a7a5a0.tar.zst +0 -0
- package/.turbo/cache/ba4418918621fbcd-meta.json +0 -1
- package/.turbo/cache/ba4418918621fbcd.tar.zst +0 -0
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +0 -1
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +0 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +0 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +0 -1
- package/.turbo/cache/cc81de9c0b452a7c.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/cd845bb6102c589a-meta.json +0 -1
- package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +0 -1
- package/.turbo/cache/dad1301ac69bcb85.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +0 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +0 -1
- package/.turbo/cache/fa132b5b5f0e75f8.tar.zst +0 -0
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
- package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
|
@@ -32,10 +32,6 @@ function valueExample() {
|
|
|
32
32
|
document.querySelector('#invalidValueExampleBtn').addEventListener('click', () => {
|
|
33
33
|
valueExample.value = 'flight course';
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
document.querySelector('#undefinedValueExampleBtn').addEventListener('click', () => {
|
|
37
|
-
valueExample.value = undefined;
|
|
38
|
-
});
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
function valueExtractionExample() {
|
|
@@ -111,33 +107,46 @@ function auroMenuLoadingExample() {
|
|
|
111
107
|
* Copyright 2019 Google LLC
|
|
112
108
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
113
109
|
*/
|
|
114
|
-
const t$5=globalThis,e$
|
|
110
|
+
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$9=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$9.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$9.set(s,t));}return t}toString(){return this.cssText}};const r$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;
|
|
115
111
|
|
|
116
112
|
/**
|
|
117
113
|
* @license
|
|
118
114
|
* Copyright 2017 Google LLC
|
|
119
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
120
|
-
*/const{is:i$a,defineProperty:e$
|
|
116
|
+
*/const{is:i$a,defineProperty:e$8,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$3,getOwnPropertySymbols:o$8,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$8(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$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");
|
|
121
117
|
|
|
122
118
|
/**
|
|
123
119
|
* @license
|
|
124
120
|
* Copyright 2017 Google LLC
|
|
125
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
126
122
|
*/
|
|
127
|
-
const t$4=globalThis,i$9=t$4.trustedTypes,s$4=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):
|
|
123
|
+
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$7="?"+h$2,n$5=`<${o$7}>`,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$7)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};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @license
|
|
127
|
+
* Copyright 2017 Google LLC
|
|
128
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
129
|
+
*/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");
|
|
128
130
|
|
|
129
131
|
/**
|
|
130
132
|
* @license
|
|
131
133
|
* Copyright 2017 Google LLC
|
|
132
134
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
133
|
-
*/
|
|
135
|
+
*/
|
|
136
|
+
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)}};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @license
|
|
140
|
+
* Copyright 2018 Google LLC
|
|
141
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
+
*/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}});
|
|
134
143
|
|
|
135
144
|
/**
|
|
136
145
|
* @license
|
|
137
146
|
* Copyright 2020 Google LLC
|
|
138
147
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
139
148
|
*/
|
|
140
|
-
const a$3=Symbol.for(""),o$6=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$3}),i$
|
|
149
|
+
const a$3=Symbol.for(""),o$6=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$6(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$3.get(t))&&(n.raw=n,l$3.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$4(x$1);
|
|
141
150
|
|
|
142
151
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
143
152
|
// See LICENSE in the project root for license information.
|
|
@@ -243,30 +252,87 @@ class AuroFormValidation {
|
|
|
243
252
|
}
|
|
244
253
|
|
|
245
254
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* @param {
|
|
255
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
256
|
+
*
|
|
257
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
249
258
|
* @returns {void}
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
262
|
+
* validateElementAttributes(inputElement);
|
|
263
|
+
*
|
|
264
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
265
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
266
|
+
*
|
|
267
|
+
* Validation rules:
|
|
268
|
+
* - input:
|
|
269
|
+
* - length:
|
|
270
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
271
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
272
|
+
* - pattern:
|
|
273
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
274
|
+
* - counter:
|
|
275
|
+
* - range:
|
|
276
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
277
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
250
278
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
279
|
+
validateElementAttributes(elem) {
|
|
280
|
+
const validationRules = {
|
|
281
|
+
input: {
|
|
282
|
+
length: [
|
|
283
|
+
{
|
|
284
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
285
|
+
validity: 'tooShort',
|
|
286
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
290
|
+
validity: 'tooLong',
|
|
291
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
pattern: [
|
|
295
|
+
{
|
|
296
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
297
|
+
validity: 'patternMismatch',
|
|
298
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
counter: {
|
|
303
|
+
range: [
|
|
304
|
+
{
|
|
305
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
306
|
+
validity: 'rangeOverflow',
|
|
307
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
311
|
+
validity: 'rangeUnderflow',
|
|
312
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
313
|
+
}
|
|
314
|
+
]
|
|
258
315
|
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
let elementType;
|
|
319
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
320
|
+
elementType = 'input';
|
|
321
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
322
|
+
elementType = 'counter';
|
|
259
323
|
}
|
|
260
|
-
|
|
261
|
-
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
262
|
-
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
263
|
-
elem.validity = 'tooShort';
|
|
264
|
-
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
265
|
-
}
|
|
266
324
|
|
|
267
|
-
if (
|
|
268
|
-
|
|
269
|
-
|
|
325
|
+
if (elementType) {
|
|
326
|
+
const rules = validationRules[elementType];
|
|
327
|
+
|
|
328
|
+
if (rules) {
|
|
329
|
+
Object.values(rules).flat().forEach(rule => {
|
|
330
|
+
if (rule.check(elem)) {
|
|
331
|
+
elem.validity = rule.validity;
|
|
332
|
+
elem.errorMessage = rule.message(elem);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
270
336
|
}
|
|
271
337
|
}
|
|
272
338
|
|
|
@@ -282,33 +348,32 @@ class AuroFormValidation {
|
|
|
282
348
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
283
349
|
|
|
284
350
|
if (!elem.value.match(emailRegex)) {
|
|
285
|
-
elem.validity = '
|
|
286
|
-
elem.
|
|
351
|
+
elem.validity = 'patternMismatch';
|
|
352
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
287
353
|
}
|
|
288
354
|
} else if (elem.type === 'credit-card') {
|
|
289
355
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
290
356
|
elem.validity = 'tooShort';
|
|
291
|
-
elem.
|
|
357
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
292
358
|
}
|
|
293
359
|
} else if (elem.type === 'number') {
|
|
294
360
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
295
361
|
elem.validity = 'rangeOverflow';
|
|
296
|
-
elem.
|
|
362
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
297
363
|
}
|
|
298
364
|
|
|
299
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
365
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
300
366
|
elem.validity = 'rangeUnderflow';
|
|
301
|
-
elem.
|
|
367
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
302
368
|
}
|
|
303
|
-
|
|
304
369
|
} else if (elem.type === 'month-day-year' ||
|
|
305
370
|
elem.type === 'month-year' ||
|
|
306
371
|
elem.type === 'month-fullYear' ||
|
|
307
372
|
elem.type === 'year-month-day'
|
|
308
373
|
) {
|
|
309
|
-
if (elem.value
|
|
374
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
310
375
|
elem.validity = 'tooShort';
|
|
311
|
-
elem.
|
|
376
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
312
377
|
} else {
|
|
313
378
|
const valueDate = new Date(elem.value);
|
|
314
379
|
|
|
@@ -318,7 +383,7 @@ class AuroFormValidation {
|
|
|
318
383
|
|
|
319
384
|
if (valueDate > maxDate) {
|
|
320
385
|
elem.validity = 'rangeOverflow';
|
|
321
|
-
elem.
|
|
386
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
322
387
|
}
|
|
323
388
|
}
|
|
324
389
|
|
|
@@ -328,7 +393,7 @@ class AuroFormValidation {
|
|
|
328
393
|
|
|
329
394
|
if (valueDate < minDate) {
|
|
330
395
|
elem.validity = 'rangeUnderflow';
|
|
331
|
-
elem.
|
|
396
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
332
397
|
}
|
|
333
398
|
}
|
|
334
399
|
}
|
|
@@ -351,10 +416,10 @@ class AuroFormValidation {
|
|
|
351
416
|
|
|
352
417
|
if (elem.hasAttribute('error')) {
|
|
353
418
|
elem.validity = 'customError';
|
|
354
|
-
elem.
|
|
419
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
355
420
|
} else if (validationShouldRun) {
|
|
356
421
|
elem.validity = 'valid';
|
|
357
|
-
elem.
|
|
422
|
+
elem.errorMessage = '';
|
|
358
423
|
|
|
359
424
|
/**
|
|
360
425
|
* Only validate once we interact with the datepicker
|
|
@@ -366,7 +431,7 @@ class AuroFormValidation {
|
|
|
366
431
|
let hasValue = elem.value && elem.value.length > 0;
|
|
367
432
|
|
|
368
433
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
369
|
-
if (this.auroInputElements
|
|
434
|
+
if (this.auroInputElements?.length === 2) {
|
|
370
435
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
371
436
|
hasValue = false;
|
|
372
437
|
}
|
|
@@ -374,31 +439,29 @@ class AuroFormValidation {
|
|
|
374
439
|
|
|
375
440
|
if (!hasValue && elem.required) {
|
|
376
441
|
elem.validity = 'valueMissing';
|
|
377
|
-
elem.
|
|
442
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
378
443
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
379
444
|
this.validateType(elem);
|
|
380
|
-
this.
|
|
445
|
+
this.validateElementAttributes(elem);
|
|
446
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
447
|
+
this.validateElementAttributes(elem);
|
|
381
448
|
}
|
|
382
449
|
}
|
|
383
450
|
|
|
384
|
-
if (this.auroInputElements
|
|
451
|
+
if (this.auroInputElements?.length > 0) {
|
|
385
452
|
elem.validity = this.auroInputElements[0].validity;
|
|
386
|
-
elem.
|
|
453
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
387
454
|
|
|
388
|
-
if (elem.validity === 'valid') {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
392
|
-
}
|
|
455
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
456
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
457
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
393
458
|
}
|
|
394
459
|
}
|
|
395
460
|
|
|
396
461
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
401
|
-
}
|
|
462
|
+
// Use the validity message override if it is declared
|
|
463
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
464
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
402
465
|
}
|
|
403
466
|
|
|
404
467
|
this.getErrorMessage(elem);
|
|
@@ -444,18 +507,18 @@ class AuroFormValidation {
|
|
|
444
507
|
if (elem.validity !== 'valid') {
|
|
445
508
|
if (elem.setCustomValidity) {
|
|
446
509
|
elem.errorMessage = elem.setCustomValidity;
|
|
447
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
510
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
448
511
|
const input = elem.renderRoot.querySelector('input');
|
|
449
512
|
|
|
450
513
|
if (input.validationMessage.length > 0) {
|
|
451
514
|
elem.errorMessage = input.validationMessage;
|
|
452
515
|
}
|
|
453
|
-
} else if (this.inputElements &&
|
|
516
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
454
517
|
const firstInput = this.inputElements[0];
|
|
455
518
|
|
|
456
519
|
if (firstInput.validationMessage.length > 0) {
|
|
457
520
|
elem.errorMessage = firstInput.validationMessage;
|
|
458
|
-
} else if (this.inputElements
|
|
521
|
+
} else if (this.inputElements?.length === 2) {
|
|
459
522
|
const secondInput = this.inputElements[1];
|
|
460
523
|
|
|
461
524
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -499,7 +562,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
499
562
|
*/
|
|
500
563
|
generateTag(baseName, version, tagClass) {
|
|
501
564
|
const elementName = this.generateElementName(baseName, version);
|
|
502
|
-
const tag = i$
|
|
565
|
+
const tag = i$6`${s$3(elementName)}`;
|
|
503
566
|
|
|
504
567
|
if (!customElements.get(elementName)) {
|
|
505
568
|
customElements.define(elementName, class extends tagClass {});
|
|
@@ -514,33 +577,33 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
514
577
|
* Copyright 2017 Google LLC
|
|
515
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
579
|
*/
|
|
517
|
-
const t$2=globalThis,i$5=t$2.trustedTypes,s$2=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):
|
|
580
|
+
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};
|
|
518
581
|
|
|
519
582
|
/**
|
|
520
583
|
* @license
|
|
521
584
|
* Copyright 2020 Google LLC
|
|
522
585
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
523
586
|
*/
|
|
524
|
-
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(
|
|
587
|
+
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);
|
|
525
588
|
|
|
526
589
|
/**
|
|
527
590
|
* @license
|
|
528
591
|
* Copyright 2019 Google LLC
|
|
529
592
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
530
593
|
*/
|
|
531
|
-
const t$1=globalThis,e$3=t$1.ShadowRoot&&(
|
|
594
|
+
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;
|
|
532
595
|
|
|
533
596
|
/**
|
|
534
597
|
* @license
|
|
535
598
|
* Copyright 2017 Google LLC
|
|
536
599
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
537
|
-
*/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
|
|
600
|
+
*/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");
|
|
538
601
|
|
|
539
602
|
/**
|
|
540
603
|
* @license
|
|
541
604
|
* Copyright 2017 Google LLC
|
|
542
605
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
543
|
-
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
606
|
+
*/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");
|
|
544
607
|
|
|
545
608
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
546
609
|
// See LICENSE in the project root for license information.
|
|
@@ -660,7 +723,7 @@ function getAlignmentAxis(placement) {
|
|
|
660
723
|
return getOppositeAxis(getSideAxis(placement));
|
|
661
724
|
}
|
|
662
725
|
function getAlignmentSides(placement, rects, rtl) {
|
|
663
|
-
if (rtl ===
|
|
726
|
+
if (rtl === undefined) {
|
|
664
727
|
rtl = false;
|
|
665
728
|
}
|
|
666
729
|
const alignment = getAlignment(placement);
|
|
@@ -817,7 +880,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
817
880
|
platform
|
|
818
881
|
} = config;
|
|
819
882
|
const validMiddleware = middleware.filter(Boolean);
|
|
820
|
-
const rtl = await (platform.isRTL == null ?
|
|
883
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
821
884
|
let rects = await platform.getElementRects({
|
|
822
885
|
reference,
|
|
823
886
|
floating,
|
|
@@ -903,7 +966,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
903
966
|
*/
|
|
904
967
|
async function detectOverflow(state, options) {
|
|
905
968
|
var _await$platform$isEle;
|
|
906
|
-
if (options ===
|
|
969
|
+
if (options === undefined) {
|
|
907
970
|
options = {};
|
|
908
971
|
}
|
|
909
972
|
const {
|
|
@@ -925,7 +988,7 @@ async function detectOverflow(state, options) {
|
|
|
925
988
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
926
989
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
927
990
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
928
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ?
|
|
991
|
+
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))),
|
|
929
992
|
boundary,
|
|
930
993
|
rootBoundary,
|
|
931
994
|
strategy
|
|
@@ -936,8 +999,8 @@ async function detectOverflow(state, options) {
|
|
|
936
999
|
width: rects.floating.width,
|
|
937
1000
|
height: rects.floating.height
|
|
938
1001
|
} : rects.reference;
|
|
939
|
-
const offsetParent = await (platform.getOffsetParent == null ?
|
|
940
|
-
const offsetScale = (await (platform.isElement == null ?
|
|
1002
|
+
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
1003
|
+
const offsetScale = (await (platform.isElement == null ? undefined : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? undefined : platform.getScale(offsetParent))) || {
|
|
941
1004
|
x: 1,
|
|
942
1005
|
y: 1
|
|
943
1006
|
} : {
|
|
@@ -974,7 +1037,7 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
974
1037
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
975
1038
|
*/
|
|
976
1039
|
const autoPlacement$1 = function (options) {
|
|
977
|
-
if (options ===
|
|
1040
|
+
if (options === undefined) {
|
|
978
1041
|
options = {};
|
|
979
1042
|
}
|
|
980
1043
|
return {
|
|
@@ -998,12 +1061,12 @@ const autoPlacement$1 = function (options) {
|
|
|
998
1061
|
} = evaluate(options, state);
|
|
999
1062
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
1000
1063
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1001
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ?
|
|
1064
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
1002
1065
|
const currentPlacement = placements$1[currentIndex];
|
|
1003
1066
|
if (currentPlacement == null) {
|
|
1004
1067
|
return {};
|
|
1005
1068
|
}
|
|
1006
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ?
|
|
1069
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
1007
1070
|
|
|
1008
1071
|
// Make `computeCoords` start from the right place.
|
|
1009
1072
|
if (placement !== currentPlacement) {
|
|
@@ -1014,7 +1077,7 @@ const autoPlacement$1 = function (options) {
|
|
|
1014
1077
|
};
|
|
1015
1078
|
}
|
|
1016
1079
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
1017
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ?
|
|
1080
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || []), {
|
|
1018
1081
|
placement: currentPlacement,
|
|
1019
1082
|
overflows: currentOverflows
|
|
1020
1083
|
}];
|
|
@@ -1044,7 +1107,7 @@ const autoPlacement$1 = function (options) {
|
|
|
1044
1107
|
// Aligned placements should not check their opposite crossAxis
|
|
1045
1108
|
// side.
|
|
1046
1109
|
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
1047
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ?
|
|
1110
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
1048
1111
|
if (resetPlacement !== placement) {
|
|
1049
1112
|
return {
|
|
1050
1113
|
data: {
|
|
@@ -1068,7 +1131,7 @@ const autoPlacement$1 = function (options) {
|
|
|
1068
1131
|
* @see https://floating-ui.com/docs/flip
|
|
1069
1132
|
*/
|
|
1070
1133
|
const flip$1 = function (options) {
|
|
1071
|
-
if (options ===
|
|
1134
|
+
if (options === undefined) {
|
|
1072
1135
|
options = {};
|
|
1073
1136
|
}
|
|
1074
1137
|
return {
|
|
@@ -1104,7 +1167,7 @@ const flip$1 = function (options) {
|
|
|
1104
1167
|
const side = getSide(placement);
|
|
1105
1168
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
1106
1169
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
1107
|
-
const rtl = await (platform.isRTL == null ?
|
|
1170
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1108
1171
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
1109
1172
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
1110
1173
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
@@ -1113,7 +1176,7 @@ const flip$1 = function (options) {
|
|
|
1113
1176
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
1114
1177
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1115
1178
|
const overflows = [];
|
|
1116
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ?
|
|
1179
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
1117
1180
|
if (checkMainAxis) {
|
|
1118
1181
|
overflows.push(overflow[side]);
|
|
1119
1182
|
}
|
|
@@ -1129,7 +1192,7 @@ const flip$1 = function (options) {
|
|
|
1129
1192
|
// One or more sides is overflowing.
|
|
1130
1193
|
if (!overflows.every(side => side <= 0)) {
|
|
1131
1194
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
1132
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ?
|
|
1195
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
1133
1196
|
const nextPlacement = placements[nextIndex];
|
|
1134
1197
|
if (nextPlacement) {
|
|
1135
1198
|
// Try next placement and re-run the lifecycle.
|
|
@@ -1146,7 +1209,7 @@ const flip$1 = function (options) {
|
|
|
1146
1209
|
|
|
1147
1210
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1148
1211
|
// then find the placement that fits the best on the main crossAxis side.
|
|
1149
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ?
|
|
1212
|
+
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;
|
|
1150
1213
|
|
|
1151
1214
|
// Otherwise fallback.
|
|
1152
1215
|
if (!resetPlacement) {
|
|
@@ -1163,7 +1226,7 @@ const flip$1 = function (options) {
|
|
|
1163
1226
|
currentSideAxis === 'y';
|
|
1164
1227
|
}
|
|
1165
1228
|
return true;
|
|
1166
|
-
}).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 ?
|
|
1229
|
+
}).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];
|
|
1167
1230
|
if (placement) {
|
|
1168
1231
|
resetPlacement = placement;
|
|
1169
1232
|
}
|
|
@@ -1196,7 +1259,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1196
1259
|
platform,
|
|
1197
1260
|
elements
|
|
1198
1261
|
} = state;
|
|
1199
|
-
const rtl = await (platform.isRTL == null ?
|
|
1262
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1200
1263
|
const side = getSide(placement);
|
|
1201
1264
|
const alignment = getAlignment(placement);
|
|
1202
1265
|
const isVertical = getSideAxis(placement) === 'y';
|
|
@@ -1238,7 +1301,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1238
1301
|
* @see https://floating-ui.com/docs/offset
|
|
1239
1302
|
*/
|
|
1240
1303
|
const offset$1 = function (options) {
|
|
1241
|
-
if (options ===
|
|
1304
|
+
if (options === undefined) {
|
|
1242
1305
|
options = 0;
|
|
1243
1306
|
}
|
|
1244
1307
|
return {
|
|
@@ -1256,7 +1319,7 @@ const offset$1 = function (options) {
|
|
|
1256
1319
|
|
|
1257
1320
|
// If the placement is the same and the arrow caused an alignment offset
|
|
1258
1321
|
// then we don't need to change the positioning coordinates.
|
|
1259
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ?
|
|
1322
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1260
1323
|
return {};
|
|
1261
1324
|
}
|
|
1262
1325
|
return {
|
|
@@ -1285,11 +1348,11 @@ function getNodeName(node) {
|
|
|
1285
1348
|
}
|
|
1286
1349
|
function getWindow(node) {
|
|
1287
1350
|
var _node$ownerDocument;
|
|
1288
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ?
|
|
1351
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1289
1352
|
}
|
|
1290
1353
|
function getDocumentElement(node) {
|
|
1291
1354
|
var _ref;
|
|
1292
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ?
|
|
1355
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1293
1356
|
}
|
|
1294
1357
|
function isNode(value) {
|
|
1295
1358
|
if (!hasWindow()) {
|
|
@@ -1404,14 +1467,14 @@ function getNearestOverflowAncestor(node) {
|
|
|
1404
1467
|
}
|
|
1405
1468
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1406
1469
|
var _node$ownerDocument2;
|
|
1407
|
-
if (list ===
|
|
1470
|
+
if (list === undefined) {
|
|
1408
1471
|
list = [];
|
|
1409
1472
|
}
|
|
1410
|
-
if (traverseIframes ===
|
|
1473
|
+
if (traverseIframes === undefined) {
|
|
1411
1474
|
traverseIframes = true;
|
|
1412
1475
|
}
|
|
1413
1476
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1414
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ?
|
|
1477
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1415
1478
|
const win = getWindow(scrollableAncestor);
|
|
1416
1479
|
if (isBody) {
|
|
1417
1480
|
const frameElement = getFrameElement(win);
|
|
@@ -1488,7 +1551,7 @@ function getVisualOffsets(element) {
|
|
|
1488
1551
|
};
|
|
1489
1552
|
}
|
|
1490
1553
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1491
|
-
if (isFixed ===
|
|
1554
|
+
if (isFixed === undefined) {
|
|
1492
1555
|
isFixed = false;
|
|
1493
1556
|
}
|
|
1494
1557
|
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
@@ -1498,10 +1561,10 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1498
1561
|
}
|
|
1499
1562
|
|
|
1500
1563
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1501
|
-
if (includeScale ===
|
|
1564
|
+
if (includeScale === undefined) {
|
|
1502
1565
|
includeScale = false;
|
|
1503
1566
|
}
|
|
1504
|
-
if (isFixedStrategy ===
|
|
1567
|
+
if (isFixedStrategy === undefined) {
|
|
1505
1568
|
isFixedStrategy = false;
|
|
1506
1569
|
}
|
|
1507
1570
|
const clientRect = element.getBoundingClientRect();
|
|
@@ -1561,7 +1624,7 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1561
1624
|
}
|
|
1562
1625
|
|
|
1563
1626
|
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1564
|
-
if (ignoreScrollbarX ===
|
|
1627
|
+
if (ignoreScrollbarX === undefined) {
|
|
1565
1628
|
ignoreScrollbarX = false;
|
|
1566
1629
|
}
|
|
1567
1630
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
@@ -1911,10 +1974,10 @@ function observeMove(element, onMove) {
|
|
|
1911
1974
|
io = null;
|
|
1912
1975
|
}
|
|
1913
1976
|
function refresh(skip, threshold) {
|
|
1914
|
-
if (skip ===
|
|
1977
|
+
if (skip === undefined) {
|
|
1915
1978
|
skip = false;
|
|
1916
1979
|
}
|
|
1917
|
-
if (threshold ===
|
|
1980
|
+
if (threshold === undefined) {
|
|
1918
1981
|
threshold = 1;
|
|
1919
1982
|
}
|
|
1920
1983
|
cleanup();
|
|
@@ -1985,7 +2048,7 @@ function observeMove(element, onMove) {
|
|
|
1985
2048
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1986
2049
|
*/
|
|
1987
2050
|
function autoUpdate(reference, floating, update, options) {
|
|
1988
|
-
if (options ===
|
|
2051
|
+
if (options === undefined) {
|
|
1989
2052
|
options = {};
|
|
1990
2053
|
}
|
|
1991
2054
|
const {
|
|
@@ -2201,7 +2264,7 @@ class AuroFloatingUI {
|
|
|
2201
2264
|
// Compute the position of the bib
|
|
2202
2265
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2203
2266
|
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2204
|
-
middleware: middleware
|
|
2267
|
+
middleware: middleware
|
|
2205
2268
|
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2206
2269
|
Object.assign(this.element.bib.style, {
|
|
2207
2270
|
left: `${x}px`,
|
|
@@ -2539,13 +2602,13 @@ class AuroDependencyVersioning {
|
|
|
2539
2602
|
* Copyright 2017 Google LLC
|
|
2540
2603
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2541
2604
|
*/
|
|
2542
|
-
const t
|
|
2605
|
+
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});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)}}
|
|
2543
2606
|
|
|
2544
2607
|
/**
|
|
2545
2608
|
* @license
|
|
2546
2609
|
* Copyright 2018 Google LLC
|
|
2547
2610
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2548
|
-
*/const e
|
|
2611
|
+
*/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}});
|
|
2549
2612
|
|
|
2550
2613
|
/**
|
|
2551
2614
|
* @license
|
|
@@ -2892,7 +2955,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
2892
2955
|
|
|
2893
2956
|
return x`
|
|
2894
2957
|
<div
|
|
2895
|
-
class="${e
|
|
2958
|
+
class="${e(classes)}"
|
|
2896
2959
|
title="${o$5(this.title || undefined)}">
|
|
2897
2960
|
<span aria-hidden="${o$5(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
2898
2961
|
${this.customSvg ? x`
|
|
@@ -2903,7 +2966,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
2903
2966
|
}
|
|
2904
2967
|
</span>
|
|
2905
2968
|
|
|
2906
|
-
<div class="${e
|
|
2969
|
+
<div class="${e(a11y)}">
|
|
2907
2970
|
<slot></slot>
|
|
2908
2971
|
</div>
|
|
2909
2972
|
</div>
|
|
@@ -2913,7 +2976,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
2913
2976
|
|
|
2914
2977
|
var iconVersion$1 = '6.1.2';
|
|
2915
2978
|
|
|
2916
|
-
var styleCss$1$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;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)}`;
|
|
2979
|
+
var styleCss$1$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)}`;
|
|
2917
2980
|
|
|
2918
2981
|
var colorCss$1$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)}`;
|
|
2919
2982
|
|
|
@@ -2937,9 +3000,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2937
3000
|
];
|
|
2938
3001
|
|
|
2939
3002
|
/**
|
|
2940
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
2941
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
2942
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
2943
3003
|
* @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.
|
|
2944
3004
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2945
3005
|
*/
|
|
@@ -2965,14 +3025,26 @@ class AuroDropdownBib extends r {
|
|
|
2965
3025
|
|
|
2966
3026
|
static get properties() {
|
|
2967
3027
|
return {
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* If declared, will apply all styles for the common theme.
|
|
3031
|
+
*/
|
|
2968
3032
|
common: {
|
|
2969
3033
|
type: Boolean,
|
|
2970
3034
|
reflect: true
|
|
2971
3035
|
},
|
|
3036
|
+
|
|
3037
|
+
/**
|
|
3038
|
+
* If declared, will apply extra padding to bib content.
|
|
3039
|
+
*/
|
|
2972
3040
|
inset: {
|
|
2973
3041
|
type: Boolean,
|
|
2974
3042
|
reflect: true
|
|
2975
3043
|
},
|
|
3044
|
+
|
|
3045
|
+
/**
|
|
3046
|
+
* If declared, will apply border-radius to the bib.
|
|
3047
|
+
*/
|
|
2976
3048
|
rounded: {
|
|
2977
3049
|
type: Boolean,
|
|
2978
3050
|
reflect: true
|
|
@@ -3016,22 +3088,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
3016
3088
|
|
|
3017
3089
|
|
|
3018
3090
|
/**
|
|
3019
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
3020
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
3021
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
3022
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
3023
3091
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
3024
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3025
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
3026
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
3027
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
3028
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
3029
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
3030
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
3031
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
3032
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
3033
|
-
* @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.
|
|
3034
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
3035
3092
|
* @slot - Default slot for the popover content.
|
|
3036
3093
|
* @slot label - Defines the content of the label.
|
|
3037
3094
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -3069,6 +3126,16 @@ class AuroDropdown extends r {
|
|
|
3069
3126
|
this.tabIndex = 0;
|
|
3070
3127
|
this.noToggle = false;
|
|
3071
3128
|
|
|
3129
|
+
/**
|
|
3130
|
+
* @private
|
|
3131
|
+
*/
|
|
3132
|
+
this.hasTriggerContent = false;
|
|
3133
|
+
|
|
3134
|
+
/**
|
|
3135
|
+
* @private
|
|
3136
|
+
*/
|
|
3137
|
+
this.triggerContentSlot = undefined;
|
|
3138
|
+
|
|
3072
3139
|
/**
|
|
3073
3140
|
* @private
|
|
3074
3141
|
*/
|
|
@@ -3115,89 +3182,166 @@ class AuroDropdown extends r {
|
|
|
3115
3182
|
// function to define props used within the scope of this component
|
|
3116
3183
|
static get properties() {
|
|
3117
3184
|
return {
|
|
3185
|
+
|
|
3186
|
+
/**
|
|
3187
|
+
* If declared, applies a border around the trigger slot.
|
|
3188
|
+
*/
|
|
3118
3189
|
bordered: {
|
|
3119
3190
|
type: Boolean,
|
|
3120
3191
|
reflect: true
|
|
3121
3192
|
},
|
|
3193
|
+
|
|
3194
|
+
/**
|
|
3195
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3196
|
+
* @attr {Boolean} chevron
|
|
3197
|
+
*/
|
|
3122
3198
|
chevron: {
|
|
3123
3199
|
type: Boolean,
|
|
3124
3200
|
reflect: true
|
|
3125
3201
|
},
|
|
3126
|
-
|
|
3202
|
+
|
|
3203
|
+
/**
|
|
3204
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3205
|
+
*/
|
|
3206
|
+
common: {
|
|
3127
3207
|
type: Boolean,
|
|
3128
3208
|
reflect: true
|
|
3129
3209
|
},
|
|
3130
|
-
|
|
3210
|
+
|
|
3211
|
+
/**
|
|
3212
|
+
* If declared, the dropdown is not interactive.
|
|
3213
|
+
*/
|
|
3214
|
+
disabled: {
|
|
3131
3215
|
type: Boolean,
|
|
3132
3216
|
reflect: true
|
|
3133
3217
|
},
|
|
3134
|
-
|
|
3218
|
+
|
|
3219
|
+
/**
|
|
3220
|
+
* @private
|
|
3221
|
+
*/
|
|
3222
|
+
dropdownWidth: {
|
|
3223
|
+
type: Number
|
|
3224
|
+
},
|
|
3225
|
+
|
|
3226
|
+
/**
|
|
3227
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3228
|
+
*/
|
|
3229
|
+
error: {
|
|
3135
3230
|
type: Boolean,
|
|
3136
|
-
reflect: true
|
|
3231
|
+
reflect: true
|
|
3137
3232
|
},
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3236
|
+
*/
|
|
3138
3237
|
focusShow: {
|
|
3139
3238
|
type: Boolean,
|
|
3140
3239
|
reflect: true
|
|
3141
3240
|
},
|
|
3142
|
-
|
|
3241
|
+
|
|
3242
|
+
/**
|
|
3243
|
+
* Makes the trigger to be full width of its parent container.
|
|
3244
|
+
*/
|
|
3245
|
+
fluid: {
|
|
3143
3246
|
type: Boolean,
|
|
3144
3247
|
reflect: true
|
|
3145
3248
|
},
|
|
3249
|
+
|
|
3250
|
+
/**
|
|
3251
|
+
* If declared, will apply padding around trigger slot content.
|
|
3252
|
+
*/
|
|
3146
3253
|
inset: {
|
|
3147
3254
|
type: Boolean,
|
|
3148
3255
|
reflect: true
|
|
3149
3256
|
},
|
|
3150
|
-
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* If true, the dropdown bib is displayed.
|
|
3260
|
+
*/
|
|
3261
|
+
isPopoverVisible: {
|
|
3262
|
+
type: Boolean
|
|
3263
|
+
},
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3267
|
+
*/
|
|
3268
|
+
hoverToggle: {
|
|
3151
3269
|
type: Boolean,
|
|
3152
3270
|
reflect: true
|
|
3153
3271
|
},
|
|
3154
|
-
|
|
3155
|
-
|
|
3272
|
+
|
|
3273
|
+
/**
|
|
3274
|
+
* @private
|
|
3275
|
+
*/
|
|
3276
|
+
hasTriggerContent: {
|
|
3277
|
+
type: Boolean
|
|
3278
|
+
},
|
|
3279
|
+
|
|
3280
|
+
/**
|
|
3281
|
+
* 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.
|
|
3282
|
+
*/
|
|
3283
|
+
mobileFullscreenBreakpoint: {
|
|
3284
|
+
type: String,
|
|
3156
3285
|
reflect: true
|
|
3157
3286
|
},
|
|
3158
|
-
|
|
3287
|
+
|
|
3288
|
+
/**
|
|
3289
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3290
|
+
*/
|
|
3291
|
+
matchWidth: {
|
|
3159
3292
|
type: Boolean,
|
|
3160
3293
|
reflect: true
|
|
3161
3294
|
},
|
|
3162
|
-
|
|
3295
|
+
|
|
3296
|
+
/**
|
|
3297
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3298
|
+
*/
|
|
3299
|
+
noHideOnThisFocusLoss: {
|
|
3163
3300
|
type: Boolean,
|
|
3164
3301
|
reflect: true
|
|
3165
3302
|
},
|
|
3166
|
-
|
|
3303
|
+
|
|
3304
|
+
/**
|
|
3305
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3306
|
+
*/
|
|
3307
|
+
noToggle: {
|
|
3167
3308
|
type: Boolean,
|
|
3168
3309
|
reflect: true
|
|
3169
3310
|
},
|
|
3170
|
-
|
|
3311
|
+
|
|
3171
3312
|
onSlotChange: {
|
|
3172
3313
|
type: Function,
|
|
3173
3314
|
reflect: false
|
|
3174
3315
|
},
|
|
3175
|
-
mobileFullscreenBreakpoint: {
|
|
3176
|
-
type: String,
|
|
3177
|
-
reflect: true,
|
|
3178
|
-
},
|
|
3179
3316
|
|
|
3180
3317
|
/**
|
|
3181
3318
|
* @private
|
|
3182
3319
|
*/
|
|
3183
|
-
|
|
3320
|
+
placement: {
|
|
3321
|
+
type: String
|
|
3322
|
+
},
|
|
3184
3323
|
|
|
3185
3324
|
/**
|
|
3186
|
-
*
|
|
3325
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3187
3326
|
*/
|
|
3188
|
-
|
|
3327
|
+
rounded: {
|
|
3328
|
+
type: Boolean,
|
|
3329
|
+
reflect: true
|
|
3330
|
+
},
|
|
3189
3331
|
|
|
3190
3332
|
/**
|
|
3191
3333
|
* @private
|
|
3192
3334
|
*/
|
|
3193
|
-
tabIndex: {
|
|
3335
|
+
tabIndex: {
|
|
3336
|
+
type: Number
|
|
3337
|
+
}
|
|
3194
3338
|
};
|
|
3195
3339
|
}
|
|
3196
3340
|
|
|
3197
3341
|
static get styles() {
|
|
3198
3342
|
return [
|
|
3199
|
-
styleCss$1$1,
|
|
3200
3343
|
colorCss$1$1,
|
|
3344
|
+
styleCss$1$1,
|
|
3201
3345
|
tokensCss$3
|
|
3202
3346
|
];
|
|
3203
3347
|
}
|
|
@@ -3228,6 +3372,12 @@ class AuroDropdown extends r {
|
|
|
3228
3372
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3229
3373
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3230
3374
|
}
|
|
3375
|
+
|
|
3376
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3377
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3378
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3379
|
+
this.handleTriggerContentSlotChange();
|
|
3380
|
+
}
|
|
3231
3381
|
}
|
|
3232
3382
|
|
|
3233
3383
|
firstUpdated() {
|
|
@@ -3270,6 +3420,43 @@ class AuroDropdown extends r {
|
|
|
3270
3420
|
return inCustomSlot;
|
|
3271
3421
|
}
|
|
3272
3422
|
|
|
3423
|
+
/**
|
|
3424
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3425
|
+
*
|
|
3426
|
+
* It first updates the floater settings
|
|
3427
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3428
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3429
|
+
*
|
|
3430
|
+
* @private
|
|
3431
|
+
* @method handleTriggerContentSlotChange
|
|
3432
|
+
* @param {Event} event - native slotchange event
|
|
3433
|
+
* @returns {void}
|
|
3434
|
+
*/
|
|
3435
|
+
handleTriggerContentSlotChange(event) {
|
|
3436
|
+
this.floater.handleTriggerTabIndex();
|
|
3437
|
+
|
|
3438
|
+
if (event) {
|
|
3439
|
+
this.triggerNode = event.target;
|
|
3440
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
if (this.triggerContentSlot) {
|
|
3444
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3445
|
+
if (slot.textContent.trim()) {
|
|
3446
|
+
return true;
|
|
3447
|
+
}
|
|
3448
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3449
|
+
if (!slotInSlot) {
|
|
3450
|
+
return false;
|
|
3451
|
+
}
|
|
3452
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3453
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3454
|
+
});
|
|
3455
|
+
} else {
|
|
3456
|
+
this.hasTriggerContent = false;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3273
3460
|
/**
|
|
3274
3461
|
* Handles the default slot change event and updates the content.
|
|
3275
3462
|
*
|
|
@@ -3304,13 +3491,13 @@ class AuroDropdown extends r {
|
|
|
3304
3491
|
tabindex="${this.tabIndex}"
|
|
3305
3492
|
>
|
|
3306
3493
|
<div class="triggerContentWrapper">
|
|
3307
|
-
<label class="label" id="triggerLabel">
|
|
3494
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3308
3495
|
<slot name="label"></slot>
|
|
3309
3496
|
</label>
|
|
3310
3497
|
<div class="triggerContent">
|
|
3311
3498
|
<slot
|
|
3312
3499
|
name="trigger"
|
|
3313
|
-
@slotchange="${() =>
|
|
3500
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
3314
3501
|
</div>
|
|
3315
3502
|
</div>
|
|
3316
3503
|
${this.chevron || this.common ? u$1`
|
|
@@ -3352,7 +3539,7 @@ AuroDropdown.register();
|
|
|
3352
3539
|
|
|
3353
3540
|
var dropdownVersion = '3.0.0';
|
|
3354
3541
|
|
|
3355
|
-
var styleCss$3 = 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}: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{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}`;
|
|
3542
|
+
var styleCss$3 = 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}`;
|
|
3356
3543
|
|
|
3357
3544
|
var colorCss$3 = 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)}`;
|
|
3358
3545
|
|
|
@@ -3366,22 +3553,10 @@ var tokensCss$2 = i$b`:host{--ds-auro-select-placeholder-text-color: var(--ds-co
|
|
|
3366
3553
|
/**
|
|
3367
3554
|
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
3368
3555
|
*
|
|
3369
|
-
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
3370
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
3371
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
3372
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
3373
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3374
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
3375
|
-
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
3376
|
-
* @attr {Boolean} flexMenuWidth - If set, makes dropdown bib width match the size of the content, rather than the width of the trigger.
|
|
3377
|
-
* @prop {String} placeholder - Define placeholder text to display before a value is manually selected.
|
|
3378
|
-
* @prop {String} value - Value selected for the component.
|
|
3379
|
-
* @prop {Boolean} disabled - When attribute is present element shows disabled state.
|
|
3380
|
-
* @prop {Boolean} noCheckmark - When true, checkmark on selected option will no longer be present.
|
|
3381
|
-
* @attr {Object} optionSelected - Specifies the current selected menuOption.
|
|
3382
3556
|
* @slot - Default slot for the menu content.
|
|
3383
3557
|
* @slot label - Defines the content of the label.
|
|
3384
3558
|
* @slot helpText - Defines the content of the helpText.
|
|
3559
|
+
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
3385
3560
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
3386
3561
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
3387
3562
|
* @csspart helpText - Apply CSS to the help text.
|
|
@@ -3392,7 +3567,6 @@ class AuroSelect extends r$4 {
|
|
|
3392
3567
|
constructor() {
|
|
3393
3568
|
super();
|
|
3394
3569
|
|
|
3395
|
-
this.placeholder = 'Please select option';
|
|
3396
3570
|
this.optionSelected = undefined;
|
|
3397
3571
|
this.validity = undefined;
|
|
3398
3572
|
|
|
@@ -3447,68 +3621,118 @@ class AuroSelect extends r$4 {
|
|
|
3447
3621
|
// to understand how to use reflected attributes with your property settings.
|
|
3448
3622
|
static get properties() {
|
|
3449
3623
|
return {
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* When attribute is present, element shows disabled state.
|
|
3627
|
+
*/
|
|
3628
|
+
disabled: {
|
|
3629
|
+
type: Boolean,
|
|
3630
|
+
reflect: true
|
|
3453
3631
|
},
|
|
3454
|
-
|
|
3455
|
-
|
|
3632
|
+
|
|
3633
|
+
/**
|
|
3634
|
+
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
3635
|
+
*/
|
|
3636
|
+
flexMenuWidth: {
|
|
3637
|
+
type: Boolean,
|
|
3638
|
+
reflect: true
|
|
3456
3639
|
},
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* When true, checkmark on selected option will no longer be present.
|
|
3643
|
+
*/
|
|
3644
|
+
noCheckmark: {
|
|
3645
|
+
type: Boolean,
|
|
3646
|
+
reflect: true
|
|
3647
|
+
},
|
|
3648
|
+
|
|
3649
|
+
/**
|
|
3650
|
+
* If set, disables auto-validation on blur.
|
|
3651
|
+
*/
|
|
3457
3652
|
noValidate: {
|
|
3458
3653
|
type: Boolean,
|
|
3459
3654
|
reflect: true
|
|
3460
3655
|
},
|
|
3656
|
+
|
|
3657
|
+
/**
|
|
3658
|
+
* @private
|
|
3659
|
+
*/
|
|
3660
|
+
optionActive: {
|
|
3661
|
+
type: Object
|
|
3662
|
+
},
|
|
3663
|
+
|
|
3664
|
+
/**
|
|
3665
|
+
* Specifies the current selected menuOption.
|
|
3666
|
+
*/
|
|
3667
|
+
optionSelected: {
|
|
3668
|
+
type: Object
|
|
3669
|
+
},
|
|
3670
|
+
|
|
3671
|
+
/**
|
|
3672
|
+
* @private
|
|
3673
|
+
*/
|
|
3674
|
+
options: {
|
|
3675
|
+
type: Array
|
|
3676
|
+
},
|
|
3677
|
+
|
|
3678
|
+
/**
|
|
3679
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
3680
|
+
*/
|
|
3461
3681
|
required: {
|
|
3462
3682
|
type: Boolean,
|
|
3463
3683
|
reflect: true
|
|
3464
3684
|
},
|
|
3685
|
+
|
|
3686
|
+
/**
|
|
3687
|
+
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3688
|
+
*/
|
|
3465
3689
|
error: {
|
|
3466
3690
|
type: String,
|
|
3467
3691
|
reflect: true
|
|
3468
3692
|
},
|
|
3693
|
+
|
|
3694
|
+
/**
|
|
3695
|
+
* Sets a custom help text message to display for all validityStates.
|
|
3696
|
+
*/
|
|
3469
3697
|
setCustomValidity: {
|
|
3470
3698
|
type: String
|
|
3471
3699
|
},
|
|
3700
|
+
|
|
3701
|
+
/**
|
|
3702
|
+
* Custom help text message to display when validity = `customError`.
|
|
3703
|
+
*/
|
|
3472
3704
|
setCustomValidityCustomError: {
|
|
3473
3705
|
type: String
|
|
3474
3706
|
},
|
|
3707
|
+
|
|
3708
|
+
/**
|
|
3709
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
3710
|
+
*/
|
|
3475
3711
|
setCustomValidityValueMissing: {
|
|
3476
3712
|
type: String
|
|
3477
3713
|
},
|
|
3714
|
+
|
|
3715
|
+
/**
|
|
3716
|
+
* Specifies the `validityState` this element is in.
|
|
3717
|
+
*/
|
|
3478
3718
|
validity: {
|
|
3479
3719
|
type: String,
|
|
3480
3720
|
reflect: true
|
|
3481
3721
|
},
|
|
3482
|
-
disabled: {
|
|
3483
|
-
type: Boolean,
|
|
3484
|
-
reflect: true
|
|
3485
|
-
},
|
|
3486
|
-
noCheckmark: {
|
|
3487
|
-
type: Boolean,
|
|
3488
|
-
reflect: true
|
|
3489
|
-
},
|
|
3490
|
-
flexMenuWidth: {
|
|
3491
|
-
type: Boolean,
|
|
3492
|
-
reflect: true
|
|
3493
|
-
},
|
|
3494
|
-
placeholder: { type: String },
|
|
3495
3722
|
|
|
3496
3723
|
/**
|
|
3497
|
-
*
|
|
3724
|
+
* Value selected for the component.
|
|
3498
3725
|
*/
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
* @private
|
|
3503
|
-
*/
|
|
3504
|
-
optionActive: { type: Object },
|
|
3726
|
+
value: {
|
|
3727
|
+
type: String
|
|
3728
|
+
}
|
|
3505
3729
|
};
|
|
3506
3730
|
}
|
|
3507
3731
|
|
|
3508
3732
|
static get styles() {
|
|
3509
3733
|
return [
|
|
3510
|
-
styleCss$3,
|
|
3511
3734
|
colorCss$3,
|
|
3735
|
+
styleCss$3,
|
|
3512
3736
|
tokensCss$2
|
|
3513
3737
|
];
|
|
3514
3738
|
}
|
|
@@ -3543,36 +3767,30 @@ class AuroSelect extends r$4 {
|
|
|
3543
3767
|
}
|
|
3544
3768
|
|
|
3545
3769
|
/**
|
|
3546
|
-
* Updates the displayed value in an Auro dropdown component based on
|
|
3547
|
-
* @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.
|
|
3770
|
+
* Updates the displayed value in an Auro dropdown component based on optionSelected
|
|
3548
3771
|
* @private
|
|
3549
3772
|
* @returns {void}
|
|
3550
3773
|
*/
|
|
3551
|
-
updateDisplayedValue(
|
|
3774
|
+
updateDisplayedValue() {
|
|
3552
3775
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
3553
3776
|
|
|
3554
3777
|
// remove all existing rendered value(s)
|
|
3555
|
-
triggerContentEl.querySelectorAll('auro-menuoption, [
|
|
3778
|
+
triggerContentEl.querySelectorAll('auro-menuoption, [auro-menuoption]').forEach((elm) => {
|
|
3556
3779
|
elm.remove();
|
|
3557
3780
|
});
|
|
3558
3781
|
|
|
3559
|
-
if (
|
|
3560
|
-
// create a new span element with the value string
|
|
3561
|
-
const valueElem = document.createElement('span');
|
|
3562
|
-
valueElem.setAttribute('valuestr', true);
|
|
3563
|
-
valueElem.textContent = option;
|
|
3564
|
-
|
|
3565
|
-
// append the new element into the trigger content
|
|
3566
|
-
triggerContentEl.appendChild(valueElem);
|
|
3567
|
-
} else if (typeof option === 'object') {
|
|
3782
|
+
if (this.optionSelected) {
|
|
3568
3783
|
// clone the selected option and remove attributes that style it
|
|
3569
|
-
const clone =
|
|
3784
|
+
const clone = this.optionSelected.cloneNode(true);
|
|
3570
3785
|
clone.removeAttribute('selected');
|
|
3571
3786
|
clone.removeAttribute('class');
|
|
3572
3787
|
|
|
3573
3788
|
// insert the non-styled clone into the trigger
|
|
3574
3789
|
triggerContentEl.appendChild(clone);
|
|
3575
3790
|
}
|
|
3791
|
+
|
|
3792
|
+
// notify dropdown as trigger content is changed
|
|
3793
|
+
this.dropdown.requestUpdate();
|
|
3576
3794
|
}
|
|
3577
3795
|
|
|
3578
3796
|
/**
|
|
@@ -3582,7 +3800,7 @@ class AuroSelect extends r$4 {
|
|
|
3582
3800
|
*/
|
|
3583
3801
|
configureMenu() {
|
|
3584
3802
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
3585
|
-
|
|
3803
|
+
|
|
3586
3804
|
// racing condition on custom-select with custom-menu
|
|
3587
3805
|
if (!this.menu) {
|
|
3588
3806
|
setTimeout(() => {
|
|
@@ -3591,6 +3809,7 @@ class AuroSelect extends r$4 {
|
|
|
3591
3809
|
return;
|
|
3592
3810
|
}
|
|
3593
3811
|
|
|
3812
|
+
this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
|
|
3594
3813
|
this.menu.setAttribute('aria-hidden', 'true');
|
|
3595
3814
|
|
|
3596
3815
|
this.generateOptionsArray();
|
|
@@ -3603,8 +3822,6 @@ class AuroSelect extends r$4 {
|
|
|
3603
3822
|
this.optionSelected = this.menu.optionSelected;
|
|
3604
3823
|
this.value = this.optionSelected.value;
|
|
3605
3824
|
|
|
3606
|
-
this.updateDisplayedValue(this.optionSelected);
|
|
3607
|
-
|
|
3608
3825
|
if (this.dropdown.isPopoverVisible) {
|
|
3609
3826
|
this.dropdown.hide();
|
|
3610
3827
|
}
|
|
@@ -3618,25 +3835,11 @@ class AuroSelect extends r$4 {
|
|
|
3618
3835
|
* with `auro-select.value`.
|
|
3619
3836
|
*/
|
|
3620
3837
|
this.menu.addEventListener('auroMenu-selectValueFailure', () => {
|
|
3621
|
-
this.
|
|
3622
|
-
this.optionSelected = this.menu.optionSelected;
|
|
3623
|
-
|
|
3624
|
-
this.validity = 'badInput';
|
|
3625
|
-
|
|
3626
|
-
// Capitalizes the first letter of each word in this.value string
|
|
3627
|
-
const valueStr = this.value.replace(/(^\w{1})|(\s+\w{1})/gu, (letter) => letter.toUpperCase());
|
|
3628
|
-
|
|
3629
|
-
// Pass the new string to the trigger content
|
|
3630
|
-
this.updateDisplayedValue(valueStr);
|
|
3838
|
+
this.reset();
|
|
3631
3839
|
});
|
|
3632
3840
|
|
|
3633
3841
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
3634
|
-
|
|
3635
|
-
this.updateDisplayedValue(this.placeholder);
|
|
3636
|
-
|
|
3637
|
-
this.optionSelected = undefined;
|
|
3638
|
-
this.value = undefined;
|
|
3639
|
-
|
|
3842
|
+
this.optionSelected = this.menu.optionSelected;
|
|
3640
3843
|
this.validation.validate(this);
|
|
3641
3844
|
});
|
|
3642
3845
|
}
|
|
@@ -3688,8 +3891,6 @@ class AuroSelect extends r$4 {
|
|
|
3688
3891
|
this.addEventListener('blur', () => {
|
|
3689
3892
|
this.validation.validate(this);
|
|
3690
3893
|
});
|
|
3691
|
-
|
|
3692
|
-
this.labelForSr();
|
|
3693
3894
|
}
|
|
3694
3895
|
|
|
3695
3896
|
/**
|
|
@@ -3808,6 +4009,10 @@ class AuroSelect extends r$4 {
|
|
|
3808
4009
|
}));
|
|
3809
4010
|
}
|
|
3810
4011
|
|
|
4012
|
+
if (changedProperties.has('optionSelected')) {
|
|
4013
|
+
this.updateDisplayedValue();
|
|
4014
|
+
}
|
|
4015
|
+
|
|
3811
4016
|
if (changedProperties.has('error')) {
|
|
3812
4017
|
this.validation.validate(this, true);
|
|
3813
4018
|
}
|
|
@@ -3821,52 +4026,15 @@ class AuroSelect extends r$4 {
|
|
|
3821
4026
|
this.validation.reset(this);
|
|
3822
4027
|
}
|
|
3823
4028
|
|
|
3824
|
-
/**
|
|
3825
|
-
* Handles reading of auro-select by screen readers.
|
|
3826
|
-
* @private
|
|
3827
|
-
* @returns {void}
|
|
3828
|
-
*/
|
|
3829
|
-
labelForSr() {
|
|
3830
|
-
const placeholderLabel = document.createElement("div");
|
|
3831
|
-
const textId = "label";
|
|
3832
|
-
|
|
3833
|
-
placeholderLabel.setAttribute("id", textId);
|
|
3834
|
-
placeholderLabel.setAttribute("aria-live", "polite");
|
|
3835
|
-
|
|
3836
|
-
const styles = {
|
|
3837
|
-
position: 'absolute',
|
|
3838
|
-
overflow: 'hidden',
|
|
3839
|
-
clipPath: 'inset(1px, 1px, 1px, 1px)',
|
|
3840
|
-
width: '1px',
|
|
3841
|
-
height: '1px',
|
|
3842
|
-
padding: '0',
|
|
3843
|
-
border: '0'
|
|
3844
|
-
};
|
|
3845
|
-
|
|
3846
|
-
Object.assign(placeholderLabel.style, styles);
|
|
3847
|
-
|
|
3848
|
-
this.addEventListener('focus', () => {
|
|
3849
|
-
document.body.appendChild(placeholderLabel);
|
|
3850
|
-
|
|
3851
|
-
if (!this.optionSelected) {
|
|
3852
|
-
document.getElementById(textId).innerHTML = this.placeholder;
|
|
3853
|
-
} else {
|
|
3854
|
-
document.getElementById(textId).innerHTML = `${this.optionSelected.innerText}, ${this.placeholder}`;
|
|
3855
|
-
}
|
|
3856
|
-
});
|
|
3857
|
-
|
|
3858
|
-
this.addEventListener('blur', () => {
|
|
3859
|
-
if (document.contains(placeholderLabel)) {
|
|
3860
|
-
document.body.removeChild(placeholderLabel);
|
|
3861
|
-
}
|
|
3862
|
-
});
|
|
3863
|
-
}
|
|
3864
|
-
|
|
3865
4029
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
3866
4030
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
3867
4031
|
|
|
3868
4032
|
// function that renders the HTML and CSS into the scope of the component
|
|
3869
4033
|
render() {
|
|
4034
|
+
const placeholderClass = {
|
|
4035
|
+
hidden: this.value,
|
|
4036
|
+
};
|
|
4037
|
+
|
|
3870
4038
|
return u$3`
|
|
3871
4039
|
<div class="outerWrapper">
|
|
3872
4040
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -3893,7 +4061,7 @@ class AuroSelect extends r$4 {
|
|
|
3893
4061
|
chevron
|
|
3894
4062
|
part="dropdown">
|
|
3895
4063
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
3896
|
-
|
|
4064
|
+
<span id="placeholder" class="${e$5(placeholderClass)}"><slot name="placeholder"></slot></span>
|
|
3897
4065
|
</span>
|
|
3898
4066
|
<div class="menuWrapper">
|
|
3899
4067
|
</div>
|
|
@@ -3906,7 +4074,7 @@ class AuroSelect extends r$4 {
|
|
|
3906
4074
|
</p>`
|
|
3907
4075
|
: u$3`
|
|
3908
4076
|
<p class="selectElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
3909
|
-
${this.
|
|
4077
|
+
${this.errorMessage}
|
|
3910
4078
|
</p>`
|
|
3911
4079
|
}
|
|
3912
4080
|
</span>
|
|
@@ -3940,8 +4108,8 @@ var tokensCss$1 = i$b`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
3940
4108
|
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
3941
4109
|
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
3942
4110
|
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
3943
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
3944
4111
|
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
4112
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
3945
4113
|
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
3946
4114
|
* @slot loadingText - Text to show while loading attribute is set
|
|
3947
4115
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
@@ -4456,19 +4624,6 @@ var styleCss$1 = i$b`:host{display:flex;align-items:center;padding:var(--ds-size
|
|
|
4456
4624
|
|
|
4457
4625
|
var colorCss$1 = i$b`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
|
|
4458
4626
|
|
|
4459
|
-
/**
|
|
4460
|
-
* @license
|
|
4461
|
-
* Copyright 2017 Google LLC
|
|
4462
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4463
|
-
*/
|
|
4464
|
-
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});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)}}
|
|
4465
|
-
|
|
4466
|
-
/**
|
|
4467
|
-
* @license
|
|
4468
|
-
* Copyright 2018 Google LLC
|
|
4469
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4470
|
-
*/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(void 0===this.st){this.st=new Set,void 0!==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}});
|
|
4471
|
-
|
|
4472
4627
|
/**
|
|
4473
4628
|
* @license
|
|
4474
4629
|
* Copyright 2018 Google LLC
|
|
@@ -4814,7 +4969,7 @@ class AuroIcon extends BaseIcon {
|
|
|
4814
4969
|
|
|
4815
4970
|
return x$1`
|
|
4816
4971
|
<div
|
|
4817
|
-
class="${e(classes)}"
|
|
4972
|
+
class="${e$5(classes)}"
|
|
4818
4973
|
title="${o(this.title || undefined)}">
|
|
4819
4974
|
<span aria-hidden="${o(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
4820
4975
|
${this.customSvg ? x$1`
|
|
@@ -4825,7 +4980,7 @@ class AuroIcon extends BaseIcon {
|
|
|
4825
4980
|
}
|
|
4826
4981
|
</span>
|
|
4827
4982
|
|
|
4828
|
-
<div class="${e(a11y)}">
|
|
4983
|
+
<div class="${e$5(a11y)}">
|
|
4829
4984
|
<slot></slot>
|
|
4830
4985
|
</div>
|
|
4831
4986
|
</div>
|