@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.0-beta.20
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/0185585abae43d38-meta.json +1 -0
- package/.turbo/cache/0185585abae43d38.tar.zst +0 -0
- package/.turbo/cache/092e1fe054c68113-meta.json +1 -0
- package/.turbo/cache/092e1fe054c68113.tar.zst +0 -0
- package/.turbo/cache/19eb9b69e5625309-meta.json +1 -0
- package/.turbo/cache/19eb9b69e5625309.tar.zst +0 -0
- package/.turbo/cache/2059bc724ac24519-meta.json +1 -0
- package/.turbo/cache/2059bc724ac24519.tar.zst +0 -0
- package/.turbo/cache/23b3a2fea223679d-meta.json +1 -0
- package/.turbo/cache/23b3a2fea223679d.tar.zst +0 -0
- package/.turbo/cache/2c0d681132c153dd-meta.json +1 -0
- package/.turbo/cache/2c0d681132c153dd.tar.zst +0 -0
- package/.turbo/cache/2e79b1c1455468a1-meta.json +1 -0
- package/.turbo/cache/2e79b1c1455468a1.tar.zst +0 -0
- package/.turbo/cache/341f87099beb533e-meta.json +1 -0
- package/.turbo/cache/341f87099beb533e.tar.zst +0 -0
- package/.turbo/cache/363aa008d976f81d-meta.json +1 -0
- package/.turbo/cache/363aa008d976f81d.tar.zst +0 -0
- package/.turbo/cache/4006a206400d5c7b-meta.json +1 -0
- package/.turbo/cache/4006a206400d5c7b.tar.zst +0 -0
- package/.turbo/cache/43ab6002bc2cd191-meta.json +1 -0
- package/.turbo/cache/43ab6002bc2cd191.tar.zst +0 -0
- package/.turbo/cache/45cd32cd38eacbcb-meta.json +1 -0
- package/.turbo/cache/45cd32cd38eacbcb.tar.zst +0 -0
- package/.turbo/cache/492dda333b8d15f1-meta.json +1 -0
- package/.turbo/cache/492dda333b8d15f1.tar.zst +0 -0
- package/.turbo/cache/493e064c221aa745-meta.json +1 -0
- package/.turbo/cache/493e064c221aa745.tar.zst +0 -0
- package/.turbo/cache/50cd7dcfc9f820c5-meta.json +1 -0
- package/.turbo/cache/50cd7dcfc9f820c5.tar.zst +0 -0
- package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -0
- package/.turbo/cache/51eaa58d5c167de8.tar.zst +0 -0
- package/.turbo/cache/56ee89ef1c48963e-meta.json +1 -0
- package/.turbo/cache/56ee89ef1c48963e.tar.zst +0 -0
- package/.turbo/cache/5b57cc0e26e1fd5d-meta.json +1 -0
- package/.turbo/cache/5b57cc0e26e1fd5d.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/631d441eebe7e4ac-meta.json +1 -0
- package/.turbo/cache/631d441eebe7e4ac.tar.zst +0 -0
- package/.turbo/cache/6c582e957afdd75f-meta.json +1 -0
- package/.turbo/cache/6c582e957afdd75f.tar.zst +0 -0
- package/.turbo/cache/77da375a012de9d0-meta.json +1 -0
- package/.turbo/cache/77da375a012de9d0.tar.zst +0 -0
- package/.turbo/cache/78418f9089673a21-meta.json +1 -0
- package/.turbo/cache/78418f9089673a21.tar.zst +0 -0
- package/.turbo/cache/7964d1656e9e702a-meta.json +1 -0
- package/.turbo/cache/7964d1656e9e702a.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/80ebd4b1fa5c1e3a-meta.json +1 -0
- package/.turbo/cache/80ebd4b1fa5c1e3a.tar.zst +0 -0
- package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -0
- package/.turbo/cache/8bb856bd31b5b479.tar.zst +0 -0
- package/.turbo/cache/8c5b86ca67d33b17-meta.json +1 -0
- package/.turbo/cache/8c5b86ca67d33b17.tar.zst +0 -0
- package/.turbo/cache/8f5fef3e04a6fcfa-meta.json +1 -0
- package/.turbo/cache/8f5fef3e04a6fcfa.tar.zst +0 -0
- package/.turbo/cache/9d99fa3ab31d272f-meta.json +1 -0
- package/.turbo/cache/9d99fa3ab31d272f.tar.zst +0 -0
- package/.turbo/cache/a779ea8b78ce9d59-meta.json +1 -0
- package/.turbo/cache/a779ea8b78ce9d59.tar.zst +0 -0
- package/.turbo/cache/a9c36a3534c5496b-meta.json +1 -0
- package/.turbo/cache/a9c36a3534c5496b.tar.zst +0 -0
- package/.turbo/cache/ac1b55ad6757fd54-meta.json +1 -0
- package/.turbo/cache/ac1b55ad6757fd54.tar.zst +0 -0
- package/.turbo/cache/b1cd3922508c11c0-meta.json +1 -0
- package/.turbo/cache/b1cd3922508c11c0.tar.zst +0 -0
- package/.turbo/cache/b3c5c13bb1c28c92-meta.json +1 -0
- package/.turbo/cache/b3c5c13bb1c28c92.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/ba270a0ef147f2e5-meta.json +1 -0
- package/.turbo/cache/ba270a0ef147f2e5.tar.zst +0 -0
- package/.turbo/cache/bb5213773d5d3b04-meta.json +1 -0
- package/.turbo/cache/bb5213773d5d3b04.tar.zst +0 -0
- package/.turbo/cache/bbefd8d9606f1e87-meta.json +1 -0
- package/.turbo/cache/bbefd8d9606f1e87.tar.zst +0 -0
- package/.turbo/cache/be0b95293ea517cc-meta.json +1 -0
- package/.turbo/cache/be0b95293ea517cc.tar.zst +0 -0
- package/.turbo/cache/c03a12ff38ba1e02-meta.json +1 -0
- package/.turbo/cache/c03a12ff38ba1e02.tar.zst +0 -0
- package/.turbo/cache/c1312c6f8c051461-meta.json +1 -0
- package/.turbo/cache/c1312c6f8c051461.tar.zst +0 -0
- package/.turbo/cache/c289a5a9a6b897a9-meta.json +1 -0
- package/.turbo/cache/c289a5a9a6b897a9.tar.zst +0 -0
- package/.turbo/cache/c376d692c092d4d1-meta.json +1 -0
- package/.turbo/cache/c376d692c092d4d1.tar.zst +0 -0
- package/.turbo/cache/c6c6411199b68170-meta.json +1 -0
- package/.turbo/cache/c6c6411199b68170.tar.zst +0 -0
- package/.turbo/cache/c6dbc49c3038946d-meta.json +1 -0
- package/.turbo/cache/c6dbc49c3038946d.tar.zst +0 -0
- package/.turbo/cache/cae7586c45bed13e-meta.json +1 -0
- package/.turbo/cache/cae7586c45bed13e.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/db5e65d819bfe66b-meta.json +1 -0
- package/.turbo/cache/db5e65d819bfe66b.tar.zst +0 -0
- package/.turbo/cache/dbe6a08c64601aec-meta.json +1 -0
- package/.turbo/cache/dbe6a08c64601aec.tar.zst +0 -0
- package/.turbo/cache/dc597b3ea4f61ec8-meta.json +1 -0
- package/.turbo/cache/dc597b3ea4f61ec8.tar.zst +0 -0
- package/.turbo/cache/df5f651693145406-meta.json +1 -0
- package/.turbo/cache/df5f651693145406.tar.zst +0 -0
- package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -0
- package/.turbo/cache/e62cfee068e3ef36.tar.zst +0 -0
- package/.turbo/cache/ee40cab15d5b1fad-meta.json +1 -0
- package/.turbo/cache/ee40cab15d5b1fad.tar.zst +0 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +202 -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 +69 -68
- package/components/checkbox/demo/api.min.js +195 -87
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +195 -87
- package/components/checkbox/dist/auro-checkbox-group.d.ts +40 -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 +195 -87
- package/components/checkbox/package.json +1 -1
- package/components/checkbox/src/auro-checkbox-group.js +57 -20
- 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 +30 -26
- package/components/combobox/demo/api.min.js +3227 -948
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +3224 -945
- package/components/combobox/dist/auro-combobox.d.ts +76 -74
- 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 +2593 -628
- 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 +225 -164
- 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 +210 -7
- package/components/counter/.turbo/turbo-build$colon$version.log +10 -0
- package/components/counter/.turbo/turbo-build.log +325 -14
- package/components/counter/.turbo/turbo-bundler.log +7 -4
- package/components/counter/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/counter/.turbo/turbo-sass$colon$render.log +45 -3
- package/components/counter/.turbo/turbo-types.log +1 -1
- package/components/counter/README.md +188 -0
- package/components/counter/demo/api.md +104 -1014
- package/components/counter/demo/api.min.js +4773 -36
- package/components/counter/demo/index.js +2 -1
- package/components/counter/demo/index.md +190 -0
- package/components/counter/demo/index.min.js +4801 -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 +112 -5
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -1
- package/components/counter/dist/auro-counter-wrapper.d.ts +23 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts.map +1 -0
- package/components/counter/dist/auro-counter.d.ts +89 -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/iconVersion.d.ts +3 -0
- package/components/counter/dist/iconVersion.d.ts.map +1 -0
- package/components/counter/dist/index.js +4773 -36
- 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-wrapper-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-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 +229 -20
- package/components/counter/src/auro-counter-wrapper.js +54 -0
- package/components/counter/src/auro-counter.js +287 -12
- package/components/counter/src/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-css.js +1 -1
- package/components/counter/src/styles/counter-group.css +9 -1
- package/components/counter/src/styles/counter-group.scss +10 -1
- package/components/counter/src/styles/counter-wrapper-color-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper-color.css +4 -0
- package/components/counter/src/styles/counter-wrapper-color.scss +19 -0
- package/components/counter/src/styles/counter-wrapper-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper.css +15 -0
- package/components/counter/src/styles/counter-wrapper.scss +29 -0
- 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 +57 -57
- 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 +182 -135
- package/components/datepicker/demo/api.min.js +1010 -566
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +1010 -566
- package/components/datepicker/dist/auro-datepicker.d.ts +94 -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 +1010 -566
- 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 +152 -106
- 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 +28 -34
- package/components/form/demo/api.min.js +338 -25
- package/components/form/demo/index.min.js +338 -25
- package/components/form/demo/registerDemoDeps.js +6 -0
- package/components/form/demo/working.html +108 -0
- package/components/form/dist/auro-form.d.ts +137 -2
- package/components/form/dist/auro-form.d.ts.map +1 -1
- package/components/form/dist/index.js +338 -25
- package/components/form/package.json +4 -2
- package/components/form/src/auro-form.js +335 -25
- 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 +151 -316
- package/components/input/demo/api.min.js +370 -150
- package/components/input/demo/index.md +11 -61
- package/components/input/demo/index.min.js +370 -150
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +158 -87
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +370 -150
- 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 +257 -90
- 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 +22 -21
- package/components/menu/.turbo/turbo-bundler.log +4 -4
- package/components/menu/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/menu/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/menu/.turbo/turbo-types.log +1 -1
- package/components/menu/README.md +18 -26
- package/components/menu/demo/api.md +57 -20
- package/components/menu/demo/api.min.js +626 -312
- package/components/menu/demo/index.min.js +624 -310
- package/components/menu/dist/auro-menu-utils.d.ts +43 -0
- package/components/menu/dist/auro-menu-utils.d.ts.map +1 -0
- package/components/menu/dist/auro-menu.d.ts +97 -81
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/index.d.ts +1 -0
- package/components/menu/dist/index.js +625 -311
- package/components/menu/package.json +1 -1
- package/components/menu/src/auro-menu-utils.js +131 -0
- package/components/menu/src/auro-menu.js +492 -303
- package/components/menu/src/index.js +7 -0
- package/components/menu/src/styles/color-menuoption-css.js +1 -1
- package/components/menu/src/styles/color-menuoption.css +3 -0
- package/components/menu/src/styles/color-menuoption.scss +4 -0
- 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 +7 -4
- package/components/radio/demo/api.min.js +120 -58
- package/components/radio/demo/index.min.js +120 -58
- package/components/radio/dist/auro-radio-group.d.ts +5 -0
- package/components/radio/dist/auro-radio-group.d.ts.map +1 -1
- package/components/radio/dist/index.js +120 -58
- package/components/radio/package.json +1 -1
- package/components/radio/src/auro-radio-group.js +10 -2
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +32 -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 +92 -121
- package/components/select/demo/api.min.js +2723 -711
- package/components/select/demo/index.md +101 -59
- package/components/select/demo/index.min.js +2722 -706
- package/components/select/dist/auro-select.d.ts +77 -48
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/dropdownVersion.d.ts +3 -0
- package/components/select/dist/dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.js +2082 -367
- package/components/select/package.json +3 -3
- package/components/select/src/auro-select.js +148 -129
- 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 +14 -0
- package/components/select/src/styles/style.scss +24 -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/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/47ba2b5ebdb579e9-meta.json +0 -1
- package/.turbo/cache/47ba2b5ebdb579e9.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/8b735250fa5a62bf-meta.json +0 -1
- package/.turbo/cache/8b735250fa5a62bf.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/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/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
- package/.turbo/cache/d716cb7a08152beb.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
|
@@ -3,33 +3,46 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$
|
|
6
|
+
const t$6=globalThis,e$a=t$6.ShadowRoot&&(undefined===t$6.ShadyCSS||t$6.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$6=Symbol(),o$9=new WeakMap;let n$8 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$6)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$a&&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$8=t=>new n$8("string"==typeof t?t:t+"",undefined,s$6),i$c=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$8(o,t,s$6)},S$4=(s,o)=>{if(e$a)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$6.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$6=e$a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$8(e)})(t):t;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$
|
|
12
|
+
*/const{is:i$b,defineProperty:e$9,getOwnPropertyDescriptor:r$7,getOwnPropertyNames:h$4,getOwnPropertySymbols:o$8,getPrototypeOf:n$7}=Object,a$6=globalThis,c$5=a$6.trustedTypes,l$6=c$5?c$5.emptyScript:"",p$4=a$6.reactiveElementPolyfillSupport,d$4=(t,s)=>t,u$6={toAttribute(t,s){switch(s){case Boolean:t=t?l$6:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$4=(t,s)=>!i$b(t,s),y$4={attribute:true,type:String,converter:u$6,reflect:false,hasChanged:f$4};Symbol.metadata??=Symbol("metadata"),a$6.litPropertyMetadata??=new WeakMap;let b$2 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$4){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$9(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$7(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$4}static _$Ei(){if(this.hasOwnProperty(d$4("elementProperties")))return;const t=n$7(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$4("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$4("properties"))){const t=this.properties,s=[...h$4(t),...o$8(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$6(s));}else undefined!==s&&i.push(c$6(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?undefined:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():undefined}constructor(){super(),this._$Ep=undefined,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),undefined!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$4(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(undefined!==e&&true===i.reflect){const r=(undefined!==i.converter?.toAttribute?i.converter:u$6).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$6;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(undefined!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$4)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=undefined;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||undefined===this[s]||this.P(s,this[s],i);}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=false,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$2.elementStyles=[],b$2.shadowRootOptions={mode:"open"},b$2[d$4("elementProperties")]=new Map,b$2[d$4("finalized")]=new Map,p$4?.({ReactiveElement:b$2}),(a$6.reactiveElementVersions??=[]).push("2.0.4");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const t$
|
|
19
|
+
const t$5=globalThis,i$a=t$5.trustedTypes,s$5=i$a?i$a.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$8="$lit$",h$3=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$3,n$6=`<${o$7}>`,r$6=document,l$5=()=>r$6.createComment(""),c$4=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$5=Array.isArray,u$5=t=>a$5(t)||"function"==typeof t?.[Symbol.iterator],d$3="[ \t\n\f\r]",f$3=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$2=/-->/g,_$2=/>/g,m$2=RegExp(`>|${d$3}(?:([^\\s"'>=/]+)(${d$3}*=${d$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$3=/'/g,g$2=/"/g,$$2=/^(?:script|style|textarea|title)$/i,y$3=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$2=y$3(1),T$2=Symbol.for("lit-noChange"),E$2=Symbol.for("lit-nothing"),A$2=new WeakMap,C$2=r$6.createTreeWalker(r$6,129);function P$2(t,i){if(!a$5(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$5?s$5.createHTML(i):i}const V$2=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$3;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$3?"!--"===u[1]?c=v$2:undefined!==u[1]?c=_$2:undefined!==u[2]?($$2.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$2):undefined!==u[3]&&(c=m$2):c===m$2?">"===u[0]?(c=r??f$3,d=-1):undefined===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=undefined===u[3]?m$2:'"'===u[3]?g$2:p$3):c===g$2||c===p$3?c=m$2:c===v$2||c===_$2?c=f$3:(c=m$2,r=undefined);const x=c===m$2&&t[i+1].startsWith("/>")?" ":"";l+=c===f$3?s+n$6:d>=0?(o.push(a),s.slice(0,d)+e$8+s.slice(d)+h$3+x):s+h$3+(-2===d?i:x);}return [P$2(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$2 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$2(t,s);if(this.el=N.createElement(f,n),C$2.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$2.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$8)){const i=v[a++],s=r.getAttribute(t).split(h$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$2:"?"===e[1]?I$2:"@"===e[1]?L$2:k$2}),r.removeAttribute(t);}else t.startsWith(h$3)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$2.test(r.tagName)){const t=r.textContent.split(h$3),s=t.length-1;if(s>0){r.textContent=i$a?i$a.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$5()),C$2.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$5());}}}else if(8===r.nodeType)if(r.data===o$7)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$3,t+1));)d.push({type:7,index:c}),t+=h$3.length-1;}c++;}}static createElement(t,i){const s=r$6.createElement("template");return s.innerHTML=t,s}};function S$3(t,i,s=t,e){if(i===T$2)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c$4(i)?undefined:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),undefined===o?h=undefined:(h=new o(t),h._$AT(t,s,e)),undefined!==e?(s._$Co??=[])[e]=h:s._$Cl=h),undefined!==h&&(i=S$3(t,h._$AS(t,i.values),h,e)),i}let M$2 = class M{constructor(t,i){this._$AV=[],this._$AN=undefined,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$6).importNode(i,true);C$2.currentNode=e;let h=C$2.nextNode(),o=0,n=0,l=s[0];for(;undefined!==l;){if(o===l.index){let i;2===l.type?i=new R$2(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$2(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$2.nextNode(),o++);}return C$2.currentNode=r$6,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$2 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$2,this._$AN=undefined,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return undefined!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$3(this,t,i),c$4(t)?t===E$2||null==t||""===t?(this._$AH!==E$2&&this._$AR(),this._$AH=E$2):t!==this._$AH&&t!==T$2&&this._(t):undefined!==t._$litType$?this.$(t):undefined!==t.nodeType?this.T(t):u$5(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$2&&c$4(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$6.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N$2.createElement(P$2(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$2(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$2.get(t.strings);return undefined===i&&A$2.set(t.strings,i=new N$2(t)),i}k(t){a$5(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$5()),this.O(l$5()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$2 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E$2,this._$AN=undefined,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E$2;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(undefined===h)t=S$3(this,t,i,0),o=!c$4(t)||t!==this._$AH&&t!==T$2,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$3(this,e[s+n],i,n),r===T$2&&(r=this._$AH[n]),o||=!c$4(r)||r!==this._$AH[n],r===E$2?t=E$2:t!==E$2&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$2?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$2 = class H extends k$2{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$2?undefined:t;}};let I$2 = class I extends k$2{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$2);}};let L$2 = class L extends k$2{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$3(this,t,i,0)??E$2)===T$2)return;const s=this._$AH,e=t===E$2&&s!==E$2||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$2&&(s===E$2||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let z$2 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=undefined,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$3(this,t);}};const j$2=t$5.litHtmlPolyfillSupport;j$2?.(N$2,R$2),(t$5.litHtmlVersions??=[]).push("3.2.1");const B$2=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(undefined===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$2(i.insertBefore(l$5(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/let r$
|
|
25
|
+
*/let r$5 = class r extends b$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=undefined;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B$2(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$2}};r$5._$litElement$=true,r$5["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$5});const i$9=globalThis.litElementPolyfillSupport;i$9?.({LitElement:r$5});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2017 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/
|
|
32
|
+
const t$4={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$7=t=>(...e)=>({_$litDirective$:t,values:e});let i$8 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2018 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/const e$6=e$7(class extends i$8{constructor(t){if(super(t),t.type!==t$4.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$2}});
|
|
26
39
|
|
|
27
40
|
/**
|
|
28
41
|
* @license
|
|
29
42
|
* Copyright 2020 Google LLC
|
|
30
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
44
|
*/
|
|
32
|
-
const a$
|
|
45
|
+
const a$4=Symbol.for(""),o$6=t=>{if(t?.r===a$4)return t?._$litStatic$},s$4=t=>({_$litStatic$:t,r:a$4}),i$7=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$4}),l$4=new Map,n$5=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&undefined!==(i=e[$],s=o$6(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$4.get(t))&&(n.raw=n,l$4.set(t,r=n)),e=u;}return t(r,...e)},u$4=n$5(x$2);
|
|
33
46
|
|
|
34
47
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
35
48
|
// See LICENSE in the project root for license information.
|
|
@@ -38,7 +51,7 @@ const a$3=Symbol.for(""),o$5=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({
|
|
|
38
51
|
|
|
39
52
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
40
53
|
|
|
41
|
-
let AuroLibraryRuntimeUtils$
|
|
54
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
42
55
|
|
|
43
56
|
/* eslint-disable jsdoc/require-param */
|
|
44
57
|
|
|
@@ -107,7 +120,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
107
120
|
|
|
108
121
|
class AuroFormValidation {
|
|
109
122
|
constructor() {
|
|
110
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
123
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
111
124
|
}
|
|
112
125
|
|
|
113
126
|
/**
|
|
@@ -135,30 +148,87 @@ class AuroFormValidation {
|
|
|
135
148
|
}
|
|
136
149
|
|
|
137
150
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* @param {
|
|
151
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
152
|
+
*
|
|
153
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
141
154
|
* @returns {void}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
158
|
+
* validateElementAttributes(inputElement);
|
|
159
|
+
*
|
|
160
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
161
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
162
|
+
*
|
|
163
|
+
* Validation rules:
|
|
164
|
+
* - input:
|
|
165
|
+
* - length:
|
|
166
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
167
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
168
|
+
* - pattern:
|
|
169
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
170
|
+
* - counter:
|
|
171
|
+
* - range:
|
|
172
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
173
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
142
174
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
175
|
+
validateElementAttributes(elem) {
|
|
176
|
+
const validationRules = {
|
|
177
|
+
input: {
|
|
178
|
+
length: [
|
|
179
|
+
{
|
|
180
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
181
|
+
validity: 'tooShort',
|
|
182
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
186
|
+
validity: 'tooLong',
|
|
187
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
pattern: [
|
|
191
|
+
{
|
|
192
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
193
|
+
validity: 'patternMismatch',
|
|
194
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
counter: {
|
|
199
|
+
range: [
|
|
200
|
+
{
|
|
201
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
202
|
+
validity: 'rangeOverflow',
|
|
203
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
207
|
+
validity: 'rangeUnderflow',
|
|
208
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
209
|
+
}
|
|
210
|
+
]
|
|
150
211
|
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
let elementType;
|
|
215
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
216
|
+
elementType = 'input';
|
|
217
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
218
|
+
elementType = 'counter';
|
|
157
219
|
}
|
|
158
220
|
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
221
|
+
if (elementType) {
|
|
222
|
+
const rules = validationRules[elementType];
|
|
223
|
+
|
|
224
|
+
if (rules) {
|
|
225
|
+
Object.values(rules).flat().forEach(rule => {
|
|
226
|
+
if (rule.check(elem)) {
|
|
227
|
+
elem.validity = rule.validity;
|
|
228
|
+
elem.errorMessage = rule.message(elem);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
162
232
|
}
|
|
163
233
|
}
|
|
164
234
|
|
|
@@ -174,33 +244,32 @@ class AuroFormValidation {
|
|
|
174
244
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
175
245
|
|
|
176
246
|
if (!elem.value.match(emailRegex)) {
|
|
177
|
-
elem.validity = '
|
|
178
|
-
elem.
|
|
247
|
+
elem.validity = 'patternMismatch';
|
|
248
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
179
249
|
}
|
|
180
250
|
} else if (elem.type === 'credit-card') {
|
|
181
251
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
182
252
|
elem.validity = 'tooShort';
|
|
183
|
-
elem.
|
|
253
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
184
254
|
}
|
|
185
255
|
} else if (elem.type === 'number') {
|
|
186
256
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
187
257
|
elem.validity = 'rangeOverflow';
|
|
188
|
-
elem.
|
|
258
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
189
259
|
}
|
|
190
260
|
|
|
191
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
261
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
192
262
|
elem.validity = 'rangeUnderflow';
|
|
193
|
-
elem.
|
|
263
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
194
264
|
}
|
|
195
|
-
|
|
196
265
|
} else if (elem.type === 'month-day-year' ||
|
|
197
266
|
elem.type === 'month-year' ||
|
|
198
267
|
elem.type === 'month-fullYear' ||
|
|
199
268
|
elem.type === 'year-month-day'
|
|
200
269
|
) {
|
|
201
|
-
if (elem.value
|
|
270
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
202
271
|
elem.validity = 'tooShort';
|
|
203
|
-
elem.
|
|
272
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
204
273
|
} else {
|
|
205
274
|
const valueDate = new Date(elem.value);
|
|
206
275
|
|
|
@@ -210,7 +279,7 @@ class AuroFormValidation {
|
|
|
210
279
|
|
|
211
280
|
if (valueDate > maxDate) {
|
|
212
281
|
elem.validity = 'rangeOverflow';
|
|
213
|
-
elem.
|
|
282
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
214
283
|
}
|
|
215
284
|
}
|
|
216
285
|
|
|
@@ -220,7 +289,7 @@ class AuroFormValidation {
|
|
|
220
289
|
|
|
221
290
|
if (valueDate < minDate) {
|
|
222
291
|
elem.validity = 'rangeUnderflow';
|
|
223
|
-
elem.
|
|
292
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
224
293
|
}
|
|
225
294
|
}
|
|
226
295
|
}
|
|
@@ -243,10 +312,10 @@ class AuroFormValidation {
|
|
|
243
312
|
|
|
244
313
|
if (elem.hasAttribute('error')) {
|
|
245
314
|
elem.validity = 'customError';
|
|
246
|
-
elem.
|
|
315
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
247
316
|
} else if (validationShouldRun) {
|
|
248
317
|
elem.validity = 'valid';
|
|
249
|
-
elem.
|
|
318
|
+
elem.errorMessage = '';
|
|
250
319
|
|
|
251
320
|
/**
|
|
252
321
|
* Only validate once we interact with the datepicker
|
|
@@ -258,7 +327,7 @@ class AuroFormValidation {
|
|
|
258
327
|
let hasValue = elem.value && elem.value.length > 0;
|
|
259
328
|
|
|
260
329
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
261
|
-
if (this.auroInputElements
|
|
330
|
+
if (this.auroInputElements?.length === 2) {
|
|
262
331
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
263
332
|
hasValue = false;
|
|
264
333
|
}
|
|
@@ -266,31 +335,29 @@ class AuroFormValidation {
|
|
|
266
335
|
|
|
267
336
|
if (!hasValue && elem.required) {
|
|
268
337
|
elem.validity = 'valueMissing';
|
|
269
|
-
elem.
|
|
338
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
270
339
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
271
340
|
this.validateType(elem);
|
|
272
|
-
this.
|
|
341
|
+
this.validateElementAttributes(elem);
|
|
342
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
343
|
+
this.validateElementAttributes(elem);
|
|
273
344
|
}
|
|
274
345
|
}
|
|
275
346
|
|
|
276
|
-
if (this.auroInputElements
|
|
347
|
+
if (this.auroInputElements?.length > 0) {
|
|
277
348
|
elem.validity = this.auroInputElements[0].validity;
|
|
278
|
-
elem.
|
|
349
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
279
350
|
|
|
280
|
-
if (elem.validity === 'valid') {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
284
|
-
}
|
|
351
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
352
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
353
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
285
354
|
}
|
|
286
355
|
}
|
|
287
356
|
|
|
288
357
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
293
|
-
}
|
|
358
|
+
// Use the validity message override if it is declared
|
|
359
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
360
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
294
361
|
}
|
|
295
362
|
|
|
296
363
|
this.getErrorMessage(elem);
|
|
@@ -336,18 +403,18 @@ class AuroFormValidation {
|
|
|
336
403
|
if (elem.validity !== 'valid') {
|
|
337
404
|
if (elem.setCustomValidity) {
|
|
338
405
|
elem.errorMessage = elem.setCustomValidity;
|
|
339
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
406
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
340
407
|
const input = elem.renderRoot.querySelector('input');
|
|
341
408
|
|
|
342
409
|
if (input.validationMessage.length > 0) {
|
|
343
410
|
elem.errorMessage = input.validationMessage;
|
|
344
411
|
}
|
|
345
|
-
} else if (this.inputElements &&
|
|
412
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
346
413
|
const firstInput = this.inputElements[0];
|
|
347
414
|
|
|
348
415
|
if (firstInput.validationMessage.length > 0) {
|
|
349
416
|
elem.errorMessage = firstInput.validationMessage;
|
|
350
|
-
} else if (this.inputElements
|
|
417
|
+
} else if (this.inputElements?.length === 2) {
|
|
351
418
|
const secondInput = this.inputElements[1];
|
|
352
419
|
|
|
353
420
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -365,7 +432,7 @@ class AuroFormValidation {
|
|
|
365
432
|
// See LICENSE in the project root for license information.
|
|
366
433
|
|
|
367
434
|
|
|
368
|
-
let AuroDependencyVersioning$
|
|
435
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
369
436
|
|
|
370
437
|
/**
|
|
371
438
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -391,7 +458,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
391
458
|
*/
|
|
392
459
|
generateTag(baseName, version, tagClass) {
|
|
393
460
|
const elementName = this.generateElementName(baseName, version);
|
|
394
|
-
const tag = i$
|
|
461
|
+
const tag = i$7`${s$4(elementName)}`;
|
|
395
462
|
|
|
396
463
|
if (!customElements.get(elementName)) {
|
|
397
464
|
customElements.define(elementName, class extends tagClass {});
|
|
@@ -406,33 +473,33 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
406
473
|
* Copyright 2017 Google LLC
|
|
407
474
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
408
475
|
*/
|
|
409
|
-
const t$2=globalThis,i$5=t$2.trustedTypes,s$2=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):
|
|
476
|
+
const t$2$1=globalThis,i$5$1=t$2$1.trustedTypes,s$2$1=i$5$1?i$5$1.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$4$1="$lit$",h$1$1=`lit$${Math.random().toFixed(9).slice(2)}$`,o$4$1="?"+h$1$1,n$3$1=`<${o$4$1}>`,r$3$1=document,l$2$1=()=>r$3$1.createComment(""),c$2$1=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2$1=Array.isArray,u$2$1=t=>a$2$1(t)||"function"==typeof t?.[Symbol.iterator],d$1$1="[ \t\n\f\r]",f$1$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_$1=/>/g,m$1=RegExp(`>|${d$1$1}(?:([^\\s"'>=/]+)(${d$1$1}*=${d$1$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1$1=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$1$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$1$1(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$3$1.createTreeWalker(r$3$1,129);function P$1(t,i){if(!a$2$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$2$1?s$2$1.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1$1?"!--"===u[1]?c=v$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$1$1,d=-1):undefined===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=undefined===u[3]?m$1:'"'===u[3]?g$1:p$1$1):c===g$1||c===p$1$1?c=m$1:c===v$1||c===_$1?c=f$1$1:(c=m$1,r=undefined);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1$1?s+n$3$1:d>=0?(o.push(a),s.slice(0,d)+e$4$1+s.slice(d)+h$1$1+x):s+h$1$1+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$4$1)){const i=v[a++],s=r.getAttribute(t).split(h$1$1),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$1:"?"===e[1]?I$1:"@"===e[1]?L$1:k$1}),r.removeAttribute(t);}else t.startsWith(h$1$1)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$1$1),s=t.length-1;if(s>0){r.textContent=i$5$1?i$5$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$2$1()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$2$1());}}}else if(8===r.nodeType)if(r.data===o$4$1)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$1$1,t+1));)d.push({type:7,index:c}),t+=h$1$1.length-1;}c++;}}static createElement(t,i){const s=r$3$1.createElement("template");return s.innerHTML=t,s}};function S$1$1(t,i,s=t,e){if(i===T$1)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c$2$1(i)?undefined:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),undefined===o?h=undefined:(h=new o(t),h._$AT(t,s,e)),undefined!==e?(s._$Co??=[])[e]=h:s._$Cl=h),undefined!==h&&(i=S$1$1(t,h._$AS(t,i.values),h,e)),i}let M$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$3$1).importNode(i,true);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;undefined!==l;){if(o===l.index){let i;2===l.type?i=new R$1(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$1.nextNode(),o++);}return C$1.currentNode=r$3$1,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$1 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$1,this._$AN=undefined,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return undefined!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$1$1(this,t,i),c$2$1(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):undefined!==t._$litType$?this.$(t):undefined!==t.nodeType?this.T(t):u$2$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$1&&c$2$1(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N$1.createElement(P$1(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$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$2$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$2$1()),this.O(l$2$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$1 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E$1,this._$AN=undefined,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(undefined===h)t=S$1$1(this,t,i,0),o=!c$2$1(t)||t!==this._$AH&&t!==T$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$1$1(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$2$1(r)||r!==this._$AH[n],r===E$1?t=E$1:t!==E$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$1 = class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$1?undefined:t;}};let I$1 = class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$1);}};let L$1 = class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$1$1(this,t,i,0)??E$1)===T$1)return;const s=this._$AH,e=t===E$1&&s!==E$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$1&&(s===E$1||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let z$1 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=undefined,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$1$1(this,t);}};const j$1=t$2$1.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$2$1.litHtmlVersions??=[]).push("3.2.1");const B$1=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(undefined===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$1(i.insertBefore(l$2$1(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
410
477
|
|
|
411
478
|
/**
|
|
412
479
|
* @license
|
|
413
480
|
* Copyright 2020 Google LLC
|
|
414
481
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
415
482
|
*/
|
|
416
|
-
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$1=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(
|
|
483
|
+
const a$1$1=Symbol.for(""),o$3$1=t=>{if(t?.r===a$1$1)return t?._$litStatic$},s$1$1=t=>({_$litStatic$:t,r:a$1$1}),i$4$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$1$1}),l$1$1=new Map,n$2$1=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&undefined!==(i=e[$],s=o$3$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l$1$1.get(t))&&(n.raw=n,l$1$1.set(t,r=n)),e=u;}return t(r,...e)},u$1$1=n$2$1(x$1);
|
|
417
484
|
|
|
418
485
|
/**
|
|
419
486
|
* @license
|
|
420
487
|
* Copyright 2019 Google LLC
|
|
421
488
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
422
489
|
*/
|
|
423
|
-
const t$1=globalThis,e$3=t$1.ShadowRoot&&(
|
|
490
|
+
const t$1$1=globalThis,e$3$1=t$1$1.ShadowRoot&&(undefined===t$1$1.ShadyCSS||t$1$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$2$1=new WeakMap;let n$1$1 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3$1&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$2$1.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2$1.set(s,t));}return t}toString(){return this.cssText}};const r$2$1=t=>new n$1$1("string"==typeof t?t:t+"",undefined,s$3),i$3$1=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$1$1(o,t,s$3)},S$2=(s,o)=>{if(e$3$1)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1$1.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1$1=e$3$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2$1(e)})(t):t;
|
|
424
491
|
|
|
425
492
|
/**
|
|
426
493
|
* @license
|
|
427
494
|
* Copyright 2017 Google LLC
|
|
428
495
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
429
|
-
*/const{is:i$2,defineProperty:e$2,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$1,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$2(t,s),y={attribute
|
|
496
|
+
*/const{is:i$2$1,defineProperty:e$2$1,getOwnPropertyDescriptor:r$1$1,getOwnPropertyNames:h$2,getOwnPropertySymbols:o$1$1,getPrototypeOf:n$4}=Object,a$3=globalThis,c$3=a$3.trustedTypes,l$3=c$3?c$3.emptyScript:"",p$2=a$3.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$3={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$2$1(t,s),y$2={attribute:true,type:String,converter:u$3,reflect:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$3.litPropertyMetadata??=new WeakMap;let b$1 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$2){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);undefined!==r&&e$2$1(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$1$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$2}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$4(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$2("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$2("properties"))){const t=this.properties,s=[...h$2(t),...o$1$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(undefined!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);undefined!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1$1(s));}else undefined!==s&&i.push(c$1$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?undefined:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():undefined}constructor(){super(),this._$Ep=undefined,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),undefined!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$2(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(undefined!==e&&true===i.reflect){const r=(undefined!==i.converter?.toAttribute?i.converter:u$3).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$3;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(undefined!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$2)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=undefined;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||undefined===this[s]||this.P(s,this[s],i);}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=false,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$2("elementProperties")]=new Map,b$1[d$2("finalized")]=new Map,p$2?.({ReactiveElement:b$1}),(a$3.reactiveElementVersions??=[]).push("2.0.4");
|
|
430
497
|
|
|
431
498
|
/**
|
|
432
499
|
* @license
|
|
433
500
|
* Copyright 2017 Google LLC
|
|
434
501
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
435
|
-
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=
|
|
502
|
+
*/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$1$1=globalThis.litElementPolyfillSupport;i$1$1?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
436
503
|
|
|
437
504
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
438
505
|
// See LICENSE in the project root for license information.
|
|
@@ -441,7 +508,7 @@ const t$1=globalThis,e$3=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.na
|
|
|
441
508
|
|
|
442
509
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
443
510
|
|
|
444
|
-
class AuroLibraryRuntimeUtils {
|
|
511
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
445
512
|
|
|
446
513
|
/* eslint-disable jsdoc/require-param */
|
|
447
514
|
|
|
@@ -502,7 +569,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
502
569
|
|
|
503
570
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
504
571
|
}
|
|
505
|
-
}
|
|
572
|
+
};
|
|
506
573
|
|
|
507
574
|
/**
|
|
508
575
|
* Custom positioning reference element.
|
|
@@ -552,7 +619,7 @@ function getAlignmentAxis(placement) {
|
|
|
552
619
|
return getOppositeAxis(getSideAxis(placement));
|
|
553
620
|
}
|
|
554
621
|
function getAlignmentSides(placement, rects, rtl) {
|
|
555
|
-
if (rtl ===
|
|
622
|
+
if (rtl === undefined) {
|
|
556
623
|
rtl = false;
|
|
557
624
|
}
|
|
558
625
|
const alignment = getAlignment(placement);
|
|
@@ -709,7 +776,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
709
776
|
platform
|
|
710
777
|
} = config;
|
|
711
778
|
const validMiddleware = middleware.filter(Boolean);
|
|
712
|
-
const rtl = await (platform.isRTL == null ?
|
|
779
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(floating));
|
|
713
780
|
let rects = await platform.getElementRects({
|
|
714
781
|
reference,
|
|
715
782
|
floating,
|
|
@@ -795,7 +862,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
795
862
|
*/
|
|
796
863
|
async function detectOverflow(state, options) {
|
|
797
864
|
var _await$platform$isEle;
|
|
798
|
-
if (options ===
|
|
865
|
+
if (options === undefined) {
|
|
799
866
|
options = {};
|
|
800
867
|
}
|
|
801
868
|
const {
|
|
@@ -817,7 +884,7 @@ async function detectOverflow(state, options) {
|
|
|
817
884
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
818
885
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
819
886
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
820
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ?
|
|
887
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? undefined : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? undefined : platform.getDocumentElement(elements.floating))),
|
|
821
888
|
boundary,
|
|
822
889
|
rootBoundary,
|
|
823
890
|
strategy
|
|
@@ -828,8 +895,8 @@ async function detectOverflow(state, options) {
|
|
|
828
895
|
width: rects.floating.width,
|
|
829
896
|
height: rects.floating.height
|
|
830
897
|
} : rects.reference;
|
|
831
|
-
const offsetParent = await (platform.getOffsetParent == null ?
|
|
832
|
-
const offsetScale = (await (platform.isElement == null ?
|
|
898
|
+
const offsetParent = await (platform.getOffsetParent == null ? undefined : platform.getOffsetParent(elements.floating));
|
|
899
|
+
const offsetScale = (await (platform.isElement == null ? undefined : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? undefined : platform.getScale(offsetParent))) || {
|
|
833
900
|
x: 1,
|
|
834
901
|
y: 1
|
|
835
902
|
} : {
|
|
@@ -866,7 +933,7 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
866
933
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
867
934
|
*/
|
|
868
935
|
const autoPlacement$1 = function (options) {
|
|
869
|
-
if (options ===
|
|
936
|
+
if (options === undefined) {
|
|
870
937
|
options = {};
|
|
871
938
|
}
|
|
872
939
|
return {
|
|
@@ -890,12 +957,12 @@ const autoPlacement$1 = function (options) {
|
|
|
890
957
|
} = evaluate(options, state);
|
|
891
958
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
892
959
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
893
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ?
|
|
960
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
894
961
|
const currentPlacement = placements$1[currentIndex];
|
|
895
962
|
if (currentPlacement == null) {
|
|
896
963
|
return {};
|
|
897
964
|
}
|
|
898
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ?
|
|
965
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating)));
|
|
899
966
|
|
|
900
967
|
// Make `computeCoords` start from the right place.
|
|
901
968
|
if (placement !== currentPlacement) {
|
|
@@ -906,7 +973,7 @@ const autoPlacement$1 = function (options) {
|
|
|
906
973
|
};
|
|
907
974
|
}
|
|
908
975
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
909
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ?
|
|
976
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP2.overflows) || []), {
|
|
910
977
|
placement: currentPlacement,
|
|
911
978
|
overflows: currentOverflows
|
|
912
979
|
}];
|
|
@@ -936,7 +1003,7 @@ const autoPlacement$1 = function (options) {
|
|
|
936
1003
|
// Aligned placements should not check their opposite crossAxis
|
|
937
1004
|
// side.
|
|
938
1005
|
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
939
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ?
|
|
1006
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? undefined : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
940
1007
|
if (resetPlacement !== placement) {
|
|
941
1008
|
return {
|
|
942
1009
|
data: {
|
|
@@ -960,7 +1027,7 @@ const autoPlacement$1 = function (options) {
|
|
|
960
1027
|
* @see https://floating-ui.com/docs/flip
|
|
961
1028
|
*/
|
|
962
1029
|
const flip$1 = function (options) {
|
|
963
|
-
if (options ===
|
|
1030
|
+
if (options === undefined) {
|
|
964
1031
|
options = {};
|
|
965
1032
|
}
|
|
966
1033
|
return {
|
|
@@ -996,7 +1063,7 @@ const flip$1 = function (options) {
|
|
|
996
1063
|
const side = getSide(placement);
|
|
997
1064
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
998
1065
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
999
|
-
const rtl = await (platform.isRTL == null ?
|
|
1066
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1000
1067
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
1001
1068
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
1002
1069
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
@@ -1005,7 +1072,7 @@ const flip$1 = function (options) {
|
|
|
1005
1072
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
1006
1073
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1007
1074
|
const overflows = [];
|
|
1008
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ?
|
|
1075
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
1009
1076
|
if (checkMainAxis) {
|
|
1010
1077
|
overflows.push(overflow[side]);
|
|
1011
1078
|
}
|
|
@@ -1021,7 +1088,7 @@ const flip$1 = function (options) {
|
|
|
1021
1088
|
// One or more sides is overflowing.
|
|
1022
1089
|
if (!overflows.every(side => side <= 0)) {
|
|
1023
1090
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
1024
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ?
|
|
1091
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? undefined : _middlewareData$flip2.index) || 0) + 1;
|
|
1025
1092
|
const nextPlacement = placements[nextIndex];
|
|
1026
1093
|
if (nextPlacement) {
|
|
1027
1094
|
// Try next placement and re-run the lifecycle.
|
|
@@ -1038,7 +1105,7 @@ const flip$1 = function (options) {
|
|
|
1038
1105
|
|
|
1039
1106
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1040
1107
|
// then find the placement that fits the best on the main crossAxis side.
|
|
1041
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ?
|
|
1108
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? undefined : _overflowsData$filter.placement;
|
|
1042
1109
|
|
|
1043
1110
|
// Otherwise fallback.
|
|
1044
1111
|
if (!resetPlacement) {
|
|
@@ -1055,7 +1122,7 @@ const flip$1 = function (options) {
|
|
|
1055
1122
|
currentSideAxis === 'y';
|
|
1056
1123
|
}
|
|
1057
1124
|
return true;
|
|
1058
|
-
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ?
|
|
1125
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? undefined : _overflowsData$filter2[0];
|
|
1059
1126
|
if (placement) {
|
|
1060
1127
|
resetPlacement = placement;
|
|
1061
1128
|
}
|
|
@@ -1088,7 +1155,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1088
1155
|
platform,
|
|
1089
1156
|
elements
|
|
1090
1157
|
} = state;
|
|
1091
|
-
const rtl = await (platform.isRTL == null ?
|
|
1158
|
+
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
1092
1159
|
const side = getSide(placement);
|
|
1093
1160
|
const alignment = getAlignment(placement);
|
|
1094
1161
|
const isVertical = getSideAxis(placement) === 'y';
|
|
@@ -1130,7 +1197,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1130
1197
|
* @see https://floating-ui.com/docs/offset
|
|
1131
1198
|
*/
|
|
1132
1199
|
const offset$1 = function (options) {
|
|
1133
|
-
if (options ===
|
|
1200
|
+
if (options === undefined) {
|
|
1134
1201
|
options = 0;
|
|
1135
1202
|
}
|
|
1136
1203
|
return {
|
|
@@ -1148,7 +1215,7 @@ const offset$1 = function (options) {
|
|
|
1148
1215
|
|
|
1149
1216
|
// If the placement is the same and the arrow caused an alignment offset
|
|
1150
1217
|
// then we don't need to change the positioning coordinates.
|
|
1151
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ?
|
|
1218
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1152
1219
|
return {};
|
|
1153
1220
|
}
|
|
1154
1221
|
return {
|
|
@@ -1177,11 +1244,11 @@ function getNodeName(node) {
|
|
|
1177
1244
|
}
|
|
1178
1245
|
function getWindow(node) {
|
|
1179
1246
|
var _node$ownerDocument;
|
|
1180
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ?
|
|
1247
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? undefined : _node$ownerDocument.defaultView) || window;
|
|
1181
1248
|
}
|
|
1182
1249
|
function getDocumentElement(node) {
|
|
1183
1250
|
var _ref;
|
|
1184
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ?
|
|
1251
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? undefined : _ref.documentElement;
|
|
1185
1252
|
}
|
|
1186
1253
|
function isNode(value) {
|
|
1187
1254
|
if (!hasWindow()) {
|
|
@@ -1296,14 +1363,14 @@ function getNearestOverflowAncestor(node) {
|
|
|
1296
1363
|
}
|
|
1297
1364
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1298
1365
|
var _node$ownerDocument2;
|
|
1299
|
-
if (list ===
|
|
1366
|
+
if (list === undefined) {
|
|
1300
1367
|
list = [];
|
|
1301
1368
|
}
|
|
1302
|
-
if (traverseIframes ===
|
|
1369
|
+
if (traverseIframes === undefined) {
|
|
1303
1370
|
traverseIframes = true;
|
|
1304
1371
|
}
|
|
1305
1372
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1306
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ?
|
|
1373
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? undefined : _node$ownerDocument2.body);
|
|
1307
1374
|
const win = getWindow(scrollableAncestor);
|
|
1308
1375
|
if (isBody) {
|
|
1309
1376
|
const frameElement = getFrameElement(win);
|
|
@@ -1380,7 +1447,7 @@ function getVisualOffsets(element) {
|
|
|
1380
1447
|
};
|
|
1381
1448
|
}
|
|
1382
1449
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1383
|
-
if (isFixed ===
|
|
1450
|
+
if (isFixed === undefined) {
|
|
1384
1451
|
isFixed = false;
|
|
1385
1452
|
}
|
|
1386
1453
|
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
@@ -1390,10 +1457,10 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1390
1457
|
}
|
|
1391
1458
|
|
|
1392
1459
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1393
|
-
if (includeScale ===
|
|
1460
|
+
if (includeScale === undefined) {
|
|
1394
1461
|
includeScale = false;
|
|
1395
1462
|
}
|
|
1396
|
-
if (isFixedStrategy ===
|
|
1463
|
+
if (isFixedStrategy === undefined) {
|
|
1397
1464
|
isFixedStrategy = false;
|
|
1398
1465
|
}
|
|
1399
1466
|
const clientRect = element.getBoundingClientRect();
|
|
@@ -1453,7 +1520,7 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1453
1520
|
}
|
|
1454
1521
|
|
|
1455
1522
|
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1456
|
-
if (ignoreScrollbarX ===
|
|
1523
|
+
if (ignoreScrollbarX === undefined) {
|
|
1457
1524
|
ignoreScrollbarX = false;
|
|
1458
1525
|
}
|
|
1459
1526
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
@@ -1803,10 +1870,10 @@ function observeMove(element, onMove) {
|
|
|
1803
1870
|
io = null;
|
|
1804
1871
|
}
|
|
1805
1872
|
function refresh(skip, threshold) {
|
|
1806
|
-
if (skip ===
|
|
1873
|
+
if (skip === undefined) {
|
|
1807
1874
|
skip = false;
|
|
1808
1875
|
}
|
|
1809
|
-
if (threshold ===
|
|
1876
|
+
if (threshold === undefined) {
|
|
1810
1877
|
threshold = 1;
|
|
1811
1878
|
}
|
|
1812
1879
|
cleanup();
|
|
@@ -1877,7 +1944,7 @@ function observeMove(element, onMove) {
|
|
|
1877
1944
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1878
1945
|
*/
|
|
1879
1946
|
function autoUpdate(reference, floating, update, options) {
|
|
1880
|
-
if (options ===
|
|
1947
|
+
if (options === undefined) {
|
|
1881
1948
|
options = {};
|
|
1882
1949
|
}
|
|
1883
1950
|
const {
|
|
@@ -2093,7 +2160,7 @@ class AuroFloatingUI {
|
|
|
2093
2160
|
// Compute the position of the bib
|
|
2094
2161
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2095
2162
|
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2096
|
-
middleware: middleware
|
|
2163
|
+
middleware: middleware
|
|
2097
2164
|
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2098
2165
|
Object.assign(this.element.bib.style, {
|
|
2099
2166
|
left: `${x}px`,
|
|
@@ -2390,7 +2457,7 @@ class AuroFloatingUI {
|
|
|
2390
2457
|
// See LICENSE in the project root for license information.
|
|
2391
2458
|
|
|
2392
2459
|
|
|
2393
|
-
class AuroDependencyVersioning {
|
|
2460
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
2394
2461
|
|
|
2395
2462
|
/**
|
|
2396
2463
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -2416,7 +2483,7 @@ class AuroDependencyVersioning {
|
|
|
2416
2483
|
*/
|
|
2417
2484
|
generateTag(baseName, version, tagClass) {
|
|
2418
2485
|
const elementName = this.generateElementName(baseName, version);
|
|
2419
|
-
const tag = i$4`${s$1(elementName)}`;
|
|
2486
|
+
const tag = i$4$1`${s$1$1(elementName)}`;
|
|
2420
2487
|
|
|
2421
2488
|
if (!customElements.get(elementName)) {
|
|
2422
2489
|
customElements.define(elementName, class extends tagClass {});
|
|
@@ -2424,26 +2491,26 @@ class AuroDependencyVersioning {
|
|
|
2424
2491
|
|
|
2425
2492
|
return tag;
|
|
2426
2493
|
}
|
|
2427
|
-
}
|
|
2494
|
+
};
|
|
2428
2495
|
|
|
2429
2496
|
/**
|
|
2430
2497
|
* @license
|
|
2431
2498
|
* Copyright 2017 Google LLC
|
|
2432
2499
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2433
2500
|
*/
|
|
2434
|
-
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)}}
|
|
2501
|
+
const t$3={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$6 = 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)}};
|
|
2435
2502
|
|
|
2436
2503
|
/**
|
|
2437
2504
|
* @license
|
|
2438
2505
|
* Copyright 2018 Google LLC
|
|
2439
2506
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2440
|
-
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(
|
|
2507
|
+
*/const e$5=e$1$1(class extends i$6{constructor(t$1){if(super(t$1),t$1.type!==t$3.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(undefined===this.st){this.st=new Set,undefined!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$1}});
|
|
2441
2508
|
|
|
2442
2509
|
/**
|
|
2443
2510
|
* @license
|
|
2444
2511
|
* Copyright 2018 Google LLC
|
|
2445
2512
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2446
|
-
*/const o=o=>o??E;
|
|
2513
|
+
*/const o$5=o=>o??E$1;
|
|
2447
2514
|
|
|
2448
2515
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2449
2516
|
// See LICENSE in the project root for license information.
|
|
@@ -2455,7 +2522,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
|
|
2455
2522
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
2456
2523
|
*/
|
|
2457
2524
|
|
|
2458
|
-
class AuroElement extends r {
|
|
2525
|
+
let AuroElement$1 = class AuroElement extends r$4 {
|
|
2459
2526
|
|
|
2460
2527
|
// function to define props used within the scope of this component
|
|
2461
2528
|
static get properties() {
|
|
@@ -2479,13 +2546,13 @@ class AuroElement extends r {
|
|
|
2479
2546
|
|
|
2480
2547
|
return 'false'
|
|
2481
2548
|
}
|
|
2482
|
-
}
|
|
2549
|
+
};
|
|
2483
2550
|
|
|
2484
|
-
var error = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
2551
|
+
var error$1 = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
2485
2552
|
|
|
2486
2553
|
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
2487
2554
|
|
|
2488
|
-
const _fetchMap = new Map();
|
|
2555
|
+
const _fetchMap$1 = new Map();
|
|
2489
2556
|
|
|
2490
2557
|
/**
|
|
2491
2558
|
* A callback to parse Response body.
|
|
@@ -2503,15 +2570,15 @@ const _fetchMap = new Map();
|
|
|
2503
2570
|
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
2504
2571
|
* @returns {Promise}
|
|
2505
2572
|
*/
|
|
2506
|
-
const cacheFetch = (uri, options = {}) => {
|
|
2573
|
+
const cacheFetch$1 = (uri, options = {}) => {
|
|
2507
2574
|
const responseParser = options.responseParser || ((response) => response.text());
|
|
2508
|
-
if (!_fetchMap.has(uri)) {
|
|
2509
|
-
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
2575
|
+
if (!_fetchMap$1.has(uri)) {
|
|
2576
|
+
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
2510
2577
|
}
|
|
2511
|
-
return _fetchMap.get(uri);
|
|
2578
|
+
return _fetchMap$1.get(uri);
|
|
2512
2579
|
};
|
|
2513
2580
|
|
|
2514
|
-
var styleCss$2 = i$3`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
|
|
2581
|
+
var styleCss$2$1 = i$3$1`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
|
|
2515
2582
|
|
|
2516
2583
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2517
2584
|
// See LICENSE in the project root for license information.
|
|
@@ -2524,7 +2591,7 @@ var styleCss$2 = i$3`*,*:before,*:after{box-sizing:border-box}@media(prefers-red
|
|
|
2524
2591
|
*/
|
|
2525
2592
|
|
|
2526
2593
|
// build the component class
|
|
2527
|
-
class BaseIcon extends AuroElement {
|
|
2594
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
2528
2595
|
constructor() {
|
|
2529
2596
|
super();
|
|
2530
2597
|
this.onDark = false;
|
|
@@ -2550,8 +2617,8 @@ class BaseIcon extends AuroElement {
|
|
|
2550
2617
|
}
|
|
2551
2618
|
|
|
2552
2619
|
static get styles() {
|
|
2553
|
-
return i$3`
|
|
2554
|
-
${styleCss$2}
|
|
2620
|
+
return i$3$1`
|
|
2621
|
+
${styleCss$2$1}
|
|
2555
2622
|
`;
|
|
2556
2623
|
}
|
|
2557
2624
|
|
|
@@ -2566,9 +2633,9 @@ class BaseIcon extends AuroElement {
|
|
|
2566
2633
|
let iconHTML = '';
|
|
2567
2634
|
|
|
2568
2635
|
if (category === 'logos') {
|
|
2569
|
-
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
2636
|
+
iconHTML = await cacheFetch$1(`${this.uri}/${category}/${name}.svg`);
|
|
2570
2637
|
} else {
|
|
2571
|
-
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
2638
|
+
iconHTML = await cacheFetch$1(`${this.uri}/icons/${category}/${name}.svg`);
|
|
2572
2639
|
}
|
|
2573
2640
|
|
|
2574
2641
|
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
@@ -2584,17 +2651,17 @@ class BaseIcon extends AuroElement {
|
|
|
2584
2651
|
if (svg) {
|
|
2585
2652
|
this.svg = svg;
|
|
2586
2653
|
} else if (!svg) {
|
|
2587
|
-
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
2654
|
+
const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
|
|
2588
2655
|
|
|
2589
2656
|
this.svg = penDOM.body.firstChild;
|
|
2590
2657
|
}
|
|
2591
2658
|
}
|
|
2592
2659
|
}
|
|
2593
|
-
}
|
|
2660
|
+
};
|
|
2594
2661
|
|
|
2595
|
-
var tokensCss$1 = i$3`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
|
|
2662
|
+
var tokensCss$1$1 = i$3$1`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
|
|
2596
2663
|
|
|
2597
|
-
var colorCss$2 = i$3`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
2664
|
+
var colorCss$2$1 = i$3$1`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
2598
2665
|
|
|
2599
2666
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2600
2667
|
// See LICENSE in the project root for license information.
|
|
@@ -2627,7 +2694,7 @@ var colorCss$2 = i$3`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
2627
2694
|
*/
|
|
2628
2695
|
|
|
2629
2696
|
// build the component class
|
|
2630
|
-
class AuroIcon extends BaseIcon {
|
|
2697
|
+
let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
2631
2698
|
constructor() {
|
|
2632
2699
|
super();
|
|
2633
2700
|
|
|
@@ -2656,7 +2723,7 @@ class AuroIcon extends BaseIcon {
|
|
|
2656
2723
|
this.success = false;
|
|
2657
2724
|
this.tertiary = false;
|
|
2658
2725
|
this.warning = false;
|
|
2659
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
2726
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
2660
2727
|
}
|
|
2661
2728
|
|
|
2662
2729
|
// function to define props used within the scope of this component
|
|
@@ -2738,9 +2805,9 @@ class AuroIcon extends BaseIcon {
|
|
|
2738
2805
|
static get styles() {
|
|
2739
2806
|
return [
|
|
2740
2807
|
super.styles,
|
|
2741
|
-
i$3`${tokensCss$1}`,
|
|
2742
|
-
i$3`${styleCss$2}`,
|
|
2743
|
-
i$3`${colorCss$2}`
|
|
2808
|
+
i$3$1`${tokensCss$1$1}`,
|
|
2809
|
+
i$3$1`${styleCss$2$1}`,
|
|
2810
|
+
i$3$1`${colorCss$2$1}`
|
|
2744
2811
|
];
|
|
2745
2812
|
}
|
|
2746
2813
|
|
|
@@ -2753,7 +2820,7 @@ class AuroIcon extends BaseIcon {
|
|
|
2753
2820
|
*
|
|
2754
2821
|
*/
|
|
2755
2822
|
static register(name = "auro-icon") {
|
|
2756
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
2823
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
2757
2824
|
}
|
|
2758
2825
|
|
|
2759
2826
|
connectedCallback() {
|
|
@@ -2782,38 +2849,38 @@ class AuroIcon extends BaseIcon {
|
|
|
2782
2849
|
'wrapper': true,
|
|
2783
2850
|
};
|
|
2784
2851
|
|
|
2785
|
-
return x`
|
|
2852
|
+
return x$1`
|
|
2786
2853
|
<div
|
|
2787
|
-
class="${e(classes)}"
|
|
2788
|
-
title="${o(this.title || undefined)}">
|
|
2789
|
-
<span aria-hidden="${o(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
2790
|
-
${this.customSvg ? x`
|
|
2854
|
+
class="${e$5(classes)}"
|
|
2855
|
+
title="${o$5(this.title || undefined)}">
|
|
2856
|
+
<span aria-hidden="${o$5(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
2857
|
+
${this.customSvg ? x$1`
|
|
2791
2858
|
<slot name="svg"></slot>
|
|
2792
|
-
` : x`
|
|
2859
|
+
` : x$1`
|
|
2793
2860
|
${this.svg}
|
|
2794
2861
|
`
|
|
2795
2862
|
}
|
|
2796
2863
|
</span>
|
|
2797
2864
|
|
|
2798
|
-
<div class="${e(a11y)}">
|
|
2865
|
+
<div class="${e$5(a11y)}">
|
|
2799
2866
|
<slot></slot>
|
|
2800
2867
|
</div>
|
|
2801
2868
|
</div>
|
|
2802
2869
|
`;
|
|
2803
2870
|
}
|
|
2804
|
-
}
|
|
2871
|
+
};
|
|
2805
2872
|
|
|
2806
|
-
var iconVersion = '6.1.2';
|
|
2873
|
+
var iconVersion$1 = '6.1.2';
|
|
2807
2874
|
|
|
2808
|
-
var styleCss$1 = i$3`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;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)}`;
|
|
2875
|
+
var styleCss$1$1 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2809
2876
|
|
|
2810
|
-
var colorCss$1 = i$3`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2877
|
+
var colorCss$1$1 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2811
2878
|
|
|
2812
|
-
var tokensCss$
|
|
2879
|
+
var tokensCss$3 = i$3$1`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
2813
2880
|
|
|
2814
|
-
var styleCss$
|
|
2881
|
+
var styleCss$4 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
2815
2882
|
|
|
2816
|
-
var colorCss$
|
|
2883
|
+
var colorCss$4 = i$3$1`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2817
2884
|
|
|
2818
2885
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2819
2886
|
// See LICENSE in the project root for license information.
|
|
@@ -2829,14 +2896,11 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2829
2896
|
];
|
|
2830
2897
|
|
|
2831
2898
|
/**
|
|
2832
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
2833
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
2834
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
2835
2899
|
* @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2836
2900
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2837
2901
|
*/
|
|
2838
2902
|
|
|
2839
|
-
class AuroDropdownBib extends r {
|
|
2903
|
+
class AuroDropdownBib extends r$4 {
|
|
2840
2904
|
|
|
2841
2905
|
constructor() {
|
|
2842
2906
|
super();
|
|
@@ -2849,22 +2913,34 @@ class AuroDropdownBib extends r {
|
|
|
2849
2913
|
|
|
2850
2914
|
static get styles() {
|
|
2851
2915
|
return [
|
|
2852
|
-
styleCss$
|
|
2853
|
-
colorCss$
|
|
2854
|
-
tokensCss$
|
|
2916
|
+
styleCss$4,
|
|
2917
|
+
colorCss$4,
|
|
2918
|
+
tokensCss$3
|
|
2855
2919
|
];
|
|
2856
2920
|
}
|
|
2857
2921
|
|
|
2858
2922
|
static get properties() {
|
|
2859
2923
|
return {
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* If declared, will apply all styles for the common theme.
|
|
2927
|
+
*/
|
|
2860
2928
|
common: {
|
|
2861
2929
|
type: Boolean,
|
|
2862
2930
|
reflect: true
|
|
2863
2931
|
},
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* If declared, will apply extra padding to bib content.
|
|
2935
|
+
*/
|
|
2864
2936
|
inset: {
|
|
2865
2937
|
type: Boolean,
|
|
2866
2938
|
reflect: true
|
|
2867
2939
|
},
|
|
2940
|
+
|
|
2941
|
+
/**
|
|
2942
|
+
* If declared, will apply border-radius to the bib.
|
|
2943
|
+
*/
|
|
2868
2944
|
rounded: {
|
|
2869
2945
|
type: Boolean,
|
|
2870
2946
|
reflect: true
|
|
@@ -2890,7 +2966,7 @@ class AuroDropdownBib extends r {
|
|
|
2890
2966
|
|
|
2891
2967
|
// function that renders the HTML and CSS into the scope of the component
|
|
2892
2968
|
render() {
|
|
2893
|
-
return u$1`
|
|
2969
|
+
return u$1$1`
|
|
2894
2970
|
<div class="container" part="bibContainer">
|
|
2895
2971
|
<slot></slot>
|
|
2896
2972
|
</div>
|
|
@@ -2908,22 +2984,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2908
2984
|
|
|
2909
2985
|
|
|
2910
2986
|
/**
|
|
2911
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
2912
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
2913
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
2914
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
2915
2987
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
2916
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2917
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
2918
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
2919
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
2920
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
2921
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
2922
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
2923
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
2924
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
2925
|
-
* @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.
|
|
2926
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
2927
2988
|
* @slot - Default slot for the popover content.
|
|
2928
2989
|
* @slot label - Defines the content of the label.
|
|
2929
2990
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -2935,7 +2996,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2935
2996
|
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
2936
2997
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
2937
2998
|
*/
|
|
2938
|
-
class AuroDropdown extends r {
|
|
2999
|
+
class AuroDropdown extends r$4 {
|
|
2939
3000
|
constructor() {
|
|
2940
3001
|
super();
|
|
2941
3002
|
|
|
@@ -2964,7 +3025,17 @@ class AuroDropdown extends r {
|
|
|
2964
3025
|
/**
|
|
2965
3026
|
* @private
|
|
2966
3027
|
*/
|
|
2967
|
-
this.
|
|
3028
|
+
this.hasTriggerContent = false;
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* @private
|
|
3032
|
+
*/
|
|
3033
|
+
this.triggerContentSlot = undefined;
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* @private
|
|
3037
|
+
*/
|
|
3038
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
2968
3039
|
|
|
2969
3040
|
/**
|
|
2970
3041
|
* @private
|
|
@@ -2984,8 +3055,8 @@ class AuroDropdown extends r {
|
|
|
2984
3055
|
/**
|
|
2985
3056
|
* Generate unique names for dependency components.
|
|
2986
3057
|
*/
|
|
2987
|
-
const versioning = new AuroDependencyVersioning();
|
|
2988
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
3058
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
3059
|
+
this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
|
|
2989
3060
|
}
|
|
2990
3061
|
|
|
2991
3062
|
/**
|
|
@@ -3007,90 +3078,167 @@ class AuroDropdown extends r {
|
|
|
3007
3078
|
// function to define props used within the scope of this component
|
|
3008
3079
|
static get properties() {
|
|
3009
3080
|
return {
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* If declared, applies a border around the trigger slot.
|
|
3084
|
+
*/
|
|
3010
3085
|
bordered: {
|
|
3011
3086
|
type: Boolean,
|
|
3012
3087
|
reflect: true
|
|
3013
3088
|
},
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3092
|
+
* @attr {Boolean} chevron
|
|
3093
|
+
*/
|
|
3014
3094
|
chevron: {
|
|
3015
3095
|
type: Boolean,
|
|
3016
3096
|
reflect: true
|
|
3017
3097
|
},
|
|
3018
|
-
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3101
|
+
*/
|
|
3102
|
+
common: {
|
|
3019
3103
|
type: Boolean,
|
|
3020
3104
|
reflect: true
|
|
3021
3105
|
},
|
|
3022
|
-
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* If declared, the dropdown is not interactive.
|
|
3109
|
+
*/
|
|
3110
|
+
disabled: {
|
|
3023
3111
|
type: Boolean,
|
|
3024
3112
|
reflect: true
|
|
3025
3113
|
},
|
|
3026
|
-
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* @private
|
|
3117
|
+
*/
|
|
3118
|
+
dropdownWidth: {
|
|
3119
|
+
type: Number
|
|
3120
|
+
},
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3124
|
+
*/
|
|
3125
|
+
error: {
|
|
3027
3126
|
type: Boolean,
|
|
3028
|
-
reflect: true
|
|
3127
|
+
reflect: true
|
|
3029
3128
|
},
|
|
3129
|
+
|
|
3130
|
+
/**
|
|
3131
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3132
|
+
*/
|
|
3030
3133
|
focusShow: {
|
|
3031
3134
|
type: Boolean,
|
|
3032
3135
|
reflect: true
|
|
3033
3136
|
},
|
|
3034
|
-
|
|
3137
|
+
|
|
3138
|
+
/**
|
|
3139
|
+
* Makes the trigger to be full width of its parent container.
|
|
3140
|
+
*/
|
|
3141
|
+
fluid: {
|
|
3035
3142
|
type: Boolean,
|
|
3036
3143
|
reflect: true
|
|
3037
3144
|
},
|
|
3145
|
+
|
|
3146
|
+
/**
|
|
3147
|
+
* If declared, will apply padding around trigger slot content.
|
|
3148
|
+
*/
|
|
3038
3149
|
inset: {
|
|
3039
3150
|
type: Boolean,
|
|
3040
3151
|
reflect: true
|
|
3041
3152
|
},
|
|
3042
|
-
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* If true, the dropdown bib is displayed.
|
|
3156
|
+
*/
|
|
3157
|
+
isPopoverVisible: {
|
|
3158
|
+
type: Boolean
|
|
3159
|
+
},
|
|
3160
|
+
|
|
3161
|
+
/**
|
|
3162
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3163
|
+
*/
|
|
3164
|
+
hoverToggle: {
|
|
3043
3165
|
type: Boolean,
|
|
3044
3166
|
reflect: true
|
|
3045
3167
|
},
|
|
3046
|
-
|
|
3047
|
-
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* @private
|
|
3171
|
+
*/
|
|
3172
|
+
hasTriggerContent: {
|
|
3173
|
+
type: Boolean
|
|
3174
|
+
},
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
3178
|
+
*/
|
|
3179
|
+
mobileFullscreenBreakpoint: {
|
|
3180
|
+
type: String,
|
|
3048
3181
|
reflect: true
|
|
3049
3182
|
},
|
|
3050
|
-
|
|
3183
|
+
|
|
3184
|
+
/**
|
|
3185
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3186
|
+
*/
|
|
3187
|
+
matchWidth: {
|
|
3051
3188
|
type: Boolean,
|
|
3052
3189
|
reflect: true
|
|
3053
3190
|
},
|
|
3054
|
-
|
|
3191
|
+
|
|
3192
|
+
/**
|
|
3193
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3194
|
+
*/
|
|
3195
|
+
noHideOnThisFocusLoss: {
|
|
3055
3196
|
type: Boolean,
|
|
3056
3197
|
reflect: true
|
|
3057
3198
|
},
|
|
3058
|
-
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3202
|
+
*/
|
|
3203
|
+
noToggle: {
|
|
3059
3204
|
type: Boolean,
|
|
3060
3205
|
reflect: true
|
|
3061
3206
|
},
|
|
3062
|
-
|
|
3207
|
+
|
|
3063
3208
|
onSlotChange: {
|
|
3064
3209
|
type: Function,
|
|
3065
3210
|
reflect: false
|
|
3066
3211
|
},
|
|
3067
|
-
mobileFullscreenBreakpoint: {
|
|
3068
|
-
type: String,
|
|
3069
|
-
reflect: true,
|
|
3070
|
-
},
|
|
3071
3212
|
|
|
3072
3213
|
/**
|
|
3073
3214
|
* @private
|
|
3074
3215
|
*/
|
|
3075
|
-
|
|
3216
|
+
placement: {
|
|
3217
|
+
type: String
|
|
3218
|
+
},
|
|
3076
3219
|
|
|
3077
3220
|
/**
|
|
3078
|
-
*
|
|
3221
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3079
3222
|
*/
|
|
3080
|
-
|
|
3223
|
+
rounded: {
|
|
3224
|
+
type: Boolean,
|
|
3225
|
+
reflect: true
|
|
3226
|
+
},
|
|
3081
3227
|
|
|
3082
3228
|
/**
|
|
3083
3229
|
* @private
|
|
3084
3230
|
*/
|
|
3085
|
-
tabIndex: {
|
|
3231
|
+
tabIndex: {
|
|
3232
|
+
type: Number
|
|
3233
|
+
}
|
|
3086
3234
|
};
|
|
3087
3235
|
}
|
|
3088
3236
|
|
|
3089
3237
|
static get styles() {
|
|
3090
3238
|
return [
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
tokensCss$
|
|
3239
|
+
colorCss$1$1,
|
|
3240
|
+
styleCss$1$1,
|
|
3241
|
+
tokensCss$3
|
|
3094
3242
|
];
|
|
3095
3243
|
}
|
|
3096
3244
|
|
|
@@ -3103,7 +3251,7 @@ class AuroDropdown extends r {
|
|
|
3103
3251
|
*
|
|
3104
3252
|
*/
|
|
3105
3253
|
static register(name = "auro-dropdown") {
|
|
3106
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDropdown);
|
|
3254
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3107
3255
|
}
|
|
3108
3256
|
|
|
3109
3257
|
connectedCallback() {
|
|
@@ -3120,6 +3268,12 @@ class AuroDropdown extends r {
|
|
|
3120
3268
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3121
3269
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3122
3270
|
}
|
|
3271
|
+
|
|
3272
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3273
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3274
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3275
|
+
this.handleTriggerContentSlotChange();
|
|
3276
|
+
}
|
|
3123
3277
|
}
|
|
3124
3278
|
|
|
3125
3279
|
firstUpdated() {
|
|
@@ -3162,6 +3316,43 @@ class AuroDropdown extends r {
|
|
|
3162
3316
|
return inCustomSlot;
|
|
3163
3317
|
}
|
|
3164
3318
|
|
|
3319
|
+
/**
|
|
3320
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3321
|
+
*
|
|
3322
|
+
* It first updates the floater settings
|
|
3323
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3324
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3325
|
+
*
|
|
3326
|
+
* @private
|
|
3327
|
+
* @method handleTriggerContentSlotChange
|
|
3328
|
+
* @param {Event} event - native slotchange event
|
|
3329
|
+
* @returns {void}
|
|
3330
|
+
*/
|
|
3331
|
+
handleTriggerContentSlotChange(event) {
|
|
3332
|
+
this.floater.handleTriggerTabIndex();
|
|
3333
|
+
|
|
3334
|
+
if (event) {
|
|
3335
|
+
this.triggerNode = event.target;
|
|
3336
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
if (this.triggerContentSlot) {
|
|
3340
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3341
|
+
if (slot.textContent.trim()) {
|
|
3342
|
+
return true;
|
|
3343
|
+
}
|
|
3344
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3345
|
+
if (!slotInSlot) {
|
|
3346
|
+
return false;
|
|
3347
|
+
}
|
|
3348
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3349
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3350
|
+
});
|
|
3351
|
+
} else {
|
|
3352
|
+
this.hasTriggerContent = false;
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3165
3356
|
/**
|
|
3166
3357
|
* Handles the default slot change event and updates the content.
|
|
3167
3358
|
*
|
|
@@ -3184,7 +3375,7 @@ class AuroDropdown extends r {
|
|
|
3184
3375
|
|
|
3185
3376
|
// function that renders the HTML and CSS into the scope of the component
|
|
3186
3377
|
render() {
|
|
3187
|
-
return u$1`
|
|
3378
|
+
return u$1$1`
|
|
3188
3379
|
<div>
|
|
3189
3380
|
<div
|
|
3190
3381
|
id="trigger"
|
|
@@ -3196,16 +3387,16 @@ class AuroDropdown extends r {
|
|
|
3196
3387
|
tabindex="${this.tabIndex}"
|
|
3197
3388
|
>
|
|
3198
3389
|
<div class="triggerContentWrapper">
|
|
3199
|
-
<label class="label" id="triggerLabel">
|
|
3390
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3200
3391
|
<slot name="label"></slot>
|
|
3201
3392
|
</label>
|
|
3202
3393
|
<div class="triggerContent">
|
|
3203
3394
|
<slot
|
|
3204
3395
|
name="trigger"
|
|
3205
|
-
@slotchange="${() =>
|
|
3396
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
3206
3397
|
</div>
|
|
3207
3398
|
</div>
|
|
3208
|
-
${this.chevron || this.common ? u$1`
|
|
3399
|
+
${this.chevron || this.common ? u$1$1`
|
|
3209
3400
|
<div
|
|
3210
3401
|
id="showStateIcon"
|
|
3211
3402
|
part="chevron">
|
|
@@ -3244,75 +3435,1573 @@ AuroDropdown.register();
|
|
|
3244
3435
|
|
|
3245
3436
|
var dropdownVersion = '3.0.0';
|
|
3246
3437
|
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3254
|
-
// See LICENSE in the project root for license information.
|
|
3438
|
+
/**
|
|
3439
|
+
* @license
|
|
3440
|
+
* Copyright 2019 Google LLC
|
|
3441
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3442
|
+
*/
|
|
3443
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(undefined===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$4=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)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$4&&undefined===t){const e=undefined!==s&&1===s.length;e&&(t=o$4.get(s)),undefined===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$4.set(s,t));}return t}toString(){return this.cssText}};const r$3=t=>new n$3("string"==typeof t?t:t+"",undefined,s$2),i$5=(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$3(o,t,s$2)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;undefined!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
|
|
3255
3444
|
|
|
3445
|
+
/**
|
|
3446
|
+
* @license
|
|
3447
|
+
* Copyright 2017 Google LLC
|
|
3448
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3449
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:r$2,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$3,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2: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$1=(t,s)=>!i$4(t,s),y$1={attribute:true,type:String,converter:u$2,reflect:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.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$1){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$3(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$2(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$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),undefined!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$3(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$2(s));}else undefined!==s&&i.push(c$2(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$1(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$2).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$2;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$1)(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$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$2.reactiveElementVersions??=[]).push("2.0.4");
|
|
3256
3450
|
|
|
3257
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
3258
3451
|
/**
|
|
3259
|
-
*
|
|
3260
|
-
*
|
|
3261
|
-
*
|
|
3262
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
3263
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
3264
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
3265
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3266
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
3267
|
-
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
3268
|
-
* @attr {Boolean} flexMenuWidth - If set, makes dropdown bib width match the size of the content, rather than the width of the trigger.
|
|
3269
|
-
* @prop {String} placeholder - Define placeholder text to display before a value is manually selected.
|
|
3270
|
-
* @prop {String} value - Value selected for the component.
|
|
3271
|
-
* @prop {Boolean} disabled - When attribute is present element shows disabled state.
|
|
3272
|
-
* @prop {Boolean} noCheckmark - When true, checkmark on selected option will no longer be present.
|
|
3273
|
-
* @attr {Object} optionSelected - Specifies the current selected menuOption.
|
|
3274
|
-
* @slot - Default slot for the menu content.
|
|
3275
|
-
* @slot label - Defines the content of the label.
|
|
3276
|
-
* @slot helpText - Defines the content of the helpText.
|
|
3277
|
-
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
3278
|
-
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
3279
|
-
* @csspart helpText - Apply CSS to the help text.
|
|
3452
|
+
* @license
|
|
3453
|
+
* Copyright 2017 Google LLC
|
|
3454
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3280
3455
|
*/
|
|
3456
|
+
const t$1=globalThis,i$3=t$1.trustedTypes,s$1=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):undefined,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$2="?"+h,n$1=`<${o$2}>`,r$1=document,l$1=()=>r$1.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$1.createTreeWalker(r$1,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return undefined!==s$1?s$1.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;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?"!--"===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,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):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=undefined);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-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$2)){const i=v[a++],s=r.getAttribute(t).split(h),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)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$2)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$1.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=undefined!==e?s._$Co?.[e]:s._$Cl;const o=c(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(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$1).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$1,e}p(t){let i=0;for(const s of this._$AV) undefined!==s&&(undefined!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}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(this,t,i),c(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$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(undefined===s.el&&(s.el=N.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$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ undefined===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}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(this,t,i,0),o=!c(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(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(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(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(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.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$1(),t),t,undefined,s??{});}return h._$AI(t),h};
|
|
3281
3457
|
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3458
|
+
/**
|
|
3459
|
+
* @license
|
|
3460
|
+
* Copyright 2017 Google LLC
|
|
3461
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3462
|
+
*/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$2=globalThis.litElementPolyfillSupport;i$2?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3286
3463
|
|
|
3287
|
-
this.placeholder = 'Please select option';
|
|
3288
|
-
this.optionSelected = undefined;
|
|
3289
|
-
this.validity = undefined;
|
|
3464
|
+
var styleCss$2 = i$5`:root{--ds-asset-font-circular-family-name: "AS Circular";--ds-asset-font-circular-filename: "ASCircularWeb";--ds-asset-font-circular-weight-light: "-Light";--ds-asset-font-circular-weight-medium: "-Medium";--ds-asset-font-circular-weight-book: "-Book";--ds-border-radius: 0.375rem;--ds-size-25: 0.125rem;--ds-size-50: 0.25rem;--ds-size-75: 0.375rem;--ds-size-100: 0.5rem;--ds-size-150: 0.75rem;--ds-size-200: 1rem;--ds-size-250: 1.25rem;--ds-size-300: 1.5rem;--ds-size-400: 2rem;--ds-size-500: 2.5rem;--ds-size-600: 3rem;--ds-size-700: 3.5rem;--ds-size-800: 4rem;--ds-size-900: 4.5rem;--ds-size-1000: 5rem;--ds-unitless-scale-20: 0.25;--ds-unitless-scale-50: 0.5;--ds-unitless-scale-100: 1;--ds-unitless-scale-140: 1.4;--ds-unitless-scale-150: 1.5;--ds-unitless-scale-200: 2;--ds-unitless-scale-300: 3;--ds-unitless-scale-350: 3.5;--ds-animation-default-property: all;--ds-animation-default-duration: 0.3s;--ds-animation-default-timing: ease-out;--ds-depth-overlay: 200;--ds-depth-modal: 300;--ds-depth-tooltip: 400;--ds-elevation-100: 0px 0px 5px rgba(0, 0, 0, 0.15);--ds-elevation-200: 0px 0px 10px rgba(0, 0, 0, 0.15);--ds-elevation-300: 0px 0px 15px rgba(0, 0, 0, 0.2);--ds-grid-breakpoint-xs: 320px;--ds-grid-breakpoint-sm: 576px;--ds-grid-breakpoint-md: 768px;--ds-grid-breakpoint-lg: 1024px;--ds-grid-breakpoint-xl: 1232px;--ds-grid-column-xs: 6;--ds-grid-column-sm: 12;--ds-grid-column-md: 12;--ds-grid-column-lg: 12;--ds-grid-column-xl: 12;--ds-grid-gutter-xs: 0.5rem;--ds-grid-gutter-sm: 1rem;--ds-grid-gutter-md: 1.5rem;--ds-grid-gutter-lg: 1.5rem;--ds-grid-gutter-xl: 2rem;--ds-grid-margin-xs: 1rem;--ds-grid-margin-sm: 1rem;--ds-grid-margin-md: 1.5rem;--ds-grid-margin-lg: 2rem;--ds-grid-margin-xl: 2rem;--ds-font-family-default: "AS Circular", Helvetica Neue, Arial, sans-serif;--ds-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;--ds-text-heading-300-weight: 300;--ds-text-heading-300-px: 18px;--ds-text-heading-300-size: 1.125rem;--ds-text-heading-300-height: 1.625rem;--ds-text-heading-300-height-px: 26px;--ds-text-heading-400-weight: 300;--ds-text-heading-400-px: 20px;--ds-text-heading-400-size: 1.25rem;--ds-text-heading-400-height: 1.625rem;--ds-text-heading-400-height-px: 26px;--ds-text-heading-500-weight: 300;--ds-text-heading-500-px-breakpoint-sm: 22px;--ds-text-heading-500-px-breakpoint-md: 24px;--ds-text-heading-500-px-breakpoint-lg: 24px;--ds-text-heading-500-size-breakpoint-sm: 1.375rem;--ds-text-heading-500-size-breakpoint-md: 1.5rem;--ds-text-heading-500-size-breakpoint-lg: 1.5rem;--ds-text-heading-500-height-breakpoint-sm: 1.625rem;--ds-text-heading-500-height-breakpoint-px-sm: 26px;--ds-text-heading-500-height-breakpoint-md: 1.875rem;--ds-text-heading-500-height-breakpoint-px-md: 30px;--ds-text-heading-500-height-breakpoint-lg: 2rem;--ds-text-heading-500-height-breakpoint-px-lg: 32px;--ds-text-heading-600-weight: 300;--ds-text-heading-600-px-breakpoint-sm: 26px;--ds-text-heading-600-px-breakpoint-md: 28px;--ds-text-heading-600-px-breakpoint-lg: 28px;--ds-text-heading-600-size-breakpoint-sm: 1.625rem;--ds-text-heading-600-size-breakpoint-md: 1.75rem;--ds-text-heading-600-size-breakpoint-lg: 1.75rem;--ds-text-heading-600-height-breakpoint-sm: 1.875rem;--ds-text-heading-600-height-breakpoint-px-sm: 30px;--ds-text-heading-600-height-breakpoint-md: 2.125rem;--ds-text-heading-600-height-breakpoint-px-md: 34px;--ds-text-heading-600-height-breakpoint-lg: 2.25rem;--ds-text-heading-600-height-breakpoint-px-lg: 36px;--ds-text-heading-700-weight: 500;--ds-text-heading-700-px-breakpoint-sm: 28px;--ds-text-heading-700-px-breakpoint-md: 32px;--ds-text-heading-700-px-breakpoint-lg: 36px;--ds-text-heading-700-size-breakpoint-sm: 1.75rem;--ds-text-heading-700-size-breakpoint-md: 2rem;--ds-text-heading-700-size-breakpoint-lg: 2.25rem;--ds-text-heading-700-height-breakpoint-sm: 2.125rem;--ds-text-heading-700-height-breakpoint-px-sm: 34px;--ds-text-heading-700-height-breakpoint-md: 2.375rem;--ds-text-heading-700-height-breakpoint-px-md: 38px;--ds-text-heading-700-height-breakpoint-lg: 2.75rem;--ds-text-heading-700-height-breakpoint-px-lg: 44px;--ds-text-heading-800-weight: 500;--ds-text-heading-800-px-breakpoint-sm: 32px;--ds-text-heading-800-px-breakpoint-md: 36px;--ds-text-heading-800-px-breakpoint-lg: 40px;--ds-text-heading-800-size-breakpoint-sm: 2rem;--ds-text-heading-800-size-breakpoint-md: 2.25rem;--ds-text-heading-800-size-breakpoint-lg: 2.5rem;--ds-text-heading-800-height-breakpoint-sm: 2.375rem;--ds-text-heading-800-height-breakpoint-px-sm: 38px;--ds-text-heading-800-height-breakpoint-md: 2.625rem;--ds-text-heading-800-height-breakpoint-px-md: 42px;--ds-text-heading-800-height-breakpoint-lg: 3rem;--ds-text-heading-800-height-breakpoint-px-lg: 48px;--ds-text-heading-default-weight: 500;--ds-text-heading-default-margin: 0;--ds-text-heading-default-spacing: -0.2px;--ds-text-heading-medium-weight: 300;--ds-text-heading-display-weight: 100;--ds-text-heading-display-px-breakpoint-sm: 44px;--ds-text-heading-display-px-breakpoint-md: 48px;--ds-text-heading-display-px-breakpoint-lg: 56px;--ds-text-heading-display-size-breakpoint-sm: 2.75rem;--ds-text-heading-display-size-breakpoint-md: 3rem;--ds-text-heading-display-size-breakpoint-lg: 3.5rem;--ds-text-heading-display-height-breakpoint-sm: 3.375rem;--ds-text-heading-display-height-breakpoint-px-sm: 54px;--ds-text-heading-display-height-breakpoint-md: 3.75rem;--ds-text-heading-display-height-breakpoint-px-md: 60px;--ds-text-heading-display-height-breakpoint-lg: 4.25rem;--ds-text-heading-display-height-breakpoint-px-lg: 68px;--ds-text-body-default-weight: 500;--ds-text-body-size-xxs: 0.625rem;--ds-text-body-size-xs: 0.75rem;--ds-text-body-size-sm: 0.875rem;--ds-text-body-size-default: 1rem;--ds-text-body-size-lg: 1.125rem;--ds-text-body-height-xs: 1rem;--ds-text-body-height-sm: 1.25rem;--ds-text-body-height-default: 1.5rem;--ds-text-body-height-lg: 1.625rem;--ds-color-alert-notification-default: #0074c8;--ds-color-alert-warning-default: #de750c;--ds-color-alert-error-default: #df0b37;--ds-color-alert-success-default: #00805d;--ds-color-alert-advisory-default: #fff0cd;--ds-color-alert-bkg-success-default: #ddf6e8;--ds-color-alert-bkg-error-default: #ffedf1;--ds-color-background-primary-100-default: #ffffff;--ds-color-background-primary-100-inverse: #0e2b4f;--ds-color-background-primary-200-default: #f7f7f7;--ds-color-background-primary-200-inverse: #194069;--ds-color-background-primary-300-default: #e4e8ec;--ds-color-background-primary-300-inverse: #265688;--ds-color-background-primary-400-default: #dddddd;--ds-color-background-primary-400-inverse: #326aa5;--ds-color-background-success-default: #eef8f5;--ds-color-background-success-inverse: #173c30;--ds-color-background-error-default: #fff4f4;--ds-color-background-error-inverse: #74110e;--ds-color-background-warning-default: #fef8e9;--ds-color-background-warning-inverse: #5d4514;--ds-color-background-info-default: #f0f7fd;--ds-color-background-info-inverse: #193d73;--ds-color-background-subtle-default: #f7f8fa;--ds-color-background-subtle-inverse: #2a2a2a;--ds-color-background-accent-default: #ebfafd;--ds-color-background-accent-inverse: #275b72;--ds-color-background-emphasis-default: #c9e0f7;--ds-color-background-emphasis-inverse: #225296;--ds-color-background-scrimmed-default: rgba(0, 0, 0, 0.5);--ds-color-background-lightest: #ffffff;--ds-color-background-lighter: #f7f7f7;--ds-color-background-darker: #01426a;--ds-color-background-darkest: #00274a;--ds-color-background-gradient-default: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));--ds-color-base-white: #ffffff;--ds-color-base-white-100: rgba(255, 255, 255, 0.03);--ds-color-base-white-200: rgba(255, 255, 255, 0.06);--ds-color-base-white-300: rgba(255, 255, 255, 0.12);--ds-color-base-white-400: rgba(255, 255, 255, 0.25);--ds-color-base-white-500: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-50: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-40: rgba(255, 255, 255, 0.4);--ds-color-base-white-opacity-0: rgba(255, 255, 255, 0);--ds-color-base-black: #000000;--ds-color-base-black-100: rgba(0, 0, 0, 0.03);--ds-color-base-black-200: rgba(0, 0, 0, 0.06);--ds-color-base-black-300: rgba(0, 0, 0, 0.12);--ds-color-base-black-400: rgba(0, 0, 0, 0.25);--ds-color-base-black-500: rgba(0, 0, 0, 0.5);--ds-color-base-black-opacity-15: rgba(0, 0, 0, 0.15);--ds-color-base-blue-100: #f0f7fd;--ds-color-base-blue-200: #c9e0f7;--ds-color-base-blue-300: #a0c9f1;--ds-color-base-blue-400: #79b2ec;--ds-color-base-blue-500: #5398e6;--ds-color-base-blue-600: #3b7fd2;--ds-color-base-blue-700: #2c67b5;--ds-color-base-blue-800: #225296;--ds-color-base-blue-900: #193d73;--ds-color-base-blue-1000: #102a51;--ds-color-base-cyan-100: #ebfafd;--ds-color-base-cyan-200: #a8e9f7;--ds-color-base-cyan-300: #6ad5ef;--ds-color-base-cyan-400: #56bbde;--ds-color-base-cyan-500: #4aa2c7;--ds-color-base-cyan-600: #3e89aa;--ds-color-base-cyan-700: #32718e;--ds-color-base-cyan-800: #275b72;--ds-color-base-cyan-900: #1d4658;--ds-color-base-cyan-1000: #12303d;--ds-color-base-error-100: #fff4f4;--ds-color-base-error-200: #f9aca6;--ds-color-base-error-300: #f16359;--ds-color-base-error-400: #cc1816;--ds-color-base-error-500: #74110e;--ds-color-base-gray-100: #f7f7f7;--ds-color-base-gray-200: #d4d4d4;--ds-color-base-gray-300: #c5c5c5;--ds-color-base-gray-400: #adadad;--ds-color-base-gray-500: #959595;--ds-color-base-gray-600: #7e7e7e;--ds-color-base-gray-700: #676767;--ds-color-base-gray-800: #525252;--ds-color-base-gray-900: #3d3d3d;--ds-color-base-gray-1000: #2a2a2a;--ds-color-base-green-100: #f3faf7;--ds-color-base-green-200: #000000;--ds-color-base-green-300: #addbca;--ds-color-base-green-400: #7ec6ac;--ds-color-base-green-500: #51ae8c;--ds-color-base-green-600: #459578;--ds-color-base-green-700: #3a7d64;--ds-color-base-green-800: #306854;--ds-color-base-green-900: #285545;--ds-color-base-green-1000: #1f4436;--ds-color-base-lime-100: #f5fbeb;--ds-color-base-lime-200: #d8efb4;--ds-color-base-lime-300: #badd81;--ds-color-base-lime-400: #a2c270;--ds-color-base-lime-500: #8ca761;--ds-color-base-lime-600: #778f53;--ds-color-base-lime-700: #647845;--ds-color-base-lime-800: #53643a;--ds-color-base-lime-900: #44522f;--ds-color-base-lime-1000: #364126;--ds-color-base-navy-100: #f2f7fb;--ds-color-base-navy-200: #cfe0ef;--ds-color-base-navy-300: #acc9e2;--ds-color-base-navy-400: #89b2d4;--ds-color-base-navy-500: #6899c6;--ds-color-base-navy-600: #4a82b7;--ds-color-base-navy-700: #326aa5;--ds-color-base-navy-800: #265688;--ds-color-base-navy-900: #194069;--ds-color-base-navy-1000: #0e2b4f;--ds-color-base-neutral-100: #f7f8fa;--ds-color-base-neutral-200: #e4e8ec;--ds-color-base-neutral-300: #ccd2db;--ds-color-base-neutral-400: #afb9c6;--ds-color-base-neutral-500: #939fad;--ds-color-base-neutral-600: #7e8894;--ds-color-base-neutral-700: #6a717c;--ds-color-base-neutral-800: #585e67;--ds-color-base-neutral-900: #484d55;--ds-color-base-neutral-1000: #393d43;--ds-color-base-pink-100: #fff7f8;--ds-color-base-pink-200: #fde0e6;--ds-color-base-pink-300: #fcc2ce;--ds-color-base-pink-400: #fa9db0;--ds-color-base-pink-500: #f7738e;--ds-color-base-pink-600: #e45472;--ds-color-base-pink-700: #bf475f;--ds-color-base-pink-800: #a03b50;--ds-color-base-pink-900: #833142;--ds-color-base-pink-1000: #692734;--ds-color-base-purple-100: #fbf8fe;--ds-color-base-purple-200: #ede3fd;--ds-color-base-purple-300: #ddc9fb;--ds-color-base-purple-400: #c9a9f8;--ds-color-base-purple-500: #b588f5;--ds-color-base-purple-600: #a268f3;--ds-color-base-purple-700: #8d47f0;--ds-color-base-purple-800: #7633d7;--ds-color-base-purple-900: #622ab2;--ds-color-base-purple-1000: #4e228d;--ds-color-base-red-100: #fef7f5;--ds-color-base-red-200: #fae2da;--ds-color-base-red-300: #f5c7b8;--ds-color-base-red-400: #f0a68d;--ds-color-base-red-500: #e9815e;--ds-color-base-red-600: #e35c2f;--ds-color-base-red-700: #d03a08;--ds-color-base-red-800: #ae3007;--ds-color-base-red-900: #902806;--ds-color-base-red-1000: #732005;--ds-color-base-success-100: #eef8f5;--ds-color-base-success-200: #8eceb9;--ds-color-base-success-300: #40a080;--ds-color-base-success-400: #0b6f4d;--ds-color-base-success-500: #173c30;--ds-color-base-turquoise-100: #f7fafa;--ds-color-base-turquoise-200: #dfe9ea;--ds-color-base-turquoise-300: #c2d5d6;--ds-color-base-turquoise-400: #9fbdbe;--ds-color-base-turquoise-500: #7ba5a6;--ds-color-base-turquoise-600: #5c8f91;--ds-color-base-turquoise-700: #3d7a7d;--ds-color-base-turquoise-800: #21686a;--ds-color-base-turquoise-900: #085659;--ds-color-base-turquoise-1000: #004447;--ds-color-base-yellow-100: #fff9df;--ds-color-base-yellow-200: #ffe87e;--ds-color-base-yellow-300: #f9ce06;--ds-color-base-yellow-400: #d6b622;--ds-color-base-yellow-500: #b49d35;--ds-color-base-yellow-600: #96873e;--ds-color-base-yellow-700: #7c7140;--ds-color-base-yellow-800: #665e3d;--ds-color-base-yellow-900: #524e38;--ds-color-base-yellow-1000: #403d30;--ds-color-base-warning-100: #fef8e9;--ds-color-base-warning-200: #f2c153;--ds-color-base-warning-300: #c49432;--ds-color-base-warning-400: #8e6b22;--ds-color-base-warning-500: #5d4514;--ds-color-state-error-100: #ff999b;--ds-color-state-error-500: #df0b37;--ds-color-state-success-100: #69cf96;--ds-color-state-success-500: #00805d;--ds-color-state-warning-500: #de750c;--ds-color-border-primary-default: #585e67;--ds-color-border-primary-inverse: #afb9c6;--ds-color-border-secondary-default: #939fad;--ds-color-border-secondary-inverse: #7e8894;--ds-color-border-tertiary-default: #dddddd;--ds-color-border-tertiary-inverse: #676767;--ds-color-border-error-default: #cc1816;--ds-color-border-error-inverse: #f9aca6;--ds-color-border-divider-default: rgba(0, 0, 0, 0.12);--ds-color-border-divider-inverse: rgba(255, 255, 255, 0.25);--ds-color-border-subtle-default: #f0f7fd;--ds-color-border-subtle-inverse: #326aa5;--ds-color-border-emphasis-default: #194069;--ds-color-border-emphasis-inverse: #f2f7fb;--ds-color-border-accent-default: #badd81;--ds-color-border-accent-inverse: #a2c270;--ds-color-border-success-default: #0b6f4d;--ds-color-border-success-inverse: #8eceb9;--ds-color-border-warning-default: #c49432;--ds-color-border-warning-inverse: #f2c153;--ds-color-border-info-default: #326aa5;--ds-color-border-info-inverse: #89b2d4;--ds-color-border-ui-default-default: #2c67b5;--ds-color-border-ui-default-inverse: #56bbde;--ds-color-border-ui-hover-default: #193d73;--ds-color-border-ui-hover-inverse: #a8e9f7;--ds-color-border-ui-active-default: #225296;--ds-color-border-ui-active-inverse: #6ad5ef;--ds-color-border-ui-focus-default: #2c67b5;--ds-color-border-ui-focus-inverse: #56bbde;--ds-color-border-ui-disabled-default: #adadad;--ds-color-border-ui-disabled-inverse: #7e7e7e;--ds-color-border-active-default: #0074c8;--ds-color-border-active-inverse: #00cff0;--ds-color-border-disabled-default: #d4d4d4;--ds-color-border-focus-default: #959595;--ds-color-brand-neutral-100: #f7f8fa;--ds-color-brand-neutral-200: #e4e8ec;--ds-color-brand-neutral-300: #ccd2db;--ds-color-brand-neutral-400: #afb9c6;--ds-color-brand-neutral-500: #939fad;--ds-color-brand-neutral-600: #7e8894;--ds-color-brand-neutral-700: #6a717c;--ds-color-brand-neutral-800: #585e67;--ds-color-brand-neutral-900: #484d55;--ds-color-brand-neutral-1000: #393d43;--ds-color-brand-gray-100: #f7f7f7;--ds-color-brand-gray-200: #dddddd;--ds-color-brand-gray-300: #c5c5c5;--ds-color-brand-gray-400: #adadad;--ds-color-brand-gray-500: #959595;--ds-color-brand-gray-600: #7e7e7e;--ds-color-brand-gray-700: #676767;--ds-color-brand-gray-800: #525252;--ds-color-brand-gray-900: #3d3d3d;--ds-color-brand-gray-1000: #2a2a2a;--ds-color-brand-red-100: #fef7f5;--ds-color-brand-red-200: #fae2da;--ds-color-brand-red-300: #f5c7b8;--ds-color-brand-red-400: #f0a68d;--ds-color-brand-red-500: #e9815e;--ds-color-brand-red-600: #e35c2f;--ds-color-brand-red-700: #d03a08;--ds-color-brand-red-800: #ae3007;--ds-color-brand-red-900: #902806;--ds-color-brand-red-1000: #732005;--ds-color-brand-yellow-100: #fff9df;--ds-color-brand-yellow-200: #ffe87e;--ds-color-brand-yellow-300: #f9ce06;--ds-color-brand-yellow-400: #d6b622;--ds-color-brand-yellow-500: #b49d35;--ds-color-brand-yellow-600: #96873e;--ds-color-brand-yellow-700: #7c7140;--ds-color-brand-yellow-800: #665e3d;--ds-color-brand-yellow-900: #524e38;--ds-color-brand-yellow-1000: #403d30;--ds-color-brand-lime-100: #f5fbeb;--ds-color-brand-lime-200: #d8efb4;--ds-color-brand-lime-300: #badd81;--ds-color-brand-lime-400: #a2c270;--ds-color-brand-lime-500: #8ca761;--ds-color-brand-lime-600: #778f53;--ds-color-brand-lime-700: #647845;--ds-color-brand-lime-800: #53643a;--ds-color-brand-lime-900: #44522f;--ds-color-brand-lime-1000: #364126;--ds-color-brand-green-100: #f3faf7;--ds-color-brand-green-200: #d4ece4;--ds-color-brand-green-300: #addbca;--ds-color-brand-green-400: #7ec6ac;--ds-color-brand-green-500: #51ae8c;--ds-color-brand-green-600: #459578;--ds-color-brand-green-700: #3a7d64;--ds-color-brand-green-800: #306854;--ds-color-brand-green-900: #285545;--ds-color-brand-green-1000: #1f4436;--ds-color-brand-turquoise-100: #f7fafa;--ds-color-brand-turquoise-200: #dfe9ea;--ds-color-brand-turquoise-300: #c2d5d6;--ds-color-brand-turquoise-400: #9fbdbe;--ds-color-brand-turquoise-500: #7ba5a6;--ds-color-brand-turquoise-600: #5c8f91;--ds-color-brand-turquoise-700: #3d7a7d;--ds-color-brand-turquoise-800: #21686a;--ds-color-brand-turquoise-900: #085659;--ds-color-brand-turquoise-1000: #004447;--ds-color-brand-cyan-100: #ebfafd;--ds-color-brand-cyan-200: #a8e9f7;--ds-color-brand-cyan-300: #6ad5ef;--ds-color-brand-cyan-400: #56bbde;--ds-color-brand-cyan-500: #4aa2c7;--ds-color-brand-cyan-600: #3e89aa;--ds-color-brand-cyan-700: #32718e;--ds-color-brand-cyan-800: #275b72;--ds-color-brand-cyan-900: #1d4658;--ds-color-brand-cyan-1000: #12303d;--ds-color-brand-blue-100: #f0f7fd;--ds-color-brand-blue-200: #c9e0f7;--ds-color-brand-blue-300: #a0c9f1;--ds-color-brand-blue-400: #79b2ec;--ds-color-brand-blue-500: #5398e6;--ds-color-brand-blue-600: #3b7fd2;--ds-color-brand-blue-700: #2c67b5;--ds-color-brand-blue-800: #225296;--ds-color-brand-blue-900: #193d73;--ds-color-brand-blue-1000: #102a51;--ds-color-brand-navy-100: #f2f7fb;--ds-color-brand-navy-200: #cfe0ef;--ds-color-brand-navy-300: #acc9e2;--ds-color-brand-navy-400: #89b2d4;--ds-color-brand-navy-500: #6899c6;--ds-color-brand-navy-600: #4a82b7;--ds-color-brand-navy-700: #326aa5;--ds-color-brand-navy-800: #265688;--ds-color-brand-navy-900: #194069;--ds-color-brand-navy-1000: #0e2b4f;--ds-color-brand-purple-100: #fbf8fe;--ds-color-brand-purple-200: #ede3fd;--ds-color-brand-purple-300: #ddc9fb;--ds-color-brand-purple-400: #c9a9f8;--ds-color-brand-purple-500: #b588f5;--ds-color-brand-purple-600: #a268f3;--ds-color-brand-purple-700: #8d47f0;--ds-color-brand-purple-800: #7633d7;--ds-color-brand-purple-900: #622ab2;--ds-color-brand-purple-1000: #4e228d;--ds-color-brand-pink-100: #fff7f8;--ds-color-brand-pink-200: #fde0e6;--ds-color-brand-pink-300: #fcc2ce;--ds-color-brand-pink-400: #fa9db0;--ds-color-brand-pink-500: #f7738e;--ds-color-brand-pink-600: #e45472;--ds-color-brand-pink-700: #bf475f;--ds-color-brand-pink-800: #a03b50;--ds-color-brand-pink-900: #833142;--ds-color-brand-pink-1000: #692734;--ds-color-brand-midnight-100: #c1daf0;--ds-color-brand-midnight-200: #569ed7;--ds-color-brand-midnight-300: #156fad;--ds-color-brand-midnight-400: #01426a;--ds-color-brand-midnight-500: #00274a;--ds-color-brand-atlas-100: #cde6ff;--ds-color-brand-atlas-200: #6bb7fb;--ds-color-brand-atlas-300: #2492eb;--ds-color-brand-atlas-400: #0074c8;--ds-color-brand-atlas-500: #054687;--ds-color-brand-atlas-400-opacity-20: rgba(0, 116, 200, 0.2);--ds-color-brand-breeze-100: #c0f7ff;--ds-color-brand-breeze-200: #5de3f7;--ds-color-brand-breeze-300: #00cff0;--ds-color-brand-breeze-400: #099dc5;--ds-color-brand-breeze-500: #0b5575;--ds-color-brand-breeze-300-opacity-30: rgba(0, 207, 240, 0.3);--ds-color-brand-tropical-100: #e2ffcd;--ds-color-brand-tropical-200: #d0fba6;--ds-color-brand-tropical-300: #c0e585;--ds-color-brand-tropical-400: #91be62;--ds-color-brand-tropical-500: #5e8741;--ds-color-brand-alpine-100: #bcaae6;--ds-color-brand-alpine-200: #9e73ea;--ds-color-brand-alpine-300: #8439ef;--ds-color-brand-alpine-400: #631db8;--ds-color-brand-alpine-500: #39115c;--ds-color-brand-flamingo-100: #ffebee;--ds-color-brand-flamingo-200: #ffc0ca;--ds-color-brand-flamingo-300: #ff94a7;--ds-color-brand-flamingo-400: #f65b7b;--ds-color-brand-flamingo-500: #b82b47;--ds-color-brand-canyon-100: #ffcab6;--ds-color-brand-canyon-200: #f99574;--ds-color-brand-canyon-300: #f26135;--ds-color-brand-canyon-400: #de3e09;--ds-color-brand-canyon-500: #b83302;--ds-color-brand-goldcoast-100: #fff0cd;--ds-color-brand-goldcoast-200: #ffdb67;--ds-color-brand-goldcoast-300: #ffd200;--ds-color-brand-goldcoast-400: #e5ad07;--ds-color-brand-goldcoast-500: #b88624;--ds-color-brand-goldgray-100: #c5c1bf;--ds-color-brand-goldgray-200: #726e6c;--ds-color-brand-gold-100: #ccbc94;--ds-color-brand-gold-200: #7f682e;--ds-color-brand-emerald: #139142;--ds-color-brand-sapphire: #015daa;--ds-color-brand-ruby: #a41d4a;--ds-color-brand-lounge: #01426a;--ds-color-brand-loungeplus: #53b390;--ds-color-container-accent-default: #f5fbeb;--ds-color-container-accent-inverse: #badd81;--ds-color-container-emphasis-default: #ebfafd;--ds-color-container-emphasis-inverse: #6ad5ef;--ds-color-container-error-default: #fff4f4;--ds-color-container-error-inverse: #74110e;--ds-color-container-info-default: #f0f7fd;--ds-color-container-info-inverse: #193d73;--ds-color-container-primary-default: #ffffff;--ds-color-container-primary-inverse: #0e2b4f;--ds-color-container-secondary-default: #f7f7f7;--ds-color-container-secondary-inverse: #194069;--ds-color-container-subtle-default: #f7f8fa;--ds-color-container-subtle-inverse: #393d43;--ds-color-container-success-default: #eef8f5;--ds-color-container-success-inverse: #173c30;--ds-color-container-tertiary-default: rgba(0, 0, 0, 0.03);--ds-color-container-tertiary-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-warning-default: #fef8e9;--ds-color-container-warning-inverse: #5d4514;--ds-color-container-ui-primary-active-default: #225296;--ds-color-container-ui-primary-active-inverse: #6ad5ef;--ds-color-container-ui-primary-default-default: #2c67b5;--ds-color-container-ui-primary-default-inverse: #56bbde;--ds-color-container-ui-primary-disabled-default: #a0c9f1;--ds-color-container-ui-primary-disabled-inverse: #275b72;--ds-color-container-ui-primary-focus-default: #2c67b5;--ds-color-container-ui-primary-focus-inverse: #56bbde;--ds-color-container-ui-primary-hover-default: #193d73;--ds-color-container-ui-primary-hover-inverse: #a8e9f7;--ds-color-container-ui-secondary-active-default: #f0f7fd;--ds-color-container-ui-secondary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-secondary-default-default: #ffffff;--ds-color-container-ui-secondary-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-disabled-default: #f7f7f7;--ds-color-container-ui-secondary-disabled-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-secondary-focus-default: #ffffff;--ds-color-container-ui-secondary-focus-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-hover-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-secondary-hover-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-active-default: rgba(0, 0, 0, 0.06);--ds-color-container-ui-tertiary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-tertiary-default-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-default-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-disabled-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-disabled-inverse: rgba(255, 255, 255, 0.25);--ds-color-container-ui-tertiary-focus-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-focus-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-hover-default: rgba(0, 0, 0, 0.12);--ds-color-container-ui-tertiary-hover-inverse: rgba(255, 255, 255, 0.25);--ds-color-icon-primary-default: #676767;--ds-color-icon-primary-inverse: #f7f7f7;--ds-color-icon-secondary-default: #7e8894;--ds-color-icon-secondary-inverse: #ccd2db;--ds-color-icon-tertiary-default: #afb9c6;--ds-color-icon-tertiary-inverse: #939fad;--ds-color-icon-emphasis-default: #2a2a2a;--ds-color-icon-emphasis-inverse: #ffffff;--ds-color-icon-accent-default: #a2c270;--ds-color-icon-accent-inverse: #badd81;--ds-color-icon-info-default: #326aa5;--ds-color-icon-info-inverse: #89b2d4;--ds-color-icon-error-default: #cc1816;--ds-color-icon-error-inverse: #f9aca6;--ds-color-icon-warning-default: #c49432;--ds-color-icon-warning-inverse: #f2c153;--ds-color-icon-success-default: #40a080;--ds-color-icon-success-inverse: #8eceb9;--ds-color-icon-subtle-default: #a0c9f1;--ds-color-icon-subtle-inverse: #326aa5;--ds-color-icon-ui-primary-default-default: #2c67b5;--ds-color-icon-ui-primary-default-inverse: #56bbde;--ds-color-icon-ui-primary-hover-default: #193d73;--ds-color-icon-ui-primary-hover-inverse: #a8e9f7;--ds-color-icon-ui-primary-active-default: #225296;--ds-color-icon-ui-primary-active-inverse: #6ad5ef;--ds-color-icon-ui-primary-disabled-default: #adadad;--ds-color-icon-ui-primary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-primary-focus-default: #2c67b5;--ds-color-icon-ui-primary-focus-inverse: #56bbde;--ds-color-icon-ui-secondary-active-default: #676767;--ds-color-icon-ui-secondary-active-inverse: #c5c5c5;--ds-color-icon-ui-secondary-default-default: #7e7e7e;--ds-color-icon-ui-secondary-default-inverse: #adadad;--ds-color-icon-ui-secondary-disabled-default: #adadad;--ds-color-icon-ui-secondary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-secondary-focus-default: #7e7e7e;--ds-color-icon-ui-secondary-focus-inverse: #adadad;--ds-color-icon-ui-secondary-hover-default: #525252;--ds-color-icon-ui-secondary-hover-inverse: #dddddd;--ds-color-icon-brand-red-default: #d03a08;--ds-color-icon-brand-red-inverse: #e9815e;--ds-color-icon-brand-yellow-default: #7c7140;--ds-color-icon-brand-yellow-inverse: #f9ce06;--ds-color-icon-brand-pink-default: #bf475f;--ds-color-icon-brand-pink-inverse: #f7738e;--ds-color-icon-brand-purple-default: #8d47f0;--ds-color-icon-brand-purple-inverse: #b588f5;--ds-color-icon-brand-lime-default: #647845;--ds-color-icon-brand-lime-inverse: #badd81;--ds-color-icon-brand-green-default: #3a7d64;--ds-color-icon-brand-green-inverse: #51ae8c;--ds-color-icon-brand-turquoise-default: #3d7a7d;--ds-color-icon-brand-turquoise-inverse: #7ba5a6;--ds-color-icon-brand-navy-default: #265688;--ds-color-icon-brand-navy-inverse: #6899c6;--ds-color-icon-brand-blue-default: #2c67b5;--ds-color-icon-brand-blue-inverse: #5398e6;--ds-color-icon-brand-cyan-default: #32718e;--ds-color-icon-brand-cyan-inverse: #6ad5ef;--ds-color-icon-brand-gray-default: #676767;--ds-color-icon-brand-gray-inverse: #c5c5c5;--ds-color-icon-brand-neutral-default: #6a717c;--ds-color-icon-brand-neutral-inverse: #afb9c6;--ds-color-icon-disabled-default: rgba(0, 0, 0, 0.15);--ds-color-text-primary-default: #2a2a2a;--ds-color-text-primary-inverse: #ffffff;--ds-color-text-secondary-default: #525252;--ds-color-text-secondary-inverse: #dddddd;--ds-color-text-tertiary-default: #6a717c;--ds-color-text-tertiary-inverse: #adadad;--ds-color-text-error-default: #cc1816;--ds-color-text-error-inverse: #f9aca6;--ds-color-text-emphasis-default: #265688;--ds-color-text-emphasis-inverse: #cfe0ef;--ds-color-text-accent-default: #647845;--ds-color-text-accent-inverse: #badd81;--ds-color-text-info-default: #326aa5;--ds-color-text-info-inverse: #acc9e2;--ds-color-text-subtle-default: #32718e;--ds-color-text-subtle-inverse: #56bbde;--ds-color-text-success-default: #0b6f4d;--ds-color-text-success-inverse: #8eceb9;--ds-color-text-ui-active-default: #225296;--ds-color-text-ui-active-inverse: #6ad5ef;--ds-color-text-ui-default-default: #2c67b5;--ds-color-text-ui-default-inverse: #56bbde;--ds-color-text-ui-disabled-default: #adadad;--ds-color-text-ui-disabled-inverse: #7e7e7e;--ds-color-text-ui-focus-default: #2c67b5;--ds-color-text-ui-focus-inverse: #56bbde;--ds-color-text-ui-hover-default: #193d73;--ds-color-text-ui-hover-inverse: #a8e9f7;--ds-color-text-link-default: #0074c8;--ds-color-text-link-inverse: #00cff0;--ds-color-tier-alaska-mvp-default: #726e6c;--ds-color-tier-alaska-mvp-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold-default: #7f682e;--ds-color-tier-alaska-mvpgold-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold75k-default: #7f682e;--ds-color-tier-alaska-mvpgold75k-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold100k-default: #7f682e;--ds-color-tier-alaska-mvpgold100k-inverse: #c5c1bf;--ds-color-tier-alaska-lounge: #01426a;--ds-color-tier-alaska-loungeplus: #53b390;--ds-color-tier-fare-business-default: #005154;--ds-color-tier-fare-business-inverse: #9fbdbe;--ds-color-tier-fare-economy-default: #2c67b5;--ds-color-tier-fare-economy-inverse: #a0c9f1;--ds-color-tier-fare-first-class-default: #002c4e;--ds-color-tier-fare-first-class-inverse: #89b2d4;--ds-color-tier-fare-saver-default: #4aa2c7;--ds-color-tier-fare-saver-inverse: #a8e9f7;--ds-color-tier-oneworld-emerald: #139142;--ds-color-tier-oneworld-sapphire: #015daa;--ds-color-tier-oneworld-ruby: #a41d4a;--ds-color-ui-default-default: #0074c8;--ds-color-ui-default-inverse: #00cff0;--ds-color-ui-hover-default: #054687;--ds-color-ui-hover-inverse: #5de3f7;--ds-color-ui-active-default: #054687;--ds-color-ui-active-inverse: #5de3f7;--ds-color-ui-disabled-default: rgba(0, 116, 200, 0.2);--ds-color-ui-bkg-default-default: rgba(0, 0, 0, 0.03);--ds-color-ui-bkg-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-ui-bkg-hover-default: rgba(0, 0, 0, 0.06);--ds-color-ui-bkg-hover-inverse: rgba(255, 255, 255, 0.06);--ds-color-utility-blue-default: #79b2ec;--ds-color-utility-blue-inverse: #c9e0f7;--ds-color-utility-cyan-default: #6ad5ef;--ds-color-utility-cyan-inverse: #a8e9f7;--ds-color-utility-green-default: #7ec6ac;--ds-color-utility-green-inverse: #addbca;--ds-color-utility-gray-default: #adadad;--ds-color-utility-gray-inverse: #dddddd;--ds-color-utility-lime-default: #badd81;--ds-color-utility-lime-inverse: #d8efb4;--ds-color-utility-navy-default: #265688;--ds-color-utility-navy-inverse: #acc9e2;--ds-color-utility-neutral-default: #7e8894;--ds-color-utility-neutral-inverse: #ccd2db;--ds-color-utility-pink-default: #f7738e;--ds-color-utility-pink-inverse: #fcc2ce;--ds-color-utility-purple-default: #8d47f0;--ds-color-utility-purple-inverse: #ddc9fb;--ds-color-utility-red-default: #e35c2f;--ds-color-utility-red-inverse: #f0a68d;--ds-color-utility-turquoise-default: #5c8f91;--ds-color-utility-turquoise-inverse: #9fbdbe;--ds-color-utility-yellow-default: #f9ce06;--ds-color-utility-yellow-inverse: #ffe87e;--ds-color-utility-error-default: #cc1816;--ds-color-utility-error-inverse: #f9aca6;--ds-color-utility-warning-default: #f2c153;--ds-color-utility-warning-inverse: #f2c153;--ds-color-utility-success-default: #0b6f4d;--ds-color-utility-success-inverse: #8eceb9}*,*: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}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder]{color:var(--ds-color-text-secondary-default, #525252)}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
|
|
3290
3465
|
|
|
3291
|
-
|
|
3292
|
-
const idSubstrEnd = 8;
|
|
3293
|
-
const idSubstrStart = 2;
|
|
3466
|
+
var colorCss$2 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color) !important}`;
|
|
3294
3467
|
|
|
3295
|
-
|
|
3296
|
-
* @private
|
|
3297
|
-
*/
|
|
3298
|
-
this.uniqueId = Math.random().
|
|
3299
|
-
toString(idLength).
|
|
3300
|
-
substring(idSubstrStart, idSubstrEnd);
|
|
3468
|
+
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-color-border-divider-default, $ds-color-border-divider-default);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-color-text-primary-default, $ds-color-text-primary-default)}`;
|
|
3301
3469
|
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3470
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3471
|
+
// See LICENSE in the project root for license information.
|
|
3472
|
+
|
|
3473
|
+
// ---------------------------------------------------------------------
|
|
3474
|
+
|
|
3475
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3476
|
+
|
|
3477
|
+
class AuroLibraryRuntimeUtils {
|
|
3478
|
+
|
|
3479
|
+
/* eslint-disable jsdoc/require-param */
|
|
3480
|
+
|
|
3481
|
+
/**
|
|
3482
|
+
* This will register a new custom element with the browser.
|
|
3483
|
+
* @param {String} name - The name of the custom element.
|
|
3484
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3485
|
+
* @returns {void}
|
|
3486
|
+
*/
|
|
3487
|
+
registerComponent(name, componentClass) {
|
|
3488
|
+
if (!customElements.get(name)) {
|
|
3489
|
+
customElements.define(name, class extends componentClass {});
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3495
|
+
* @returns {void}
|
|
3496
|
+
*/
|
|
3497
|
+
closestElement(
|
|
3498
|
+
selector, // selector like in .closest()
|
|
3499
|
+
base = this, // extra functionality to skip a parent
|
|
3500
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3501
|
+
!el || el === document || el === window
|
|
3502
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3503
|
+
: found
|
|
3504
|
+
? found // found a selector INside this element
|
|
3505
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3506
|
+
) {
|
|
3507
|
+
return __Closest(base);
|
|
3508
|
+
}
|
|
3509
|
+
/* eslint-enable jsdoc/require-param */
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3513
|
+
* @param {Object} elem - The element to check.
|
|
3514
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3515
|
+
* @returns {void}
|
|
3516
|
+
*/
|
|
3517
|
+
handleComponentTagRename(elem, tagName) {
|
|
3518
|
+
const tag = tagName.toLowerCase();
|
|
3519
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3520
|
+
|
|
3521
|
+
if (elemTag !== tag) {
|
|
3522
|
+
elem.setAttribute(tag, true);
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3526
|
+
/**
|
|
3527
|
+
* Validates if an element is a specific Auro component.
|
|
3528
|
+
* @param {Object} elem - The element to validate.
|
|
3529
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3530
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3531
|
+
*/
|
|
3532
|
+
elementMatch(elem, tagName) {
|
|
3533
|
+
const tag = tagName.toLowerCase();
|
|
3534
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3535
|
+
|
|
3536
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3541
|
+
// See LICENSE in the project root for license information.
|
|
3542
|
+
|
|
3543
|
+
// ---------------------------------------------------------------------
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* Converts value to an array.
|
|
3547
|
+
* If the value is a JSON string representing an array, it will be parsed.
|
|
3548
|
+
* If the value is already an array, it is returned.
|
|
3549
|
+
* If the value is undefined, it returns undefined.
|
|
3550
|
+
* @private
|
|
3551
|
+
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
3552
|
+
* @returns {Array|undefined} - The converted array or undefined.
|
|
3553
|
+
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
3554
|
+
* or if the value cannot be parsed into an array from a JSON string.
|
|
3555
|
+
*/
|
|
3556
|
+
function arrayConverter(value) {
|
|
3557
|
+
// Allow undefined
|
|
3558
|
+
if (value === undefined) {
|
|
3559
|
+
return undefined;
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
// Return the value if it is already an array
|
|
3563
|
+
if (Array.isArray(value)) {
|
|
3564
|
+
return value;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
try {
|
|
3568
|
+
// If value is a JSON string, parse it
|
|
3569
|
+
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
3570
|
+
|
|
3571
|
+
// Check if the parsed value is an array
|
|
3572
|
+
if (Array.isArray(parsed)) {
|
|
3573
|
+
return parsed;
|
|
3574
|
+
}
|
|
3575
|
+
} catch (error) {
|
|
3576
|
+
// If JSON parsing fails, continue to throw an error below
|
|
3577
|
+
/* eslint-disable no-console */
|
|
3578
|
+
console.error('JSON parsing failed:', error);
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
// Throw error if the input is not an array or undefined
|
|
3582
|
+
throw new Error('Invalid value: Input must be an array or undefined');
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3585
|
+
/**
|
|
3586
|
+
* Compare two arrays for equality.
|
|
3587
|
+
* @private
|
|
3588
|
+
* @param {Array} arr1 - First array to compare.
|
|
3589
|
+
* @param {Array} arr2 - Second array to compare.
|
|
3590
|
+
* @returns {boolean} True if arrays are equal.
|
|
3591
|
+
*/
|
|
3592
|
+
function arraysAreEqual(arr1, arr2) {
|
|
3593
|
+
// If both arrays undefined, they are equal (true)
|
|
3594
|
+
if (arr1 === undefined || arr2 === undefined) {
|
|
3595
|
+
return arr1 === arr2;
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
// If arrays have different lengths, they are not equal
|
|
3599
|
+
if (arr1.length !== arr2.length) {
|
|
3600
|
+
return false;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
// If every item at each index is the same, return true
|
|
3604
|
+
for (let index = 0; index < arr1.length; index += 1) {
|
|
3605
|
+
if (arr1[index] !== arr2[index]) {
|
|
3606
|
+
return false;
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
return true;
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
/**
|
|
3613
|
+
* Compares array for changes.
|
|
3614
|
+
* @private
|
|
3615
|
+
* @param {Array|any} newVal - New value to compare.
|
|
3616
|
+
* @param {Array|any} oldVal - Old value to compare.
|
|
3617
|
+
* @returns {boolean} True if arrays have changed.
|
|
3618
|
+
*/
|
|
3619
|
+
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
3620
|
+
try {
|
|
3621
|
+
// Check if values are undefined or arrays
|
|
3622
|
+
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
3623
|
+
|
|
3624
|
+
// If non-array or non-undefined, throw error
|
|
3625
|
+
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
3626
|
+
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
3627
|
+
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
// Return true if arrays have changed, false if they are the same
|
|
3631
|
+
return !arraysAreEqual(newVal, oldVal);
|
|
3632
|
+
} catch (error) {
|
|
3633
|
+
/* eslint-disable no-console */
|
|
3634
|
+
console.error(error);
|
|
3635
|
+
// If validation fails, it has changed
|
|
3636
|
+
return true;
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3640
|
+
/**
|
|
3641
|
+
* Validates if an option can be interacted with.
|
|
3642
|
+
* @private
|
|
3643
|
+
* @param {HTMLElement} option - The option to check.
|
|
3644
|
+
* @returns {boolean} True if option is interactive.
|
|
3645
|
+
*/
|
|
3646
|
+
function isOptionInteractive(option) {
|
|
3647
|
+
return !option.hasAttribute('hidden') &&
|
|
3648
|
+
!option.hasAttribute('disabled') &&
|
|
3649
|
+
!option.hasAttribute('static');
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3652
|
+
/**
|
|
3653
|
+
* Helper method to dispatch custom events.
|
|
3654
|
+
* @param {HTMLElement} element - Element to dispatch event from.
|
|
3655
|
+
* @param {string} eventName - Name of the event to dispatch.
|
|
3656
|
+
* @param {Object} [detail] - Optional detail object to include with the event.
|
|
3657
|
+
*/
|
|
3658
|
+
function dispatchMenuEvent(element, eventName, detail = null) {
|
|
3659
|
+
const eventConfig = {
|
|
3660
|
+
bubbles: true,
|
|
3661
|
+
cancelable: false,
|
|
3662
|
+
composed: true
|
|
3663
|
+
};
|
|
3664
|
+
|
|
3665
|
+
if (detail !== null) {
|
|
3666
|
+
eventConfig.detail = detail;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
element.dispatchEvent(new CustomEvent(eventName, eventConfig));
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3673
|
+
// See LICENSE in the project root for license information.
|
|
3674
|
+
|
|
3675
|
+
|
|
3676
|
+
|
|
3677
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
3678
|
+
/**
|
|
3679
|
+
* The auro-menu element provides users a way to select from a list of options.
|
|
3680
|
+
* @attr {Array<HTMLElement>|undefined} optionselected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
|
|
3681
|
+
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
3682
|
+
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
3683
|
+
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
3684
|
+
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
3685
|
+
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
3686
|
+
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
3687
|
+
* @attr {Array<string>|undefined} value - Value selected for the menu. `undefined` when no selection has been made, otherwise an array of strings. In single-select mode, the array will contain only one value.
|
|
3688
|
+
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
3689
|
+
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
3690
|
+
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
3691
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
3692
|
+
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
|
|
3693
|
+
* @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
3694
|
+
* @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
3695
|
+
* @slot loadingText - Text to show while loading attribute is set
|
|
3696
|
+
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
3697
|
+
* @slot - Slot for insertion of menu options.
|
|
3698
|
+
*/
|
|
3699
|
+
|
|
3700
|
+
/* eslint-disable no-magic-numbers, max-lines */
|
|
3701
|
+
|
|
3702
|
+
class AuroMenu extends r {
|
|
3703
|
+
constructor() {
|
|
3704
|
+
super();
|
|
3705
|
+
|
|
3706
|
+
// State properties (reactive)
|
|
3707
|
+
|
|
3708
|
+
// Value of the selected options
|
|
3709
|
+
this.value = undefined;
|
|
3710
|
+
// Currently selected option
|
|
3711
|
+
this.optionSelected = undefined;
|
|
3712
|
+
// String used for highlighting/filtering
|
|
3713
|
+
this.matchWord = undefined;
|
|
3714
|
+
// Hide the checkmark icon on selected options
|
|
3715
|
+
this.noCheckmark = false;
|
|
3716
|
+
// Currently active option
|
|
3717
|
+
this.optionActive = undefined;
|
|
3718
|
+
// Loading state
|
|
3719
|
+
this.loading = false;
|
|
3720
|
+
// Multi-select mode
|
|
3721
|
+
this.multiSelect = false;
|
|
3722
|
+
|
|
3723
|
+
// Event Bindings
|
|
3724
|
+
|
|
3725
|
+
/**
|
|
3726
|
+
* @private
|
|
3727
|
+
*/
|
|
3728
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* @private
|
|
3732
|
+
*/
|
|
3733
|
+
this.handleMouseSelect = this.handleMouseSelect.bind(this);
|
|
3734
|
+
|
|
3735
|
+
/**
|
|
3736
|
+
* @private
|
|
3737
|
+
*/
|
|
3738
|
+
this.handleOptionHover = this.handleOptionHover.bind(this);
|
|
3739
|
+
|
|
3740
|
+
/**
|
|
3741
|
+
* @private
|
|
3742
|
+
*/
|
|
3743
|
+
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
3744
|
+
|
|
3745
|
+
// Instance properties (non-reactive)
|
|
3746
|
+
|
|
3747
|
+
/**
|
|
3748
|
+
* @private
|
|
3749
|
+
*/
|
|
3750
|
+
Object.assign(this, {
|
|
3751
|
+
// Root-level menu (true) or a nested submenu (false)
|
|
3752
|
+
rootMenu: true,
|
|
3753
|
+
// Currently focused/active menu item index
|
|
3754
|
+
index: -1,
|
|
3755
|
+
// Nested menu spacer
|
|
3756
|
+
nestingSpacer: '<span class="nestingSpacer"></span>',
|
|
3757
|
+
// Loading indicator for slot elements
|
|
3758
|
+
loadingSlots: null,
|
|
3759
|
+
// Store for menu items
|
|
3760
|
+
items: [],
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
static get properties() {
|
|
3765
|
+
return {
|
|
3766
|
+
noCheckmark: {
|
|
3767
|
+
type: Boolean,
|
|
3768
|
+
reflect: true,
|
|
3769
|
+
attribute: 'nocheckmark'
|
|
3770
|
+
},
|
|
3771
|
+
disabled: {
|
|
3772
|
+
type: Boolean,
|
|
3773
|
+
reflect: true
|
|
3774
|
+
},
|
|
3775
|
+
loading: {
|
|
3776
|
+
type: Boolean,
|
|
3777
|
+
reflect: true
|
|
3778
|
+
},
|
|
3779
|
+
optionSelected: {
|
|
3780
|
+
// Allow HTMLElement[] arrays and undefined
|
|
3781
|
+
converter: arrayConverter,
|
|
3782
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
3783
|
+
},
|
|
3784
|
+
optionActive: {
|
|
3785
|
+
type: Object,
|
|
3786
|
+
attribute: 'optionactive'
|
|
3787
|
+
},
|
|
3788
|
+
matchWord: {
|
|
3789
|
+
type: String,
|
|
3790
|
+
attribute: 'matchword'
|
|
3791
|
+
},
|
|
3792
|
+
multiSelect: {
|
|
3793
|
+
type: Boolean,
|
|
3794
|
+
reflect: true,
|
|
3795
|
+
attribute: 'multiselect'
|
|
3796
|
+
},
|
|
3797
|
+
value: {
|
|
3798
|
+
// Allow string[] arrays and undefined
|
|
3799
|
+
type: Object,
|
|
3800
|
+
converter: arrayConverter,
|
|
3801
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
3802
|
+
}
|
|
3803
|
+
};
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
static get styles() {
|
|
3807
|
+
return [
|
|
3808
|
+
styleCss$2,
|
|
3809
|
+
colorCss$2,
|
|
3810
|
+
tokensCss$1
|
|
3811
|
+
];
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
/**
|
|
3815
|
+
* This will register this element with the browser.
|
|
3816
|
+
* @param {string} [name="auro-menu"] - The name of element that you want to register to.
|
|
3817
|
+
*
|
|
3818
|
+
* @example
|
|
3819
|
+
* AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
|
|
3820
|
+
*
|
|
3821
|
+
*/
|
|
3822
|
+
static register(name = "auro-menu") {
|
|
3823
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
// Lifecycle Methods
|
|
3827
|
+
|
|
3828
|
+
connectedCallback() {
|
|
3829
|
+
super.connectedCallback();
|
|
3830
|
+
|
|
3831
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
3832
|
+
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
3833
|
+
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
3834
|
+
this.addEventListener('slotchange', this.handleSlotChange);
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3837
|
+
disconnectedCallback() {
|
|
3838
|
+
this.removeEventListener('keydown', this.handleKeyDown);
|
|
3839
|
+
this.removeEventListener('mousedown', this.handleMouseSelect);
|
|
3840
|
+
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
3841
|
+
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
3842
|
+
|
|
3843
|
+
super.disconnectedCallback();
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
firstUpdated() {
|
|
3847
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
3848
|
+
|
|
3849
|
+
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
3850
|
+
this.initializeMenu();
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
updated(changedProperties) {
|
|
3854
|
+
if (changedProperties.has('value')) {
|
|
3855
|
+
// Handle null/undefined case
|
|
3856
|
+
if (this.value === undefined || this.value === null) {
|
|
3857
|
+
this.optionSelected = undefined;
|
|
3858
|
+
// Reset index tracking
|
|
3859
|
+
this.index = -1;
|
|
3860
|
+
} else {
|
|
3861
|
+
// Convert single values to arrays
|
|
3862
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
3863
|
+
|
|
3864
|
+
// Find all matching options
|
|
3865
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
3866
|
+
|
|
3867
|
+
if (matchingOptions.length > 0) {
|
|
3868
|
+
if (this.multiSelect) {
|
|
3869
|
+
// For multiselect, keep all matching options
|
|
3870
|
+
this.optionSelected = matchingOptions;
|
|
3871
|
+
} else {
|
|
3872
|
+
// For single select, only use the first match
|
|
3873
|
+
this.optionSelected = [matchingOptions[0]];
|
|
3874
|
+
this.index = this.items.indexOf(matchingOptions[0]);
|
|
3875
|
+
}
|
|
3876
|
+
} else {
|
|
3877
|
+
// No matches found - trigger failure event
|
|
3878
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
3879
|
+
this.optionSelected = undefined;
|
|
3880
|
+
this.index = -1;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3884
|
+
// Update UI state
|
|
3885
|
+
this.updateItemsState(new Map([
|
|
3886
|
+
[
|
|
3887
|
+
'optionSelected',
|
|
3888
|
+
true
|
|
3889
|
+
]
|
|
3890
|
+
]));
|
|
3891
|
+
|
|
3892
|
+
// Notify of changes
|
|
3893
|
+
if (this.optionSelected !== undefined) {
|
|
3894
|
+
this.notifySelectionChange();
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3898
|
+
// Process all other UI updates
|
|
3899
|
+
this.updateItemsState(changedProperties);
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3902
|
+
/**
|
|
3903
|
+
* Updates the UI state and appearance of menu items based on changed properties.
|
|
3904
|
+
* @private
|
|
3905
|
+
* @param {Map<string, boolean>} changedProperties - LitElement's changed properties map.
|
|
3906
|
+
*/
|
|
3907
|
+
updateItemsState(changedProperties) {
|
|
3908
|
+
if (!this.items) {
|
|
3909
|
+
return;
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
// Handle noCheckmark propagation to all menus and options
|
|
3913
|
+
if (changedProperties.has('noCheckmark') && this.noCheckmark) {
|
|
3914
|
+
// Update both menus and options
|
|
3915
|
+
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
// Regex for matchWord if needed
|
|
3919
|
+
let regexWord = null;
|
|
3920
|
+
|
|
3921
|
+
if (changedProperties.has('matchWord') && this.matchWord && this.matchWord.length) {
|
|
3922
|
+
const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
|
|
3923
|
+
regexWord = new RegExp(escapedWord, 'giu');
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
// Handle direct item updates
|
|
3927
|
+
this.items.forEach((option) => {
|
|
3928
|
+
// Update selection if option or value changed
|
|
3929
|
+
if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
|
|
3930
|
+
const isSelected = this.isOptionSelected(option);
|
|
3931
|
+
option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
|
|
3932
|
+
|
|
3933
|
+
// Add/remove selected attribute based on state
|
|
3934
|
+
if (isSelected) {
|
|
3935
|
+
option.setAttribute('selected', '');
|
|
3936
|
+
} else {
|
|
3937
|
+
option.removeAttribute('selected');
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3941
|
+
// Update text highlighting if matchWord changed
|
|
3942
|
+
if (changedProperties.has('matchWord') && regexWord &&
|
|
3943
|
+
isOptionInteractive(option) && !option.hasAttribute('persistent')) {
|
|
3944
|
+
const nested = option.querySelectorAll('.nestingSpacer');
|
|
3945
|
+
// Create nested spacers
|
|
3946
|
+
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
3947
|
+
|
|
3948
|
+
// Update with spacers and matchWord
|
|
3949
|
+
option.innerHTML = nestingSpacerBundle +
|
|
3950
|
+
option.textContent.replace(
|
|
3951
|
+
regexWord,
|
|
3952
|
+
(match) => `<strong>${match}</strong>`
|
|
3953
|
+
);
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
// Update disabled state
|
|
3957
|
+
if (changedProperties.has('disabled')) {
|
|
3958
|
+
option.disabled = this.disabled;
|
|
3959
|
+
}
|
|
3960
|
+
});
|
|
3961
|
+
|
|
3962
|
+
// Handle loading state changes
|
|
3963
|
+
if (changedProperties.has('loading')) {
|
|
3964
|
+
this.setAttribute("aria-busy", this.loading);
|
|
3965
|
+
dispatchMenuEvent(this, "auroMenu-loadingChange", {
|
|
3966
|
+
loading: this.loading,
|
|
3967
|
+
hasLoadingPlaceholder: this.hasLoadingPlaceholder
|
|
3968
|
+
});
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
|
|
3972
|
+
// Init Methods
|
|
3973
|
+
|
|
3974
|
+
/**
|
|
3975
|
+
* Initializes the menu's state and structure.
|
|
3976
|
+
* @private
|
|
3977
|
+
*/
|
|
3978
|
+
initializeMenu() {
|
|
3979
|
+
this.initItems();
|
|
3980
|
+
if (this.rootMenu) {
|
|
3981
|
+
this.setAttribute('role', 'listbox');
|
|
3982
|
+
this.setAttribute('root', '');
|
|
3983
|
+
this.handleNestedMenus(this);
|
|
3984
|
+
}
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
/**
|
|
3988
|
+
* Initializes menu items and their attributes.
|
|
3989
|
+
* @private
|
|
3990
|
+
*/
|
|
3991
|
+
initItems() {
|
|
3992
|
+
this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
|
|
3993
|
+
if (this.noCheckmark) {
|
|
3994
|
+
this.updateItemsState(new Map([
|
|
3995
|
+
[
|
|
3996
|
+
'noCheckmark',
|
|
3997
|
+
true
|
|
3998
|
+
]
|
|
3999
|
+
]));
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
4002
|
+
|
|
4003
|
+
// Logic Methods
|
|
4004
|
+
|
|
4005
|
+
/**
|
|
4006
|
+
* Updates menu state when an option is selected.
|
|
4007
|
+
* @private
|
|
4008
|
+
* @param {HTMLElement} option - The option element to select.
|
|
4009
|
+
*/
|
|
4010
|
+
handleSelectState(option) {
|
|
4011
|
+
if (this.multiSelect) {
|
|
4012
|
+
const currentValue = this.value || [];
|
|
4013
|
+
const currentSelected = this.optionSelected || [];
|
|
4014
|
+
|
|
4015
|
+
if (!currentValue.includes(option.value)) {
|
|
4016
|
+
this.value = [
|
|
4017
|
+
...currentValue,
|
|
4018
|
+
option.value
|
|
4019
|
+
];
|
|
4020
|
+
}
|
|
4021
|
+
if (!currentSelected.includes(option)) {
|
|
4022
|
+
this.optionSelected = [
|
|
4023
|
+
...currentSelected,
|
|
4024
|
+
option
|
|
4025
|
+
];
|
|
4026
|
+
}
|
|
4027
|
+
} else {
|
|
4028
|
+
// Single select - use arrays with single values
|
|
4029
|
+
this.value = [option.value];
|
|
4030
|
+
this.optionSelected = [option];
|
|
4031
|
+
}
|
|
4032
|
+
|
|
4033
|
+
this.index = this.items.indexOf(option);
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
/**
|
|
4037
|
+
* Deselects a menu option and updates related state.
|
|
4038
|
+
* @private
|
|
4039
|
+
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
4040
|
+
*/
|
|
4041
|
+
handleDeselectState(option) {
|
|
4042
|
+
if (this.multiSelect && Array.isArray(this.value)) {
|
|
4043
|
+
// Remove this option from array
|
|
4044
|
+
this.value = this.value.filter((val) => val !== option.value);
|
|
4045
|
+
|
|
4046
|
+
// If array is empty after removal, set back to undefined
|
|
4047
|
+
if (this.value.length === 0) {
|
|
4048
|
+
this.value = undefined;
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4051
|
+
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
4052
|
+
if (this.optionSelected.length === 0) {
|
|
4053
|
+
this.optionSelected = undefined;
|
|
4054
|
+
}
|
|
4055
|
+
} else {
|
|
4056
|
+
// For single-select: Back to undefined when deselected
|
|
4057
|
+
this.value = undefined;
|
|
4058
|
+
this.optionSelected = undefined;
|
|
4059
|
+
}
|
|
4060
|
+
|
|
4061
|
+
// Update the index tracking
|
|
4062
|
+
this.index = this.items.indexOf(option);
|
|
4063
|
+
|
|
4064
|
+
// Update UI to reflect changes
|
|
4065
|
+
this.updateItemsState(new Map([
|
|
4066
|
+
[
|
|
4067
|
+
'optionSelected',
|
|
4068
|
+
true
|
|
4069
|
+
]
|
|
4070
|
+
]));
|
|
4071
|
+
|
|
4072
|
+
// Notify of selection change
|
|
4073
|
+
this.notifySelectionChange();
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
/**
|
|
4077
|
+
* Resets all options to their default state.
|
|
4078
|
+
* @private
|
|
4079
|
+
*/
|
|
4080
|
+
clearSelection() {
|
|
4081
|
+
this.optionSelected = undefined;
|
|
4082
|
+
this.value = undefined;
|
|
4083
|
+
}
|
|
4084
|
+
|
|
4085
|
+
/**
|
|
4086
|
+
* Resets the menu to its initial state.
|
|
4087
|
+
* This is the only way to return value to undefined.
|
|
4088
|
+
* @public
|
|
4089
|
+
*/
|
|
4090
|
+
reset() {
|
|
4091
|
+
// Reset to undefined - initial state
|
|
4092
|
+
this.value = undefined;
|
|
4093
|
+
this.optionSelected = undefined;
|
|
4094
|
+
this.index = -1;
|
|
4095
|
+
|
|
4096
|
+
// Reset UI state
|
|
4097
|
+
this.updateItemsState(new Map([
|
|
4098
|
+
[
|
|
4099
|
+
'optionSelected',
|
|
4100
|
+
true
|
|
4101
|
+
]
|
|
4102
|
+
]));
|
|
4103
|
+
|
|
4104
|
+
// Dispatch reset event
|
|
4105
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueReset');
|
|
4106
|
+
}
|
|
4107
|
+
|
|
4108
|
+
/**
|
|
4109
|
+
* Handles nested menu structure.
|
|
4110
|
+
* @private
|
|
4111
|
+
* @param {HTMLElement} menu - Root menu element.
|
|
4112
|
+
*/
|
|
4113
|
+
handleNestedMenus(menu) {
|
|
4114
|
+
const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu]');
|
|
4115
|
+
|
|
4116
|
+
nestedMenus.forEach((nestedMenu) => {
|
|
4117
|
+
// role="listbox" only allows "role=group" for children.
|
|
4118
|
+
nestedMenu.setAttribute('role', 'group');
|
|
4119
|
+
if (!nestedMenu.hasAttribute('aria-label')) {
|
|
4120
|
+
nestedMenu.setAttribute('aria-label', 'submenu');
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
4124
|
+
options.forEach((option) => {
|
|
4125
|
+
option.innerHTML = this.nestingSpacer + option.innerHTML;
|
|
4126
|
+
});
|
|
4127
|
+
|
|
4128
|
+
this.handleNestedMenus(nestedMenu);
|
|
4129
|
+
});
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
// Event Handlers
|
|
4133
|
+
|
|
4134
|
+
/**
|
|
4135
|
+
* Handles keyboard navigation.
|
|
4136
|
+
* @private
|
|
4137
|
+
* @param {KeyboardEvent} event - Event object from the browser.
|
|
4138
|
+
*/
|
|
4139
|
+
handleKeyDown(event) {
|
|
4140
|
+
event.preventDefault();
|
|
4141
|
+
switch (event.key) {
|
|
4142
|
+
case "ArrowDown":
|
|
4143
|
+
this.navigateOptions('down');
|
|
4144
|
+
break;
|
|
4145
|
+
case "ArrowUp":
|
|
4146
|
+
this.navigateOptions('up');
|
|
4147
|
+
break;
|
|
4148
|
+
case "Enter":
|
|
4149
|
+
this.makeSelection();
|
|
4150
|
+
break;
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
/**
|
|
4155
|
+
* Makes a selection based on the current index or clicked option.
|
|
4156
|
+
* @private
|
|
4157
|
+
*/
|
|
4158
|
+
makeSelection() {
|
|
4159
|
+
if (!this.items) {
|
|
4160
|
+
this.initItems();
|
|
4161
|
+
}
|
|
4162
|
+
|
|
4163
|
+
// Get currently selected menu option based on index
|
|
4164
|
+
const option = this.items[this.index];
|
|
4165
|
+
|
|
4166
|
+
// Return early if option is not interactive
|
|
4167
|
+
if (!option || !isOptionInteractive(option)) {
|
|
4168
|
+
return;
|
|
4169
|
+
}
|
|
4170
|
+
|
|
4171
|
+
// Handle custom events first
|
|
4172
|
+
if (option.hasAttribute('event')) {
|
|
4173
|
+
this.handleCustomEvent(option);
|
|
4174
|
+
return;
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4177
|
+
if (this.multiSelect) {
|
|
4178
|
+
// In multiselect, toggle individual selections
|
|
4179
|
+
this.toggleOption(option);
|
|
4180
|
+
// In single select, only handle selection of new options
|
|
4181
|
+
} else if (!this.isOptionSelected(option)) {
|
|
4182
|
+
this.clearSelection();
|
|
4183
|
+
this.handleSelectState(option);
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
this.notifySelectionChange();
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* Toggle the selection state of the menuoption.
|
|
4191
|
+
* @private
|
|
4192
|
+
* @param {HTMLElement} option - The menuoption to toggle.
|
|
4193
|
+
*/
|
|
4194
|
+
toggleOption(option) {
|
|
4195
|
+
const isCurrentlySelected = this.isOptionSelected(option);
|
|
4196
|
+
|
|
4197
|
+
if (isCurrentlySelected) {
|
|
4198
|
+
this.handleDeselectState(option);
|
|
4199
|
+
} else if (option.value === undefined || option.value === '') {
|
|
4200
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
4201
|
+
} else {
|
|
4202
|
+
this.handleSelectState(option);
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4206
|
+
/**
|
|
4207
|
+
* Handles option selection via mouse.
|
|
4208
|
+
* @private
|
|
4209
|
+
* @param {MouseEvent} event - Event object from the browser.
|
|
4210
|
+
*/
|
|
4211
|
+
handleMouseSelect(event) {
|
|
4212
|
+
if (event.target === this) {
|
|
4213
|
+
return;
|
|
4214
|
+
}
|
|
4215
|
+
|
|
4216
|
+
const option = event.target.closest('auro-menuoption, [auro-menuoption]');
|
|
4217
|
+
if (option) {
|
|
4218
|
+
this.index = this.items.indexOf(option);
|
|
4219
|
+
this.makeSelection();
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
/**
|
|
4224
|
+
* Handles option hover events.
|
|
4225
|
+
* @private
|
|
4226
|
+
* @param {CustomEvent} event - Event object from the browser.
|
|
4227
|
+
*/
|
|
4228
|
+
handleOptionHover(event) {
|
|
4229
|
+
const option = event.target;
|
|
4230
|
+
this.index = this.items.indexOf(option);
|
|
4231
|
+
this.updateActiveOption(this.index);
|
|
4232
|
+
}
|
|
4233
|
+
|
|
4234
|
+
/**
|
|
4235
|
+
* Handles slot change events.
|
|
4236
|
+
* @private
|
|
4237
|
+
*/
|
|
4238
|
+
handleSlotChange() {
|
|
4239
|
+
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
4240
|
+
this.rootMenu = false;
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
if (this.rootMenu) {
|
|
4244
|
+
this.initializeMenu();
|
|
4245
|
+
} else if (this.noCheckmark) {
|
|
4246
|
+
this.updateItemsState(new Map([
|
|
4247
|
+
[
|
|
4248
|
+
'noCheckmark',
|
|
4249
|
+
true
|
|
4250
|
+
]
|
|
4251
|
+
]));
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4255
|
+
/**
|
|
4256
|
+
* Navigates through options using keyboard.
|
|
4257
|
+
* @private
|
|
4258
|
+
* @param {string} direction - 'up' or 'down'.
|
|
4259
|
+
*/
|
|
4260
|
+
navigateOptions(direction) {
|
|
4261
|
+
// Return early if no items exist
|
|
4262
|
+
if (!this.items || !this.items.length) {
|
|
4263
|
+
return;
|
|
4264
|
+
}
|
|
4265
|
+
|
|
4266
|
+
let newIndex = this.index;
|
|
4267
|
+
const increment = direction === 'down' ? 1 : -1;
|
|
4268
|
+
const maxIterations = this.items.length;
|
|
4269
|
+
let iterations = 0;
|
|
4270
|
+
let foundInteractiveOption = false;
|
|
4271
|
+
|
|
4272
|
+
do {
|
|
4273
|
+
newIndex = (newIndex + increment + this.items.length) % this.items.length;
|
|
4274
|
+
iterations += 1;
|
|
4275
|
+
|
|
4276
|
+
// Check if current option is interactive
|
|
4277
|
+
const currentOption = this.items[newIndex];
|
|
4278
|
+
if (isOptionInteractive(currentOption)) {
|
|
4279
|
+
foundInteractiveOption = true;
|
|
4280
|
+
break;
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4283
|
+
// Break if all options were checked
|
|
4284
|
+
if (iterations >= maxIterations) {
|
|
4285
|
+
break;
|
|
4286
|
+
}
|
|
4287
|
+
} while (iterations < maxIterations);
|
|
4288
|
+
|
|
4289
|
+
// Handle the results of the search
|
|
4290
|
+
if (foundInteractiveOption) {
|
|
4291
|
+
// Update only if an interactive option was found
|
|
4292
|
+
this.index = newIndex;
|
|
4293
|
+
this.updateActiveOption(this.index);
|
|
4294
|
+
} else {
|
|
4295
|
+
// All options are disabled or non-interactive
|
|
4296
|
+
// Keep the current index unchanged
|
|
4297
|
+
dispatchMenuEvent(this, 'auroMenu-navigateFailure', {
|
|
4298
|
+
reason: 'No interactive options available',
|
|
4299
|
+
direction,
|
|
4300
|
+
currentIndex: this.index
|
|
4301
|
+
});
|
|
4302
|
+
}
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
/**
|
|
4306
|
+
* Updates the active option state and dispatches events.
|
|
4307
|
+
* @private
|
|
4308
|
+
* @param {number} index - Index of the option to make active.
|
|
4309
|
+
*/
|
|
4310
|
+
updateActiveOption(index) {
|
|
4311
|
+
if (!this.items || !this.items[index]) {
|
|
4312
|
+
return;
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4315
|
+
this.items.forEach((item) => item.classList.remove('active'));
|
|
4316
|
+
this.items[index].classList.add('active');
|
|
4317
|
+
this.optionActive = this.items[index];
|
|
4318
|
+
|
|
4319
|
+
dispatchMenuEvent(this, 'auroMenu-activatedOption', this.items[index]);
|
|
4320
|
+
}
|
|
4321
|
+
|
|
4322
|
+
/**
|
|
4323
|
+
* Handles custom events defined on options.
|
|
4324
|
+
* @private
|
|
4325
|
+
* @param {HTMLElement} option - Option with custom event.
|
|
4326
|
+
*/
|
|
4327
|
+
handleCustomEvent(option) {
|
|
4328
|
+
const eventName = option.getAttribute('event');
|
|
4329
|
+
dispatchMenuEvent(this, eventName);
|
|
4330
|
+
dispatchMenuEvent(this, 'auroMenu-customEventFired');
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
/**
|
|
4334
|
+
* Notifies selection change to parent components.
|
|
4335
|
+
* @private
|
|
4336
|
+
*/
|
|
4337
|
+
notifySelectionChange() {
|
|
4338
|
+
dispatchMenuEvent(this, 'auroMenu-selectedOption');
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4341
|
+
/**
|
|
4342
|
+
* Checks if an option is currently selected.
|
|
4343
|
+
* @private
|
|
4344
|
+
* @param {HTMLElement} option - The option to check.
|
|
4345
|
+
* @returns {boolean}
|
|
4346
|
+
*/
|
|
4347
|
+
isOptionSelected(option) {
|
|
4348
|
+
if (!this.optionSelected) {
|
|
4349
|
+
return false;
|
|
4350
|
+
}
|
|
4351
|
+
// Always treat as array for both single and multi-select
|
|
4352
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.includes(option);
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4355
|
+
/**
|
|
4356
|
+
* Getter for loading placeholder state.
|
|
4357
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
4358
|
+
*/
|
|
4359
|
+
get hasLoadingPlaceholder() {
|
|
4360
|
+
return this.loadingSlots && this.loadingSlots.length > 0;
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
/**
|
|
4364
|
+
* Renders the component.
|
|
4365
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
4366
|
+
*/
|
|
4367
|
+
render() {
|
|
4368
|
+
if (this.loading) {
|
|
4369
|
+
return x`
|
|
4370
|
+
<auro-menuoption disabled loadingplaceholder class="${this.hasLoadingPlaceholder ? '' : 'empty'}">
|
|
4371
|
+
<div>
|
|
4372
|
+
<slot name="loadingIcon"></slot>
|
|
4373
|
+
<slot name="loadingText"></slot>
|
|
4374
|
+
</div>
|
|
4375
|
+
</auro-menuoption>
|
|
4376
|
+
`;
|
|
4377
|
+
}
|
|
4378
|
+
|
|
4379
|
+
return x`<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
|
|
4383
|
+
/**
|
|
4384
|
+
* @license
|
|
4385
|
+
* Copyright 2020 Google LLC
|
|
4386
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4387
|
+
*/
|
|
4388
|
+
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(undefined!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=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$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");undefined===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
4389
|
+
|
|
4390
|
+
var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
4391
|
+
|
|
4392
|
+
var colorCss$1 = i$5`: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)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
|
|
4393
|
+
|
|
4394
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4395
|
+
// See LICENSE in the project root for license information.
|
|
4396
|
+
|
|
4397
|
+
|
|
4398
|
+
class AuroDependencyVersioning {
|
|
4399
|
+
|
|
4400
|
+
/**
|
|
4401
|
+
* Generates a unique string to be used for child auro element naming.
|
|
4402
|
+
* @private
|
|
4403
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
4404
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
4405
|
+
* @returns {string} - Unique string to be used for naming.
|
|
4406
|
+
*/
|
|
4407
|
+
generateElementName(baseName, version) {
|
|
4408
|
+
let result = baseName;
|
|
4409
|
+
|
|
4410
|
+
result += '-';
|
|
4411
|
+
result += version.replace(/[.]/g, '_');
|
|
4412
|
+
|
|
4413
|
+
return result;
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
/**
|
|
4417
|
+
* Generates a unique string to be used for child auro element naming.
|
|
4418
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
4419
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
4420
|
+
* @returns {string} - Unique string to be used for naming.
|
|
4421
|
+
*/
|
|
4422
|
+
generateTag(baseName, version, tagClass) {
|
|
4423
|
+
const elementName = this.generateElementName(baseName, version);
|
|
4424
|
+
const tag = i$1`${s(elementName)}`;
|
|
4425
|
+
|
|
4426
|
+
if (!customElements.get(elementName)) {
|
|
4427
|
+
customElements.define(elementName, class extends tagClass {});
|
|
4428
|
+
}
|
|
4429
|
+
|
|
4430
|
+
return tag;
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
|
|
4434
|
+
/**
|
|
4435
|
+
* @license
|
|
4436
|
+
* Copyright 2017 Google LLC
|
|
4437
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4438
|
+
*/
|
|
4439
|
+
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)}}
|
|
4440
|
+
|
|
4441
|
+
/**
|
|
4442
|
+
* @license
|
|
4443
|
+
* Copyright 2018 Google LLC
|
|
4444
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4445
|
+
*/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}});
|
|
4446
|
+
|
|
4447
|
+
/**
|
|
4448
|
+
* @license
|
|
4449
|
+
* Copyright 2018 Google LLC
|
|
4450
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4451
|
+
*/const o=o=>o??E;
|
|
4452
|
+
|
|
4453
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4454
|
+
// See LICENSE in the project root for license information.
|
|
4455
|
+
|
|
4456
|
+
|
|
4457
|
+
/**
|
|
4458
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
4459
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
4460
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
4461
|
+
*/
|
|
4462
|
+
|
|
4463
|
+
class AuroElement extends r {
|
|
4464
|
+
|
|
4465
|
+
// function to define props used within the scope of this component
|
|
4466
|
+
static get properties() {
|
|
4467
|
+
return {
|
|
4468
|
+
hidden: { type: Boolean,
|
|
4469
|
+
reflect: true },
|
|
4470
|
+
hiddenVisually: { type: Boolean,
|
|
4471
|
+
reflect: true },
|
|
4472
|
+
hiddenAudible: { type: Boolean,
|
|
4473
|
+
reflect: true },
|
|
4474
|
+
};
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4477
|
+
/**
|
|
4478
|
+
* @private Function that determines state of aria-hidden
|
|
4479
|
+
*/
|
|
4480
|
+
hideAudible(value) {
|
|
4481
|
+
if (value) {
|
|
4482
|
+
return 'true'
|
|
4483
|
+
}
|
|
4484
|
+
|
|
4485
|
+
return 'false'
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4488
|
+
|
|
4489
|
+
var error = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
4490
|
+
|
|
4491
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
4492
|
+
|
|
4493
|
+
const _fetchMap = new Map();
|
|
4494
|
+
|
|
4495
|
+
/**
|
|
4496
|
+
* A callback to parse Response body.
|
|
4497
|
+
*
|
|
4498
|
+
* @callback ResponseParser
|
|
4499
|
+
* @param {Fetch.Response} response
|
|
4500
|
+
* @returns {Promise}
|
|
4501
|
+
*/
|
|
4502
|
+
|
|
4503
|
+
/**
|
|
4504
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
4505
|
+
*
|
|
4506
|
+
* @param {String} uri
|
|
4507
|
+
* @param {Object} [options={}]
|
|
4508
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
4509
|
+
* @returns {Promise}
|
|
4510
|
+
*/
|
|
4511
|
+
const cacheFetch = (uri, options = {}) => {
|
|
4512
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
4513
|
+
if (!_fetchMap.has(uri)) {
|
|
4514
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
4515
|
+
}
|
|
4516
|
+
return _fetchMap.get(uri);
|
|
4517
|
+
};
|
|
4518
|
+
|
|
4519
|
+
var styleCss$3 = i$5`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
|
|
4520
|
+
|
|
4521
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4522
|
+
// See LICENSE in the project root for license information.
|
|
4523
|
+
|
|
4524
|
+
|
|
4525
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
4526
|
+
/**
|
|
4527
|
+
* @attr {Boolean} onDark - Set value for on-dark version of auro-icon
|
|
4528
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
4529
|
+
*/
|
|
4530
|
+
|
|
4531
|
+
// build the component class
|
|
4532
|
+
class BaseIcon extends AuroElement {
|
|
4533
|
+
constructor() {
|
|
4534
|
+
super();
|
|
4535
|
+
this.onDark = false;
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
// function to define props used within the scope of this component
|
|
4539
|
+
static get properties() {
|
|
4540
|
+
return {
|
|
4541
|
+
...super.properties,
|
|
4542
|
+
onDark: {
|
|
4543
|
+
type: Boolean,
|
|
4544
|
+
reflect: true
|
|
4545
|
+
},
|
|
4546
|
+
|
|
4547
|
+
/**
|
|
4548
|
+
* @private
|
|
4549
|
+
*/
|
|
4550
|
+
svg: {
|
|
4551
|
+
attribute: false,
|
|
4552
|
+
reflect: true
|
|
4553
|
+
}
|
|
4554
|
+
};
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
static get styles() {
|
|
4558
|
+
return i$5`
|
|
4559
|
+
${styleCss$3}
|
|
4560
|
+
`;
|
|
4561
|
+
}
|
|
4562
|
+
|
|
4563
|
+
/**
|
|
4564
|
+
* Async function to fetch requested icon from npm CDN.
|
|
4565
|
+
* @private
|
|
4566
|
+
* @param {string} category - Icon category.
|
|
4567
|
+
* @param {string} name - Icon name.
|
|
4568
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
4569
|
+
*/
|
|
4570
|
+
async fetchIcon(category, name) {
|
|
4571
|
+
let iconHTML = '';
|
|
4572
|
+
|
|
4573
|
+
if (category === 'logos') {
|
|
4574
|
+
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
4575
|
+
} else {
|
|
4576
|
+
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
4577
|
+
}
|
|
4578
|
+
|
|
4579
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
4580
|
+
|
|
4581
|
+
return dom.body.querySelector('svg');
|
|
4582
|
+
}
|
|
4583
|
+
|
|
4584
|
+
// lifecycle function
|
|
4585
|
+
async firstUpdated() {
|
|
4586
|
+
if (!this.customSvg) {
|
|
4587
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
4588
|
+
|
|
4589
|
+
if (svg) {
|
|
4590
|
+
this.svg = svg;
|
|
4591
|
+
} else if (!svg) {
|
|
4592
|
+
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
4593
|
+
|
|
4594
|
+
this.svg = penDOM.body.firstChild;
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
|
|
4600
|
+
var tokensCss$2 = i$5`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
|
|
4601
|
+
|
|
4602
|
+
var colorCss$3 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
4603
|
+
|
|
4604
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4605
|
+
// See LICENSE in the project root for license information.
|
|
4606
|
+
|
|
4607
|
+
|
|
4608
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
4609
|
+
/**
|
|
4610
|
+
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
4611
|
+
*
|
|
4612
|
+
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
4613
|
+
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
4614
|
+
* @attr {Boolean} customColor - Removes primary selector.
|
|
4615
|
+
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
4616
|
+
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
4617
|
+
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
4618
|
+
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
4619
|
+
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
4620
|
+
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
4621
|
+
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
4622
|
+
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
4623
|
+
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
4624
|
+
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
4625
|
+
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
4626
|
+
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
4627
|
+
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
4628
|
+
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
4629
|
+
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
4630
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
4631
|
+
* @slot svg - Used for custom SVG content.
|
|
4632
|
+
*/
|
|
4633
|
+
|
|
4634
|
+
// build the component class
|
|
4635
|
+
class AuroIcon extends BaseIcon {
|
|
4636
|
+
constructor() {
|
|
4637
|
+
super();
|
|
4638
|
+
|
|
4639
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
4640
|
+
|
|
4641
|
+
this.privateDefaults();
|
|
4642
|
+
}
|
|
4643
|
+
|
|
4644
|
+
/**
|
|
4645
|
+
* Internal Defaults.
|
|
4646
|
+
* @private
|
|
4647
|
+
* @returns {void}
|
|
4648
|
+
*/
|
|
4649
|
+
privateDefaults() {
|
|
4650
|
+
this.accent = false;
|
|
4651
|
+
this.customColor = false;
|
|
4652
|
+
this.customSvg = false;
|
|
4653
|
+
this.disabled = false;
|
|
4654
|
+
this.emphasis = false;
|
|
4655
|
+
this.error = false;
|
|
4656
|
+
this.info = false;
|
|
4657
|
+
this.label = false;
|
|
4658
|
+
this.primary = false;
|
|
4659
|
+
this.secondary = false;
|
|
4660
|
+
this.subtle = false;
|
|
4661
|
+
this.success = false;
|
|
4662
|
+
this.tertiary = false;
|
|
4663
|
+
this.warning = false;
|
|
4664
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
4665
|
+
}
|
|
4666
|
+
|
|
4667
|
+
// function to define props used within the scope of this component
|
|
4668
|
+
static get properties() {
|
|
4669
|
+
return {
|
|
4670
|
+
...super.properties,
|
|
4671
|
+
accent: {
|
|
4672
|
+
type: Boolean,
|
|
4673
|
+
reflect: true
|
|
4674
|
+
},
|
|
4675
|
+
ariaHidden: {
|
|
4676
|
+
type: String,
|
|
4677
|
+
reflect: true
|
|
4678
|
+
},
|
|
4679
|
+
category: {
|
|
4680
|
+
type: String,
|
|
4681
|
+
reflect: true
|
|
4682
|
+
},
|
|
4683
|
+
customColor: {
|
|
4684
|
+
type: Boolean
|
|
4685
|
+
},
|
|
4686
|
+
customSvg: {
|
|
4687
|
+
type: Boolean
|
|
4688
|
+
},
|
|
4689
|
+
disabled: {
|
|
4690
|
+
type: Boolean,
|
|
4691
|
+
reflect: true
|
|
4692
|
+
},
|
|
4693
|
+
emphasis: {
|
|
4694
|
+
type: Boolean,
|
|
4695
|
+
reflect: true
|
|
4696
|
+
},
|
|
4697
|
+
error: {
|
|
4698
|
+
type: Boolean,
|
|
4699
|
+
reflect: true
|
|
4700
|
+
},
|
|
4701
|
+
info: {
|
|
4702
|
+
type: Boolean,
|
|
4703
|
+
reflect: true
|
|
4704
|
+
},
|
|
4705
|
+
label: {
|
|
4706
|
+
type: Boolean,
|
|
4707
|
+
reflect: true
|
|
4708
|
+
},
|
|
4709
|
+
name: {
|
|
4710
|
+
type: String,
|
|
4711
|
+
reflect: true
|
|
4712
|
+
},
|
|
4713
|
+
primary: {
|
|
4714
|
+
type: Boolean,
|
|
4715
|
+
reflect: true
|
|
4716
|
+
},
|
|
4717
|
+
secondary: {
|
|
4718
|
+
type: Boolean,
|
|
4719
|
+
reflect: true
|
|
4720
|
+
},
|
|
4721
|
+
subtle: {
|
|
4722
|
+
type: Boolean,
|
|
4723
|
+
reflect: true
|
|
4724
|
+
},
|
|
4725
|
+
success: {
|
|
4726
|
+
type: Boolean,
|
|
4727
|
+
reflect: true
|
|
4728
|
+
},
|
|
4729
|
+
tertiary: {
|
|
4730
|
+
type: Boolean,
|
|
4731
|
+
reflect: true
|
|
4732
|
+
},
|
|
4733
|
+
uri: {
|
|
4734
|
+
type: String
|
|
4735
|
+
},
|
|
4736
|
+
warning: {
|
|
4737
|
+
type: Boolean,
|
|
4738
|
+
reflect: true
|
|
4739
|
+
}
|
|
4740
|
+
};
|
|
4741
|
+
}
|
|
4742
|
+
|
|
4743
|
+
static get styles() {
|
|
4744
|
+
return [
|
|
4745
|
+
super.styles,
|
|
4746
|
+
i$5`${tokensCss$2}`,
|
|
4747
|
+
i$5`${styleCss$3}`,
|
|
4748
|
+
i$5`${colorCss$3}`
|
|
4749
|
+
];
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
/**
|
|
4753
|
+
* This will register this element with the browser.
|
|
4754
|
+
* @param {string} [name="auro-icon"] - The name of element that you want to register to.
|
|
4755
|
+
*
|
|
4756
|
+
* @example
|
|
4757
|
+
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
4758
|
+
*
|
|
4759
|
+
*/
|
|
4760
|
+
static register(name = "auro-icon") {
|
|
4761
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
4762
|
+
}
|
|
4763
|
+
|
|
4764
|
+
connectedCallback() {
|
|
4765
|
+
super.connectedCallback();
|
|
4766
|
+
|
|
4767
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
4768
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
/**
|
|
4772
|
+
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
4773
|
+
*/
|
|
4774
|
+
exposeCssParts() {
|
|
4775
|
+
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4778
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
4779
|
+
render() {
|
|
4780
|
+
const a11y = {
|
|
4781
|
+
'labelContainer': true,
|
|
4782
|
+
'util_displayHiddenVisually': !this.label
|
|
4783
|
+
};
|
|
4784
|
+
|
|
4785
|
+
const classes = {
|
|
4786
|
+
'label': this.label,
|
|
4787
|
+
'wrapper': true,
|
|
4788
|
+
};
|
|
4789
|
+
|
|
4790
|
+
return x`
|
|
4791
|
+
<div
|
|
4792
|
+
class="${e(classes)}"
|
|
4793
|
+
title="${o(this.title || undefined)}">
|
|
4794
|
+
<span aria-hidden="${o(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
4795
|
+
${this.customSvg ? x`
|
|
4796
|
+
<slot name="svg"></slot>
|
|
4797
|
+
` : x`
|
|
4798
|
+
${this.svg}
|
|
4799
|
+
`
|
|
4800
|
+
}
|
|
4801
|
+
</span>
|
|
4802
|
+
|
|
4803
|
+
<div class="${e(a11y)}">
|
|
4804
|
+
<slot></slot>
|
|
4805
|
+
</div>
|
|
4806
|
+
</div>
|
|
4807
|
+
`;
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
|
|
4811
|
+
var iconVersion = '6.1.2';
|
|
4812
|
+
|
|
4813
|
+
var checkmarkIcon = {"role":"img","color":"currentColor","title":"","desc":"a small check mark.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"checkmark-sm","category":"interface","svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
4814
|
+
|
|
4815
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4816
|
+
// See LICENSE in the project root for license information.
|
|
4817
|
+
|
|
4818
|
+
|
|
4819
|
+
/**
|
|
4820
|
+
* The auro-menu element provides users a way to define a menu option.
|
|
4821
|
+
*
|
|
4822
|
+
* @attr {String} value - Specifies the value to be sent to a server.
|
|
4823
|
+
* @attr {String} noCheckmark - When true, selected option will not show the checkmark.
|
|
4824
|
+
* @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
|
|
4825
|
+
* @attr {Boolean} selected - Specifies that an option is selected.
|
|
4826
|
+
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
4827
|
+
* @slot - Specifies text for an option, but is not the value.
|
|
4828
|
+
*/
|
|
4829
|
+
class AuroMenuOption extends r {
|
|
4830
|
+
constructor() {
|
|
4831
|
+
super();
|
|
4832
|
+
|
|
4833
|
+
/**
|
|
4834
|
+
* Generate unique names for dependency components.
|
|
4835
|
+
*/
|
|
4836
|
+
const versioning = new AuroDependencyVersioning();
|
|
4837
|
+
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
4838
|
+
|
|
4839
|
+
this.selected = false;
|
|
4840
|
+
this.nocheckmark = false;
|
|
4841
|
+
this.disabled = false;
|
|
4842
|
+
|
|
4843
|
+
/**
|
|
4844
|
+
* @private
|
|
4845
|
+
*/
|
|
4846
|
+
this.tabIndex = -1;
|
|
4847
|
+
|
|
4848
|
+
/**
|
|
4849
|
+
* @private
|
|
4850
|
+
*/
|
|
4851
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
4852
|
+
}
|
|
4853
|
+
|
|
4854
|
+
static get properties() {
|
|
4855
|
+
return {
|
|
4856
|
+
nocheckmark: {
|
|
4857
|
+
type: Boolean,
|
|
4858
|
+
reflect: true
|
|
4859
|
+
},
|
|
4860
|
+
selected: {
|
|
4861
|
+
type: Boolean,
|
|
4862
|
+
reflect: true
|
|
4863
|
+
},
|
|
4864
|
+
disabled: {
|
|
4865
|
+
type: Boolean,
|
|
4866
|
+
reflect: true
|
|
4867
|
+
},
|
|
4868
|
+
value: {
|
|
4869
|
+
type: String
|
|
4870
|
+
},
|
|
4871
|
+
tabIndex: {
|
|
4872
|
+
type: Number,
|
|
4873
|
+
reflect: true
|
|
4874
|
+
}
|
|
4875
|
+
};
|
|
4876
|
+
}
|
|
4877
|
+
|
|
4878
|
+
static get styles() {
|
|
4879
|
+
return [
|
|
4880
|
+
styleCss$1,
|
|
4881
|
+
colorCss$1,
|
|
4882
|
+
tokensCss$1
|
|
4883
|
+
];
|
|
4884
|
+
}
|
|
4885
|
+
|
|
4886
|
+
/**
|
|
4887
|
+
* This will register this element with the browser.
|
|
4888
|
+
* @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
|
|
4889
|
+
*
|
|
4890
|
+
* @example
|
|
4891
|
+
* AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
|
|
4892
|
+
*
|
|
4893
|
+
*/
|
|
4894
|
+
static register(name = "auro-menuoption") {
|
|
4895
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
4896
|
+
}
|
|
4897
|
+
|
|
4898
|
+
firstUpdated() {
|
|
4899
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
4900
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
|
|
4901
|
+
|
|
4902
|
+
this.setAttribute('role', 'option');
|
|
4903
|
+
this.setAttribute('aria-selected', 'false');
|
|
4904
|
+
|
|
4905
|
+
this.addEventListener('mouseover', () => {
|
|
4906
|
+
this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
|
|
4907
|
+
bubbles: true,
|
|
4908
|
+
cancelable: false,
|
|
4909
|
+
composed: true,
|
|
4910
|
+
detail: this
|
|
4911
|
+
}));
|
|
4912
|
+
});
|
|
4913
|
+
}
|
|
4914
|
+
|
|
4915
|
+
// observer for selected property changes
|
|
4916
|
+
updated(changedProperties) {
|
|
4917
|
+
if (changedProperties.has('selected')) {
|
|
4918
|
+
this.setAttribute('aria-selected', this.selected.toString());
|
|
4919
|
+
}
|
|
4920
|
+
}
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* Generates an HTML element containing an SVG icon based on the provided `svgContent`.
|
|
4924
|
+
*
|
|
4925
|
+
* @private
|
|
4926
|
+
* @param {string} svgContent - The SVG content to be embedded.
|
|
4927
|
+
* @returns {Element} The HTML element containing the SVG icon.
|
|
4928
|
+
*/
|
|
4929
|
+
generateIconHtml(svgContent) {
|
|
4930
|
+
const dom = new DOMParser().parseFromString(svgContent, 'text/html');
|
|
4931
|
+
const svg = dom.body.firstChild;
|
|
4932
|
+
|
|
4933
|
+
svg.setAttribute('slot', 'svg');
|
|
4934
|
+
|
|
4935
|
+
return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
render() {
|
|
4939
|
+
return u`
|
|
4940
|
+
${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
|
|
4941
|
+
<slot></slot>
|
|
4942
|
+
`;
|
|
4943
|
+
}
|
|
4944
|
+
}
|
|
4945
|
+
|
|
4946
|
+
AuroMenu.register();
|
|
4947
|
+
AuroMenuOption.register();
|
|
4948
|
+
|
|
4949
|
+
var styleCss = i$c`*,*: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}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}`;
|
|
4950
|
+
|
|
4951
|
+
var colorCss = i$c`*,*: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)}`;
|
|
4952
|
+
|
|
4953
|
+
var tokensCss = i$c`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
|
|
4954
|
+
|
|
4955
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4956
|
+
// See LICENSE in the project root for license information.
|
|
4957
|
+
|
|
4958
|
+
|
|
4959
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
4960
|
+
/**
|
|
4961
|
+
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
4962
|
+
*
|
|
4963
|
+
* @slot - Default slot for the menu content.
|
|
4964
|
+
* @slot label - Defines the content of the label.
|
|
4965
|
+
* @slot helpText - Defines the content of the helpText.
|
|
4966
|
+
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
4967
|
+
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
4968
|
+
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
4969
|
+
* @csspart helpText - Apply CSS to the help text.
|
|
4970
|
+
*/
|
|
4971
|
+
|
|
4972
|
+
// build the component class
|
|
4973
|
+
class AuroSelect extends r$5 {
|
|
4974
|
+
constructor() {
|
|
4975
|
+
super();
|
|
4976
|
+
|
|
4977
|
+
this.optionSelected = undefined;
|
|
4978
|
+
this.value = undefined;
|
|
4979
|
+
|
|
4980
|
+
const idLength = 36;
|
|
4981
|
+
const idSubstrEnd = 8;
|
|
4982
|
+
const idSubstrStart = 2;
|
|
4983
|
+
|
|
4984
|
+
/**
|
|
4985
|
+
* @private
|
|
4986
|
+
*/
|
|
4987
|
+
this.uniqueId = Math.random().
|
|
4988
|
+
toString(idLength).
|
|
4989
|
+
substring(idSubstrStart, idSubstrEnd);
|
|
4990
|
+
|
|
4991
|
+
/**
|
|
4992
|
+
* @private
|
|
4993
|
+
*/
|
|
3305
4994
|
this.validation = new AuroFormValidation();
|
|
3306
4995
|
|
|
3307
4996
|
/**
|
|
3308
4997
|
* @private
|
|
3309
4998
|
*/
|
|
3310
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4999
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
3311
5000
|
|
|
3312
5001
|
/**
|
|
3313
5002
|
* Generate unique names for dependency components.
|
|
3314
5003
|
*/
|
|
3315
|
-
const versioning = new AuroDependencyVersioning$
|
|
5004
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
3316
5005
|
|
|
3317
5006
|
/**
|
|
3318
5007
|
* @private
|
|
@@ -3339,68 +5028,131 @@ class AuroSelect extends r$4 {
|
|
|
3339
5028
|
// to understand how to use reflected attributes with your property settings.
|
|
3340
5029
|
static get properties() {
|
|
3341
5030
|
return {
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
5031
|
+
|
|
5032
|
+
/**
|
|
5033
|
+
* When attribute is present, element shows disabled state.
|
|
5034
|
+
*/
|
|
5035
|
+
disabled: {
|
|
5036
|
+
type: Boolean,
|
|
5037
|
+
reflect: true
|
|
3345
5038
|
},
|
|
3346
|
-
|
|
3347
|
-
|
|
5039
|
+
|
|
5040
|
+
/**
|
|
5041
|
+
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
5042
|
+
*/
|
|
5043
|
+
flexMenuWidth: {
|
|
5044
|
+
type: Boolean,
|
|
5045
|
+
reflect: true
|
|
5046
|
+
},
|
|
5047
|
+
|
|
5048
|
+
/**
|
|
5049
|
+
* When true, checkmark on selected option will no longer be present.
|
|
5050
|
+
*/
|
|
5051
|
+
noCheckmark: {
|
|
5052
|
+
type: Boolean,
|
|
5053
|
+
reflect: true
|
|
3348
5054
|
},
|
|
5055
|
+
|
|
5056
|
+
/**
|
|
5057
|
+
* If set, disables auto-validation on blur.
|
|
5058
|
+
*/
|
|
3349
5059
|
noValidate: {
|
|
3350
5060
|
type: Boolean,
|
|
3351
5061
|
reflect: true
|
|
3352
5062
|
},
|
|
5063
|
+
|
|
5064
|
+
/**
|
|
5065
|
+
* @private
|
|
5066
|
+
*/
|
|
5067
|
+
optionActive: {
|
|
5068
|
+
type: Object
|
|
5069
|
+
},
|
|
5070
|
+
|
|
5071
|
+
/**
|
|
5072
|
+
* Specifies the current selected menuOption.
|
|
5073
|
+
*/
|
|
5074
|
+
optionSelected: {
|
|
5075
|
+
// Allow HTMLElement[] arrays and undefined
|
|
5076
|
+
converter: arrayConverter,
|
|
5077
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
5078
|
+
},
|
|
5079
|
+
|
|
5080
|
+
/**
|
|
5081
|
+
* @private
|
|
5082
|
+
*/
|
|
5083
|
+
options: {
|
|
5084
|
+
type: Array
|
|
5085
|
+
},
|
|
5086
|
+
|
|
5087
|
+
/**
|
|
5088
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
5089
|
+
*/
|
|
3353
5090
|
required: {
|
|
3354
5091
|
type: Boolean,
|
|
3355
5092
|
reflect: true
|
|
3356
5093
|
},
|
|
5094
|
+
|
|
5095
|
+
/**
|
|
5096
|
+
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
5097
|
+
*/
|
|
3357
5098
|
error: {
|
|
3358
5099
|
type: String,
|
|
3359
5100
|
reflect: true
|
|
3360
5101
|
},
|
|
5102
|
+
|
|
5103
|
+
/**
|
|
5104
|
+
* Sets a custom help text message to display for all validityStates.
|
|
5105
|
+
*/
|
|
3361
5106
|
setCustomValidity: {
|
|
3362
5107
|
type: String
|
|
3363
5108
|
},
|
|
5109
|
+
|
|
5110
|
+
/**
|
|
5111
|
+
* Custom help text message to display when validity = `customError`.
|
|
5112
|
+
*/
|
|
3364
5113
|
setCustomValidityCustomError: {
|
|
3365
5114
|
type: String
|
|
3366
5115
|
},
|
|
5116
|
+
|
|
5117
|
+
/**
|
|
5118
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
5119
|
+
*/
|
|
3367
5120
|
setCustomValidityValueMissing: {
|
|
3368
5121
|
type: String
|
|
3369
5122
|
},
|
|
5123
|
+
|
|
5124
|
+
/**
|
|
5125
|
+
* Specifies the `validityState` this element is in.
|
|
5126
|
+
*/
|
|
3370
5127
|
validity: {
|
|
3371
5128
|
type: String,
|
|
3372
5129
|
reflect: true
|
|
3373
5130
|
},
|
|
3374
|
-
disabled: {
|
|
3375
|
-
type: Boolean,
|
|
3376
|
-
reflect: true
|
|
3377
|
-
},
|
|
3378
|
-
noCheckmark: {
|
|
3379
|
-
type: Boolean,
|
|
3380
|
-
reflect: true
|
|
3381
|
-
},
|
|
3382
|
-
flexMenuWidth: {
|
|
3383
|
-
type: Boolean,
|
|
3384
|
-
reflect: true
|
|
3385
|
-
},
|
|
3386
|
-
placeholder: { type: String },
|
|
3387
5131
|
|
|
3388
5132
|
/**
|
|
3389
|
-
*
|
|
5133
|
+
* Value selected for the component.
|
|
3390
5134
|
*/
|
|
3391
|
-
|
|
5135
|
+
value: {
|
|
5136
|
+
// Allow string[] arrays and undefined
|
|
5137
|
+
converter: arrayConverter,
|
|
5138
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
5139
|
+
},
|
|
3392
5140
|
|
|
3393
5141
|
/**
|
|
3394
|
-
*
|
|
5142
|
+
* Sets multi-select mode, allowing multiple options to be selected at once.
|
|
3395
5143
|
*/
|
|
3396
|
-
|
|
5144
|
+
multiSelect: {
|
|
5145
|
+
type: Boolean,
|
|
5146
|
+
reflect: true,
|
|
5147
|
+
attribute: 'multiselect'
|
|
5148
|
+
},
|
|
3397
5149
|
};
|
|
3398
5150
|
}
|
|
3399
5151
|
|
|
3400
5152
|
static get styles() {
|
|
3401
5153
|
return [
|
|
3402
|
-
styleCss,
|
|
3403
5154
|
colorCss,
|
|
5155
|
+
styleCss,
|
|
3404
5156
|
tokensCss
|
|
3405
5157
|
];
|
|
3406
5158
|
}
|
|
@@ -3431,40 +5183,35 @@ class AuroSelect extends r$4 {
|
|
|
3431
5183
|
*
|
|
3432
5184
|
*/
|
|
3433
5185
|
static register(name = "auro-select") {
|
|
3434
|
-
AuroLibraryRuntimeUtils$
|
|
5186
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroSelect);
|
|
3435
5187
|
}
|
|
3436
5188
|
|
|
3437
5189
|
/**
|
|
3438
|
-
* Updates the displayed value in an Auro dropdown component based on
|
|
3439
|
-
* @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.
|
|
5190
|
+
* Updates the displayed value in an Auro dropdown component based on optionSelected.
|
|
3440
5191
|
* @private
|
|
3441
5192
|
* @returns {void}
|
|
3442
5193
|
*/
|
|
3443
|
-
updateDisplayedValue(
|
|
5194
|
+
updateDisplayedValue() {
|
|
3444
5195
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
3445
5196
|
|
|
3446
|
-
//
|
|
3447
|
-
triggerContentEl.
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
// create a new span element with the value string
|
|
3453
|
-
const valueElem = document.createElement('span');
|
|
3454
|
-
valueElem.setAttribute('valuestr', true);
|
|
3455
|
-
valueElem.textContent = option;
|
|
5197
|
+
// Clear everything except placeholder
|
|
5198
|
+
const placeholder = triggerContentEl.querySelector('#placeholder');
|
|
5199
|
+
triggerContentEl.innerHTML = '';
|
|
5200
|
+
if (placeholder) {
|
|
5201
|
+
triggerContentEl.appendChild(placeholder);
|
|
5202
|
+
}
|
|
3456
5203
|
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
const clone = option.cloneNode(true);
|
|
3462
|
-
clone.removeAttribute('selected');
|
|
3463
|
-
clone.removeAttribute('class');
|
|
5204
|
+
// Handle selected options
|
|
5205
|
+
if (this.optionSelected && this.optionSelected.length) {
|
|
5206
|
+
// Create display text from selected options
|
|
5207
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
3464
5208
|
|
|
3465
|
-
|
|
3466
|
-
|
|
5209
|
+
const span = document.createElement('span');
|
|
5210
|
+
span.textContent = displayText;
|
|
5211
|
+
triggerContentEl.appendChild(span);
|
|
3467
5212
|
}
|
|
5213
|
+
|
|
5214
|
+
this.dropdown.requestUpdate();
|
|
3468
5215
|
}
|
|
3469
5216
|
|
|
3470
5217
|
/**
|
|
@@ -3474,7 +5221,7 @@ class AuroSelect extends r$4 {
|
|
|
3474
5221
|
*/
|
|
3475
5222
|
configureMenu() {
|
|
3476
5223
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
3477
|
-
|
|
5224
|
+
|
|
3478
5225
|
// racing condition on custom-select with custom-menu
|
|
3479
5226
|
if (!this.menu) {
|
|
3480
5227
|
setTimeout(() => {
|
|
@@ -3483,6 +5230,11 @@ class AuroSelect extends r$4 {
|
|
|
3483
5230
|
return;
|
|
3484
5231
|
}
|
|
3485
5232
|
|
|
5233
|
+
if (this.multiSelect) {
|
|
5234
|
+
this.menu.multiSelect = this.multiSelect;
|
|
5235
|
+
}
|
|
5236
|
+
|
|
5237
|
+
this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
|
|
3486
5238
|
this.menu.setAttribute('aria-hidden', 'true');
|
|
3487
5239
|
|
|
3488
5240
|
this.generateOptionsArray();
|
|
@@ -3492,10 +5244,10 @@ class AuroSelect extends r$4 {
|
|
|
3492
5244
|
});
|
|
3493
5245
|
|
|
3494
5246
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
5247
|
+
// Get array of selected options from menu
|
|
3495
5248
|
this.optionSelected = this.menu.optionSelected;
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
this.updateDisplayedValue(this.optionSelected);
|
|
5249
|
+
// For single select, we still use arrays but only take first value
|
|
5250
|
+
this.value = this.menu.value;
|
|
3499
5251
|
|
|
3500
5252
|
if (this.dropdown.isPopoverVisible) {
|
|
3501
5253
|
this.dropdown.hide();
|
|
@@ -3510,25 +5262,11 @@ class AuroSelect extends r$4 {
|
|
|
3510
5262
|
* with `auro-select.value`.
|
|
3511
5263
|
*/
|
|
3512
5264
|
this.menu.addEventListener('auroMenu-selectValueFailure', () => {
|
|
3513
|
-
this.menu.
|
|
3514
|
-
this.optionSelected = this.menu.optionSelected;
|
|
3515
|
-
|
|
3516
|
-
this.validity = 'badInput';
|
|
3517
|
-
|
|
3518
|
-
// Capitalizes the first letter of each word in this.value string
|
|
3519
|
-
const valueStr = this.value.replace(/(^\w{1})|(\s+\w{1})/gu, (letter) => letter.toUpperCase());
|
|
3520
|
-
|
|
3521
|
-
// Pass the new string to the trigger content
|
|
3522
|
-
this.updateDisplayedValue(valueStr);
|
|
5265
|
+
this.menu.clearSelection();
|
|
3523
5266
|
});
|
|
3524
5267
|
|
|
3525
5268
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
3526
|
-
|
|
3527
|
-
this.updateDisplayedValue(this.placeholder);
|
|
3528
|
-
|
|
3529
|
-
this.optionSelected = undefined;
|
|
3530
|
-
this.value = undefined;
|
|
3531
|
-
|
|
5269
|
+
this.optionSelected = this.menu.optionSelected;
|
|
3532
5270
|
this.validation.validate(this);
|
|
3533
5271
|
});
|
|
3534
5272
|
}
|
|
@@ -3549,7 +5287,7 @@ class AuroSelect extends r$4 {
|
|
|
3549
5287
|
this.dropdown.show();
|
|
3550
5288
|
|
|
3551
5289
|
if (this.dropdown.isPopoverVisible) {
|
|
3552
|
-
this.menu.
|
|
5290
|
+
this.menu.navigateOptions('up');
|
|
3553
5291
|
}
|
|
3554
5292
|
}
|
|
3555
5293
|
|
|
@@ -3559,7 +5297,7 @@ class AuroSelect extends r$4 {
|
|
|
3559
5297
|
this.dropdown.show();
|
|
3560
5298
|
|
|
3561
5299
|
if (this.dropdown.isPopoverVisible) {
|
|
3562
|
-
this.menu.
|
|
5300
|
+
this.menu.navigateOptions('down');
|
|
3563
5301
|
}
|
|
3564
5302
|
}
|
|
3565
5303
|
|
|
@@ -3580,8 +5318,6 @@ class AuroSelect extends r$4 {
|
|
|
3580
5318
|
this.addEventListener('blur', () => {
|
|
3581
5319
|
this.validation.validate(this);
|
|
3582
5320
|
});
|
|
3583
|
-
|
|
3584
|
-
this.labelForSr();
|
|
3585
5321
|
}
|
|
3586
5322
|
|
|
3587
5323
|
/**
|
|
@@ -3624,7 +5360,7 @@ class AuroSelect extends r$4 {
|
|
|
3624
5360
|
* input as no longer in the initial state.
|
|
3625
5361
|
*/
|
|
3626
5362
|
if (this.value === undefined) {
|
|
3627
|
-
this.value =
|
|
5363
|
+
this.value = undefined;
|
|
3628
5364
|
this.removeEventListener('focusin', this.handleFocusin);
|
|
3629
5365
|
}
|
|
3630
5366
|
}
|
|
@@ -3682,11 +5418,15 @@ class AuroSelect extends r$4 {
|
|
|
3682
5418
|
}
|
|
3683
5419
|
}
|
|
3684
5420
|
|
|
3685
|
-
updated(changedProperties) {
|
|
3686
|
-
// After the component is ready, send direct value changes to auro-menu.
|
|
5421
|
+
async updated(changedProperties) {
|
|
3687
5422
|
if (changedProperties.has('value')) {
|
|
3688
5423
|
if (this.value) {
|
|
3689
5424
|
this.menu.value = this.value;
|
|
5425
|
+
|
|
5426
|
+
// Wait for menu to finish updating its value
|
|
5427
|
+
await this.menu.updateComplete;
|
|
5428
|
+
|
|
5429
|
+
this.optionSelected = this.menu.optionSelected;
|
|
3690
5430
|
} else {
|
|
3691
5431
|
this.menu.value = undefined;
|
|
3692
5432
|
}
|
|
@@ -3700,8 +5440,12 @@ class AuroSelect extends r$4 {
|
|
|
3700
5440
|
}));
|
|
3701
5441
|
}
|
|
3702
5442
|
|
|
5443
|
+
if (changedProperties.has('optionSelected')) {
|
|
5444
|
+
this.updateDisplayedValue();
|
|
5445
|
+
}
|
|
5446
|
+
|
|
3703
5447
|
if (changedProperties.has('error')) {
|
|
3704
|
-
this.
|
|
5448
|
+
this.validate(true);
|
|
3705
5449
|
}
|
|
3706
5450
|
}
|
|
3707
5451
|
|
|
@@ -3714,44 +5458,11 @@ class AuroSelect extends r$4 {
|
|
|
3714
5458
|
}
|
|
3715
5459
|
|
|
3716
5460
|
/**
|
|
3717
|
-
*
|
|
3718
|
-
* @
|
|
3719
|
-
* @returns {void}
|
|
5461
|
+
* Validates value.
|
|
5462
|
+
* @param {boolean} [force=false] - Whether to force validation.
|
|
3720
5463
|
*/
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
const textId = "label";
|
|
3724
|
-
|
|
3725
|
-
placeholderLabel.setAttribute("id", textId);
|
|
3726
|
-
placeholderLabel.setAttribute("aria-live", "polite");
|
|
3727
|
-
|
|
3728
|
-
const styles = {
|
|
3729
|
-
position: 'absolute',
|
|
3730
|
-
overflow: 'hidden',
|
|
3731
|
-
clipPath: 'inset(1px, 1px, 1px, 1px)',
|
|
3732
|
-
width: '1px',
|
|
3733
|
-
height: '1px',
|
|
3734
|
-
padding: '0',
|
|
3735
|
-
border: '0'
|
|
3736
|
-
};
|
|
3737
|
-
|
|
3738
|
-
Object.assign(placeholderLabel.style, styles);
|
|
3739
|
-
|
|
3740
|
-
this.addEventListener('focus', () => {
|
|
3741
|
-
document.body.appendChild(placeholderLabel);
|
|
3742
|
-
|
|
3743
|
-
if (!this.optionSelected) {
|
|
3744
|
-
document.getElementById(textId).innerHTML = this.placeholder;
|
|
3745
|
-
} else {
|
|
3746
|
-
document.getElementById(textId).innerHTML = `${this.optionSelected.innerText}, ${this.placeholder}`;
|
|
3747
|
-
}
|
|
3748
|
-
});
|
|
3749
|
-
|
|
3750
|
-
this.addEventListener('blur', () => {
|
|
3751
|
-
if (document.contains(placeholderLabel)) {
|
|
3752
|
-
document.body.removeChild(placeholderLabel);
|
|
3753
|
-
}
|
|
3754
|
-
});
|
|
5464
|
+
validate(force = false) {
|
|
5465
|
+
this.validation.validate(this, force);
|
|
3755
5466
|
}
|
|
3756
5467
|
|
|
3757
5468
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
@@ -3759,18 +5470,22 @@ class AuroSelect extends r$4 {
|
|
|
3759
5470
|
|
|
3760
5471
|
// function that renders the HTML and CSS into the scope of the component
|
|
3761
5472
|
render() {
|
|
3762
|
-
|
|
5473
|
+
const placeholderClass = {
|
|
5474
|
+
hidden: this.value,
|
|
5475
|
+
};
|
|
5476
|
+
|
|
5477
|
+
return u$4`
|
|
3763
5478
|
<div class="outerWrapper">
|
|
3764
5479
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
3765
5480
|
${this.optionActive && this.options.length > 0
|
|
3766
|
-
? u$
|
|
5481
|
+
? u$4`
|
|
3767
5482
|
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
3768
5483
|
`
|
|
3769
5484
|
: undefined
|
|
3770
5485
|
};
|
|
3771
5486
|
|
|
3772
5487
|
${this.optionSelected && this.options.length > 0
|
|
3773
|
-
? u$
|
|
5488
|
+
? u$4`
|
|
3774
5489
|
${`${this.optionSelected.innerText} selected`}
|
|
3775
5490
|
`
|
|
3776
5491
|
: undefined
|
|
@@ -3785,20 +5500,20 @@ class AuroSelect extends r$4 {
|
|
|
3785
5500
|
chevron
|
|
3786
5501
|
part="dropdown">
|
|
3787
5502
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
3788
|
-
|
|
5503
|
+
<span id="placeholder" class="${e$6(placeholderClass)}"><slot name="placeholder"></slot></span>
|
|
3789
5504
|
</span>
|
|
3790
5505
|
<div class="menuWrapper">
|
|
3791
5506
|
</div>
|
|
3792
5507
|
<slot name="label" slot="label"></slot>
|
|
3793
5508
|
<span slot="helpText">
|
|
3794
5509
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
3795
|
-
? u$
|
|
5510
|
+
? u$4`
|
|
3796
5511
|
<p class="selectElement-helpText" id="${this.uniqueId}" part="helpText">
|
|
3797
5512
|
<slot name="helpText"></slot>
|
|
3798
5513
|
</p>`
|
|
3799
|
-
: u$
|
|
5514
|
+
: u$4`
|
|
3800
5515
|
<p class="selectElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
3801
|
-
${this.
|
|
5516
|
+
${this.errorMessage}
|
|
3802
5517
|
</p>`
|
|
3803
5518
|
}
|
|
3804
5519
|
</span>
|