@aurodesignsystem/auro-formkit 2.0.0-beta.42 → 2.0.0-beta.43
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/CHANGELOG.md +18 -0
- package/NOTICE +2 -0
- package/README.md +116 -48
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +0 -1
- package/components/bibtemplate/dist/headerVersion.d.ts +0 -1
- package/components/bibtemplate/dist/iconVersion.d.ts +0 -1
- package/components/bibtemplate/dist/index.d.ts +0 -1
- package/components/bibtemplate/dist/index.js +8 -10
- package/components/bibtemplate/dist/registered.js +790 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts +0 -1
- package/components/bibtemplate/dist/styles/style-css.d.ts +0 -1
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +0 -1
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +38 -229
- package/components/checkbox/demo/index.html +49 -0
- package/components/checkbox/demo/index.min.js +38 -229
- package/components/checkbox/dist/auro-checkbox-group.d.ts +0 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +0 -1
- package/components/checkbox/dist/index.d.ts +0 -1
- package/components/checkbox/dist/index.js +38 -232
- package/components/checkbox/dist/registered.js +1032 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +0 -1
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +0 -1
- package/components/checkbox/dist/styles/color-css.d.ts +0 -1
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +0 -1
- package/components/checkbox/dist/styles/tokens-css.d.ts +0 -1
- package/components/combobox/README.md +4 -4
- package/components/combobox/demo/api.js +1 -1
- package/components/combobox/demo/api.min.js +409 -2166
- package/components/combobox/demo/index.html +57 -0
- package/components/combobox/demo/index.js +1 -1
- package/components/combobox/demo/index.min.js +409 -2166
- package/components/combobox/dist/auro-combobox.d.ts +0 -1
- package/components/combobox/dist/bibtemplateVersion.d.ts +0 -1
- package/components/combobox/dist/dropdownVersion.d.ts +0 -1
- package/components/combobox/dist/index.d.ts +0 -1
- package/components/combobox/dist/index.js +452 -2211
- package/components/combobox/dist/inputVersion.d.ts +0 -1
- package/components/combobox/dist/registered.js +9716 -0
- package/components/combobox/dist/styles/style-css.d.ts +0 -1
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.js +1 -1
- package/components/counter/demo/api.min.js +128 -321
- package/components/counter/demo/index.html +53 -0
- package/components/counter/demo/index.min.js +128 -321
- package/components/counter/dist/auro-counter-button.d.ts +0 -1
- package/components/counter/dist/auro-counter-group.d.ts +0 -1
- package/components/counter/dist/auro-counter-wrapper.d.ts +0 -1
- package/components/counter/dist/auro-counter.d.ts +0 -1
- package/components/counter/dist/dropdownVersion.d.ts +0 -1
- package/components/counter/dist/iconVersion.d.ts +0 -1
- package/components/counter/dist/index.d.ts +0 -1
- package/components/counter/dist/index.js +128 -324
- package/components/counter/dist/registered.js +5158 -0
- package/components/counter/dist/styles/color-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-button-color-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-button-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-group-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +0 -1
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +0 -1
- package/components/counter/dist/styles/style-css.d.ts +0 -1
- package/components/counter/dist/styles/tokens-css.d.ts +0 -1
- package/components/datepicker/README.md +4 -4
- package/components/datepicker/demo/api.js +1 -1
- package/components/datepicker/demo/api.min.js +338 -728
- package/components/datepicker/demo/index.html +57 -0
- package/components/datepicker/demo/index.min.js +338 -728
- package/components/datepicker/dist/auro-calendar-cell.d.ts +0 -1
- package/components/datepicker/dist/auro-calendar-month.d.ts +0 -1
- package/components/datepicker/dist/auro-calendar.d.ts +0 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +0 -1
- package/components/datepicker/dist/dropdownVersion.d.ts +0 -1
- package/components/datepicker/dist/index.d.ts +0 -1
- package/components/datepicker/dist/index.js +338 -730
- package/components/datepicker/dist/inputVersion.d.ts +0 -1
- package/components/datepicker/dist/popoverVersion.d.ts +0 -1
- package/components/datepicker/dist/registered.js +18935 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +0 -1
- package/components/datepicker/dist/styles/color-cell-css.d.ts +0 -1
- package/components/datepicker/dist/styles/color-css.d.ts +0 -1
- package/components/datepicker/dist/styles/color-month-css.d.ts +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +0 -1
- package/components/datepicker/dist/styles/style-css.d.ts +0 -1
- package/components/datepicker/dist/styles/tokens-css.d.ts +0 -1
- package/components/datepicker/dist/utilities.d.ts +0 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts +0 -1
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +0 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.js +1 -1
- package/components/dropdown/demo/api.min.js +76 -267
- package/components/dropdown/demo/index.html +53 -0
- package/components/dropdown/demo/index.min.js +76 -267
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -1
- package/components/dropdown/dist/dropdownVersion.d.ts +0 -1
- package/components/dropdown/dist/iconVersion.d.ts +0 -1
- package/components/dropdown/dist/index.d.ts +0 -1
- package/components/dropdown/dist/index.js +76 -269
- package/components/dropdown/dist/registered.js +3167 -0
- package/components/dropdown/dist/styles/bibColors-css.d.ts +0 -1
- package/components/dropdown/dist/styles/bibStyles-css.d.ts +0 -1
- package/components/dropdown/dist/styles/color-css.d.ts +0 -1
- package/components/dropdown/dist/styles/style-css.d.ts +0 -1
- package/components/dropdown/dist/styles/tokens-css.d.ts +0 -1
- package/components/form/README.md +1 -1
- package/components/form/demo/api.js +1 -1
- package/components/form/demo/api.min.js +42 -5
- package/components/form/demo/index.html +48 -0
- package/components/form/demo/index.min.js +42 -5
- package/components/form/dist/auro-form.d.ts +16 -2
- package/components/form/dist/index.d.ts +0 -1
- package/components/form/dist/index.js +42 -7
- package/components/form/dist/registered.d.ts +1 -0
- package/components/form/dist/registered.js +632 -0
- package/components/form/dist/styles/style-css.d.ts +0 -1
- package/components/helptext/dist/auro-helptext.d.ts +0 -1
- package/components/helptext/dist/index.d.ts +0 -1
- package/components/helptext/dist/index.js +4 -6
- package/components/helptext/dist/registered.js +222 -0
- package/components/helptext/dist/styles/color-css.d.ts +0 -1
- package/components/helptext/dist/styles/style-css.d.ts +0 -1
- package/components/helptext/dist/styles/tokens-css.d.ts +0 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +57 -248
- package/components/input/demo/index.html +41 -0
- package/components/input/demo/index.min.js +57 -248
- package/components/input/dist/auro-input.d.ts +0 -1
- package/components/input/dist/base-input.d.ts +0 -1
- package/components/input/dist/buttonVersion.d.ts +0 -1
- package/components/input/dist/i18n.d.ts +0 -1
- package/components/input/dist/iconVersion.d.ts +0 -1
- package/components/input/dist/index.d.ts +0 -1
- package/components/input/dist/index.js +57 -250
- package/components/input/dist/registered.js +4254 -0
- package/components/input/dist/styles/borders-css.d.ts +0 -1
- package/components/input/dist/styles/color-css.d.ts +0 -1
- package/components/input/dist/styles/input-css.d.ts +0 -1
- package/components/input/dist/styles/label-css.d.ts +0 -1
- package/components/input/dist/styles/mixins-css.d.ts +0 -1
- package/components/input/dist/styles/notificationIcons-css.d.ts +0 -1
- package/components/input/dist/styles/style-css.d.ts +0 -1
- package/components/input/dist/styles/tokens-css.d.ts +0 -1
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.js +1 -1
- package/components/menu/demo/api.min.js +9 -9
- package/components/menu/demo/index.html +50 -0
- package/components/menu/demo/index.min.js +9 -9
- package/components/menu/dist/auro-menu-utils.d.ts +0 -1
- package/components/menu/dist/auro-menu.d.ts +0 -1
- package/components/menu/dist/auro-menuoption.d.ts +0 -1
- package/components/{combobox/dist/formkit/auro-dropdownVersion.d.ts → menu/dist/dropdownVersion.d.ts} +0 -1
- package/components/menu/dist/iconVersion.d.ts +0 -1
- package/components/menu/dist/index.d.ts +0 -1
- package/components/menu/dist/index.js +9 -12
- package/components/menu/dist/registered.js +1510 -0
- package/components/menu/dist/styles/color-menu-css.d.ts +0 -1
- package/components/menu/dist/styles/color-menuoption-css.d.ts +0 -1
- package/components/menu/dist/styles/style-menu-css.d.ts +0 -1
- package/components/menu/dist/styles/style-menuoption-css.d.ts +0 -1
- package/components/menu/dist/styles/tokens-css.d.ts +0 -1
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +34 -225
- package/components/radio/demo/index.html +48 -0
- package/components/radio/demo/index.min.js +34 -225
- package/components/radio/dist/auro-radio-group.d.ts +0 -1
- package/components/radio/dist/auro-radio.d.ts +0 -1
- package/components/radio/dist/index.d.ts +0 -1
- package/components/radio/dist/index.js +34 -228
- package/components/radio/dist/registered.js +1149 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +0 -1
- package/components/radio/dist/styles/color-css.d.ts +0 -1
- package/components/radio/dist/styles/groupColor-css.d.ts +0 -1
- package/components/radio/dist/styles/style-css.d.ts +0 -1
- package/components/radio/dist/styles/tokens-css.d.ts +0 -1
- package/components/select/README.md +3 -3
- package/components/select/demo/api.js +1 -1
- package/components/select/demo/api.min.js +234 -1796
- package/components/select/demo/index.html +49 -0
- package/components/select/demo/index.js +1 -1
- package/components/select/demo/index.min.js +234 -1796
- package/components/select/dist/auro-select.d.ts +0 -1
- package/components/select/dist/dropdownVersion.d.ts +0 -1
- package/components/select/dist/index.d.ts +0 -1
- package/components/select/dist/index.js +206 -1770
- package/components/select/dist/registered.js +4367 -0
- package/components/select/dist/styles/color-css.d.ts +0 -1
- package/components/select/dist/styles/style-css.d.ts +0 -1
- package/components/select/dist/styles/tokens-css.d.ts +0 -1
- package/package.json +113 -9
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -3
- package/.turbo/cache/04e52430125e8954-meta.json +0 -1
- package/.turbo/cache/04e52430125e8954.tar.zst +0 -0
- package/.turbo/cache/0593ea8b5b3ed321-meta.json +0 -1
- package/.turbo/cache/0593ea8b5b3ed321.tar.zst +0 -0
- package/.turbo/cache/068b8eef3688b4e2-meta.json +0 -1
- package/.turbo/cache/068b8eef3688b4e2.tar.zst +0 -0
- package/.turbo/cache/06c6468593bc10ab-meta.json +0 -1
- package/.turbo/cache/06c6468593bc10ab.tar.zst +0 -0
- package/.turbo/cache/0c48a4d7b5aac928-meta.json +0 -1
- package/.turbo/cache/0c48a4d7b5aac928.tar.zst +0 -0
- package/.turbo/cache/1959dd19c8cca5b3-meta.json +0 -1
- package/.turbo/cache/1959dd19c8cca5b3.tar.zst +0 -0
- package/.turbo/cache/1c16e59f30927b15-meta.json +0 -1
- package/.turbo/cache/1c16e59f30927b15.tar.zst +0 -0
- package/.turbo/cache/29ac8c4304c43ba8-meta.json +0 -1
- package/.turbo/cache/29ac8c4304c43ba8.tar.zst +0 -0
- package/.turbo/cache/2b46337c7a6faa1f-meta.json +0 -1
- package/.turbo/cache/2b46337c7a6faa1f.tar.zst +0 -0
- package/.turbo/cache/33b12bddab905466-meta.json +0 -1
- package/.turbo/cache/33b12bddab905466.tar.zst +0 -0
- package/.turbo/cache/3e068f9ea52e35fd-meta.json +0 -1
- package/.turbo/cache/3e068f9ea52e35fd.tar.zst +0 -0
- package/.turbo/cache/3f6725da0ddcb57a-meta.json +0 -1
- package/.turbo/cache/3f6725da0ddcb57a.tar.zst +0 -0
- package/.turbo/cache/3fa3b39e63c49920-meta.json +0 -1
- package/.turbo/cache/3fa3b39e63c49920.tar.zst +0 -0
- package/.turbo/cache/3fbb4335136fe72b-meta.json +0 -1
- package/.turbo/cache/3fbb4335136fe72b.tar.zst +0 -0
- package/.turbo/cache/4d32cb975704a7bc-meta.json +0 -1
- package/.turbo/cache/4d32cb975704a7bc.tar.zst +0 -0
- package/.turbo/cache/504dc5478398bc23-meta.json +0 -1
- package/.turbo/cache/504dc5478398bc23.tar.zst +0 -0
- package/.turbo/cache/5736b4ba6916fd8d-meta.json +0 -1
- package/.turbo/cache/5736b4ba6916fd8d.tar.zst +0 -0
- package/.turbo/cache/5aae6a716a40ac0d-meta.json +0 -1
- package/.turbo/cache/5aae6a716a40ac0d.tar.zst +0 -0
- package/.turbo/cache/618b3075ce2d9a61-meta.json +0 -1
- package/.turbo/cache/618b3075ce2d9a61.tar.zst +0 -0
- package/.turbo/cache/67c13dfc4fd939fc-meta.json +0 -1
- package/.turbo/cache/67c13dfc4fd939fc.tar.zst +0 -0
- package/.turbo/cache/68fe65245fb34e68-meta.json +0 -1
- package/.turbo/cache/68fe65245fb34e68.tar.zst +0 -0
- package/.turbo/cache/6a25a3c0fc92f44d-meta.json +0 -1
- package/.turbo/cache/6a25a3c0fc92f44d.tar.zst +0 -0
- package/.turbo/cache/6cd6d76ac166da16-meta.json +0 -1
- package/.turbo/cache/6cd6d76ac166da16.tar.zst +0 -0
- package/.turbo/cache/71cd21072abc2990-meta.json +0 -1
- package/.turbo/cache/71cd21072abc2990.tar.zst +0 -0
- package/.turbo/cache/7b4e0f3ba43fedf0-meta.json +0 -1
- package/.turbo/cache/7b4e0f3ba43fedf0.tar.zst +0 -0
- package/.turbo/cache/7b9897d3439462f4-meta.json +0 -1
- package/.turbo/cache/7b9897d3439462f4.tar.zst +0 -0
- package/.turbo/cache/80a42a1ee43a7b11-meta.json +0 -1
- package/.turbo/cache/80a42a1ee43a7b11.tar.zst +0 -0
- package/.turbo/cache/80bda930b819e4e5-meta.json +0 -1
- package/.turbo/cache/80bda930b819e4e5.tar.zst +0 -0
- package/.turbo/cache/826ecc96865e3b2b-meta.json +0 -1
- package/.turbo/cache/826ecc96865e3b2b.tar.zst +0 -0
- package/.turbo/cache/8a66291a4385f56d-meta.json +0 -1
- package/.turbo/cache/8a66291a4385f56d.tar.zst +0 -0
- package/.turbo/cache/8b33dd53ac78ffcb-meta.json +0 -1
- package/.turbo/cache/8b33dd53ac78ffcb.tar.zst +0 -0
- package/.turbo/cache/922ac9eb482cf470-meta.json +0 -1
- package/.turbo/cache/922ac9eb482cf470.tar.zst +0 -0
- package/.turbo/cache/939cf3ccc40e9ab0-meta.json +0 -1
- package/.turbo/cache/939cf3ccc40e9ab0.tar.zst +0 -0
- package/.turbo/cache/997795fcad6346cf-meta.json +0 -1
- package/.turbo/cache/997795fcad6346cf.tar.zst +0 -0
- package/.turbo/cache/9d39077f59442e6d-meta.json +0 -1
- package/.turbo/cache/9d39077f59442e6d.tar.zst +0 -0
- package/.turbo/cache/9f33c2699df2acc2-meta.json +0 -1
- package/.turbo/cache/9f33c2699df2acc2.tar.zst +0 -0
- package/.turbo/cache/a95cdb7b2836627c-meta.json +0 -1
- package/.turbo/cache/a95cdb7b2836627c.tar.zst +0 -0
- package/.turbo/cache/aa7a71eea03e0057-meta.json +0 -1
- package/.turbo/cache/aa7a71eea03e0057.tar.zst +0 -0
- package/.turbo/cache/ac01a85fedf6d42a-meta.json +0 -1
- package/.turbo/cache/ac01a85fedf6d42a.tar.zst +0 -0
- package/.turbo/cache/b0b5371ee9e6fd7b-meta.json +0 -1
- package/.turbo/cache/b0b5371ee9e6fd7b.tar.zst +0 -0
- package/.turbo/cache/b21472a210e5d253-meta.json +0 -1
- package/.turbo/cache/b21472a210e5d253.tar.zst +0 -0
- package/.turbo/cache/ba6844de212fdfc5-meta.json +0 -1
- package/.turbo/cache/ba6844de212fdfc5.tar.zst +0 -0
- package/.turbo/cache/bb95b8c7cc483fe7-meta.json +0 -1
- package/.turbo/cache/bb95b8c7cc483fe7.tar.zst +0 -0
- package/.turbo/cache/be89ec729b2d7aa1-meta.json +0 -1
- package/.turbo/cache/be89ec729b2d7aa1.tar.zst +0 -0
- package/.turbo/cache/c0c0f7ab71b548fe-meta.json +0 -1
- package/.turbo/cache/c0c0f7ab71b548fe.tar.zst +0 -0
- package/.turbo/cache/c4b442aa3a612c5a-meta.json +0 -1
- package/.turbo/cache/c4b442aa3a612c5a.tar.zst +0 -0
- package/.turbo/cache/c833fd369811f0b3-meta.json +0 -1
- package/.turbo/cache/c833fd369811f0b3.tar.zst +0 -0
- package/.turbo/cache/cc1bb0ba75999fd5-meta.json +0 -1
- package/.turbo/cache/cc1bb0ba75999fd5.tar.zst +0 -0
- package/.turbo/cache/cc999fcae80b9892-meta.json +0 -1
- package/.turbo/cache/cc999fcae80b9892.tar.zst +0 -0
- package/.turbo/cache/cf739f73c4d81043-meta.json +0 -1
- package/.turbo/cache/cf739f73c4d81043.tar.zst +0 -0
- package/.turbo/cache/cf87272227a0d544-meta.json +0 -1
- package/.turbo/cache/cf87272227a0d544.tar.zst +0 -0
- package/.turbo/cache/d09e82feba2c48a3-meta.json +0 -1
- package/.turbo/cache/d09e82feba2c48a3.tar.zst +0 -0
- package/.turbo/cache/d264bb58130e3915-meta.json +0 -1
- package/.turbo/cache/d264bb58130e3915.tar.zst +0 -0
- package/.turbo/cache/d4fda50b9aa326d9-meta.json +0 -1
- package/.turbo/cache/d4fda50b9aa326d9.tar.zst +0 -0
- package/.turbo/cache/da0461631780f1e1-meta.json +0 -1
- package/.turbo/cache/da0461631780f1e1.tar.zst +0 -0
- package/.turbo/cache/dbdfe30495790f74-meta.json +0 -1
- package/.turbo/cache/dbdfe30495790f74.tar.zst +0 -0
- package/.turbo/cache/dea41fd4a13eb241-meta.json +0 -1
- package/.turbo/cache/dea41fd4a13eb241.tar.zst +0 -0
- package/.turbo/cache/e229b033acee0336-meta.json +0 -1
- package/.turbo/cache/e229b033acee0336.tar.zst +0 -0
- package/.turbo/cache/ed401f9a734e292c-meta.json +0 -1
- package/.turbo/cache/ed401f9a734e292c.tar.zst +0 -0
- package/.turbo/cache/efafac21cf262b2c-meta.json +0 -1
- package/.turbo/cache/efafac21cf262b2c.tar.zst +0 -0
- package/.turbo/cache/f20df212682f7978-meta.json +0 -1
- package/.turbo/cache/f20df212682f7978.tar.zst +0 -0
- package/.turbo/cache/f272ad05432871ac-meta.json +0 -1
- package/.turbo/cache/f272ad05432871ac.tar.zst +0 -0
- package/.vscode/settings.json +0 -3
- package/components/bibtemplate/.stylelintrc.json +0 -3
- package/components/bibtemplate/.turbo/turbo-build$colon$sass.log +0 -24
- package/components/bibtemplate/.turbo/turbo-build$colon$version.log +0 -10
- package/components/bibtemplate/.turbo/turbo-build.log +0 -49
- package/components/bibtemplate/.turbo/turbo-bundler.log +0 -7
- package/components/bibtemplate/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/bibtemplate/.turbo/turbo-sass$colon$render.log +0 -22
- package/components/bibtemplate/.turbo/turbo-types.log +0 -4
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts.map +0 -1
- package/components/bibtemplate/dist/headerVersion.d.ts.map +0 -1
- package/components/bibtemplate/dist/iconVersion.d.ts.map +0 -1
- package/components/bibtemplate/dist/index.d.ts.map +0 -1
- package/components/bibtemplate/dist/styles/color-css.d.ts.map +0 -1
- package/components/bibtemplate/dist/styles/style-css.d.ts.map +0 -1
- package/components/bibtemplate/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/bibtemplate/node_modules/chalk/package.json +0 -83
- package/components/bibtemplate/node_modules/chalk/readme.md +0 -297
- package/components/bibtemplate/node_modules/chalk/source/index.d.ts +0 -325
- package/components/bibtemplate/node_modules/chalk/source/index.js +0 -225
- package/components/bibtemplate/node_modules/chalk/source/utilities.js +0 -33
- package/components/bibtemplate/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/bibtemplate/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/bibtemplate/package.json +0 -60
- package/components/bibtemplate/src/auro-bibtemplate.js +0 -137
- package/components/bibtemplate/src/headerVersion.js +0 -1
- package/components/bibtemplate/src/iconVersion.js +0 -1
- package/components/bibtemplate/src/index.js +0 -6
- package/components/bibtemplate/src/styles/color-css.js +0 -2
- package/components/bibtemplate/src/styles/color.css +0 -1
- package/components/bibtemplate/src/styles/color.scss +0 -0
- package/components/bibtemplate/src/styles/style-css.js +0 -2
- package/components/bibtemplate/src/styles/style.css +0 -58
- package/components/bibtemplate/src/styles/style.scss +0 -62
- package/components/bibtemplate/src/styles/tokens-css.js +0 -2
- package/components/bibtemplate/src/styles/tokens.css +0 -3
- package/components/bibtemplate/src/styles/tokens.scss +0 -5
- package/components/checkbox/.stylelintrc.json +0 -3
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +0 -98
- package/components/checkbox/.turbo/turbo-build.log +0 -184
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +0 -34
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +0 -1
- package/components/checkbox/dist/auro-checkbox.d.ts.map +0 -1
- package/components/checkbox/dist/index.d.ts.map +0 -1
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts.map +0 -1
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts.map +0 -1
- package/components/checkbox/dist/styles/color-css.d.ts.map +0 -1
- package/components/checkbox/dist/styles/colorGroup-css.d.ts.map +0 -1
- package/components/checkbox/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/checkbox/node_modules/chalk/package.json +0 -83
- package/components/checkbox/node_modules/chalk/readme.md +0 -325
- package/components/checkbox/node_modules/chalk/source/index.d.ts +0 -320
- package/components/checkbox/node_modules/chalk/source/index.js +0 -225
- package/components/checkbox/node_modules/chalk/source/utilities.js +0 -33
- package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/checkbox/package.json +0 -69
- package/components/checkbox/src/auro-checkbox-group.js +0 -370
- package/components/checkbox/src/auro-checkbox.js +0 -214
- package/components/checkbox/src/index.js +0 -8
- package/components/checkbox/src/styles/auro-checkbox-css.js +0 -2
- package/components/checkbox/src/styles/auro-checkbox-group-css.js +0 -2
- package/components/checkbox/src/styles/auro-checkbox-group.css +0 -26
- package/components/checkbox/src/styles/auro-checkbox-group.scss +0 -38
- package/components/checkbox/src/styles/auro-checkbox.css +0 -123
- package/components/checkbox/src/styles/auro-checkbox.scss +0 -100
- package/components/checkbox/src/styles/color-css.js +0 -2
- package/components/checkbox/src/styles/color.css +0 -84
- package/components/checkbox/src/styles/color.scss +0 -118
- package/components/checkbox/src/styles/colorGroup-css.js +0 -2
- package/components/checkbox/src/styles/colorGroup.css +0 -8
- package/components/checkbox/src/styles/colorGroup.scss +0 -16
- package/components/checkbox/src/styles/tokens-css.js +0 -2
- package/components/checkbox/src/styles/tokens.css +0 -8
- package/components/checkbox/src/styles/tokens.scss +0 -10
- package/components/combobox/.stylelintrc.json +0 -3
- package/components/combobox/.turbo/turbo-build$colon$sass.log +0 -46
- package/components/combobox/.turbo/turbo-build.log +0 -167
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/combobox/.turbo/turbo-sass$colon$render.log +0 -10
- package/components/combobox/dist/auro-combobox.d.ts.map +0 -1
- package/components/combobox/dist/bibtemplateVersion.d.ts.map +0 -1
- package/components/combobox/dist/dropdownVersion.d.ts.map +0 -1
- package/components/combobox/dist/formkit/auro-dropdownVersion.d.ts.map +0 -1
- package/components/combobox/dist/formkit/auro-inputVersion.d.ts +0 -3
- package/components/combobox/dist/formkit/auro-inputVersion.d.ts.map +0 -1
- package/components/combobox/dist/index.d.ts.map +0 -1
- package/components/combobox/dist/inputVersion.d.ts.map +0 -1
- package/components/combobox/dist/styles/style-css.d.ts.map +0 -1
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/.husky/pre-commit +0 -1
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/CHANGELOG.md +0 -863
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/README.md +0 -109
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/README.md +0 -86
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/_auroElement.scss +0 -45
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.js +0 -38
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs +0 -38
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials+fv.css +0 -110
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials.css +0 -106
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css +0 -8
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css +0 -813
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/package.json +0 -134
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/packageScripts/postinstall.mjs +0 -39
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_animation.scss +0 -30
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_blockquote.scss +0 -46
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_breakpoints.scss +0 -155
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_core.scss +0 -25
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_essentials.scss +0 -267
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_focus-visible.scss +0 -36
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_fonts.scss +0 -50
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_grids.scss +0 -395
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_headings.scss +0 -255
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_normalize.scss +0 -663
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_picture.scss +0 -31
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_utilityClasses.scss +0 -22
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials+fv.scss +0 -19
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials.scss +0 -18
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleButton.scss +0 -32
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleTab.scss +0 -26
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_containedButtons.scss +0 -59
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_table.scss +0 -54
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_tablist.scss +0 -37
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/README.md +0 -5
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/demoWrapper.scss +0 -18
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/elementDemoStyles.scss +0 -123
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_deprecated.scss +0 -16
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_manageScope.scss +0 -42
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_displayProperties.scss +0 -142
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_fontStyles.scss +0 -151
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_inset.scss +0 -188
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_layoutProperties.scss +0 -75
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_listProperties.scss +0 -176
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_responsive.scss +0 -249
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_typeProperties.scss +0 -49
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_capitalize.scss +0 -20
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_contains.scss +0 -26
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_map-deep-get.scss +0 -29
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleButton.scss +0 -76
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleTab.scss +0 -86
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_insetUtility.scss +0 -9
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_layoutPropertiesGenerator.scss +0 -75
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_spacingUtility.scss +0 -96
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_important.scss +0 -20
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_spacing-options.scss +0 -13
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/README.md +0 -293
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js +0 -1377
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/index.js +0 -1370
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/package.json +0 -1
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/package.json +0 -89
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/types/index.d.ts +0 -115
- package/components/combobox/node_modules/chalk/package.json +0 -83
- package/components/combobox/node_modules/chalk/readme.md +0 -297
- package/components/combobox/node_modules/chalk/source/index.d.ts +0 -325
- package/components/combobox/node_modules/chalk/source/index.js +0 -225
- package/components/combobox/node_modules/chalk/source/utilities.js +0 -33
- package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/combobox/package.json +0 -67
- package/components/combobox/src/auro-combobox.js +0 -925
- package/components/combobox/src/bibtemplateVersion.js +0 -1
- package/components/combobox/src/dropdownVersion.js +0 -1
- package/components/combobox/src/formkit/auro-dropdownVersion.js +0 -1
- package/components/combobox/src/formkit/auro-inputVersion.js +0 -1
- package/components/combobox/src/index.js +0 -6
- package/components/combobox/src/inputVersion.js +0 -1
- package/components/combobox/src/styles/style-css.js +0 -2
- package/components/combobox/src/styles/style.css +0 -56
- package/components/combobox/src/styles/style.scss +0 -38
- package/components/counter/.stylelintrc.json +0 -3
- package/components/counter/.turbo/turbo-build$colon$sass.log +0 -269
- package/components/counter/.turbo/turbo-build$colon$version.log +0 -10
- package/components/counter/.turbo/turbo-build.log +0 -402
- package/components/counter/.turbo/turbo-bundler.log +0 -22
- package/components/counter/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/counter/.turbo/turbo-sass$colon$render.log +0 -58
- package/components/counter/.turbo/turbo-types.log +0 -4
- package/components/counter/dist/auro-counter-button.d.ts.map +0 -1
- package/components/counter/dist/auro-counter-group.d.ts.map +0 -1
- package/components/counter/dist/auro-counter-wrapper.d.ts.map +0 -1
- package/components/counter/dist/auro-counter.d.ts.map +0 -1
- package/components/counter/dist/dropdownVersion.d.ts.map +0 -1
- package/components/counter/dist/iconVersion.d.ts.map +0 -1
- package/components/counter/dist/index.d.ts.map +0 -1
- package/components/counter/dist/styles/color-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-button-color-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-button-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-group-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts.map +0 -1
- package/components/counter/dist/styles/counter-wrapper-css.d.ts.map +0 -1
- package/components/counter/dist/styles/style-css.d.ts.map +0 -1
- package/components/counter/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/counter/node_modules/chalk/package.json +0 -83
- package/components/counter/node_modules/chalk/readme.md +0 -325
- package/components/counter/node_modules/chalk/source/index.d.ts +0 -320
- package/components/counter/node_modules/chalk/source/index.js +0 -225
- package/components/counter/node_modules/chalk/source/utilities.js +0 -33
- package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/counter/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/counter/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/counter/package.json +0 -59
- package/components/counter/src/auro-counter-button.js +0 -42
- package/components/counter/src/auro-counter-group.js +0 -333
- package/components/counter/src/auro-counter-wrapper.js +0 -54
- package/components/counter/src/auro-counter.js +0 -342
- package/components/counter/src/dropdownVersion.js +0 -1
- package/components/counter/src/iconVersion.js +0 -1
- package/components/counter/src/index.js +0 -8
- package/components/counter/src/styles/color-css.js +0 -2
- package/components/counter/src/styles/color.css +0 -29
- package/components/counter/src/styles/color.scss +0 -49
- package/components/counter/src/styles/counter-button-color-css.js +0 -2
- package/components/counter/src/styles/counter-button-color.css +0 -11
- package/components/counter/src/styles/counter-button-color.scss +0 -23
- package/components/counter/src/styles/counter-button-css.js +0 -2
- package/components/counter/src/styles/counter-button-tokens-css.js +0 -2
- package/components/counter/src/styles/counter-button-tokens.css +0 -6
- package/components/counter/src/styles/counter-button-tokens.scss +0 -8
- package/components/counter/src/styles/counter-button.css +0 -186
- package/components/counter/src/styles/counter-button.scss +0 -84
- package/components/counter/src/styles/counter-group-css.js +0 -2
- package/components/counter/src/styles/counter-group.css +0 -18
- package/components/counter/src/styles/counter-group.scss +0 -32
- package/components/counter/src/styles/counter-wrapper-color-css.js +0 -2
- package/components/counter/src/styles/counter-wrapper-color.css +0 -4
- package/components/counter/src/styles/counter-wrapper-color.scss +0 -19
- package/components/counter/src/styles/counter-wrapper-css.js +0 -2
- package/components/counter/src/styles/counter-wrapper.css +0 -15
- package/components/counter/src/styles/counter-wrapper.scss +0 -29
- package/components/counter/src/styles/style-css.js +0 -2
- package/components/counter/src/styles/style.css +0 -53
- package/components/counter/src/styles/style.scss +0 -73
- package/components/counter/src/styles/tokens-css.js +0 -2
- package/components/counter/src/styles/tokens.css +0 -12
- package/components/counter/src/styles/tokens.scss +0 -25
- package/components/datepicker/.stylelintrc.json +0 -3
- package/components/datepicker/.turbo/turbo-build$colon$sass.log +0 -352
- package/components/datepicker/.turbo/turbo-build.log +0 -492
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +0 -58
- package/components/datepicker/dist/auro-calendar-cell.d.ts.map +0 -1
- package/components/datepicker/dist/auro-calendar-month.d.ts.map +0 -1
- package/components/datepicker/dist/auro-calendar.d.ts.map +0 -1
- package/components/datepicker/dist/auro-datepicker.d.ts.map +0 -1
- package/components/datepicker/dist/dropdownVersion.d.ts.map +0 -1
- package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts +0 -3
- package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts.map +0 -1
- package/components/datepicker/dist/formkit/auro-inputVersion.d.ts +0 -3
- package/components/datepicker/dist/formkit/auro-inputVersion.d.ts.map +0 -1
- package/components/datepicker/dist/index.d.ts.map +0 -1
- package/components/datepicker/dist/inputVersion.d.ts.map +0 -1
- package/components/datepicker/dist/popoverVersion.d.ts.map +0 -1
- package/components/datepicker/dist/styles/color-calendar-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/color-cell-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/color-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/color-month-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/style-css.d.ts.map +0 -1
- package/components/datepicker/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/datepicker/dist/utilities.d.ts.map +0 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts.map +0 -1
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts.map +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts.map +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts.map +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts.map +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts.map +0 -1
- package/components/datepicker/node_modules/chalk/package.json +0 -83
- package/components/datepicker/node_modules/chalk/readme.md +0 -325
- package/components/datepicker/node_modules/chalk/source/index.d.ts +0 -320
- package/components/datepicker/node_modules/chalk/source/index.js +0 -225
- package/components/datepicker/node_modules/chalk/source/utilities.js +0 -33
- package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/datepicker/node_modules/rollup-plugin-serve/LICENSE.md +0 -21
- package/components/datepicker/node_modules/rollup-plugin-serve/README.md +0 -137
- package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.cjs +0 -181
- package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.mjs +0 -173
- package/components/datepicker/node_modules/rollup-plugin-serve/index.d.ts +0 -75
- package/components/datepicker/node_modules/rollup-plugin-serve/package.json +0 -51
- package/components/datepicker/package.json +0 -79
- package/components/datepicker/src/auro-calendar-cell.js +0 -381
- package/components/datepicker/src/auro-calendar-month.js +0 -128
- package/components/datepicker/src/auro-calendar.js +0 -329
- package/components/datepicker/src/auro-datepicker.js +0 -1040
- package/components/datepicker/src/dropdownVersion.js +0 -1
- package/components/datepicker/src/formkit/auro-dropdownVersion.js +0 -1
- package/components/datepicker/src/formkit/auro-inputVersion.js +0 -1
- package/components/datepicker/src/index.js +0 -6
- package/components/datepicker/src/inputVersion.js +0 -1
- package/components/datepicker/src/popoverVersion.js +0 -1
- package/components/datepicker/src/styles/color-calendar-css.js +0 -2
- package/components/datepicker/src/styles/color-calendar.css +0 -35
- package/components/datepicker/src/styles/color-calendar.scss +0 -51
- package/components/datepicker/src/styles/color-cell-css.js +0 -2
- package/components/datepicker/src/styles/color-cell.css +0 -45
- package/components/datepicker/src/styles/color-cell.scss +0 -73
- package/components/datepicker/src/styles/color-css.js +0 -2
- package/components/datepicker/src/styles/color-month-css.js +0 -2
- package/components/datepicker/src/styles/color-month.css +0 -34
- package/components/datepicker/src/styles/color-month.scss +0 -27
- package/components/datepicker/src/styles/color.css +0 -43
- package/components/datepicker/src/styles/color.scss +0 -30
- package/components/datepicker/src/styles/style-auro-calendar-cell-css.js +0 -2
- package/components/datepicker/src/styles/style-auro-calendar-cell.css +0 -123
- package/components/datepicker/src/styles/style-auro-calendar-cell.scss +0 -147
- package/components/datepicker/src/styles/style-auro-calendar-css.js +0 -2
- package/components/datepicker/src/styles/style-auro-calendar-month-css.js +0 -2
- package/components/datepicker/src/styles/style-auro-calendar-month.css +0 -121
- package/components/datepicker/src/styles/style-auro-calendar-month.scss +0 -141
- package/components/datepicker/src/styles/style-auro-calendar.css +0 -152
- package/components/datepicker/src/styles/style-auro-calendar.scss +0 -191
- package/components/datepicker/src/styles/style-css.js +0 -2
- package/components/datepicker/src/styles/style.css +0 -131
- package/components/datepicker/src/styles/style.scss +0 -139
- package/components/datepicker/src/styles/tokens-css.js +0 -2
- package/components/datepicker/src/styles/tokens.css +0 -22
- package/components/datepicker/src/styles/tokens.scss +0 -25
- package/components/datepicker/src/utilities.js +0 -87
- package/components/datepicker/src/utilitiesCalendar.js +0 -138
- package/components/datepicker/src/utilitiesCalendarRender.js +0 -156
- package/components/datepicker/src/vendor/wc-range-datepicker/day.js +0 -8
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-calendar.js +0 -521
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-cell.js +0 -211
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker.js +0 -254
- package/components/dropdown/.stylelintrc.json +0 -3
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +0 -75
- package/components/dropdown/.turbo/turbo-build.log +0 -208
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +0 -34
- package/components/dropdown/dist/auro-dropdown.d.ts.map +0 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +0 -1
- package/components/dropdown/dist/dropdownVersion.d.ts.map +0 -1
- package/components/dropdown/dist/iconVersion.d.ts.map +0 -1
- package/components/dropdown/dist/index.d.ts.map +0 -1
- package/components/dropdown/dist/styles/bibColors-css.d.ts.map +0 -1
- package/components/dropdown/dist/styles/bibStyles-css.d.ts.map +0 -1
- package/components/dropdown/dist/styles/color-css.d.ts.map +0 -1
- package/components/dropdown/dist/styles/style-css.d.ts.map +0 -1
- package/components/dropdown/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/dropdown/node_modules/chalk/package.json +0 -83
- package/components/dropdown/node_modules/chalk/readme.md +0 -325
- package/components/dropdown/node_modules/chalk/source/index.d.ts +0 -320
- package/components/dropdown/node_modules/chalk/source/index.js +0 -225
- package/components/dropdown/node_modules/chalk/source/utilities.js +0 -33
- package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/dropdown/package.json +0 -58
- package/components/dropdown/src/auro-dropdown.js +0 -586
- package/components/dropdown/src/auro-dropdownBib.js +0 -128
- package/components/dropdown/src/dropdownVersion.js +0 -1
- package/components/dropdown/src/iconVersion.js +0 -1
- package/components/dropdown/src/index.js +0 -6
- package/components/dropdown/src/styles/bibColors-css.js +0 -2
- package/components/dropdown/src/styles/bibColors.css +0 -6
- package/components/dropdown/src/styles/bibColors.scss +0 -18
- package/components/dropdown/src/styles/bibStyles-css.js +0 -2
- package/components/dropdown/src/styles/bibStyles.css +0 -44
- package/components/dropdown/src/styles/bibStyles.scss +0 -61
- package/components/dropdown/src/styles/color-css.js +0 -2
- package/components/dropdown/src/styles/color.css +0 -56
- package/components/dropdown/src/styles/color.scss +0 -76
- package/components/dropdown/src/styles/style-css.js +0 -2
- package/components/dropdown/src/styles/style.css +0 -91
- package/components/dropdown/src/styles/style.scss +0 -122
- package/components/dropdown/src/styles/tokens-css.js +0 -2
- package/components/dropdown/src/styles/tokens.css +0 -13
- package/components/dropdown/src/styles/tokens.scss +0 -15
- package/components/form/.stylelintrc.json +0 -3
- package/components/form/.turbo/turbo-build$colon$sass.log +0 -57
- package/components/form/.turbo/turbo-build$colon$version.log +0 -4
- package/components/form/.turbo/turbo-build.log +0 -112
- package/components/form/.turbo/turbo-bundler.log +0 -13
- package/components/form/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/form/.turbo/turbo-sass$colon$render.log +0 -10
- package/components/form/.turbo/turbo-types.log +0 -4
- package/components/form/dist/auro-form.d.ts.map +0 -1
- package/components/form/dist/index.d.ts.map +0 -1
- package/components/form/dist/styles/style-css.d.ts.map +0 -1
- package/components/form/node_modules/chalk/package.json +0 -83
- package/components/form/node_modules/chalk/readme.md +0 -325
- package/components/form/node_modules/chalk/source/index.d.ts +0 -320
- package/components/form/node_modules/chalk/source/index.js +0 -225
- package/components/form/node_modules/chalk/source/utilities.js +0 -33
- package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/form/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/form/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/form/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/form/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/form/package.json +0 -74
- package/components/form/src/auro-form.js +0 -506
- package/components/form/src/index.js +0 -6
- package/components/form/src/styles/style-css.js +0 -2
- package/components/form/src/styles/style.css +0 -36
- package/components/form/src/styles/style.scss +0 -37
- package/components/helptext/.stylelintrc.json +0 -3
- package/components/helptext/.turbo/turbo-build$colon$sass.log +0 -34
- package/components/helptext/.turbo/turbo-build.log +0 -49
- package/components/helptext/.turbo/turbo-bundler.log +0 -7
- package/components/helptext/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/helptext/.turbo/turbo-sass$colon$render.log +0 -22
- package/components/helptext/.turbo/turbo-types.log +0 -4
- package/components/helptext/dist/auro-helptext.d.ts.map +0 -1
- package/components/helptext/dist/index.d.ts.map +0 -1
- package/components/helptext/dist/styles/color-css.d.ts.map +0 -1
- package/components/helptext/dist/styles/style-css.d.ts.map +0 -1
- package/components/helptext/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/helptext/node_modules/chalk/package.json +0 -83
- package/components/helptext/node_modules/chalk/readme.md +0 -297
- package/components/helptext/node_modules/chalk/source/index.d.ts +0 -325
- package/components/helptext/node_modules/chalk/source/index.js +0 -225
- package/components/helptext/node_modules/chalk/source/utilities.js +0 -33
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/helptext/package.json +0 -57
- package/components/helptext/src/auro-helptext.js +0 -127
- package/components/helptext/src/index.js +0 -6
- package/components/helptext/src/styles/color-css.js +0 -2
- package/components/helptext/src/styles/color.css +0 -8
- package/components/helptext/src/styles/color.scss +0 -11
- package/components/helptext/src/styles/style-css.js +0 -2
- package/components/helptext/src/styles/style.css +0 -23
- package/components/helptext/src/styles/style.scss +0 -33
- package/components/helptext/src/styles/tokens-css.js +0 -2
- package/components/helptext/src/styles/tokens.css +0 -3
- package/components/helptext/src/styles/tokens.scss +0 -5
- package/components/input/.stylelintrc.json +0 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +0 -188
- package/components/input/.turbo/turbo-build.log +0 -340
- package/components/input/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/input/.turbo/turbo-sass$colon$render.log +0 -52
- package/components/input/dist/auro-input.d.ts.map +0 -1
- package/components/input/dist/base-input.d.ts.map +0 -1
- package/components/input/dist/buttonVersion.d.ts.map +0 -1
- package/components/input/dist/i18n.d.ts.map +0 -1
- package/components/input/dist/iconVersion.d.ts.map +0 -1
- package/components/input/dist/index.d.ts.map +0 -1
- package/components/input/dist/styles/borders-css.d.ts.map +0 -1
- package/components/input/dist/styles/color-css.d.ts.map +0 -1
- package/components/input/dist/styles/input-css.d.ts.map +0 -1
- package/components/input/dist/styles/label-css.d.ts.map +0 -1
- package/components/input/dist/styles/mixins-css.d.ts.map +0 -1
- package/components/input/dist/styles/notificationIcons-css.d.ts.map +0 -1
- package/components/input/dist/styles/style-css.d.ts.map +0 -1
- package/components/input/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/input/node_modules/chalk/package.json +0 -83
- package/components/input/node_modules/chalk/readme.md +0 -325
- package/components/input/node_modules/chalk/source/index.d.ts +0 -320
- package/components/input/node_modules/chalk/source/index.js +0 -225
- package/components/input/node_modules/chalk/source/utilities.js +0 -33
- package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/input/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/input/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/input/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/input/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/input/package.json +0 -76
- package/components/input/src/auro-input.js +0 -249
- package/components/input/src/base-input.js +0 -1103
- package/components/input/src/buttonVersion.js +0 -1
- package/components/input/src/i18n.js +0 -102
- package/components/input/src/iconVersion.js +0 -1
- package/components/input/src/index.js +0 -6
- package/components/input/src/styles/@aurodesignsystem/webcorestylesheets/src/breakpoints +0 -0
- package/components/input/src/styles/borders-css.js +0 -2
- package/components/input/src/styles/borders.css +0 -35
- package/components/input/src/styles/borders.scss +0 -49
- package/components/input/src/styles/color-css.js +0 -2
- package/components/input/src/styles/color.css +0 -57
- package/components/input/src/styles/color.scss +0 -84
- package/components/input/src/styles/input-css.js +0 -2
- package/components/input/src/styles/input.css +0 -35
- package/components/input/src/styles/input.scss +0 -53
- package/components/input/src/styles/label-css.js +0 -2
- package/components/input/src/styles/label.css +0 -45
- package/components/input/src/styles/label.scss +0 -71
- package/components/input/src/styles/mixins-css.js +0 -2
- package/components/input/src/styles/mixins.css +0 -1
- package/components/input/src/styles/mixins.scss +0 -45
- package/components/input/src/styles/notificationIcons-css.js +0 -2
- package/components/input/src/styles/notificationIcons.css +0 -84
- package/components/input/src/styles/notificationIcons.scss +0 -109
- package/components/input/src/styles/style-css.js +0 -2
- package/components/input/src/styles/style.css +0 -283
- package/components/input/src/styles/style.scss +0 -52
- package/components/input/src/styles/tokens-css.js +0 -2
- package/components/input/src/styles/tokens.css +0 -8
- package/components/input/src/styles/tokens.scss +0 -10
- package/components/menu/.stylelintrc.json +0 -3
- package/components/menu/.turbo/turbo-build$colon$sass.log +0 -86
- package/components/menu/.turbo/turbo-build$colon$version.log +0 -7
- package/components/menu/.turbo/turbo-build.log +0 -185
- package/components/menu/.turbo/turbo-bundler.log +0 -13
- package/components/menu/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/menu/.turbo/turbo-sass$colon$render.log +0 -34
- package/components/menu/.turbo/turbo-types.log +0 -4
- package/components/menu/dist/auro-menu-utils.d.ts.map +0 -1
- package/components/menu/dist/auro-menu.d.ts.map +0 -1
- package/components/menu/dist/auro-menuoption.d.ts.map +0 -1
- package/components/menu/dist/iconVersion.d.ts.map +0 -1
- package/components/menu/dist/index.d.ts.map +0 -1
- package/components/menu/dist/styles/color-menu-css.d.ts.map +0 -1
- package/components/menu/dist/styles/color-menuoption-css.d.ts.map +0 -1
- package/components/menu/dist/styles/style-menu-css.d.ts.map +0 -1
- package/components/menu/dist/styles/style-menuoption-css.d.ts.map +0 -1
- package/components/menu/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/menu/node_modules/chalk/package.json +0 -83
- package/components/menu/node_modules/chalk/readme.md +0 -325
- package/components/menu/node_modules/chalk/source/index.d.ts +0 -320
- package/components/menu/node_modules/chalk/source/index.js +0 -225
- package/components/menu/node_modules/chalk/source/utilities.js +0 -33
- package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/menu/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/menu/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/menu/node_modules/mime/CHANGELOG.md +0 -296
- package/components/menu/node_modules/mime/Mime.js +0 -97
- package/components/menu/node_modules/mime/README.md +0 -187
- package/components/menu/node_modules/mime/cli.js +0 -46
- package/components/menu/node_modules/mime/index.js +0 -4
- package/components/menu/node_modules/mime/lite.js +0 -4
- package/components/menu/node_modules/mime/package.json +0 -52
- package/components/menu/node_modules/mime/types/other.js +0 -1
- package/components/menu/node_modules/mime/types/standard.js +0 -1
- package/components/menu/node_modules/rollup-plugin-serve/LICENSE.md +0 -21
- package/components/menu/node_modules/rollup-plugin-serve/README.md +0 -135
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs +0 -181
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs.js +0 -197
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.es.js +0 -193
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.mjs +0 -173
- package/components/menu/node_modules/rollup-plugin-serve/package.json +0 -44
- package/components/menu/package.json +0 -70
- package/components/menu/src/auro-menu-utils.js +0 -131
- package/components/menu/src/auro-menu.js +0 -728
- package/components/menu/src/auro-menuoption.js +0 -147
- package/components/menu/src/iconVersion.js +0 -1
- package/components/menu/src/index.js +0 -15
- package/components/menu/src/styles/color-menu-css.js +0 -2
- package/components/menu/src/styles/color-menu.css +0 -4
- package/components/menu/src/styles/color-menu.scss +0 -12
- package/components/menu/src/styles/color-menuoption-css.js +0 -2
- package/components/menu/src/styles/color-menuoption.css +0 -26
- package/components/menu/src/styles/color-menuoption.scss +0 -37
- package/components/menu/src/styles/style-menu-css.js +0 -2
- package/components/menu/src/styles/style-menu.css +0 -2061
- package/components/menu/src/styles/style-menu.scss +0 -80
- package/components/menu/src/styles/style-menuoption-css.js +0 -2
- package/components/menu/src/styles/style-menuoption.css +0 -45
- package/components/menu/src/styles/style-menuoption.scss +0 -66
- package/components/menu/src/styles/tokens-css.js +0 -2
- package/components/menu/src/styles/tokens.css +0 -6
- package/components/menu/src/styles/tokens.scss +0 -6
- package/components/radio/.stylelintrc.json +0 -3
- package/components/radio/.turbo/turbo-build$colon$sass.log +0 -130
- package/components/radio/.turbo/turbo-build.log +0 -215
- package/components/radio/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/radio/.turbo/turbo-sass$colon$render.log +0 -34
- package/components/radio/dist/auro-radio-group.d.ts.map +0 -1
- package/components/radio/dist/auro-radio.d.ts.map +0 -1
- package/components/radio/dist/index.d.ts.map +0 -1
- package/components/radio/dist/styles/auro-radio-group-css.d.ts.map +0 -1
- package/components/radio/dist/styles/color-css.d.ts.map +0 -1
- package/components/radio/dist/styles/groupColor-css.d.ts.map +0 -1
- package/components/radio/dist/styles/style-css.d.ts.map +0 -1
- package/components/radio/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/radio/node_modules/chalk/package.json +0 -83
- package/components/radio/node_modules/chalk/readme.md +0 -325
- package/components/radio/node_modules/chalk/source/index.d.ts +0 -320
- package/components/radio/node_modules/chalk/source/index.js +0 -225
- package/components/radio/node_modules/chalk/source/utilities.js +0 -33
- package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/radio/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/radio/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/radio/package.json +0 -69
- package/components/radio/src/auro-radio-group.js +0 -451
- package/components/radio/src/auro-radio.js +0 -256
- package/components/radio/src/index.js +0 -8
- package/components/radio/src/styles/auro-radio-group-css.js +0 -2
- package/components/radio/src/styles/auro-radio-group.css +0 -23
- package/components/radio/src/styles/auro-radio-group.scss +0 -36
- package/components/radio/src/styles/color-css.js +0 -2
- package/components/radio/src/styles/color.css +0 -45
- package/components/radio/src/styles/color.scss +0 -56
- package/components/radio/src/styles/groupColor-css.js +0 -2
- package/components/radio/src/styles/groupColor.css +0 -13
- package/components/radio/src/styles/groupColor.scss +0 -25
- package/components/radio/src/styles/style-css.js +0 -2
- package/components/radio/src/styles/style.css +0 -113
- package/components/radio/src/styles/style.scss +0 -99
- package/components/radio/src/styles/tokens-css.js +0 -2
- package/components/radio/src/styles/tokens.css +0 -8
- package/components/radio/src/styles/tokens.scss +0 -11
- package/components/select/.stylelintrc.json +0 -3
- package/components/select/.turbo/turbo-build$colon$sass.log +0 -122
- package/components/select/.turbo/turbo-build.log +0 -242
- package/components/select/.turbo/turbo-postCss$colon$component.log +0 -4
- package/components/select/.turbo/turbo-sass$colon$render.log +0 -22
- package/components/select/dist/auro-select.d.ts.map +0 -1
- package/components/select/dist/dropdownVersion.d.ts.map +0 -1
- package/components/select/dist/formkit/auro-dropdownVersion.d.ts +0 -3
- package/components/select/dist/formkit/auro-dropdownVersion.d.ts.map +0 -1
- package/components/select/dist/index.d.ts.map +0 -1
- package/components/select/dist/styles/color-css.d.ts.map +0 -1
- package/components/select/dist/styles/style-css.d.ts.map +0 -1
- package/components/select/dist/styles/tokens-css.d.ts.map +0 -1
- package/components/select/node_modules/chalk/package.json +0 -83
- package/components/select/node_modules/chalk/readme.md +0 -325
- package/components/select/node_modules/chalk/source/index.d.ts +0 -320
- package/components/select/node_modules/chalk/source/index.js +0 -225
- package/components/select/node_modules/chalk/source/utilities.js +0 -33
- package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/components/select/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/components/select/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- package/components/select/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/components/select/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- package/components/select/node_modules/mime/CHANGELOG.md +0 -296
- package/components/select/node_modules/mime/Mime.js +0 -97
- package/components/select/node_modules/mime/README.md +0 -187
- package/components/select/node_modules/mime/cli.js +0 -46
- package/components/select/node_modules/mime/index.js +0 -4
- package/components/select/node_modules/mime/lite.js +0 -4
- package/components/select/node_modules/mime/package.json +0 -52
- package/components/select/node_modules/mime/types/other.js +0 -1
- package/components/select/node_modules/mime/types/standard.js +0 -1
- package/components/select/node_modules/rollup-plugin-serve/LICENSE.md +0 -21
- package/components/select/node_modules/rollup-plugin-serve/README.md +0 -135
- package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs +0 -181
- package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs.js +0 -197
- package/components/select/node_modules/rollup-plugin-serve/dist/index.es.js +0 -193
- package/components/select/node_modules/rollup-plugin-serve/dist/index.mjs +0 -173
- package/components/select/node_modules/rollup-plugin-serve/package.json +0 -44
- package/components/select/package.json +0 -70
- package/components/select/packageScripts/postinstall.mjs +0 -28
- package/components/select/src/auro-select.js +0 -604
- package/components/select/src/dropdownVersion.js +0 -1
- package/components/select/src/formkit/auro-dropdownVersion.js +0 -1
- package/components/select/src/index.js +0 -6
- package/components/select/src/styles/color-css.js +0 -2
- package/components/select/src/styles/color.css +0 -63
- package/components/select/src/styles/color.scss +0 -33
- package/components/select/src/styles/style-css.js +0 -2
- package/components/select/src/styles/style.css +0 -105
- package/components/select/src/styles/style.scss +0 -83
- package/components/select/src/styles/tokens-css.js +0 -2
- package/components/select/src/styles/tokens.css +0 -3
- package/components/select/src/styles/tokens.scss +0 -5
- package/packages/build-tools/package.json +0 -15
- package/packages/build-tools/src/docProcessor.mjs +0 -133
- package/packages/build-tools/src/formVersionWriter.mjs +0 -75
- package/packages/build-tools/src/index.js +0 -1
- package/packages/build-tools/src/kitDocProcessor.mjs +0 -66
- package/packages/form-validation/package.json +0 -12
- package/packages/form-validation/src/index.js +0 -1
- package/packages/form-validation/src/validation.js +0 -318
- package/packages/typescript/base.json +0 -19
- package/packages/typescript/package.json +0 -20
- package/packages/utils/package.json +0 -12
- package/packages/utils/src/iconUtil.js +0 -25
- package/packages/utils/src/index.js +0 -1
- package/turbo.json +0 -134
|
@@ -0,0 +1,4367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t$7=globalThis,e$c=t$7.ShadowRoot&&(void 0===t$7.ShadyCSS||t$7.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$7=Symbol(),o$b=new WeakMap;let n$a = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$7)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$c&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$b.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$b.set(s,t));}return t}toString(){return this.cssText}};const r$c=t=>new n$a("string"==typeof t?t:t+"",void 0,s$7),i$f=(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$a(o,t,s$7)},S$6=(s,o)=>{if(e$c)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$7.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$9=e$c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$c(e)})(t):t;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2017 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/const{is:i$e,defineProperty:e$b,getOwnPropertyDescriptor:r$b,getOwnPropertyNames:h$6,getOwnPropertySymbols:o$a,getPrototypeOf:n$9}=Object,a$7=globalThis,c$8=a$7.trustedTypes,l$7=c$8?c$8.emptyScript:"",p$6=a$7.reactiveElementPolyfillSupport,d$6=(t,s)=>t,u$7={toAttribute(t,s){switch(s){case Boolean:t=t?l$7: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$6=(t,s)=>!i$e(t,s),y$4={attribute:true,type:String,converter:u$7,reflect:false,hasChanged:f$6};Symbol.metadata??=Symbol("metadata"),a$7.litPropertyMetadata??=new WeakMap;let b$3 = 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);void 0!==r&&e$b(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$b(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$6("elementProperties")))return;const t=n$9(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$6("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$6("properties"))){const t=this.properties,s=[...h$6(t),...o$a(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(void 0!==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);void 0!==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$9(s));}else void 0!==s&&i.push(c$9(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,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),void 0!==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$6(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(void 0!==e&&true===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$7).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(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$7;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$6)(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=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||void 0===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$3.elementStyles=[],b$3.shadowRootOptions={mode:"open"},b$3[d$6("elementProperties")]=new Map,b$3[d$6("finalized")]=new Map,p$6?.({ReactiveElement:b$3}),(a$7.reactiveElementVersions??=[]).push("2.0.4");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright 2017 Google LLC
|
|
17
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
+
*/
|
|
19
|
+
const t$6=globalThis,i$d=t$6.trustedTypes,s$6=i$d?i$d.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$a="$lit$",h$5=`lit$${Math.random().toFixed(9).slice(2)}$`,o$9="?"+h$5,n$8=`<${o$9}>`,r$a=document,l$6=()=>r$a.createComment(""),c$7=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$6=Array.isArray,u$6=t=>a$6(t)||"function"==typeof t?.[Symbol.iterator],d$5="[ \t\n\f\r]",f$5=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$3=/-->/g,_$3=/>/g,m$3=RegExp(`>|${d$5}(?:([^\\s"'>=/]+)(${d$5}*=${d$5}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$5=/'/g,g$3=/"/g,$$3=/^(?:script|style|textarea|title)$/i,y$3=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$3(1),T$3=Symbol.for("lit-noChange"),E$3=Symbol.for("lit-nothing"),A$3=new WeakMap,C$3=r$a.createTreeWalker(r$a,129);function P$3(t,i){if(!a$6(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$6?s$6.createHTML(i):i}const V$3=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$5;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$5?"!--"===u[1]?c=v$3:void 0!==u[1]?c=_$3:void 0!==u[2]?($$3.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$3):void 0!==u[3]&&(c=m$3):c===m$3?">"===u[0]?(c=r??f$5,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$3:'"'===u[3]?g$3:p$5):c===g$3||c===p$5?c=m$3:c===v$3||c===_$3?c=f$5:(c=m$3,r=void 0);const x=c===m$3&&t[i+1].startsWith("/>")?" ":"";l+=c===f$5?s+n$8:d>=0?(o.push(a),s.slice(0,d)+e$a+s.slice(d)+h$5+x):s+h$5+(-2===d?i:x);}return [P$3(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$3 = 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$3(t,s);if(this.el=N.createElement(f,n),C$3.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$3.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$a)){const i=v[a++],s=r.getAttribute(t).split(h$5),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$3:"?"===e[1]?I$3:"@"===e[1]?L$3:k$3}),r.removeAttribute(t);}else t.startsWith(h$5)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$3.test(r.tagName)){const t=r.textContent.split(h$5),s=t.length-1;if(s>0){r.textContent=i$d?i$d.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$6()),C$3.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$6());}}}else if(8===r.nodeType)if(r.data===o$9)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$5,t+1));)d.push({type:7,index:c}),t+=h$5.length-1;}c++;}}static createElement(t,i){const s=r$a.createElement("template");return s.innerHTML=t,s}};function S$5(t,i,s=t,e){if(i===T$3)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$7(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S$5(t,h._$AS(t,i.values),h,e)),i}let M$3 = class M{constructor(t,i){this._$AV=[],this._$AN=void 0,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$a).importNode(i,true);C$3.currentNode=e;let h=C$3.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R$3(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$3(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$3.nextNode(),o++);}return C$3.currentNode=r$a,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$3 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$3,this._$AN=void 0,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 void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$5(this,t,i),c$7(t)?t===E$3||null==t||""===t?(this._$AH!==E$3&&this._$AR(),this._$AH=E$3):t!==this._$AH&&t!==T$3&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$6(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$3&&c$7(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$a.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N$3.createElement(P$3(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$3(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$3.get(t.strings);return void 0===i&&A$3.set(t.strings,i=new N$3(t)),i}k(t){a$6(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$6()),this.O(l$6()),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){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$3 = 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$3,this._$AN=void 0,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$3;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S$5(this,t,i,0),o=!c$7(t)||t!==this._$AH&&t!==T$3,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$5(this,e[s+n],i,n),r===T$3&&(r=this._$AH[n]),o||=!c$7(r)||r!==this._$AH[n],r===E$3?t=E$3:t!==E$3&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$3?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$3 = class H extends k$3{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$3?void 0:t;}};let I$3 = class I extends k$3{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$3);}};let L$3 = class L extends k$3{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$5(this,t,i,0)??E$3)===T$3)return;const s=this._$AH,e=t===E$3&&s!==E$3||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$3&&(s===E$3||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$3 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$5(this,t);}};const j$3=t$6.litHtmlPolyfillSupport;j$3?.(N$3,R$3),(t$6.litHtmlVersions??=[]).push("3.2.1");const B$3=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$3(i.insertBefore(l$6(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2017 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/let r$9 = class r extends b$3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}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$3(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$3}};r$9._$litElement$=true,r$9["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$9});const i$c=globalThis.litElementPolyfillSupport;i$c?.({LitElement:r$9});(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$5={ATTRIBUTE:1},e$9=t=>(...e)=>({_$litDirective$:t,values:e});let i$b = 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$8=e$9(class extends i$b{constructor(t){if(super(t),t.type!==t$5.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(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$3}});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @license
|
|
42
|
+
* Copyright 2020 Google LLC
|
|
43
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
+
*/
|
|
45
|
+
const a$5=Symbol.for(""),o$8=t=>{if(t?.r===a$5)return t?._$litStatic$},s$5=t=>({_$litStatic$:t,r:a$5}),i$a=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==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$5}),l$5=new Map,n$7=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$8(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$$");void 0===(r=l$5.get(t))&&(n.raw=n,l$5.set(t,r=n)),e=u;}return t(r,...e)},u$5=n$7(x$1);
|
|
46
|
+
|
|
47
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
48
|
+
// See LICENSE in the project root for license information.
|
|
49
|
+
|
|
50
|
+
// ---------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
53
|
+
|
|
54
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
55
|
+
|
|
56
|
+
/* eslint-disable jsdoc/require-param */
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This will register a new custom element with the browser.
|
|
60
|
+
* @param {String} name - The name of the custom element.
|
|
61
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
62
|
+
* @returns {void}
|
|
63
|
+
*/
|
|
64
|
+
registerComponent(name, componentClass) {
|
|
65
|
+
if (!customElements.get(name)) {
|
|
66
|
+
customElements.define(name, class extends componentClass {});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
72
|
+
* @returns {void}
|
|
73
|
+
*/
|
|
74
|
+
closestElement(
|
|
75
|
+
selector, // selector like in .closest()
|
|
76
|
+
base = this, // extra functionality to skip a parent
|
|
77
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
78
|
+
!el || el === document || el === window
|
|
79
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
80
|
+
: found
|
|
81
|
+
? found // found a selector INside this element
|
|
82
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
83
|
+
) {
|
|
84
|
+
return __Closest(base);
|
|
85
|
+
}
|
|
86
|
+
/* eslint-enable jsdoc/require-param */
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 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.
|
|
90
|
+
* @param {Object} elem - The element to check.
|
|
91
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
handleComponentTagRename(elem, tagName) {
|
|
95
|
+
const tag = tagName.toLowerCase();
|
|
96
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
97
|
+
|
|
98
|
+
if (elemTag !== tag) {
|
|
99
|
+
elem.setAttribute(tag, true);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Validates if an element is a specific Auro component.
|
|
105
|
+
* @param {Object} elem - The element to validate.
|
|
106
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
107
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
108
|
+
*/
|
|
109
|
+
elementMatch(elem, tagName) {
|
|
110
|
+
const tag = tagName.toLowerCase();
|
|
111
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
112
|
+
|
|
113
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
118
|
+
// See LICENSE in the project root for license information.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class AuroFormValidation {
|
|
122
|
+
constructor() {
|
|
123
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Resets the element to its initial state.
|
|
128
|
+
* @private
|
|
129
|
+
* @param {object} elem - HTML element to reset.
|
|
130
|
+
* @returns {void}
|
|
131
|
+
*/
|
|
132
|
+
reset(elem) {
|
|
133
|
+
elem.validity = undefined;
|
|
134
|
+
elem.value = undefined;
|
|
135
|
+
|
|
136
|
+
// Resets the second value of the datepicker in range state
|
|
137
|
+
if (elem.valueEnd) {
|
|
138
|
+
elem.valueEnd = undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Resets selected option of element
|
|
142
|
+
if (elem.optionSelected) {
|
|
143
|
+
elem.optionSelected = undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Runs validation to handle error attribute
|
|
147
|
+
this.validate(elem);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Validates the attributes of a given element based on predefined validation rules.
|
|
152
|
+
*
|
|
153
|
+
* @param {HTMLElement} elem - The element to be validated.
|
|
154
|
+
* @returns {void}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* // Assuming `inputElement` is a reference to an input element in the DOM
|
|
158
|
+
* validateElementAttributes(inputElement);
|
|
159
|
+
*
|
|
160
|
+
* The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
|
|
161
|
+
* If a validation rule is violated, it sets the element's validity state and error message accordingly.
|
|
162
|
+
*
|
|
163
|
+
* Validation rules:
|
|
164
|
+
* - input:
|
|
165
|
+
* - length:
|
|
166
|
+
* - tooShort: Checks if the value length is less than the minimum length.
|
|
167
|
+
* - tooLong: Checks if the value length exceeds the maximum length.
|
|
168
|
+
* - pattern:
|
|
169
|
+
* - patternMismatch: Checks if the value does not match the specified pattern.
|
|
170
|
+
* - counter:
|
|
171
|
+
* - range:
|
|
172
|
+
* - rangeOverflow: Checks if the value exceeds the maximum value.
|
|
173
|
+
* - rangeUnderflow: Checks if the value is less than the minimum value.
|
|
174
|
+
*/
|
|
175
|
+
validateElementAttributes(elem) {
|
|
176
|
+
const validationRules = {
|
|
177
|
+
input: {
|
|
178
|
+
length: [
|
|
179
|
+
{
|
|
180
|
+
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
181
|
+
validity: 'tooShort',
|
|
182
|
+
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
check: (e) => e.value?.length > e.maxLength,
|
|
186
|
+
validity: 'tooLong',
|
|
187
|
+
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
pattern: [
|
|
191
|
+
{
|
|
192
|
+
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
193
|
+
validity: 'patternMismatch',
|
|
194
|
+
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
counter: {
|
|
199
|
+
range: [
|
|
200
|
+
{
|
|
201
|
+
check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
|
|
202
|
+
validity: 'rangeOverflow',
|
|
203
|
+
message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
|
|
207
|
+
validity: 'rangeUnderflow',
|
|
208
|
+
message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
let elementType;
|
|
215
|
+
if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
216
|
+
elementType = 'input';
|
|
217
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
218
|
+
elementType = 'counter';
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (elementType) {
|
|
222
|
+
const rules = validationRules[elementType];
|
|
223
|
+
|
|
224
|
+
if (rules) {
|
|
225
|
+
Object.values(rules).flat().forEach(rule => {
|
|
226
|
+
if (rule.check(elem)) {
|
|
227
|
+
elem.validity = rule.validity;
|
|
228
|
+
elem.errorMessage = rule.message(elem);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Determines the validity state of the element based on the type attribute.
|
|
237
|
+
* @private
|
|
238
|
+
* @param {object} elem - HTML element to validate.
|
|
239
|
+
* @returns {void}
|
|
240
|
+
*/
|
|
241
|
+
validateType(elem) {
|
|
242
|
+
if (elem.hasAttribute('type')) {
|
|
243
|
+
if (elem.type === 'email') {
|
|
244
|
+
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
245
|
+
|
|
246
|
+
if (!elem.value.match(emailRegex)) {
|
|
247
|
+
elem.validity = 'patternMismatch';
|
|
248
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
249
|
+
}
|
|
250
|
+
} else if (elem.type === 'credit-card') {
|
|
251
|
+
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
252
|
+
elem.validity = 'tooShort';
|
|
253
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
254
|
+
}
|
|
255
|
+
} else if (elem.type === 'number') {
|
|
256
|
+
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
257
|
+
elem.validity = 'rangeOverflow';
|
|
258
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
262
|
+
elem.validity = 'rangeUnderflow';
|
|
263
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
264
|
+
}
|
|
265
|
+
} else if (elem.type === 'month-day-year' ||
|
|
266
|
+
elem.type === 'month-year' ||
|
|
267
|
+
elem.type === 'month-fullYear' ||
|
|
268
|
+
elem.type === 'year-month-day'
|
|
269
|
+
) {
|
|
270
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
271
|
+
elem.validity = 'tooShort';
|
|
272
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
273
|
+
} else {
|
|
274
|
+
const valueDate = new Date(elem.value);
|
|
275
|
+
|
|
276
|
+
// validate max
|
|
277
|
+
if (elem.max !== undefined) {
|
|
278
|
+
const maxDate = new Date(elem.max);
|
|
279
|
+
|
|
280
|
+
if (valueDate > maxDate) {
|
|
281
|
+
elem.validity = 'rangeOverflow';
|
|
282
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// validate min
|
|
287
|
+
if (elem.min) {
|
|
288
|
+
const minDate = new Date(elem.min);
|
|
289
|
+
|
|
290
|
+
if (valueDate < minDate) {
|
|
291
|
+
elem.validity = 'rangeUnderflow';
|
|
292
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Determines the validity state of the element.
|
|
302
|
+
* @param {object} elem - HTML element to validate.
|
|
303
|
+
* @param {boolean} force - Boolean that forces validation to run.
|
|
304
|
+
* @returns {void}
|
|
305
|
+
*/
|
|
306
|
+
validate(elem, force) {
|
|
307
|
+
this.getInputElements(elem);
|
|
308
|
+
this.getAuroInputs(elem);
|
|
309
|
+
|
|
310
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
311
|
+
const validationShouldRun = force || (!elem.contains(document.activeElement) && elem.value !== undefined) || elem.validateOnInput;
|
|
312
|
+
|
|
313
|
+
if (elem.hasAttribute('error')) {
|
|
314
|
+
elem.validity = 'customError';
|
|
315
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
316
|
+
} else if (validationShouldRun) {
|
|
317
|
+
elem.validity = 'valid';
|
|
318
|
+
elem.errorMessage = '';
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Only validate once we interact with the datepicker
|
|
322
|
+
* elem.value === undefined is the initial state pre-interaction.
|
|
323
|
+
*
|
|
324
|
+
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
325
|
+
*/
|
|
326
|
+
|
|
327
|
+
let hasValue = elem.value && elem.value.length > 0;
|
|
328
|
+
|
|
329
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
330
|
+
if (this.auroInputElements?.length === 2) {
|
|
331
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
332
|
+
hasValue = false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (!hasValue && elem.required) {
|
|
337
|
+
elem.validity = 'valueMissing';
|
|
338
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
339
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
340
|
+
this.validateType(elem);
|
|
341
|
+
this.validateElementAttributes(elem);
|
|
342
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
343
|
+
this.validateElementAttributes(elem);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (this.auroInputElements?.length > 0) {
|
|
348
|
+
elem.validity = this.auroInputElements[0].validity;
|
|
349
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
350
|
+
|
|
351
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
352
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
353
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
358
|
+
// Use the validity message override if it is declared
|
|
359
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
360
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
this.getErrorMessage(elem);
|
|
364
|
+
|
|
365
|
+
elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
|
|
366
|
+
bubbles: true,
|
|
367
|
+
composed: true,
|
|
368
|
+
detail: {
|
|
369
|
+
validity: elem.validity,
|
|
370
|
+
message: elem.errorMessage
|
|
371
|
+
}
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Gets all the HTML5 `inputs` in the element shadow DOM.
|
|
378
|
+
* @private
|
|
379
|
+
* @param {object} elem - HTML element to validate.
|
|
380
|
+
* @returns {void}
|
|
381
|
+
*/
|
|
382
|
+
getInputElements(elem) {
|
|
383
|
+
this.inputElements = elem.renderRoot.querySelectorAll('input');
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Gets all the `auro-inputs` in the element shadow DOM.
|
|
388
|
+
* @private
|
|
389
|
+
* @param {object} elem - HTML element to validate.
|
|
390
|
+
* @returns {void}
|
|
391
|
+
*/
|
|
392
|
+
getAuroInputs(elem) {
|
|
393
|
+
this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Return appropriate error message.
|
|
398
|
+
* @private
|
|
399
|
+
* @param {object} elem - HTML element to validate.
|
|
400
|
+
* @returns {void}
|
|
401
|
+
*/
|
|
402
|
+
getErrorMessage(elem) {
|
|
403
|
+
if (elem.validity !== 'valid') {
|
|
404
|
+
if (elem.setCustomValidity) {
|
|
405
|
+
elem.errorMessage = elem.setCustomValidity;
|
|
406
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
407
|
+
const input = elem.renderRoot.querySelector('input');
|
|
408
|
+
|
|
409
|
+
if (input.validationMessage.length > 0) {
|
|
410
|
+
elem.errorMessage = input.validationMessage;
|
|
411
|
+
}
|
|
412
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
413
|
+
const firstInput = this.inputElements[0];
|
|
414
|
+
|
|
415
|
+
if (firstInput.validationMessage.length > 0) {
|
|
416
|
+
elem.errorMessage = firstInput.validationMessage;
|
|
417
|
+
} else if (this.inputElements?.length === 2) {
|
|
418
|
+
const secondInput = this.inputElements[1];
|
|
419
|
+
|
|
420
|
+
if (secondInput.validationMessage.length > 0) {
|
|
421
|
+
elem.errorMessage = secondInput.validationMessage;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
} else {
|
|
426
|
+
elem.errorMessage = undefined;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
432
|
+
// See LICENSE in the project root for license information.
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Generates a unique string to be used for child auro element naming.
|
|
439
|
+
* @private
|
|
440
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
441
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
442
|
+
* @returns {string} - Unique string to be used for naming.
|
|
443
|
+
*/
|
|
444
|
+
generateElementName(baseName, version) {
|
|
445
|
+
let result = baseName;
|
|
446
|
+
|
|
447
|
+
result += '-';
|
|
448
|
+
result += version.replace(/[.]/g, '_');
|
|
449
|
+
|
|
450
|
+
return result;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Generates a unique string to be used for child auro element naming.
|
|
455
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
456
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
457
|
+
* @returns {string} - Unique string to be used for naming.
|
|
458
|
+
*/
|
|
459
|
+
generateTag(baseName, version, tagClass) {
|
|
460
|
+
const elementName = this.generateElementName(baseName, version);
|
|
461
|
+
const tag = i$a`${s$5(elementName)}`;
|
|
462
|
+
|
|
463
|
+
if (!customElements.get(elementName)) {
|
|
464
|
+
customElements.define(elementName, class extends tagClass {});
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return tag;
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @license
|
|
473
|
+
* Copyright 2017 Google LLC
|
|
474
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
475
|
+
*/
|
|
476
|
+
const t$4=globalThis,i$9=t$4.trustedTypes,s$4=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$7="$lit$",h$3=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$3,n$6=`<${o$7}>`,r$7=document,l$4=()=>r$7.createComment(""),c$5=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$4=Array.isArray,u$4=t=>a$4(t)||"function"==typeof t?.[Symbol.iterator],d$3="[ \t\n\f\r]",f$3=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_$1=/>/g,m$1=RegExp(`>|${d$3}(?:([^\\s"'>=/]+)(${d$3}*=${d$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$3=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$2=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y$2(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$7.createTreeWalker(r$7,129);function P$1(t,i){if(!a$4(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$4?s$4.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$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$1:void 0!==u[1]?c=_$1:void 0!==u[2]?($$1.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$3,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g$1:p$3):c===g$1||c===p$3?c=m$1:c===v$1||c===_$1?c=f$3:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$3?s+n$6:d>=0?(o.push(a),s.slice(0,d)+e$7+s.slice(d)+h$3+x):s+h$3+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$7)){const i=v[a++],s=r.getAttribute(t).split(h$3),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$3)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$3),s=t.length-1;if(s>0){r.textContent=i$9?i$9.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$4()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$4());}}}else if(8===r.nodeType)if(r.data===o$7)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$3,t+1));)d.push({type:7,index:c}),t+=h$3.length-1;}c++;}}static createElement(t,i){const s=r$7.createElement("template");return s.innerHTML=t,s}};function S$3(t,i,s=t,e){if(i===T$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$5(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S$3(t,h._$AS(t,i.values),h,e)),i}let M$1 = class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$7).importNode(i,true);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;void 0!==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$7,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==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=void 0,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 void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$3(this,t,i),c$5(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$4(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$1&&c$5(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$7.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===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 void 0===i&&A$1.set(t.strings,i=new N$1(t)),i}k(t){a$4(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$4()),this.O(l$4()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===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=void 0,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(void 0===h)t=S$3(this,t,i,0),o=!c$5(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$3(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$5(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?void 0: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$3(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=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$3(this,t);}};const j$1=t$4.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$4.litHtmlVersions??=[]).push("3.2.1");const B$1=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$1(i.insertBefore(l$4(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @license
|
|
480
|
+
* Copyright 2020 Google LLC
|
|
481
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
482
|
+
*/
|
|
483
|
+
const a$3=Symbol.for(""),o$6=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$3}),i$8=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a$3}),l$3=new Map,n$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&&void 0!==(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$$");void 0===(r=l$3.get(t))&&(n.raw=n,l$3.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$5(x);
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @license
|
|
487
|
+
* Copyright 2019 Google LLC
|
|
488
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
489
|
+
*/
|
|
490
|
+
const t$3=globalThis,e$6=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2$1=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2$1)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$6&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$6=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2$1),i$7=(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$4(o,t,s$2$1)},S$2=(s,o)=>{if(e$6)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$4=e$6?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$6(e)})(t):t;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @license
|
|
494
|
+
* Copyright 2017 Google LLC
|
|
495
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
496
|
+
*/const{is:i$6,defineProperty:e$5,getOwnPropertyDescriptor:r$5,getOwnPropertyNames:h$2,getOwnPropertySymbols:o$4$1,getPrototypeOf:n$3$1}=Object,a$2$1=globalThis,c$3=a$2$1.trustedTypes,l$2$1=c$3?c$3.emptyScript:"",p$2=a$2$1.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$2$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$2$1: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$6(t,s),y={attribute:true,type:String,converter:u$2$1,reflect:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$2$1.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){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$5(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$5(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$3$1(this);t.finalize(),void 0!==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$4$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(void 0!==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);void 0!==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$4(s));}else void 0!==s&&i.push(c$4(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,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),void 0!==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(void 0!==e&&true===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$2$1).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(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==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=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||void 0===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$2$1.reactiveElementVersions??=[]).push("2.0.4");
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* @license
|
|
500
|
+
* Copyright 2017 Google LLC
|
|
501
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
502
|
+
*/let r$4 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}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$5$1=globalThis.litElementPolyfillSupport;i$5$1?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
503
|
+
|
|
504
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
505
|
+
// See LICENSE in the project root for license information.
|
|
506
|
+
|
|
507
|
+
// ---------------------------------------------------------------------
|
|
508
|
+
|
|
509
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
510
|
+
|
|
511
|
+
class AuroLibraryRuntimeUtils {
|
|
512
|
+
|
|
513
|
+
/* eslint-disable jsdoc/require-param */
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* This will register a new custom element with the browser.
|
|
517
|
+
* @param {String} name - The name of the custom element.
|
|
518
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
519
|
+
* @returns {void}
|
|
520
|
+
*/
|
|
521
|
+
registerComponent(name, componentClass) {
|
|
522
|
+
if (!customElements.get(name)) {
|
|
523
|
+
customElements.define(name, class extends componentClass {});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
529
|
+
* @returns {void}
|
|
530
|
+
*/
|
|
531
|
+
closestElement(
|
|
532
|
+
selector, // selector like in .closest()
|
|
533
|
+
base = this, // extra functionality to skip a parent
|
|
534
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
535
|
+
!el || el === document || el === window
|
|
536
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
537
|
+
: found
|
|
538
|
+
? found // found a selector INside this element
|
|
539
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
540
|
+
) {
|
|
541
|
+
return __Closest(base);
|
|
542
|
+
}
|
|
543
|
+
/* eslint-enable jsdoc/require-param */
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* 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.
|
|
547
|
+
* @param {Object} elem - The element to check.
|
|
548
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
549
|
+
* @returns {void}
|
|
550
|
+
*/
|
|
551
|
+
handleComponentTagRename(elem, tagName) {
|
|
552
|
+
const tag = tagName.toLowerCase();
|
|
553
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
554
|
+
|
|
555
|
+
if (elemTag !== tag) {
|
|
556
|
+
elem.setAttribute(tag, true);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Validates if an element is a specific Auro component.
|
|
562
|
+
* @param {Object} elem - The element to validate.
|
|
563
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
564
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
565
|
+
*/
|
|
566
|
+
elementMatch(elem, tagName) {
|
|
567
|
+
const tag = tagName.toLowerCase();
|
|
568
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
569
|
+
|
|
570
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Custom positioning reference element.
|
|
576
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
577
|
+
*/
|
|
578
|
+
|
|
579
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
580
|
+
const alignments = ['start', 'end'];
|
|
581
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
582
|
+
const min = Math.min;
|
|
583
|
+
const max = Math.max;
|
|
584
|
+
const round = Math.round;
|
|
585
|
+
const floor = Math.floor;
|
|
586
|
+
const createCoords = v => ({
|
|
587
|
+
x: v,
|
|
588
|
+
y: v
|
|
589
|
+
});
|
|
590
|
+
const oppositeSideMap = {
|
|
591
|
+
left: 'right',
|
|
592
|
+
right: 'left',
|
|
593
|
+
bottom: 'top',
|
|
594
|
+
top: 'bottom'
|
|
595
|
+
};
|
|
596
|
+
const oppositeAlignmentMap = {
|
|
597
|
+
start: 'end',
|
|
598
|
+
end: 'start'
|
|
599
|
+
};
|
|
600
|
+
function evaluate(value, param) {
|
|
601
|
+
return typeof value === 'function' ? value(param) : value;
|
|
602
|
+
}
|
|
603
|
+
function getSide(placement) {
|
|
604
|
+
return placement.split('-')[0];
|
|
605
|
+
}
|
|
606
|
+
function getAlignment(placement) {
|
|
607
|
+
return placement.split('-')[1];
|
|
608
|
+
}
|
|
609
|
+
function getOppositeAxis(axis) {
|
|
610
|
+
return axis === 'x' ? 'y' : 'x';
|
|
611
|
+
}
|
|
612
|
+
function getAxisLength(axis) {
|
|
613
|
+
return axis === 'y' ? 'height' : 'width';
|
|
614
|
+
}
|
|
615
|
+
function getSideAxis(placement) {
|
|
616
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
617
|
+
}
|
|
618
|
+
function getAlignmentAxis(placement) {
|
|
619
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
620
|
+
}
|
|
621
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
622
|
+
if (rtl === void 0) {
|
|
623
|
+
rtl = false;
|
|
624
|
+
}
|
|
625
|
+
const alignment = getAlignment(placement);
|
|
626
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
627
|
+
const length = getAxisLength(alignmentAxis);
|
|
628
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
629
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
630
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
631
|
+
}
|
|
632
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
633
|
+
}
|
|
634
|
+
function getExpandedPlacements(placement) {
|
|
635
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
636
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
637
|
+
}
|
|
638
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
639
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
640
|
+
}
|
|
641
|
+
function getSideList(side, isStart, rtl) {
|
|
642
|
+
const lr = ['left', 'right'];
|
|
643
|
+
const rl = ['right', 'left'];
|
|
644
|
+
const tb = ['top', 'bottom'];
|
|
645
|
+
const bt = ['bottom', 'top'];
|
|
646
|
+
switch (side) {
|
|
647
|
+
case 'top':
|
|
648
|
+
case 'bottom':
|
|
649
|
+
if (rtl) return isStart ? rl : lr;
|
|
650
|
+
return isStart ? lr : rl;
|
|
651
|
+
case 'left':
|
|
652
|
+
case 'right':
|
|
653
|
+
return isStart ? tb : bt;
|
|
654
|
+
default:
|
|
655
|
+
return [];
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
659
|
+
const alignment = getAlignment(placement);
|
|
660
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
661
|
+
if (alignment) {
|
|
662
|
+
list = list.map(side => side + "-" + alignment);
|
|
663
|
+
if (flipAlignment) {
|
|
664
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return list;
|
|
668
|
+
}
|
|
669
|
+
function getOppositePlacement(placement) {
|
|
670
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
671
|
+
}
|
|
672
|
+
function expandPaddingObject(padding) {
|
|
673
|
+
return {
|
|
674
|
+
top: 0,
|
|
675
|
+
right: 0,
|
|
676
|
+
bottom: 0,
|
|
677
|
+
left: 0,
|
|
678
|
+
...padding
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
function getPaddingObject(padding) {
|
|
682
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
683
|
+
top: padding,
|
|
684
|
+
right: padding,
|
|
685
|
+
bottom: padding,
|
|
686
|
+
left: padding
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
function rectToClientRect(rect) {
|
|
690
|
+
const {
|
|
691
|
+
x,
|
|
692
|
+
y,
|
|
693
|
+
width,
|
|
694
|
+
height
|
|
695
|
+
} = rect;
|
|
696
|
+
return {
|
|
697
|
+
width,
|
|
698
|
+
height,
|
|
699
|
+
top: y,
|
|
700
|
+
left: x,
|
|
701
|
+
right: x + width,
|
|
702
|
+
bottom: y + height,
|
|
703
|
+
x,
|
|
704
|
+
y
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
709
|
+
let {
|
|
710
|
+
reference,
|
|
711
|
+
floating
|
|
712
|
+
} = _ref;
|
|
713
|
+
const sideAxis = getSideAxis(placement);
|
|
714
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
715
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
716
|
+
const side = getSide(placement);
|
|
717
|
+
const isVertical = sideAxis === 'y';
|
|
718
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
719
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
720
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
721
|
+
let coords;
|
|
722
|
+
switch (side) {
|
|
723
|
+
case 'top':
|
|
724
|
+
coords = {
|
|
725
|
+
x: commonX,
|
|
726
|
+
y: reference.y - floating.height
|
|
727
|
+
};
|
|
728
|
+
break;
|
|
729
|
+
case 'bottom':
|
|
730
|
+
coords = {
|
|
731
|
+
x: commonX,
|
|
732
|
+
y: reference.y + reference.height
|
|
733
|
+
};
|
|
734
|
+
break;
|
|
735
|
+
case 'right':
|
|
736
|
+
coords = {
|
|
737
|
+
x: reference.x + reference.width,
|
|
738
|
+
y: commonY
|
|
739
|
+
};
|
|
740
|
+
break;
|
|
741
|
+
case 'left':
|
|
742
|
+
coords = {
|
|
743
|
+
x: reference.x - floating.width,
|
|
744
|
+
y: commonY
|
|
745
|
+
};
|
|
746
|
+
break;
|
|
747
|
+
default:
|
|
748
|
+
coords = {
|
|
749
|
+
x: reference.x,
|
|
750
|
+
y: reference.y
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
switch (getAlignment(placement)) {
|
|
754
|
+
case 'start':
|
|
755
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
756
|
+
break;
|
|
757
|
+
case 'end':
|
|
758
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
return coords;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
766
|
+
* next to a given reference element.
|
|
767
|
+
*
|
|
768
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
769
|
+
* write one for the platform you are using Floating UI with.
|
|
770
|
+
*/
|
|
771
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
772
|
+
const {
|
|
773
|
+
placement = 'bottom',
|
|
774
|
+
strategy = 'absolute',
|
|
775
|
+
middleware = [],
|
|
776
|
+
platform
|
|
777
|
+
} = config;
|
|
778
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
779
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
780
|
+
let rects = await platform.getElementRects({
|
|
781
|
+
reference,
|
|
782
|
+
floating,
|
|
783
|
+
strategy
|
|
784
|
+
});
|
|
785
|
+
let {
|
|
786
|
+
x,
|
|
787
|
+
y
|
|
788
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
789
|
+
let statefulPlacement = placement;
|
|
790
|
+
let middlewareData = {};
|
|
791
|
+
let resetCount = 0;
|
|
792
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
793
|
+
const {
|
|
794
|
+
name,
|
|
795
|
+
fn
|
|
796
|
+
} = validMiddleware[i];
|
|
797
|
+
const {
|
|
798
|
+
x: nextX,
|
|
799
|
+
y: nextY,
|
|
800
|
+
data,
|
|
801
|
+
reset
|
|
802
|
+
} = await fn({
|
|
803
|
+
x,
|
|
804
|
+
y,
|
|
805
|
+
initialPlacement: placement,
|
|
806
|
+
placement: statefulPlacement,
|
|
807
|
+
strategy,
|
|
808
|
+
middlewareData,
|
|
809
|
+
rects,
|
|
810
|
+
platform,
|
|
811
|
+
elements: {
|
|
812
|
+
reference,
|
|
813
|
+
floating
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
x = nextX != null ? nextX : x;
|
|
817
|
+
y = nextY != null ? nextY : y;
|
|
818
|
+
middlewareData = {
|
|
819
|
+
...middlewareData,
|
|
820
|
+
[name]: {
|
|
821
|
+
...middlewareData[name],
|
|
822
|
+
...data
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
if (reset && resetCount <= 50) {
|
|
826
|
+
resetCount++;
|
|
827
|
+
if (typeof reset === 'object') {
|
|
828
|
+
if (reset.placement) {
|
|
829
|
+
statefulPlacement = reset.placement;
|
|
830
|
+
}
|
|
831
|
+
if (reset.rects) {
|
|
832
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
833
|
+
reference,
|
|
834
|
+
floating,
|
|
835
|
+
strategy
|
|
836
|
+
}) : reset.rects;
|
|
837
|
+
}
|
|
838
|
+
({
|
|
839
|
+
x,
|
|
840
|
+
y
|
|
841
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
842
|
+
}
|
|
843
|
+
i = -1;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
return {
|
|
847
|
+
x,
|
|
848
|
+
y,
|
|
849
|
+
placement: statefulPlacement,
|
|
850
|
+
strategy,
|
|
851
|
+
middlewareData
|
|
852
|
+
};
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
857
|
+
* element is overflowing a given clipping boundary on each side.
|
|
858
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
859
|
+
* - negative = how many pixels left before it will overflow
|
|
860
|
+
* - 0 = lies flush with the boundary
|
|
861
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
862
|
+
*/
|
|
863
|
+
async function detectOverflow(state, options) {
|
|
864
|
+
var _await$platform$isEle;
|
|
865
|
+
if (options === void 0) {
|
|
866
|
+
options = {};
|
|
867
|
+
}
|
|
868
|
+
const {
|
|
869
|
+
x,
|
|
870
|
+
y,
|
|
871
|
+
platform,
|
|
872
|
+
rects,
|
|
873
|
+
elements,
|
|
874
|
+
strategy
|
|
875
|
+
} = state;
|
|
876
|
+
const {
|
|
877
|
+
boundary = 'clippingAncestors',
|
|
878
|
+
rootBoundary = 'viewport',
|
|
879
|
+
elementContext = 'floating',
|
|
880
|
+
altBoundary = false,
|
|
881
|
+
padding = 0
|
|
882
|
+
} = evaluate(options, state);
|
|
883
|
+
const paddingObject = getPaddingObject(padding);
|
|
884
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
885
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
886
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
887
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
888
|
+
boundary,
|
|
889
|
+
rootBoundary,
|
|
890
|
+
strategy
|
|
891
|
+
}));
|
|
892
|
+
const rect = elementContext === 'floating' ? {
|
|
893
|
+
x,
|
|
894
|
+
y,
|
|
895
|
+
width: rects.floating.width,
|
|
896
|
+
height: rects.floating.height
|
|
897
|
+
} : rects.reference;
|
|
898
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
899
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
900
|
+
x: 1,
|
|
901
|
+
y: 1
|
|
902
|
+
} : {
|
|
903
|
+
x: 1,
|
|
904
|
+
y: 1
|
|
905
|
+
};
|
|
906
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
907
|
+
elements,
|
|
908
|
+
rect,
|
|
909
|
+
offsetParent,
|
|
910
|
+
strategy
|
|
911
|
+
}) : rect);
|
|
912
|
+
return {
|
|
913
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
914
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
915
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
916
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
921
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
922
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
923
|
+
if (alignment) {
|
|
924
|
+
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
925
|
+
}
|
|
926
|
+
return true;
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
931
|
+
* that has the most space available automatically, without needing to specify a
|
|
932
|
+
* preferred placement. Alternative to `flip`.
|
|
933
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
934
|
+
*/
|
|
935
|
+
const autoPlacement$1 = function (options) {
|
|
936
|
+
if (options === void 0) {
|
|
937
|
+
options = {};
|
|
938
|
+
}
|
|
939
|
+
return {
|
|
940
|
+
name: 'autoPlacement',
|
|
941
|
+
options,
|
|
942
|
+
async fn(state) {
|
|
943
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
944
|
+
const {
|
|
945
|
+
rects,
|
|
946
|
+
middlewareData,
|
|
947
|
+
placement,
|
|
948
|
+
platform,
|
|
949
|
+
elements
|
|
950
|
+
} = state;
|
|
951
|
+
const {
|
|
952
|
+
crossAxis = false,
|
|
953
|
+
alignment,
|
|
954
|
+
allowedPlacements = placements,
|
|
955
|
+
autoAlignment = true,
|
|
956
|
+
...detectOverflowOptions
|
|
957
|
+
} = evaluate(options, state);
|
|
958
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
959
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
960
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
961
|
+
const currentPlacement = placements$1[currentIndex];
|
|
962
|
+
if (currentPlacement == null) {
|
|
963
|
+
return {};
|
|
964
|
+
}
|
|
965
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
966
|
+
|
|
967
|
+
// Make `computeCoords` start from the right place.
|
|
968
|
+
if (placement !== currentPlacement) {
|
|
969
|
+
return {
|
|
970
|
+
reset: {
|
|
971
|
+
placement: placements$1[0]
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
976
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
977
|
+
placement: currentPlacement,
|
|
978
|
+
overflows: currentOverflows
|
|
979
|
+
}];
|
|
980
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
|
981
|
+
|
|
982
|
+
// There are more placements to check.
|
|
983
|
+
if (nextPlacement) {
|
|
984
|
+
return {
|
|
985
|
+
data: {
|
|
986
|
+
index: currentIndex + 1,
|
|
987
|
+
overflows: allOverflows
|
|
988
|
+
},
|
|
989
|
+
reset: {
|
|
990
|
+
placement: nextPlacement
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
995
|
+
const alignment = getAlignment(d.placement);
|
|
996
|
+
return [d.placement, alignment && crossAxis ?
|
|
997
|
+
// Check along the mainAxis and main crossAxis side.
|
|
998
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
999
|
+
// Check only the mainAxis.
|
|
1000
|
+
d.overflows[0], d.overflows];
|
|
1001
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
1002
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
1003
|
+
// Aligned placements should not check their opposite crossAxis
|
|
1004
|
+
// side.
|
|
1005
|
+
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
1006
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
1007
|
+
if (resetPlacement !== placement) {
|
|
1008
|
+
return {
|
|
1009
|
+
data: {
|
|
1010
|
+
index: currentIndex + 1,
|
|
1011
|
+
overflows: allOverflows
|
|
1012
|
+
},
|
|
1013
|
+
reset: {
|
|
1014
|
+
placement: resetPlacement
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
return {};
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1025
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1026
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1027
|
+
* @see https://floating-ui.com/docs/flip
|
|
1028
|
+
*/
|
|
1029
|
+
const flip$1 = function (options) {
|
|
1030
|
+
if (options === void 0) {
|
|
1031
|
+
options = {};
|
|
1032
|
+
}
|
|
1033
|
+
return {
|
|
1034
|
+
name: 'flip',
|
|
1035
|
+
options,
|
|
1036
|
+
async fn(state) {
|
|
1037
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
1038
|
+
const {
|
|
1039
|
+
placement,
|
|
1040
|
+
middlewareData,
|
|
1041
|
+
rects,
|
|
1042
|
+
initialPlacement,
|
|
1043
|
+
platform,
|
|
1044
|
+
elements
|
|
1045
|
+
} = state;
|
|
1046
|
+
const {
|
|
1047
|
+
mainAxis: checkMainAxis = true,
|
|
1048
|
+
crossAxis: checkCrossAxis = true,
|
|
1049
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
1050
|
+
fallbackStrategy = 'bestFit',
|
|
1051
|
+
fallbackAxisSideDirection = 'none',
|
|
1052
|
+
flipAlignment = true,
|
|
1053
|
+
...detectOverflowOptions
|
|
1054
|
+
} = evaluate(options, state);
|
|
1055
|
+
|
|
1056
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
|
1057
|
+
// added, we should skip any logic now since `flip()` has already done its
|
|
1058
|
+
// work.
|
|
1059
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
1060
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1061
|
+
return {};
|
|
1062
|
+
}
|
|
1063
|
+
const side = getSide(placement);
|
|
1064
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
1065
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
1066
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
1067
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
1068
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
1069
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
1070
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
1071
|
+
}
|
|
1072
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
1073
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1074
|
+
const overflows = [];
|
|
1075
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
1076
|
+
if (checkMainAxis) {
|
|
1077
|
+
overflows.push(overflow[side]);
|
|
1078
|
+
}
|
|
1079
|
+
if (checkCrossAxis) {
|
|
1080
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
1081
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
1082
|
+
}
|
|
1083
|
+
overflowsData = [...overflowsData, {
|
|
1084
|
+
placement,
|
|
1085
|
+
overflows
|
|
1086
|
+
}];
|
|
1087
|
+
|
|
1088
|
+
// One or more sides is overflowing.
|
|
1089
|
+
if (!overflows.every(side => side <= 0)) {
|
|
1090
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
1091
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1092
|
+
const nextPlacement = placements[nextIndex];
|
|
1093
|
+
if (nextPlacement) {
|
|
1094
|
+
// Try next placement and re-run the lifecycle.
|
|
1095
|
+
return {
|
|
1096
|
+
data: {
|
|
1097
|
+
index: nextIndex,
|
|
1098
|
+
overflows: overflowsData
|
|
1099
|
+
},
|
|
1100
|
+
reset: {
|
|
1101
|
+
placement: nextPlacement
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1107
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
1108
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
1109
|
+
|
|
1110
|
+
// Otherwise fallback.
|
|
1111
|
+
if (!resetPlacement) {
|
|
1112
|
+
switch (fallbackStrategy) {
|
|
1113
|
+
case 'bestFit':
|
|
1114
|
+
{
|
|
1115
|
+
var _overflowsData$filter2;
|
|
1116
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
1117
|
+
if (hasFallbackAxisSideDirection) {
|
|
1118
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
1119
|
+
return currentSideAxis === initialSideAxis ||
|
|
1120
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
1121
|
+
// reading directions favoring greater width.
|
|
1122
|
+
currentSideAxis === 'y';
|
|
1123
|
+
}
|
|
1124
|
+
return true;
|
|
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 ? void 0 : _overflowsData$filter2[0];
|
|
1126
|
+
if (placement) {
|
|
1127
|
+
resetPlacement = placement;
|
|
1128
|
+
}
|
|
1129
|
+
break;
|
|
1130
|
+
}
|
|
1131
|
+
case 'initialPlacement':
|
|
1132
|
+
resetPlacement = initialPlacement;
|
|
1133
|
+
break;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
if (placement !== resetPlacement) {
|
|
1137
|
+
return {
|
|
1138
|
+
reset: {
|
|
1139
|
+
placement: resetPlacement
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
return {};
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
1150
|
+
// Derivable.
|
|
1151
|
+
|
|
1152
|
+
async function convertValueToCoords(state, options) {
|
|
1153
|
+
const {
|
|
1154
|
+
placement,
|
|
1155
|
+
platform,
|
|
1156
|
+
elements
|
|
1157
|
+
} = state;
|
|
1158
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
1159
|
+
const side = getSide(placement);
|
|
1160
|
+
const alignment = getAlignment(placement);
|
|
1161
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
1162
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
1163
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1164
|
+
const rawValue = evaluate(options, state);
|
|
1165
|
+
|
|
1166
|
+
// eslint-disable-next-line prefer-const
|
|
1167
|
+
let {
|
|
1168
|
+
mainAxis,
|
|
1169
|
+
crossAxis,
|
|
1170
|
+
alignmentAxis
|
|
1171
|
+
} = typeof rawValue === 'number' ? {
|
|
1172
|
+
mainAxis: rawValue,
|
|
1173
|
+
crossAxis: 0,
|
|
1174
|
+
alignmentAxis: null
|
|
1175
|
+
} : {
|
|
1176
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
1177
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
1178
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
1179
|
+
};
|
|
1180
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
1181
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
1182
|
+
}
|
|
1183
|
+
return isVertical ? {
|
|
1184
|
+
x: crossAxis * crossAxisMulti,
|
|
1185
|
+
y: mainAxis * mainAxisMulti
|
|
1186
|
+
} : {
|
|
1187
|
+
x: mainAxis * mainAxisMulti,
|
|
1188
|
+
y: crossAxis * crossAxisMulti
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Modifies the placement by translating the floating element along the
|
|
1194
|
+
* specified axes.
|
|
1195
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1196
|
+
* object may be passed.
|
|
1197
|
+
* @see https://floating-ui.com/docs/offset
|
|
1198
|
+
*/
|
|
1199
|
+
const offset$1 = function (options) {
|
|
1200
|
+
if (options === void 0) {
|
|
1201
|
+
options = 0;
|
|
1202
|
+
}
|
|
1203
|
+
return {
|
|
1204
|
+
name: 'offset',
|
|
1205
|
+
options,
|
|
1206
|
+
async fn(state) {
|
|
1207
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
1208
|
+
const {
|
|
1209
|
+
x,
|
|
1210
|
+
y,
|
|
1211
|
+
placement,
|
|
1212
|
+
middlewareData
|
|
1213
|
+
} = state;
|
|
1214
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
1215
|
+
|
|
1216
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
1217
|
+
// then we don't need to change the positioning coordinates.
|
|
1218
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1219
|
+
return {};
|
|
1220
|
+
}
|
|
1221
|
+
return {
|
|
1222
|
+
x: x + diffCoords.x,
|
|
1223
|
+
y: y + diffCoords.y,
|
|
1224
|
+
data: {
|
|
1225
|
+
...diffCoords,
|
|
1226
|
+
placement
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
function hasWindow() {
|
|
1234
|
+
return typeof window !== 'undefined';
|
|
1235
|
+
}
|
|
1236
|
+
function getNodeName(node) {
|
|
1237
|
+
if (isNode(node)) {
|
|
1238
|
+
return (node.nodeName || '').toLowerCase();
|
|
1239
|
+
}
|
|
1240
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
1241
|
+
// returning `#document` an infinite loop won't occur.
|
|
1242
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
1243
|
+
return '#document';
|
|
1244
|
+
}
|
|
1245
|
+
function getWindow(node) {
|
|
1246
|
+
var _node$ownerDocument;
|
|
1247
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1248
|
+
}
|
|
1249
|
+
function getDocumentElement(node) {
|
|
1250
|
+
var _ref;
|
|
1251
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1252
|
+
}
|
|
1253
|
+
function isNode(value) {
|
|
1254
|
+
if (!hasWindow()) {
|
|
1255
|
+
return false;
|
|
1256
|
+
}
|
|
1257
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1258
|
+
}
|
|
1259
|
+
function isElement(value) {
|
|
1260
|
+
if (!hasWindow()) {
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
1263
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1264
|
+
}
|
|
1265
|
+
function isHTMLElement(value) {
|
|
1266
|
+
if (!hasWindow()) {
|
|
1267
|
+
return false;
|
|
1268
|
+
}
|
|
1269
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1270
|
+
}
|
|
1271
|
+
function isShadowRoot(value) {
|
|
1272
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
1273
|
+
return false;
|
|
1274
|
+
}
|
|
1275
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1276
|
+
}
|
|
1277
|
+
function isOverflowElement(element) {
|
|
1278
|
+
const {
|
|
1279
|
+
overflow,
|
|
1280
|
+
overflowX,
|
|
1281
|
+
overflowY,
|
|
1282
|
+
display
|
|
1283
|
+
} = getComputedStyle$1(element);
|
|
1284
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
1285
|
+
}
|
|
1286
|
+
function isTableElement(element) {
|
|
1287
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
1288
|
+
}
|
|
1289
|
+
function isTopLayer(element) {
|
|
1290
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
1291
|
+
try {
|
|
1292
|
+
return element.matches(selector);
|
|
1293
|
+
} catch (e) {
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
function isContainingBlock(elementOrCss) {
|
|
1299
|
+
const webkit = isWebKit();
|
|
1300
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1301
|
+
|
|
1302
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1303
|
+
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1304
|
+
}
|
|
1305
|
+
function getContainingBlock(element) {
|
|
1306
|
+
let currentNode = getParentNode(element);
|
|
1307
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1308
|
+
if (isContainingBlock(currentNode)) {
|
|
1309
|
+
return currentNode;
|
|
1310
|
+
} else if (isTopLayer(currentNode)) {
|
|
1311
|
+
return null;
|
|
1312
|
+
}
|
|
1313
|
+
currentNode = getParentNode(currentNode);
|
|
1314
|
+
}
|
|
1315
|
+
return null;
|
|
1316
|
+
}
|
|
1317
|
+
function isWebKit() {
|
|
1318
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
1319
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
1320
|
+
}
|
|
1321
|
+
function isLastTraversableNode(node) {
|
|
1322
|
+
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
1323
|
+
}
|
|
1324
|
+
function getComputedStyle$1(element) {
|
|
1325
|
+
return getWindow(element).getComputedStyle(element);
|
|
1326
|
+
}
|
|
1327
|
+
function getNodeScroll(element) {
|
|
1328
|
+
if (isElement(element)) {
|
|
1329
|
+
return {
|
|
1330
|
+
scrollLeft: element.scrollLeft,
|
|
1331
|
+
scrollTop: element.scrollTop
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
return {
|
|
1335
|
+
scrollLeft: element.scrollX,
|
|
1336
|
+
scrollTop: element.scrollY
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
function getParentNode(node) {
|
|
1340
|
+
if (getNodeName(node) === 'html') {
|
|
1341
|
+
return node;
|
|
1342
|
+
}
|
|
1343
|
+
const result =
|
|
1344
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1345
|
+
node.assignedSlot ||
|
|
1346
|
+
// DOM Element detected.
|
|
1347
|
+
node.parentNode ||
|
|
1348
|
+
// ShadowRoot detected.
|
|
1349
|
+
isShadowRoot(node) && node.host ||
|
|
1350
|
+
// Fallback.
|
|
1351
|
+
getDocumentElement(node);
|
|
1352
|
+
return isShadowRoot(result) ? result.host : result;
|
|
1353
|
+
}
|
|
1354
|
+
function getNearestOverflowAncestor(node) {
|
|
1355
|
+
const parentNode = getParentNode(node);
|
|
1356
|
+
if (isLastTraversableNode(parentNode)) {
|
|
1357
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1358
|
+
}
|
|
1359
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1360
|
+
return parentNode;
|
|
1361
|
+
}
|
|
1362
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1363
|
+
}
|
|
1364
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1365
|
+
var _node$ownerDocument2;
|
|
1366
|
+
if (list === void 0) {
|
|
1367
|
+
list = [];
|
|
1368
|
+
}
|
|
1369
|
+
if (traverseIframes === void 0) {
|
|
1370
|
+
traverseIframes = true;
|
|
1371
|
+
}
|
|
1372
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1373
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1374
|
+
const win = getWindow(scrollableAncestor);
|
|
1375
|
+
if (isBody) {
|
|
1376
|
+
const frameElement = getFrameElement(win);
|
|
1377
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1378
|
+
}
|
|
1379
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1380
|
+
}
|
|
1381
|
+
function getFrameElement(win) {
|
|
1382
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
function getCssDimensions(element) {
|
|
1386
|
+
const css = getComputedStyle$1(element);
|
|
1387
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
1388
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1389
|
+
let width = parseFloat(css.width) || 0;
|
|
1390
|
+
let height = parseFloat(css.height) || 0;
|
|
1391
|
+
const hasOffset = isHTMLElement(element);
|
|
1392
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1393
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1394
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1395
|
+
if (shouldFallback) {
|
|
1396
|
+
width = offsetWidth;
|
|
1397
|
+
height = offsetHeight;
|
|
1398
|
+
}
|
|
1399
|
+
return {
|
|
1400
|
+
width,
|
|
1401
|
+
height,
|
|
1402
|
+
$: shouldFallback
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
function unwrapElement(element) {
|
|
1407
|
+
return !isElement(element) ? element.contextElement : element;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
function getScale(element) {
|
|
1411
|
+
const domElement = unwrapElement(element);
|
|
1412
|
+
if (!isHTMLElement(domElement)) {
|
|
1413
|
+
return createCoords(1);
|
|
1414
|
+
}
|
|
1415
|
+
const rect = domElement.getBoundingClientRect();
|
|
1416
|
+
const {
|
|
1417
|
+
width,
|
|
1418
|
+
height,
|
|
1419
|
+
$
|
|
1420
|
+
} = getCssDimensions(domElement);
|
|
1421
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1422
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1423
|
+
|
|
1424
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
1425
|
+
|
|
1426
|
+
if (!x || !Number.isFinite(x)) {
|
|
1427
|
+
x = 1;
|
|
1428
|
+
}
|
|
1429
|
+
if (!y || !Number.isFinite(y)) {
|
|
1430
|
+
y = 1;
|
|
1431
|
+
}
|
|
1432
|
+
return {
|
|
1433
|
+
x,
|
|
1434
|
+
y
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1439
|
+
function getVisualOffsets(element) {
|
|
1440
|
+
const win = getWindow(element);
|
|
1441
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
1442
|
+
return noOffsets;
|
|
1443
|
+
}
|
|
1444
|
+
return {
|
|
1445
|
+
x: win.visualViewport.offsetLeft,
|
|
1446
|
+
y: win.visualViewport.offsetTop
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1450
|
+
if (isFixed === void 0) {
|
|
1451
|
+
isFixed = false;
|
|
1452
|
+
}
|
|
1453
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1454
|
+
return false;
|
|
1455
|
+
}
|
|
1456
|
+
return isFixed;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1460
|
+
if (includeScale === void 0) {
|
|
1461
|
+
includeScale = false;
|
|
1462
|
+
}
|
|
1463
|
+
if (isFixedStrategy === void 0) {
|
|
1464
|
+
isFixedStrategy = false;
|
|
1465
|
+
}
|
|
1466
|
+
const clientRect = element.getBoundingClientRect();
|
|
1467
|
+
const domElement = unwrapElement(element);
|
|
1468
|
+
let scale = createCoords(1);
|
|
1469
|
+
if (includeScale) {
|
|
1470
|
+
if (offsetParent) {
|
|
1471
|
+
if (isElement(offsetParent)) {
|
|
1472
|
+
scale = getScale(offsetParent);
|
|
1473
|
+
}
|
|
1474
|
+
} else {
|
|
1475
|
+
scale = getScale(element);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1479
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1480
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1481
|
+
let width = clientRect.width / scale.x;
|
|
1482
|
+
let height = clientRect.height / scale.y;
|
|
1483
|
+
if (domElement) {
|
|
1484
|
+
const win = getWindow(domElement);
|
|
1485
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1486
|
+
let currentWin = win;
|
|
1487
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
1488
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1489
|
+
const iframeScale = getScale(currentIFrame);
|
|
1490
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1491
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
1492
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1493
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1494
|
+
x *= iframeScale.x;
|
|
1495
|
+
y *= iframeScale.y;
|
|
1496
|
+
width *= iframeScale.x;
|
|
1497
|
+
height *= iframeScale.y;
|
|
1498
|
+
x += left;
|
|
1499
|
+
y += top;
|
|
1500
|
+
currentWin = getWindow(currentIFrame);
|
|
1501
|
+
currentIFrame = getFrameElement(currentWin);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
return rectToClientRect({
|
|
1505
|
+
width,
|
|
1506
|
+
height,
|
|
1507
|
+
x,
|
|
1508
|
+
y
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1513
|
+
// incorrect for RTL.
|
|
1514
|
+
function getWindowScrollBarX(element, rect) {
|
|
1515
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1516
|
+
if (!rect) {
|
|
1517
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1518
|
+
}
|
|
1519
|
+
return rect.left + leftScroll;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1523
|
+
if (ignoreScrollbarX === void 0) {
|
|
1524
|
+
ignoreScrollbarX = false;
|
|
1525
|
+
}
|
|
1526
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
1527
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
1528
|
+
// RTL <body> scrollbar.
|
|
1529
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
1530
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
1531
|
+
return {
|
|
1532
|
+
x,
|
|
1533
|
+
y
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1538
|
+
let {
|
|
1539
|
+
elements,
|
|
1540
|
+
rect,
|
|
1541
|
+
offsetParent,
|
|
1542
|
+
strategy
|
|
1543
|
+
} = _ref;
|
|
1544
|
+
const isFixed = strategy === 'fixed';
|
|
1545
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1546
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1547
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1548
|
+
return rect;
|
|
1549
|
+
}
|
|
1550
|
+
let scroll = {
|
|
1551
|
+
scrollLeft: 0,
|
|
1552
|
+
scrollTop: 0
|
|
1553
|
+
};
|
|
1554
|
+
let scale = createCoords(1);
|
|
1555
|
+
const offsets = createCoords(0);
|
|
1556
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1557
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1558
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1559
|
+
scroll = getNodeScroll(offsetParent);
|
|
1560
|
+
}
|
|
1561
|
+
if (isHTMLElement(offsetParent)) {
|
|
1562
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1563
|
+
scale = getScale(offsetParent);
|
|
1564
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1565
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
1569
|
+
return {
|
|
1570
|
+
width: rect.width * scale.x,
|
|
1571
|
+
height: rect.height * scale.y,
|
|
1572
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1573
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
function getClientRects(element) {
|
|
1578
|
+
return Array.from(element.getClientRects());
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
|
1582
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1583
|
+
function getDocumentRect(element) {
|
|
1584
|
+
const html = getDocumentElement(element);
|
|
1585
|
+
const scroll = getNodeScroll(element);
|
|
1586
|
+
const body = element.ownerDocument.body;
|
|
1587
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1588
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1589
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1590
|
+
const y = -scroll.scrollTop;
|
|
1591
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1592
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1593
|
+
}
|
|
1594
|
+
return {
|
|
1595
|
+
width,
|
|
1596
|
+
height,
|
|
1597
|
+
x,
|
|
1598
|
+
y
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
function getViewportRect(element, strategy) {
|
|
1603
|
+
const win = getWindow(element);
|
|
1604
|
+
const html = getDocumentElement(element);
|
|
1605
|
+
const visualViewport = win.visualViewport;
|
|
1606
|
+
let width = html.clientWidth;
|
|
1607
|
+
let height = html.clientHeight;
|
|
1608
|
+
let x = 0;
|
|
1609
|
+
let y = 0;
|
|
1610
|
+
if (visualViewport) {
|
|
1611
|
+
width = visualViewport.width;
|
|
1612
|
+
height = visualViewport.height;
|
|
1613
|
+
const visualViewportBased = isWebKit();
|
|
1614
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1615
|
+
x = visualViewport.offsetLeft;
|
|
1616
|
+
y = visualViewport.offsetTop;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
return {
|
|
1620
|
+
width,
|
|
1621
|
+
height,
|
|
1622
|
+
x,
|
|
1623
|
+
y
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1628
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
1629
|
+
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1630
|
+
const top = clientRect.top + element.clientTop;
|
|
1631
|
+
const left = clientRect.left + element.clientLeft;
|
|
1632
|
+
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1633
|
+
const width = element.clientWidth * scale.x;
|
|
1634
|
+
const height = element.clientHeight * scale.y;
|
|
1635
|
+
const x = left * scale.x;
|
|
1636
|
+
const y = top * scale.y;
|
|
1637
|
+
return {
|
|
1638
|
+
width,
|
|
1639
|
+
height,
|
|
1640
|
+
x,
|
|
1641
|
+
y
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1645
|
+
let rect;
|
|
1646
|
+
if (clippingAncestor === 'viewport') {
|
|
1647
|
+
rect = getViewportRect(element, strategy);
|
|
1648
|
+
} else if (clippingAncestor === 'document') {
|
|
1649
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
1650
|
+
} else if (isElement(clippingAncestor)) {
|
|
1651
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1652
|
+
} else {
|
|
1653
|
+
const visualOffsets = getVisualOffsets(element);
|
|
1654
|
+
rect = {
|
|
1655
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
1656
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
1657
|
+
width: clippingAncestor.width,
|
|
1658
|
+
height: clippingAncestor.height
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
return rectToClientRect(rect);
|
|
1662
|
+
}
|
|
1663
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
1664
|
+
const parentNode = getParentNode(element);
|
|
1665
|
+
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1666
|
+
return false;
|
|
1667
|
+
}
|
|
1668
|
+
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1672
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1673
|
+
// of the given element up the tree.
|
|
1674
|
+
function getClippingElementAncestors(element, cache) {
|
|
1675
|
+
const cachedResult = cache.get(element);
|
|
1676
|
+
if (cachedResult) {
|
|
1677
|
+
return cachedResult;
|
|
1678
|
+
}
|
|
1679
|
+
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1680
|
+
let currentContainingBlockComputedStyle = null;
|
|
1681
|
+
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1682
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1683
|
+
|
|
1684
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1685
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1686
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
1687
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1688
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1689
|
+
currentContainingBlockComputedStyle = null;
|
|
1690
|
+
}
|
|
1691
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1692
|
+
if (shouldDropCurrentNode) {
|
|
1693
|
+
// Drop non-containing blocks.
|
|
1694
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1695
|
+
} else {
|
|
1696
|
+
// Record last containing block for next iteration.
|
|
1697
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
1698
|
+
}
|
|
1699
|
+
currentNode = getParentNode(currentNode);
|
|
1700
|
+
}
|
|
1701
|
+
cache.set(element, result);
|
|
1702
|
+
return result;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
// Gets the maximum area that the element is visible in due to any number of
|
|
1706
|
+
// clipping ancestors.
|
|
1707
|
+
function getClippingRect(_ref) {
|
|
1708
|
+
let {
|
|
1709
|
+
element,
|
|
1710
|
+
boundary,
|
|
1711
|
+
rootBoundary,
|
|
1712
|
+
strategy
|
|
1713
|
+
} = _ref;
|
|
1714
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1715
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1716
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
1717
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1718
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1719
|
+
accRect.top = max(rect.top, accRect.top);
|
|
1720
|
+
accRect.right = min(rect.right, accRect.right);
|
|
1721
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1722
|
+
accRect.left = max(rect.left, accRect.left);
|
|
1723
|
+
return accRect;
|
|
1724
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1725
|
+
return {
|
|
1726
|
+
width: clippingRect.right - clippingRect.left,
|
|
1727
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
1728
|
+
x: clippingRect.left,
|
|
1729
|
+
y: clippingRect.top
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
function getDimensions(element) {
|
|
1734
|
+
const {
|
|
1735
|
+
width,
|
|
1736
|
+
height
|
|
1737
|
+
} = getCssDimensions(element);
|
|
1738
|
+
return {
|
|
1739
|
+
width,
|
|
1740
|
+
height
|
|
1741
|
+
};
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1745
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1746
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1747
|
+
const isFixed = strategy === 'fixed';
|
|
1748
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1749
|
+
let scroll = {
|
|
1750
|
+
scrollLeft: 0,
|
|
1751
|
+
scrollTop: 0
|
|
1752
|
+
};
|
|
1753
|
+
const offsets = createCoords(0);
|
|
1754
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1755
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1756
|
+
scroll = getNodeScroll(offsetParent);
|
|
1757
|
+
}
|
|
1758
|
+
if (isOffsetParentAnElement) {
|
|
1759
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1760
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1761
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1762
|
+
} else if (documentElement) {
|
|
1763
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1764
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1765
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1769
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1770
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1771
|
+
return {
|
|
1772
|
+
x,
|
|
1773
|
+
y,
|
|
1774
|
+
width: rect.width,
|
|
1775
|
+
height: rect.height
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
function isStaticPositioned(element) {
|
|
1780
|
+
return getComputedStyle$1(element).position === 'static';
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
1784
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1785
|
+
return null;
|
|
1786
|
+
}
|
|
1787
|
+
if (polyfill) {
|
|
1788
|
+
return polyfill(element);
|
|
1789
|
+
}
|
|
1790
|
+
let rawOffsetParent = element.offsetParent;
|
|
1791
|
+
|
|
1792
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1793
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1794
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
1795
|
+
// non-static.
|
|
1796
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1797
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1798
|
+
}
|
|
1799
|
+
return rawOffsetParent;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1803
|
+
// such as table ancestors and cross browser bugs.
|
|
1804
|
+
function getOffsetParent(element, polyfill) {
|
|
1805
|
+
const win = getWindow(element);
|
|
1806
|
+
if (isTopLayer(element)) {
|
|
1807
|
+
return win;
|
|
1808
|
+
}
|
|
1809
|
+
if (!isHTMLElement(element)) {
|
|
1810
|
+
let svgOffsetParent = getParentNode(element);
|
|
1811
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1812
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1813
|
+
return svgOffsetParent;
|
|
1814
|
+
}
|
|
1815
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1816
|
+
}
|
|
1817
|
+
return win;
|
|
1818
|
+
}
|
|
1819
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1820
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1821
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1822
|
+
}
|
|
1823
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1824
|
+
return win;
|
|
1825
|
+
}
|
|
1826
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
const getElementRects = async function (data) {
|
|
1830
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1831
|
+
const getDimensionsFn = this.getDimensions;
|
|
1832
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1833
|
+
return {
|
|
1834
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1835
|
+
floating: {
|
|
1836
|
+
x: 0,
|
|
1837
|
+
y: 0,
|
|
1838
|
+
width: floatingDimensions.width,
|
|
1839
|
+
height: floatingDimensions.height
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1844
|
+
function isRTL(element) {
|
|
1845
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
const platform = {
|
|
1849
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1850
|
+
getDocumentElement,
|
|
1851
|
+
getClippingRect,
|
|
1852
|
+
getOffsetParent,
|
|
1853
|
+
getElementRects,
|
|
1854
|
+
getClientRects,
|
|
1855
|
+
getDimensions,
|
|
1856
|
+
getScale,
|
|
1857
|
+
isElement,
|
|
1858
|
+
isRTL
|
|
1859
|
+
};
|
|
1860
|
+
|
|
1861
|
+
// https://samthor.au/2021/observing-dom/
|
|
1862
|
+
function observeMove(element, onMove) {
|
|
1863
|
+
let io = null;
|
|
1864
|
+
let timeoutId;
|
|
1865
|
+
const root = getDocumentElement(element);
|
|
1866
|
+
function cleanup() {
|
|
1867
|
+
var _io;
|
|
1868
|
+
clearTimeout(timeoutId);
|
|
1869
|
+
(_io = io) == null || _io.disconnect();
|
|
1870
|
+
io = null;
|
|
1871
|
+
}
|
|
1872
|
+
function refresh(skip, threshold) {
|
|
1873
|
+
if (skip === void 0) {
|
|
1874
|
+
skip = false;
|
|
1875
|
+
}
|
|
1876
|
+
if (threshold === void 0) {
|
|
1877
|
+
threshold = 1;
|
|
1878
|
+
}
|
|
1879
|
+
cleanup();
|
|
1880
|
+
const {
|
|
1881
|
+
left,
|
|
1882
|
+
top,
|
|
1883
|
+
width,
|
|
1884
|
+
height
|
|
1885
|
+
} = element.getBoundingClientRect();
|
|
1886
|
+
if (!skip) {
|
|
1887
|
+
onMove();
|
|
1888
|
+
}
|
|
1889
|
+
if (!width || !height) {
|
|
1890
|
+
return;
|
|
1891
|
+
}
|
|
1892
|
+
const insetTop = floor(top);
|
|
1893
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
1894
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1895
|
+
const insetLeft = floor(left);
|
|
1896
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1897
|
+
const options = {
|
|
1898
|
+
rootMargin,
|
|
1899
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
1900
|
+
};
|
|
1901
|
+
let isFirstUpdate = true;
|
|
1902
|
+
function handleObserve(entries) {
|
|
1903
|
+
const ratio = entries[0].intersectionRatio;
|
|
1904
|
+
if (ratio !== threshold) {
|
|
1905
|
+
if (!isFirstUpdate) {
|
|
1906
|
+
return refresh();
|
|
1907
|
+
}
|
|
1908
|
+
if (!ratio) {
|
|
1909
|
+
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1910
|
+
// to prevent an infinite loop of updates.
|
|
1911
|
+
timeoutId = setTimeout(() => {
|
|
1912
|
+
refresh(false, 1e-7);
|
|
1913
|
+
}, 1000);
|
|
1914
|
+
} else {
|
|
1915
|
+
refresh(false, ratio);
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
isFirstUpdate = false;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
// Older browsers don't support a `document` as the root and will throw an
|
|
1922
|
+
// error.
|
|
1923
|
+
try {
|
|
1924
|
+
io = new IntersectionObserver(handleObserve, {
|
|
1925
|
+
...options,
|
|
1926
|
+
// Handle <iframe>s
|
|
1927
|
+
root: root.ownerDocument
|
|
1928
|
+
});
|
|
1929
|
+
} catch (e) {
|
|
1930
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
1931
|
+
}
|
|
1932
|
+
io.observe(element);
|
|
1933
|
+
}
|
|
1934
|
+
refresh(true);
|
|
1935
|
+
return cleanup;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* Automatically updates the position of the floating element when necessary.
|
|
1940
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
1941
|
+
* visible on the screen.
|
|
1942
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
1943
|
+
* removed from the DOM or hidden from the screen.
|
|
1944
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
1945
|
+
*/
|
|
1946
|
+
function autoUpdate(reference, floating, update, options) {
|
|
1947
|
+
if (options === void 0) {
|
|
1948
|
+
options = {};
|
|
1949
|
+
}
|
|
1950
|
+
const {
|
|
1951
|
+
ancestorScroll = true,
|
|
1952
|
+
ancestorResize = true,
|
|
1953
|
+
elementResize = typeof ResizeObserver === 'function',
|
|
1954
|
+
layoutShift = typeof IntersectionObserver === 'function',
|
|
1955
|
+
animationFrame = false
|
|
1956
|
+
} = options;
|
|
1957
|
+
const referenceEl = unwrapElement(reference);
|
|
1958
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1959
|
+
ancestors.forEach(ancestor => {
|
|
1960
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1961
|
+
passive: true
|
|
1962
|
+
});
|
|
1963
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1964
|
+
});
|
|
1965
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1966
|
+
let reobserveFrame = -1;
|
|
1967
|
+
let resizeObserver = null;
|
|
1968
|
+
if (elementResize) {
|
|
1969
|
+
resizeObserver = new ResizeObserver(_ref => {
|
|
1970
|
+
let [firstEntry] = _ref;
|
|
1971
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1972
|
+
// Prevent update loops when using the `size` middleware.
|
|
1973
|
+
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1974
|
+
resizeObserver.unobserve(floating);
|
|
1975
|
+
cancelAnimationFrame(reobserveFrame);
|
|
1976
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
1977
|
+
var _resizeObserver;
|
|
1978
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1981
|
+
update();
|
|
1982
|
+
});
|
|
1983
|
+
if (referenceEl && !animationFrame) {
|
|
1984
|
+
resizeObserver.observe(referenceEl);
|
|
1985
|
+
}
|
|
1986
|
+
resizeObserver.observe(floating);
|
|
1987
|
+
}
|
|
1988
|
+
let frameId;
|
|
1989
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1990
|
+
if (animationFrame) {
|
|
1991
|
+
frameLoop();
|
|
1992
|
+
}
|
|
1993
|
+
function frameLoop() {
|
|
1994
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
1995
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1996
|
+
update();
|
|
1997
|
+
}
|
|
1998
|
+
prevRefRect = nextRefRect;
|
|
1999
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
2000
|
+
}
|
|
2001
|
+
update();
|
|
2002
|
+
return () => {
|
|
2003
|
+
var _resizeObserver2;
|
|
2004
|
+
ancestors.forEach(ancestor => {
|
|
2005
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
2006
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
2007
|
+
});
|
|
2008
|
+
cleanupIo == null || cleanupIo();
|
|
2009
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
2010
|
+
resizeObserver = null;
|
|
2011
|
+
if (animationFrame) {
|
|
2012
|
+
cancelAnimationFrame(frameId);
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
/**
|
|
2018
|
+
* Modifies the placement by translating the floating element along the
|
|
2019
|
+
* specified axes.
|
|
2020
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
2021
|
+
* object may be passed.
|
|
2022
|
+
* @see https://floating-ui.com/docs/offset
|
|
2023
|
+
*/
|
|
2024
|
+
const offset = offset$1;
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
2028
|
+
* that has the most space available automatically, without needing to specify a
|
|
2029
|
+
* preferred placement. Alternative to `flip`.
|
|
2030
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
2031
|
+
*/
|
|
2032
|
+
const autoPlacement = autoPlacement$1;
|
|
2033
|
+
|
|
2034
|
+
/**
|
|
2035
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
2036
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
2037
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
2038
|
+
* @see https://floating-ui.com/docs/flip
|
|
2039
|
+
*/
|
|
2040
|
+
const flip = flip$1;
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
2044
|
+
* next to a given reference element.
|
|
2045
|
+
*/
|
|
2046
|
+
const computePosition = (reference, floating, options) => {
|
|
2047
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
2048
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
2049
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
2050
|
+
const cache = new Map();
|
|
2051
|
+
const mergedOptions = {
|
|
2052
|
+
platform,
|
|
2053
|
+
...options
|
|
2054
|
+
};
|
|
2055
|
+
const platformWithCache = {
|
|
2056
|
+
...mergedOptions.platform,
|
|
2057
|
+
_c: cache
|
|
2058
|
+
};
|
|
2059
|
+
return computePosition$1(reference, floating, {
|
|
2060
|
+
...mergedOptions,
|
|
2061
|
+
platform: platformWithCache
|
|
2062
|
+
});
|
|
2063
|
+
};
|
|
2064
|
+
|
|
2065
|
+
/* eslint-disable line-comment-position, no-inline-comments */
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
class AuroFloatingUI {
|
|
2069
|
+
constructor() {
|
|
2070
|
+
// Store event listener references for cleanup
|
|
2071
|
+
this.focusHandler = null;
|
|
2072
|
+
this.clickHandler = null;
|
|
2073
|
+
this.keyDownHandler = null;
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* @private
|
|
2077
|
+
*/
|
|
2078
|
+
this.eventPrefix = undefined;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Mirrors the size of the bibSizer element to the bib content.
|
|
2083
|
+
* Copies the width, height, max-width, and max-height styles from the bibSizer element to the bib content container.
|
|
2084
|
+
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
2085
|
+
*/
|
|
2086
|
+
mirrorSize() {
|
|
2087
|
+
// mirror the boxsize from bibSizer
|
|
2088
|
+
if (this.element.bibSizer) {
|
|
2089
|
+
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2090
|
+
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2091
|
+
if (sizerStyle.width !== '0px') {
|
|
2092
|
+
bibContent.style.width = sizerStyle.width;
|
|
2093
|
+
}
|
|
2094
|
+
if (sizerStyle.height !== '0px') {
|
|
2095
|
+
bibContent.style.height = sizerStyle.height;
|
|
2096
|
+
}
|
|
2097
|
+
bibContent.style.maxWidth = sizerStyle.maxWidth;
|
|
2098
|
+
bibContent.style.maxHeight = sizerStyle.maxHeight;
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* @private
|
|
2104
|
+
* Determines the positioning strategy based on the current viewport size and mobile breakpoint.
|
|
2105
|
+
*
|
|
2106
|
+
* This method checks if the current viewport width is less than or equal to the specified mobile fullscreen breakpoint
|
|
2107
|
+
* defined in the bib element. If it is, the strategy is set to 'fullscreen'; otherwise, it defaults to 'floating'.
|
|
2108
|
+
*
|
|
2109
|
+
* @returns {String} The positioning strategy, either 'fullscreen' or 'floating'.
|
|
2110
|
+
*/
|
|
2111
|
+
getPositioningStrategy() {
|
|
2112
|
+
let strategy = 'floating';
|
|
2113
|
+
if (this.element.bib.mobileFullscreenBreakpoint) {
|
|
2114
|
+
const smallerThanBreakpoint = window.matchMedia(`(max-width: ${this.element.bib.mobileFullscreenBreakpoint})`).matches;
|
|
2115
|
+
if (smallerThanBreakpoint) {
|
|
2116
|
+
strategy = 'fullscreen';
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
return strategy;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* @private
|
|
2125
|
+
* Positions the bib element based on the current configuration and positioning strategy.
|
|
2126
|
+
*
|
|
2127
|
+
* This method determines the appropriate positioning strategy (fullscreen or not) and configures the bib accordingly.
|
|
2128
|
+
* It also sets up middleware for the floater configuration, computes the position of the bib relative to the trigger element,
|
|
2129
|
+
* and applies the calculated position to the bib's style.
|
|
2130
|
+
*/
|
|
2131
|
+
position() {
|
|
2132
|
+
const strategy = this.getPositioningStrategy();
|
|
2133
|
+
this.configureBibStrategy(strategy);
|
|
2134
|
+
|
|
2135
|
+
if (strategy === 'floating') {
|
|
2136
|
+
this.mirrorSize();
|
|
2137
|
+
// Define the middlware for the floater configuration
|
|
2138
|
+
const middleware = [
|
|
2139
|
+
offset(this.element.floaterConfig.offset || 0),
|
|
2140
|
+
...(this.element.floaterConfig.flip ? [flip()] : []), // Add flip middleware if flip is enabled
|
|
2141
|
+
...(this.element.floaterConfig.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled
|
|
2142
|
+
];
|
|
2143
|
+
|
|
2144
|
+
// Compute the position of the bib
|
|
2145
|
+
computePosition(this.element.trigger, this.element.bib, {
|
|
2146
|
+
placement: this.element.floaterConfig.placement || 'bottom',
|
|
2147
|
+
middleware: middleware || []
|
|
2148
|
+
}).then(({x, y}) => { // eslint-disable-line id-length
|
|
2149
|
+
Object.assign(this.element.bib.style, {
|
|
2150
|
+
left: `${x}px`,
|
|
2151
|
+
top: `${y}px`,
|
|
2152
|
+
});
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* @private
|
|
2159
|
+
* Controls whether to lock the scrolling for the document's body.
|
|
2160
|
+
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
2161
|
+
*/
|
|
2162
|
+
lockScroll(lock = true) {
|
|
2163
|
+
if (lock) {
|
|
2164
|
+
document.body.style.overflow = 'hidden'; // hide body's scrollbar
|
|
2165
|
+
|
|
2166
|
+
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
2167
|
+
this.element.bib.style.transform = `translateY(${visualViewport.offsetTop}px)`;
|
|
2168
|
+
} else {
|
|
2169
|
+
document.body.style.overflow = '';
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* @private
|
|
2175
|
+
* Configures the bib element's display strategy.
|
|
2176
|
+
*
|
|
2177
|
+
* Sets the bib to fullscreen or floating mode based on the provided strategy.
|
|
2178
|
+
* Dispatches a 'strategy-change' event if the strategy changes.
|
|
2179
|
+
*
|
|
2180
|
+
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
2181
|
+
*/
|
|
2182
|
+
configureBibStrategy(strategy) {
|
|
2183
|
+
const prevStrategy = this.element.isBibFullscreen ? 'fullscreen' : 'floating';
|
|
2184
|
+
if (strategy === 'fullscreen') {
|
|
2185
|
+
this.element.isBibFullscreen = true;
|
|
2186
|
+
// reset the prev position
|
|
2187
|
+
this.element.bib.style.top = "0px";
|
|
2188
|
+
this.element.bib.style.left = "0px";
|
|
2189
|
+
|
|
2190
|
+
// reset the size that was mirroring `size` css-part
|
|
2191
|
+
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2192
|
+
bibContent.style.width = '';
|
|
2193
|
+
bibContent.style.height = '';
|
|
2194
|
+
bibContent.style.maxWidth = '';
|
|
2195
|
+
bibContent.style.maxHeight = `${window.visualViewport.height}px`;
|
|
2196
|
+
|
|
2197
|
+
if (this.element.isPopoverVisible) {
|
|
2198
|
+
this.lockScroll(true);
|
|
2199
|
+
}
|
|
2200
|
+
} else {
|
|
2201
|
+
this.element.isBibFullscreen = false;
|
|
2202
|
+
|
|
2203
|
+
this.lockScroll(false);
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
if (prevStrategy !== strategy) {
|
|
2207
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-strategy-change` : 'strategy-change', {
|
|
2208
|
+
detail: {
|
|
2209
|
+
strategy,
|
|
2210
|
+
},
|
|
2211
|
+
composed: true
|
|
2212
|
+
});
|
|
2213
|
+
|
|
2214
|
+
this.element.dispatchEvent(event);
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
updateState() {
|
|
2219
|
+
const isVisible = this.element.isPopoverVisible;
|
|
2220
|
+
|
|
2221
|
+
// Refactor this to apply attribute to correct focusable element
|
|
2222
|
+
// Reference Issue: https://github.com/AlaskaAirlines/auro-library/issues/105
|
|
2223
|
+
//
|
|
2224
|
+
// this.element.trigger.setAttribute('aria-expanded', isVisible);
|
|
2225
|
+
|
|
2226
|
+
if (isVisible) {
|
|
2227
|
+
this.element.bib.setAttribute('data-show', true);
|
|
2228
|
+
} else {
|
|
2229
|
+
this.element.bib.removeAttribute('data-show');
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
if (!isVisible) {
|
|
2233
|
+
this.cleanupHideHandlers();
|
|
2234
|
+
try {
|
|
2235
|
+
this.element.cleanup?.();
|
|
2236
|
+
} catch (error) {
|
|
2237
|
+
// Do nothing
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
handleFocusLoss() {
|
|
2243
|
+
if (this.element.noHideOnThisFocusLoss ||
|
|
2244
|
+
this.element.hasAttribute('noHideOnThisFocusLoss')) {
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
const {activeElement} = document;
|
|
2249
|
+
if (activeElement === document.querySelector('body') ||
|
|
2250
|
+
this.element.contains(activeElement) ||
|
|
2251
|
+
this.element.bibContent?.contains(activeElement)) {
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
this.hideBib();
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
setupHideHandlers() {
|
|
2259
|
+
// Define handlers & store references
|
|
2260
|
+
this.focusHandler = () => this.handleFocusLoss();
|
|
2261
|
+
|
|
2262
|
+
this.clickHandler = (evt) => {
|
|
2263
|
+
if (!evt.composedPath().includes(this.element.trigger) &&
|
|
2264
|
+
!evt.composedPath().includes(this.element.bibContent)) {
|
|
2265
|
+
this.hideBib();
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
|
|
2269
|
+
// ESC key handler
|
|
2270
|
+
this.keyDownHandler = (evt) => {
|
|
2271
|
+
if (evt.key === 'Escape' && this.element.isPopoverVisible) {
|
|
2272
|
+
this.hideBib();
|
|
2273
|
+
}
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
// Add event listeners using the stored references
|
|
2277
|
+
document.addEventListener('focusin', this.focusHandler);
|
|
2278
|
+
window.addEventListener('click', this.clickHandler);
|
|
2279
|
+
document.addEventListener('keydown', this.keyDownHandler);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
cleanupHideHandlers() {
|
|
2283
|
+
// Remove event listeners if they exist
|
|
2284
|
+
if (this.focusHandler) {
|
|
2285
|
+
document.removeEventListener('focusin', this.focusHandler);
|
|
2286
|
+
this.focusHandler = null;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
if (this.clickHandler) {
|
|
2290
|
+
window.removeEventListener('click', this.clickHandler);
|
|
2291
|
+
this.clickHandler = null;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
if (this.keyDownHandler) {
|
|
2295
|
+
document.removeEventListener('keydown', this.keyDownHandler);
|
|
2296
|
+
this.keyDownHandler = null;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
handleUpdate(changedProperties) {
|
|
2301
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
2302
|
+
this.updateState();
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
updateCurrentExpandedDropdown() {
|
|
2307
|
+
// Close any other dropdown that is already open
|
|
2308
|
+
if (document.expandedAuroDropdown) {
|
|
2309
|
+
this.hideBib(document.expandedAuroDropdown);
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
document.expandedAuroDropdown = this;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
showBib() {
|
|
2316
|
+
if (!this.element.disabled && !this.element.isPopoverVisible) {
|
|
2317
|
+
this.updateCurrentExpandedDropdown();
|
|
2318
|
+
this.element.isPopoverVisible = true;
|
|
2319
|
+
this.element.triggerChevron?.setAttribute('data-expanded', true);
|
|
2320
|
+
|
|
2321
|
+
this.dispatchEventDropdownToggle();
|
|
2322
|
+
this.position();
|
|
2323
|
+
|
|
2324
|
+
// Clean up any existing handlers before setting up new ones
|
|
2325
|
+
this.cleanupHideHandlers();
|
|
2326
|
+
this.setupHideHandlers();
|
|
2327
|
+
|
|
2328
|
+
// Setup auto update to handle resize and scroll
|
|
2329
|
+
this.element.cleanup = autoUpdate(this.element.trigger, this.element.bib, () => {
|
|
2330
|
+
this.position();
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
hideBib() {
|
|
2336
|
+
if (this.element.isPopoverVisible && !this.element.disabled && !this.element.noToggle) {
|
|
2337
|
+
this.element.isPopoverVisible = false;
|
|
2338
|
+
this.lockScroll(false);
|
|
2339
|
+
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
2340
|
+
this.dispatchEventDropdownToggle();
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* @private
|
|
2346
|
+
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
2347
|
+
*/
|
|
2348
|
+
dispatchEventDropdownToggle() {
|
|
2349
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
2350
|
+
detail: {
|
|
2351
|
+
expanded: this.element.isPopoverVisible,
|
|
2352
|
+
},
|
|
2353
|
+
composed: true
|
|
2354
|
+
});
|
|
2355
|
+
|
|
2356
|
+
this.element.dispatchEvent(event);
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
handleClick() {
|
|
2360
|
+
if (this.element.isPopoverVisible) {
|
|
2361
|
+
this.hideBib();
|
|
2362
|
+
} else {
|
|
2363
|
+
this.showBib();
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-triggerClick` : "triggerClick", {
|
|
2367
|
+
composed: true,
|
|
2368
|
+
detail: {
|
|
2369
|
+
expanded: this.element.isPopoverVisible
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
|
|
2373
|
+
this.element.dispatchEvent(event);
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
handleEvent(event) {
|
|
2377
|
+
if (!this.element.disableEventShow) {
|
|
2378
|
+
switch (event.type) {
|
|
2379
|
+
case 'keydown':
|
|
2380
|
+
// Support both Enter and Space keys for accessibility
|
|
2381
|
+
// Space is included as it's expected behavior for interactive elements
|
|
2382
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
2383
|
+
event.preventDefault(); // Prevent page scroll on space
|
|
2384
|
+
this.handleClick();
|
|
2385
|
+
}
|
|
2386
|
+
break;
|
|
2387
|
+
case 'mouseenter':
|
|
2388
|
+
if (this.element.hoverToggle) {
|
|
2389
|
+
this.showBib();
|
|
2390
|
+
}
|
|
2391
|
+
break;
|
|
2392
|
+
case 'mouseleave':
|
|
2393
|
+
if (this.element.hoverToggle) {
|
|
2394
|
+
this.hideBib();
|
|
2395
|
+
}
|
|
2396
|
+
break;
|
|
2397
|
+
case 'focus':
|
|
2398
|
+
if (this.element.focusShow) {
|
|
2399
|
+
/*
|
|
2400
|
+
This needs to better handle clicking that gives focus -
|
|
2401
|
+
currently it shows and then immediately hides the bib
|
|
2402
|
+
*/
|
|
2403
|
+
this.showBib();
|
|
2404
|
+
}
|
|
2405
|
+
break;
|
|
2406
|
+
case 'blur':
|
|
2407
|
+
this.handleFocusLoss();
|
|
2408
|
+
break;
|
|
2409
|
+
case 'click':
|
|
2410
|
+
if (document.activeElement === document.body) {
|
|
2411
|
+
event.currentTarget.focus();
|
|
2412
|
+
}
|
|
2413
|
+
this.handleClick();
|
|
2414
|
+
break;
|
|
2415
|
+
// Do nothing
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* Manages the tabIndex of the trigger element based on its focusability.
|
|
2422
|
+
*
|
|
2423
|
+
* If the trigger element or any of its children are inherently focusable, the tabIndex of the component is set to -1.
|
|
2424
|
+
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
2425
|
+
*/
|
|
2426
|
+
handleTriggerTabIndex() {
|
|
2427
|
+
const focusableElementSelectors = [
|
|
2428
|
+
'a',
|
|
2429
|
+
'button',
|
|
2430
|
+
'input:not([type="hidden"])',
|
|
2431
|
+
'select',
|
|
2432
|
+
'textarea',
|
|
2433
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
2434
|
+
'auro-button',
|
|
2435
|
+
'auro-input',
|
|
2436
|
+
'auro-hyperlink'
|
|
2437
|
+
];
|
|
2438
|
+
|
|
2439
|
+
const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
|
|
2440
|
+
if (!triggerNode) {
|
|
2441
|
+
return;
|
|
2442
|
+
}
|
|
2443
|
+
const triggerNodeTagName = triggerNode.tagName.toLowerCase();
|
|
2444
|
+
|
|
2445
|
+
focusableElementSelectors.forEach((selector) => {
|
|
2446
|
+
// Check if the trigger node element is focusable
|
|
2447
|
+
if (triggerNodeTagName === selector) {
|
|
2448
|
+
this.element.tabIndex = -1;
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
// Check if any child is focusable
|
|
2453
|
+
if (triggerNode.querySelector(selector)) {
|
|
2454
|
+
this.element.tabIndex = -1;
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
configure(elem, eventPrefix) {
|
|
2460
|
+
this.eventPrefix = eventPrefix;
|
|
2461
|
+
this.element = elem;
|
|
2462
|
+
this.element.trigger = this.element.shadowRoot.querySelector('#trigger');
|
|
2463
|
+
this.element.bib = this.element.shadowRoot.querySelector('#bib');
|
|
2464
|
+
this.element.bibSizer = this.element.shadowRoot.querySelector('#bibSizer');
|
|
2465
|
+
this.element.triggerChevron = this.element.shadowRoot.querySelector('#showStateIcon');
|
|
2466
|
+
|
|
2467
|
+
document.body.append(this.element.bib);
|
|
2468
|
+
|
|
2469
|
+
this.handleTriggerTabIndex();
|
|
2470
|
+
|
|
2471
|
+
this.handleEvent = this.handleEvent.bind(this);
|
|
2472
|
+
this.element.trigger.addEventListener('keydown', this.handleEvent);
|
|
2473
|
+
this.element.trigger.addEventListener('click', this.handleEvent);
|
|
2474
|
+
this.element.trigger.addEventListener('mouseenter', this.handleEvent);
|
|
2475
|
+
this.element.trigger.addEventListener('mouseleave', this.handleEvent);
|
|
2476
|
+
this.element.trigger.addEventListener('focus', this.handleEvent);
|
|
2477
|
+
this.element.trigger.addEventListener('blur', this.handleEvent);
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
disconnect() {
|
|
2481
|
+
this.cleanupHideHandlers();
|
|
2482
|
+
this.element.cleanup?.();
|
|
2483
|
+
|
|
2484
|
+
// Remove event & keyboard listeners
|
|
2485
|
+
if (this.element?.trigger) {
|
|
2486
|
+
this.element.trigger.removeEventListener('keydown', this.handleEvent);
|
|
2487
|
+
this.element.trigger.removeEventListener('click', this.handleEvent);
|
|
2488
|
+
this.element.trigger.removeEventListener('mouseenter', this.handleEvent);
|
|
2489
|
+
this.element.trigger.removeEventListener('mouseleave', this.handleEvent);
|
|
2490
|
+
this.element.trigger.removeEventListener('focus', this.handleEvent);
|
|
2491
|
+
this.element.trigger.removeEventListener('blur', this.handleEvent);
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2497
|
+
// See LICENSE in the project root for license information.
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
class AuroDependencyVersioning {
|
|
2501
|
+
|
|
2502
|
+
/**
|
|
2503
|
+
* Generates a unique string to be used for child auro element naming.
|
|
2504
|
+
* @private
|
|
2505
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
2506
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
2507
|
+
* @returns {string} - Unique string to be used for naming.
|
|
2508
|
+
*/
|
|
2509
|
+
generateElementName(baseName, version) {
|
|
2510
|
+
let result = baseName;
|
|
2511
|
+
|
|
2512
|
+
result += '-';
|
|
2513
|
+
result += version.replace(/[.]/g, '_');
|
|
2514
|
+
|
|
2515
|
+
return result;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
/**
|
|
2519
|
+
* Generates a unique string to be used for child auro element naming.
|
|
2520
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
2521
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
2522
|
+
* @returns {string} - Unique string to be used for naming.
|
|
2523
|
+
*/
|
|
2524
|
+
generateTag(baseName, version, tagClass) {
|
|
2525
|
+
const elementName = this.generateElementName(baseName, version);
|
|
2526
|
+
const tag = i$8`${s$3(elementName)}`;
|
|
2527
|
+
|
|
2528
|
+
if (!customElements.get(elementName)) {
|
|
2529
|
+
customElements.define(elementName, class extends tagClass {});
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
return tag;
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
/**
|
|
2537
|
+
* @license
|
|
2538
|
+
* Copyright 2017 Google LLC
|
|
2539
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2540
|
+
*/
|
|
2541
|
+
const t$2$1={ATTRIBUTE:1},e$4$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$4$1 = 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)}};
|
|
2542
|
+
|
|
2543
|
+
/**
|
|
2544
|
+
* @license
|
|
2545
|
+
* Copyright 2018 Google LLC
|
|
2546
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2547
|
+
*/const e$3$1=e$4$1(class extends i$4$1{constructor(t){if(super(t),t.type!==t$2$1.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(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$1}});
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* @license
|
|
2551
|
+
* Copyright 2018 Google LLC
|
|
2552
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2553
|
+
*/const o$3$1=o=>o??E$1;
|
|
2554
|
+
|
|
2555
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2556
|
+
// See LICENSE in the project root for license information.
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
2561
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
2562
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
2563
|
+
*/
|
|
2564
|
+
|
|
2565
|
+
class AuroElement extends r$4 {
|
|
2566
|
+
|
|
2567
|
+
// function to define props used within the scope of this component
|
|
2568
|
+
static get properties() {
|
|
2569
|
+
return {
|
|
2570
|
+
hidden: { type: Boolean,
|
|
2571
|
+
reflect: true },
|
|
2572
|
+
hiddenVisually: { type: Boolean,
|
|
2573
|
+
reflect: true },
|
|
2574
|
+
hiddenAudible: { type: Boolean,
|
|
2575
|
+
reflect: true },
|
|
2576
|
+
};
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
/**
|
|
2580
|
+
* @private Function that determines state of aria-hidden
|
|
2581
|
+
*/
|
|
2582
|
+
hideAudible(value) {
|
|
2583
|
+
if (value) {
|
|
2584
|
+
return 'true'
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
return 'false'
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
var error = {"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>"};
|
|
2592
|
+
|
|
2593
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
2594
|
+
|
|
2595
|
+
const _fetchMap = new Map();
|
|
2596
|
+
|
|
2597
|
+
/**
|
|
2598
|
+
* A callback to parse Response body.
|
|
2599
|
+
*
|
|
2600
|
+
* @callback ResponseParser
|
|
2601
|
+
* @param {Fetch.Response} response
|
|
2602
|
+
* @returns {Promise}
|
|
2603
|
+
*/
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
2607
|
+
*
|
|
2608
|
+
* @param {String} uri
|
|
2609
|
+
* @param {Object} [options={}]
|
|
2610
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
2611
|
+
* @returns {Promise}
|
|
2612
|
+
*/
|
|
2613
|
+
const cacheFetch = (uri, options = {}) => {
|
|
2614
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
2615
|
+
if (!_fetchMap.has(uri)) {
|
|
2616
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
2617
|
+
}
|
|
2618
|
+
return _fetchMap.get(uri);
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
var styleCss$2 = i$7`*,*: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}`;
|
|
2622
|
+
|
|
2623
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2624
|
+
// See LICENSE in the project root for license information.
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
2628
|
+
/**
|
|
2629
|
+
* @attr {Boolean} onDark - Set value for on-dark version of auro-icon
|
|
2630
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
2631
|
+
*/
|
|
2632
|
+
|
|
2633
|
+
// build the component class
|
|
2634
|
+
class BaseIcon extends AuroElement {
|
|
2635
|
+
constructor() {
|
|
2636
|
+
super();
|
|
2637
|
+
this.onDark = false;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
// function to define props used within the scope of this component
|
|
2641
|
+
static get properties() {
|
|
2642
|
+
return {
|
|
2643
|
+
...super.properties,
|
|
2644
|
+
onDark: {
|
|
2645
|
+
type: Boolean,
|
|
2646
|
+
reflect: true
|
|
2647
|
+
},
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* @private
|
|
2651
|
+
*/
|
|
2652
|
+
svg: {
|
|
2653
|
+
attribute: false,
|
|
2654
|
+
reflect: true
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
static get styles() {
|
|
2660
|
+
return i$7`
|
|
2661
|
+
${styleCss$2}
|
|
2662
|
+
`;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Async function to fetch requested icon from npm CDN.
|
|
2667
|
+
* @private
|
|
2668
|
+
* @param {string} category - Icon category.
|
|
2669
|
+
* @param {string} name - Icon name.
|
|
2670
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
2671
|
+
*/
|
|
2672
|
+
async fetchIcon(category, name) {
|
|
2673
|
+
let iconHTML = '';
|
|
2674
|
+
|
|
2675
|
+
if (category === 'logos') {
|
|
2676
|
+
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
2677
|
+
} else {
|
|
2678
|
+
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
2682
|
+
|
|
2683
|
+
return dom.body.querySelector('svg');
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
// lifecycle function
|
|
2687
|
+
async firstUpdated() {
|
|
2688
|
+
if (!this.customSvg) {
|
|
2689
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
2690
|
+
|
|
2691
|
+
if (svg) {
|
|
2692
|
+
this.svg = svg;
|
|
2693
|
+
} else if (!svg) {
|
|
2694
|
+
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
2695
|
+
|
|
2696
|
+
this.svg = penDOM.body.firstChild;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
var tokensCss$1 = i$7`: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)}`;
|
|
2703
|
+
|
|
2704
|
+
var colorCss$2 = i$7`: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)}`;
|
|
2705
|
+
|
|
2706
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2707
|
+
// See LICENSE in the project root for license information.
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
2711
|
+
/**
|
|
2712
|
+
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
2713
|
+
*
|
|
2714
|
+
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
2715
|
+
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
2716
|
+
* @attr {Boolean} customColor - Removes primary selector.
|
|
2717
|
+
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
2718
|
+
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
2719
|
+
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
2720
|
+
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
2721
|
+
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
2722
|
+
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
2723
|
+
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
2724
|
+
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
2725
|
+
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
2726
|
+
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
2727
|
+
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
2728
|
+
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
2729
|
+
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
2730
|
+
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
2731
|
+
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
2732
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
2733
|
+
* @slot svg - Used for custom SVG content.
|
|
2734
|
+
*/
|
|
2735
|
+
|
|
2736
|
+
// build the component class
|
|
2737
|
+
class AuroIcon extends BaseIcon {
|
|
2738
|
+
constructor() {
|
|
2739
|
+
super();
|
|
2740
|
+
|
|
2741
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
2742
|
+
|
|
2743
|
+
this.privateDefaults();
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
/**
|
|
2747
|
+
* Internal Defaults.
|
|
2748
|
+
* @private
|
|
2749
|
+
* @returns {void}
|
|
2750
|
+
*/
|
|
2751
|
+
privateDefaults() {
|
|
2752
|
+
this.accent = false;
|
|
2753
|
+
this.customColor = false;
|
|
2754
|
+
this.customSvg = false;
|
|
2755
|
+
this.disabled = false;
|
|
2756
|
+
this.emphasis = false;
|
|
2757
|
+
this.error = false;
|
|
2758
|
+
this.info = false;
|
|
2759
|
+
this.label = false;
|
|
2760
|
+
this.primary = false;
|
|
2761
|
+
this.secondary = false;
|
|
2762
|
+
this.subtle = false;
|
|
2763
|
+
this.success = false;
|
|
2764
|
+
this.tertiary = false;
|
|
2765
|
+
this.warning = false;
|
|
2766
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
// function to define props used within the scope of this component
|
|
2770
|
+
static get properties() {
|
|
2771
|
+
return {
|
|
2772
|
+
...super.properties,
|
|
2773
|
+
accent: {
|
|
2774
|
+
type: Boolean,
|
|
2775
|
+
reflect: true
|
|
2776
|
+
},
|
|
2777
|
+
ariaHidden: {
|
|
2778
|
+
type: String,
|
|
2779
|
+
reflect: true
|
|
2780
|
+
},
|
|
2781
|
+
category: {
|
|
2782
|
+
type: String,
|
|
2783
|
+
reflect: true
|
|
2784
|
+
},
|
|
2785
|
+
customColor: {
|
|
2786
|
+
type: Boolean
|
|
2787
|
+
},
|
|
2788
|
+
customSvg: {
|
|
2789
|
+
type: Boolean
|
|
2790
|
+
},
|
|
2791
|
+
disabled: {
|
|
2792
|
+
type: Boolean,
|
|
2793
|
+
reflect: true
|
|
2794
|
+
},
|
|
2795
|
+
emphasis: {
|
|
2796
|
+
type: Boolean,
|
|
2797
|
+
reflect: true
|
|
2798
|
+
},
|
|
2799
|
+
error: {
|
|
2800
|
+
type: Boolean,
|
|
2801
|
+
reflect: true
|
|
2802
|
+
},
|
|
2803
|
+
info: {
|
|
2804
|
+
type: Boolean,
|
|
2805
|
+
reflect: true
|
|
2806
|
+
},
|
|
2807
|
+
label: {
|
|
2808
|
+
type: Boolean,
|
|
2809
|
+
reflect: true
|
|
2810
|
+
},
|
|
2811
|
+
name: {
|
|
2812
|
+
type: String,
|
|
2813
|
+
reflect: true
|
|
2814
|
+
},
|
|
2815
|
+
primary: {
|
|
2816
|
+
type: Boolean,
|
|
2817
|
+
reflect: true
|
|
2818
|
+
},
|
|
2819
|
+
secondary: {
|
|
2820
|
+
type: Boolean,
|
|
2821
|
+
reflect: true
|
|
2822
|
+
},
|
|
2823
|
+
subtle: {
|
|
2824
|
+
type: Boolean,
|
|
2825
|
+
reflect: true
|
|
2826
|
+
},
|
|
2827
|
+
success: {
|
|
2828
|
+
type: Boolean,
|
|
2829
|
+
reflect: true
|
|
2830
|
+
},
|
|
2831
|
+
tertiary: {
|
|
2832
|
+
type: Boolean,
|
|
2833
|
+
reflect: true
|
|
2834
|
+
},
|
|
2835
|
+
uri: {
|
|
2836
|
+
type: String
|
|
2837
|
+
},
|
|
2838
|
+
warning: {
|
|
2839
|
+
type: Boolean,
|
|
2840
|
+
reflect: true
|
|
2841
|
+
}
|
|
2842
|
+
};
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
static get styles() {
|
|
2846
|
+
return [
|
|
2847
|
+
super.styles,
|
|
2848
|
+
i$7`${tokensCss$1}`,
|
|
2849
|
+
i$7`${styleCss$2}`,
|
|
2850
|
+
i$7`${colorCss$2}`
|
|
2851
|
+
];
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* This will register this element with the browser.
|
|
2856
|
+
* @param {string} [name="auro-icon"] - The name of element that you want to register to.
|
|
2857
|
+
*
|
|
2858
|
+
* @example
|
|
2859
|
+
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
2860
|
+
*
|
|
2861
|
+
*/
|
|
2862
|
+
static register(name = "auro-icon") {
|
|
2863
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
connectedCallback() {
|
|
2867
|
+
super.connectedCallback();
|
|
2868
|
+
|
|
2869
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
2870
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
/**
|
|
2874
|
+
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
2875
|
+
*/
|
|
2876
|
+
exposeCssParts() {
|
|
2877
|
+
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2880
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
2881
|
+
render() {
|
|
2882
|
+
const a11y = {
|
|
2883
|
+
'labelContainer': true,
|
|
2884
|
+
'util_displayHiddenVisually': !this.label
|
|
2885
|
+
};
|
|
2886
|
+
|
|
2887
|
+
const classes = {
|
|
2888
|
+
'label': this.label,
|
|
2889
|
+
'wrapper': true,
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2892
|
+
return x`
|
|
2893
|
+
<div
|
|
2894
|
+
class="${e$3$1(classes)}"
|
|
2895
|
+
title="${o$3$1(this.title || undefined)}">
|
|
2896
|
+
<span aria-hidden="${o$3$1(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
2897
|
+
${this.customSvg ? x`
|
|
2898
|
+
<slot name="svg"></slot>
|
|
2899
|
+
` : x`
|
|
2900
|
+
${this.svg}
|
|
2901
|
+
`
|
|
2902
|
+
}
|
|
2903
|
+
</span>
|
|
2904
|
+
|
|
2905
|
+
<div class="${e$3$1(a11y)}">
|
|
2906
|
+
<slot></slot>
|
|
2907
|
+
</div>
|
|
2908
|
+
</div>
|
|
2909
|
+
`;
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
var iconVersion = '6.1.2';
|
|
2914
|
+
|
|
2915
|
+
var styleCss$1 = i$7`: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;overscroll-behavior:contain}: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}`;
|
|
2916
|
+
|
|
2917
|
+
var colorCss$1 = i$7`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2918
|
+
|
|
2919
|
+
var tokensCss$2 = i$7`:host{--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-outline-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)}`;
|
|
2920
|
+
|
|
2921
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2922
|
+
// See LICENSE in the project root for license information.
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2927
|
+
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2928
|
+
'lg',
|
|
2929
|
+
'md',
|
|
2930
|
+
'sm',
|
|
2931
|
+
'xs',
|
|
2932
|
+
];
|
|
2933
|
+
|
|
2934
|
+
/**
|
|
2935
|
+
* @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.
|
|
2936
|
+
* @csspart bibContainer - Apply css to the bib container.
|
|
2937
|
+
*/
|
|
2938
|
+
|
|
2939
|
+
class AuroDropdownBib extends r$4 {
|
|
2940
|
+
|
|
2941
|
+
constructor() {
|
|
2942
|
+
super();
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* @private
|
|
2946
|
+
*/
|
|
2947
|
+
this._mobileBreakpointValue = undefined;
|
|
2948
|
+
|
|
2949
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
static get styles() {
|
|
2953
|
+
return [
|
|
2954
|
+
styleCss$1,
|
|
2955
|
+
colorCss$1,
|
|
2956
|
+
tokensCss$2
|
|
2957
|
+
];
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
static get properties() {
|
|
2961
|
+
return {
|
|
2962
|
+
|
|
2963
|
+
/**
|
|
2964
|
+
* If declared, will take the fullscreen when the bib is displayed.
|
|
2965
|
+
*/
|
|
2966
|
+
isFullscreen: {
|
|
2967
|
+
type: Boolean,
|
|
2968
|
+
reflect: true
|
|
2969
|
+
},
|
|
2970
|
+
|
|
2971
|
+
/**
|
|
2972
|
+
* If declared, will apply all styles for the common theme.
|
|
2973
|
+
*/
|
|
2974
|
+
common: {
|
|
2975
|
+
type: Boolean,
|
|
2976
|
+
reflect: true
|
|
2977
|
+
},
|
|
2978
|
+
|
|
2979
|
+
/**
|
|
2980
|
+
* If declared, will apply extra padding to bib content.
|
|
2981
|
+
*/
|
|
2982
|
+
inset: {
|
|
2983
|
+
type: Boolean,
|
|
2984
|
+
reflect: true
|
|
2985
|
+
},
|
|
2986
|
+
|
|
2987
|
+
/**
|
|
2988
|
+
* If declared, will apply border-radius to the bib.
|
|
2989
|
+
*/
|
|
2990
|
+
rounded: {
|
|
2991
|
+
type: Boolean,
|
|
2992
|
+
reflect: true
|
|
2993
|
+
},
|
|
2994
|
+
};
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
set mobileFullscreenBreakpoint(value) {
|
|
2998
|
+
// verify the defined breakpoint is valid and exit out if not
|
|
2999
|
+
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
3000
|
+
if (!validatedValue) {
|
|
3001
|
+
this._mobileBreakpointValue = undefined;
|
|
3002
|
+
} else {
|
|
3003
|
+
// get the pixel value for the defined breakpoint
|
|
3004
|
+
const docStyle = getComputedStyle(document.documentElement);
|
|
3005
|
+
this._mobileBreakpointValue = docStyle.getPropertyValue(DESIGN_TOKEN_BREAKPOINT_PREFIX + value);
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
get mobileFullscreenBreakpoint() {
|
|
3010
|
+
return this._mobileBreakpointValue;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
updated(changedProperties) {
|
|
3014
|
+
if (changedProperties.has('isFullscreen')) {
|
|
3015
|
+
this.childNodes.forEach((child) => {
|
|
3016
|
+
// skip any text that is not in an HTMLElement on setting `isFullscreen` attr.
|
|
3017
|
+
if (child.nodeName !== '#text') {
|
|
3018
|
+
if (this.isFullscreen) {
|
|
3019
|
+
child.setAttribute('isFullscreen', 'true');
|
|
3020
|
+
} else {
|
|
3021
|
+
child.removeAttribute('isFullscreen');
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
});
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
3029
|
+
render() {
|
|
3030
|
+
return u$3`
|
|
3031
|
+
<div class="container" part="bibContainer">
|
|
3032
|
+
<slot></slot>
|
|
3033
|
+
</div>
|
|
3034
|
+
`;
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
var dropdownVersion$1 = '3.0.0';
|
|
3039
|
+
|
|
3040
|
+
var styleCss$3 = i$7`: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}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@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)}: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)}`;
|
|
3041
|
+
|
|
3042
|
+
var colorCss$3 = i$7`.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);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8);--ds-auro-dropdown-trigger-outline-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);--ds-auro-dropdown-trigger-outline-color: 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))}: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-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)}`;
|
|
3043
|
+
|
|
3044
|
+
/**
|
|
3045
|
+
* @license
|
|
3046
|
+
* Copyright 2019 Google LLC
|
|
3047
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3048
|
+
*/
|
|
3049
|
+
const t$1$1=globalThis,e$2$1=t$1$1.ShadowRoot&&(void 0===t$1$1.ShadyCSS||t$1$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1$1=Symbol(),o$2$1=new WeakMap;let n$2$1 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$1$1)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$2$1&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2$1.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2$1.set(s,t));}return t}toString(){return this.cssText}};const r$3$1=t=>new n$2$1("string"==typeof t?t:t+"",void 0,s$1$1),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$2$1(o,t,s$1$1)},S$1$1=(s,o)=>{if(e$2$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;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2$1=e$2$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3$1(e)})(t):t;
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* @license
|
|
3053
|
+
* Copyright 2017 Google LLC
|
|
3054
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3055
|
+
*/const{is:i$2$1,defineProperty:e$1,getOwnPropertyDescriptor:r$2$1,getOwnPropertyNames:h$1$1,getOwnPropertySymbols:o$1,getPrototypeOf:n$1$1}=Object,a$1$1=globalThis,c$1$1=a$1$1.trustedTypes,l$1$1=c$1$1?c$1$1.emptyScript:"",p$1$1=a$1$1.reactiveElementPolyfillSupport,d$1$1=(t,s)=>t,u$1$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1$1: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$1=(t,s)=>!i$2$1(t,s),y$1$1={attribute:true,type:String,converter:u$1$1,reflect:false,hasChanged:f$1$1};Symbol.metadata??=Symbol("metadata"),a$1$1.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$1$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);void 0!==r&&e$1(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$2$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$1$1}static _$Ei(){if(this.hasOwnProperty(d$1$1("elementProperties")))return;const t=n$1$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1$1("properties"))){const t=this.properties,s=[...h$1$1(t),...o$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==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);void 0!==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$1(s));}else void 0!==s&&i.push(c$2$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,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),void 0!==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$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(void 0!==e&&true===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1$1).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(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1$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=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||void 0===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$1$1("elementProperties")]=new Map,b$2[d$1$1("finalized")]=new Map,p$1$1?.({ReactiveElement:b$2}),(a$1$1.reactiveElementVersions??=[]).push("2.0.4");
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* @license
|
|
3059
|
+
* Copyright 2017 Google LLC
|
|
3060
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3061
|
+
*/
|
|
3062
|
+
const t=globalThis,i$1=t.trustedTypes,s=i$1?i$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,e="$lit$",h$4=`lit$${Math.random().toFixed(9).slice(2)}$`,o="?"+h$4,n=`<${o}>`,r$1$1=document,l=()=>r$1$1.createComment(""),c$6=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d$4="[ \t\n\f\r]",f$4=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$2=/-->/g,_$2=/>/g,m$2=RegExp(`>|${d$4}(?:([^\\s"'>=/]+)(${d$4}*=${d$4}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$4=/'/g,g$2=/"/g,$$2=/^(?:script|style|textarea|title)$/i,T$2=Symbol.for("lit-noChange"),E$2=Symbol.for("lit-nothing"),A$2=new WeakMap,C$2=r$1$1.createTreeWalker(r$1$1,129);function P$2(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.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$4;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$4?"!--"===u[1]?c=v$2:void 0!==u[1]?c=_$2:void 0!==u[2]?($$2.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$2):void 0!==u[3]&&(c=m$2):c===m$2?">"===u[0]?(c=r??f$4,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$2:'"'===u[3]?g$2:p$4):c===g$2||c===p$4?c=m$2:c===v$2||c===_$2?c=f$4:(c=m$2,r=void 0);const x=c===m$2&&t[i+1].startsWith("/>")?" ":"";l+=c===f$4?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h$4+x):s+h$4+(-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)){const i=v[a++],s=r.getAttribute(t).split(h$4),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$4)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$2.test(r.tagName)){const t=r.textContent.split(h$4),s=t.length-1;if(s>0){r.textContent=i$1?i$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C$2.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$4,t+1));)d.push({type:7,index:c}),t+=h$4.length-1;}c++;}}static createElement(t,i){const s=r$1$1.createElement("template");return s.innerHTML=t,s}};function S$4(t,i,s=t,e){if(i===T$2)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$6(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S$4(t,h._$AS(t,i.values),h,e)),i}let M$2 = class M{constructor(t,i){this._$AV=[],this._$AN=void 0,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$1).importNode(i,true);C$2.currentNode=e;let h=C$2.nextNode(),o=0,n=0,l=s[0];for(;void 0!==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$1$1,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==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=void 0,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 void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$4(this,t,i),c$6(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):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(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$6(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$1$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===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 void 0===i&&A$2.set(t.strings,i=new N$2(t)),i}k(t){a(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()),this.O(l()),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){ void 0===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=void 0,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(void 0===h)t=S$4(this,t,i,0),o=!c$6(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$4(this,e[s+n],i,n),r===T$2&&(r=this._$AH[n]),o||=!c$6(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?void 0: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$4(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=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$4(this,t);}};const j$2=t.litHtmlPolyfillSupport;j$2?.(N$2,R$2),(t.litHtmlVersions??=[]).push("3.2.1");const B$2=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$2(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
3063
|
+
|
|
3064
|
+
/**
|
|
3065
|
+
* @license
|
|
3066
|
+
* Copyright 2017 Google LLC
|
|
3067
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3068
|
+
*/let r$8 = class r extends b$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}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$8._$litElement$=true,r$8["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$8});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r$8});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
3069
|
+
|
|
3070
|
+
i$3$1`:host([error]){--ds-auro-helptext-color: var(--ds-color-text-error-default, #cc1816)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3071
|
+
|
|
3072
|
+
i$3$1`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}:host([large]) .helptext-wrapper{font-size:var(--ds-text-body-size-default, 1rem)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3073
|
+
|
|
3074
|
+
i$3$1`:host{--ds-auro-helptext-color: var(--ds-color-text-tertiary-default, #6a717c)}`;
|
|
3075
|
+
|
|
3076
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3077
|
+
// See LICENSE in the project root for license information.
|
|
3078
|
+
|
|
3079
|
+
|
|
3080
|
+
/**
|
|
3081
|
+
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
3082
|
+
* @slot - Default slot for the popover content.
|
|
3083
|
+
* @slot label - Defines the content of the label.
|
|
3084
|
+
* @slot helpText - Defines the content of the helpText.
|
|
3085
|
+
* @slot trigger - Defines the content of the trigger.
|
|
3086
|
+
* @csspart trigger - The trigger content container.
|
|
3087
|
+
* @csspart chevron - The collapsed/expanded state icon container.
|
|
3088
|
+
* @csspart helpText - The helpText content container.
|
|
3089
|
+
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
3090
|
+
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
3091
|
+
*/
|
|
3092
|
+
class AuroDropdown extends r$4 {
|
|
3093
|
+
constructor() {
|
|
3094
|
+
super();
|
|
3095
|
+
|
|
3096
|
+
this.isPopoverVisible = false;
|
|
3097
|
+
this.isBibFullscreen = false;
|
|
3098
|
+
this.matchWidth = false;
|
|
3099
|
+
this.noHideOnThisFocusLoss = false;
|
|
3100
|
+
|
|
3101
|
+
this.privateDefaults();
|
|
3102
|
+
|
|
3103
|
+
/**
|
|
3104
|
+
* @private
|
|
3105
|
+
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
3106
|
+
*/
|
|
3107
|
+
this.constructor.shadowRootOptions = {
|
|
3108
|
+
...r$4.shadowRootOptions,
|
|
3109
|
+
delegatesFocus: true,
|
|
3110
|
+
};
|
|
3111
|
+
|
|
3112
|
+
/**
|
|
3113
|
+
* @private
|
|
3114
|
+
*/
|
|
3115
|
+
this.triggerContentFocusable = false;
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* @private
|
|
3119
|
+
*/
|
|
3120
|
+
this.showTriggerBorders = true;
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
/**
|
|
3124
|
+
* @private
|
|
3125
|
+
* @returns {void} Internal defaults.
|
|
3126
|
+
*/
|
|
3127
|
+
privateDefaults() {
|
|
3128
|
+
this.bordered = false;
|
|
3129
|
+
this.chevron = false;
|
|
3130
|
+
this.disabled = false;
|
|
3131
|
+
this.error = false;
|
|
3132
|
+
this.inset = false;
|
|
3133
|
+
this.placement = 'bottom-start';
|
|
3134
|
+
this.rounded = false;
|
|
3135
|
+
this.tabIndex = 0;
|
|
3136
|
+
this.noToggle = false;
|
|
3137
|
+
|
|
3138
|
+
/**
|
|
3139
|
+
* @private
|
|
3140
|
+
*/
|
|
3141
|
+
this.hasTriggerContent = false;
|
|
3142
|
+
|
|
3143
|
+
/**
|
|
3144
|
+
* @private
|
|
3145
|
+
*/
|
|
3146
|
+
this.triggerContentSlot = undefined;
|
|
3147
|
+
|
|
3148
|
+
/**
|
|
3149
|
+
* @private
|
|
3150
|
+
*/
|
|
3151
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
3152
|
+
|
|
3153
|
+
/**
|
|
3154
|
+
* @private
|
|
3155
|
+
*/
|
|
3156
|
+
this.floater = new AuroFloatingUI();
|
|
3157
|
+
|
|
3158
|
+
/**
|
|
3159
|
+
* @private
|
|
3160
|
+
*/
|
|
3161
|
+
this.floaterConfig = {
|
|
3162
|
+
placement: 'bottom-start',
|
|
3163
|
+
flip: true,
|
|
3164
|
+
autoPlacement: false,
|
|
3165
|
+
offset: 0,
|
|
3166
|
+
};
|
|
3167
|
+
|
|
3168
|
+
/**
|
|
3169
|
+
* Generate unique names for dependency components.
|
|
3170
|
+
*/
|
|
3171
|
+
const versioning = new AuroDependencyVersioning();
|
|
3172
|
+
|
|
3173
|
+
/**
|
|
3174
|
+
* @private
|
|
3175
|
+
*/
|
|
3176
|
+
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
3177
|
+
|
|
3178
|
+
/**
|
|
3179
|
+
* @private
|
|
3180
|
+
*/
|
|
3181
|
+
this.dropdownBibTag = versioning.generateTag('auro-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
/**
|
|
3185
|
+
* Public method to hide the dropdown.
|
|
3186
|
+
* @returns {void}
|
|
3187
|
+
*/
|
|
3188
|
+
hide() {
|
|
3189
|
+
this.floater.hideBib();
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
/**
|
|
3193
|
+
* Public method to show the dropdown.
|
|
3194
|
+
* @returns {void}
|
|
3195
|
+
*/
|
|
3196
|
+
show() {
|
|
3197
|
+
this.floater.showBib();
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
// function to define props used within the scope of this component
|
|
3201
|
+
static get properties() {
|
|
3202
|
+
return {
|
|
3203
|
+
|
|
3204
|
+
/**
|
|
3205
|
+
* If declared, applies a border around the trigger slot.
|
|
3206
|
+
*/
|
|
3207
|
+
bordered: {
|
|
3208
|
+
type: Boolean,
|
|
3209
|
+
reflect: true
|
|
3210
|
+
},
|
|
3211
|
+
|
|
3212
|
+
/**
|
|
3213
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
3214
|
+
* @attr {Boolean} chevron
|
|
3215
|
+
*/
|
|
3216
|
+
chevron: {
|
|
3217
|
+
type: Boolean,
|
|
3218
|
+
reflect: true
|
|
3219
|
+
},
|
|
3220
|
+
|
|
3221
|
+
/**
|
|
3222
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
3223
|
+
*/
|
|
3224
|
+
common: {
|
|
3225
|
+
type: Boolean,
|
|
3226
|
+
reflect: true
|
|
3227
|
+
},
|
|
3228
|
+
|
|
3229
|
+
/**
|
|
3230
|
+
* If declared, the dropdown is not interactive.
|
|
3231
|
+
*/
|
|
3232
|
+
disabled: {
|
|
3233
|
+
type: Boolean,
|
|
3234
|
+
reflect: true
|
|
3235
|
+
},
|
|
3236
|
+
|
|
3237
|
+
/**
|
|
3238
|
+
* @private
|
|
3239
|
+
*/
|
|
3240
|
+
dropdownWidth: {
|
|
3241
|
+
type: Number
|
|
3242
|
+
},
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
3246
|
+
*/
|
|
3247
|
+
error: {
|
|
3248
|
+
type: Boolean,
|
|
3249
|
+
reflect: true
|
|
3250
|
+
},
|
|
3251
|
+
|
|
3252
|
+
/**
|
|
3253
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
3254
|
+
*/
|
|
3255
|
+
focusShow: {
|
|
3256
|
+
type: Boolean,
|
|
3257
|
+
reflect: true
|
|
3258
|
+
},
|
|
3259
|
+
|
|
3260
|
+
/**
|
|
3261
|
+
* Makes the trigger to be full width of its parent container.
|
|
3262
|
+
*/
|
|
3263
|
+
fluid: {
|
|
3264
|
+
type: Boolean,
|
|
3265
|
+
reflect: true
|
|
3266
|
+
},
|
|
3267
|
+
|
|
3268
|
+
/**
|
|
3269
|
+
* If declared, will apply padding around trigger slot content.
|
|
3270
|
+
*/
|
|
3271
|
+
inset: {
|
|
3272
|
+
type: Boolean,
|
|
3273
|
+
reflect: true
|
|
3274
|
+
},
|
|
3275
|
+
|
|
3276
|
+
/**
|
|
3277
|
+
* If true, the dropdown bib is displayed.
|
|
3278
|
+
*/
|
|
3279
|
+
isPopoverVisible: {
|
|
3280
|
+
type: Boolean
|
|
3281
|
+
},
|
|
3282
|
+
|
|
3283
|
+
/**
|
|
3284
|
+
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
3285
|
+
*/
|
|
3286
|
+
isBibFullscreen: {
|
|
3287
|
+
type: Boolean,
|
|
3288
|
+
reflect: true,
|
|
3289
|
+
},
|
|
3290
|
+
|
|
3291
|
+
/**
|
|
3292
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
3293
|
+
*/
|
|
3294
|
+
hoverToggle: {
|
|
3295
|
+
type: Boolean,
|
|
3296
|
+
reflect: true
|
|
3297
|
+
},
|
|
3298
|
+
|
|
3299
|
+
/**
|
|
3300
|
+
* @private
|
|
3301
|
+
*/
|
|
3302
|
+
hasTriggerContent: {
|
|
3303
|
+
type: Boolean
|
|
3304
|
+
},
|
|
3305
|
+
|
|
3306
|
+
/**
|
|
3307
|
+
* 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.
|
|
3308
|
+
*/
|
|
3309
|
+
mobileFullscreenBreakpoint: {
|
|
3310
|
+
type: String,
|
|
3311
|
+
reflect: true
|
|
3312
|
+
},
|
|
3313
|
+
|
|
3314
|
+
/**
|
|
3315
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
3316
|
+
*/
|
|
3317
|
+
matchWidth: {
|
|
3318
|
+
type: Boolean,
|
|
3319
|
+
reflect: true
|
|
3320
|
+
},
|
|
3321
|
+
|
|
3322
|
+
/**
|
|
3323
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3324
|
+
*/
|
|
3325
|
+
noHideOnThisFocusLoss: {
|
|
3326
|
+
type: Boolean,
|
|
3327
|
+
reflect: true
|
|
3328
|
+
},
|
|
3329
|
+
|
|
3330
|
+
/**
|
|
3331
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
3332
|
+
*/
|
|
3333
|
+
noToggle: {
|
|
3334
|
+
type: Boolean,
|
|
3335
|
+
reflect: true
|
|
3336
|
+
},
|
|
3337
|
+
|
|
3338
|
+
onSlotChange: {
|
|
3339
|
+
type: Function,
|
|
3340
|
+
reflect: false
|
|
3341
|
+
},
|
|
3342
|
+
|
|
3343
|
+
/**
|
|
3344
|
+
* @private
|
|
3345
|
+
*/
|
|
3346
|
+
placement: {
|
|
3347
|
+
type: String
|
|
3348
|
+
},
|
|
3349
|
+
|
|
3350
|
+
/**
|
|
3351
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
3352
|
+
*/
|
|
3353
|
+
rounded: {
|
|
3354
|
+
type: Boolean,
|
|
3355
|
+
reflect: true
|
|
3356
|
+
},
|
|
3357
|
+
|
|
3358
|
+
/**
|
|
3359
|
+
* @private
|
|
3360
|
+
*/
|
|
3361
|
+
tabIndex: {
|
|
3362
|
+
type: Number
|
|
3363
|
+
}
|
|
3364
|
+
};
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
static get styles() {
|
|
3368
|
+
return [
|
|
3369
|
+
colorCss$3,
|
|
3370
|
+
styleCss$3,
|
|
3371
|
+
tokensCss$2
|
|
3372
|
+
];
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
/**
|
|
3376
|
+
* This will register this element with the browser.
|
|
3377
|
+
* @param {string} [name="auro-dropdown"] - The name of element that you want to register to.
|
|
3378
|
+
*
|
|
3379
|
+
* @example
|
|
3380
|
+
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
3381
|
+
*
|
|
3382
|
+
*/
|
|
3383
|
+
static register(name = "auro-dropdown") {
|
|
3384
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDropdown);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
connectedCallback() {
|
|
3388
|
+
super.connectedCallback();
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
disconnectedCallback() {
|
|
3392
|
+
super.disconnectedCallback();
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
updated(changedProperties) {
|
|
3396
|
+
this.floater.handleUpdate(changedProperties);
|
|
3397
|
+
|
|
3398
|
+
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
3399
|
+
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
// when trigger's content is changed without any attribute or node change,
|
|
3403
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
3404
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3405
|
+
this.handleTriggerContentSlotChange();
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
|
|
3409
|
+
firstUpdated() {
|
|
3410
|
+
this.floater.configure(this, 'auroDropdown');
|
|
3411
|
+
this.bibContent = this.floater.element.bib;
|
|
3412
|
+
|
|
3413
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
3414
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
/**
|
|
3418
|
+
* Exposes CSS parts for styling from parent components.
|
|
3419
|
+
* @returns {void}
|
|
3420
|
+
*/
|
|
3421
|
+
exposeCssParts() {
|
|
3422
|
+
this.setAttribute('exportparts', 'trigger:dropdownTrigger, chevron:dropdownChevron, helpText:dropdownHelpText, size:dropdownSize');
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3425
|
+
/**
|
|
3426
|
+
* Determines if content is within a custom slot.
|
|
3427
|
+
* @private
|
|
3428
|
+
* @param {HTMLElement} element - The element to check.
|
|
3429
|
+
* @returns {Boolean}
|
|
3430
|
+
*/
|
|
3431
|
+
isCustomSlotContent(element) {
|
|
3432
|
+
let currentElement = element;
|
|
3433
|
+
|
|
3434
|
+
let inCustomSlot = false;
|
|
3435
|
+
|
|
3436
|
+
while (currentElement) {
|
|
3437
|
+
currentElement = currentElement.parentElement;
|
|
3438
|
+
|
|
3439
|
+
if (currentElement && currentElement.hasAttribute('slot')) {
|
|
3440
|
+
inCustomSlot = true;
|
|
3441
|
+
break;
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
return inCustomSlot;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Determines if the element or any children are focusable.
|
|
3450
|
+
* @private
|
|
3451
|
+
* @param {HTMLElement} element - Element to check.
|
|
3452
|
+
* @returns {Boolean} - True if the element or any children are focusable.
|
|
3453
|
+
*/
|
|
3454
|
+
containsFocusableElement(element) {
|
|
3455
|
+
this.showTriggerBorders = true;
|
|
3456
|
+
|
|
3457
|
+
const nodes = [
|
|
3458
|
+
element,
|
|
3459
|
+
...element.children
|
|
3460
|
+
];
|
|
3461
|
+
|
|
3462
|
+
const focusableElements = [
|
|
3463
|
+
'a',
|
|
3464
|
+
'auro-hyperlink',
|
|
3465
|
+
'button',
|
|
3466
|
+
'auro-button',
|
|
3467
|
+
'input',
|
|
3468
|
+
'auro-input',
|
|
3469
|
+
];
|
|
3470
|
+
|
|
3471
|
+
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
3472
|
+
|
|
3473
|
+
const result = nodes.some((node) => {
|
|
3474
|
+
const tagName = node.tagName.toLowerCase();
|
|
3475
|
+
|
|
3476
|
+
if (node.tabIndex > -1) {
|
|
3477
|
+
return true;
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
if (focusableElements.includes(tagName)) {
|
|
3481
|
+
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
3482
|
+
return true;
|
|
3483
|
+
}
|
|
3484
|
+
if (!node.hasAttribute('disabled')) {
|
|
3485
|
+
return true;
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
3490
|
+
return true;
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
return false;
|
|
3494
|
+
});
|
|
3495
|
+
|
|
3496
|
+
if (result) {
|
|
3497
|
+
this.showTriggerBorders = !nodes.some((node) => {
|
|
3498
|
+
const tagName = node.tagName.toLowerCase();
|
|
3499
|
+
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
return result;
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3506
|
+
/**
|
|
3507
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
3508
|
+
*
|
|
3509
|
+
* It first updates the floater settings
|
|
3510
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
3511
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
3512
|
+
*
|
|
3513
|
+
* @private
|
|
3514
|
+
* @method handleTriggerContentSlotChange
|
|
3515
|
+
* @param {Event} event - Native slotchange event.
|
|
3516
|
+
* @returns {void}
|
|
3517
|
+
*/
|
|
3518
|
+
handleTriggerContentSlotChange(event) {
|
|
3519
|
+
this.floater.handleTriggerTabIndex();
|
|
3520
|
+
|
|
3521
|
+
const triggerContentNodes = this.shadowRoot.querySelector('.triggerContent slot').assignedNodes();
|
|
3522
|
+
|
|
3523
|
+
triggerContentNodes.forEach((node) => {
|
|
3524
|
+
if (!this.triggerContentFocusable) {
|
|
3525
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
3526
|
+
}
|
|
3527
|
+
});
|
|
3528
|
+
|
|
3529
|
+
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3530
|
+
|
|
3531
|
+
if (!this.triggerContentFocusable) {
|
|
3532
|
+
trigger.setAttribute('tabindex', '0');
|
|
3533
|
+
trigger.setAttribute('role', 'button');
|
|
3534
|
+
} else {
|
|
3535
|
+
trigger.removeAttribute('tabindex');
|
|
3536
|
+
trigger.removeAttribute('role');
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
if (event) {
|
|
3540
|
+
this.triggerNode = event.target;
|
|
3541
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3544
|
+
if (this.triggerContentSlot) {
|
|
3545
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
3546
|
+
if (slot.textContent.trim()) {
|
|
3547
|
+
return true;
|
|
3548
|
+
}
|
|
3549
|
+
const slotInSlot = slot.querySelector('slot');
|
|
3550
|
+
if (!slotInSlot) {
|
|
3551
|
+
return false;
|
|
3552
|
+
}
|
|
3553
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
3554
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
3555
|
+
});
|
|
3556
|
+
} else {
|
|
3557
|
+
this.hasTriggerContent = false;
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
/**
|
|
3562
|
+
* Handles the default slot change event and updates the content.
|
|
3563
|
+
*
|
|
3564
|
+
* This method retrieves all nodes assigned to the default slot of the event target and appends them
|
|
3565
|
+
* to the `bibContent` element. If a callback function `onSlotChange` is defined, it is invoked to
|
|
3566
|
+
* notify about the slot change.
|
|
3567
|
+
*
|
|
3568
|
+
* @private
|
|
3569
|
+
* @method handleDefaultSlot
|
|
3570
|
+
* @param {Event} event - The event object representing the slot change.
|
|
3571
|
+
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
3572
|
+
*/
|
|
3573
|
+
handleDefaultSlot(event) {
|
|
3574
|
+
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
3575
|
+
|
|
3576
|
+
if (this.onSlotChange) {
|
|
3577
|
+
this.onSlotChange();
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
3582
|
+
render() {
|
|
3583
|
+
return u$3`
|
|
3584
|
+
<div>
|
|
3585
|
+
<div
|
|
3586
|
+
id="trigger"
|
|
3587
|
+
class="trigger"
|
|
3588
|
+
part="trigger"
|
|
3589
|
+
aria-labelledby="triggerLabel"
|
|
3590
|
+
tabindex="${this.tabIndex}"
|
|
3591
|
+
?showBorder="${this.showTriggerBorders}"
|
|
3592
|
+
>
|
|
3593
|
+
<div class="triggerContentWrapper">
|
|
3594
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3595
|
+
<slot name="label"></slot>
|
|
3596
|
+
</label>
|
|
3597
|
+
<div class="triggerContent">
|
|
3598
|
+
<slot
|
|
3599
|
+
name="trigger"
|
|
3600
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
3601
|
+
</div>
|
|
3602
|
+
</div>
|
|
3603
|
+
${this.chevron || this.common ? u$3`
|
|
3604
|
+
<div
|
|
3605
|
+
id="showStateIcon"
|
|
3606
|
+
part="chevron">
|
|
3607
|
+
<${this.iconTag}
|
|
3608
|
+
category="interface"
|
|
3609
|
+
name="chevron-down"
|
|
3610
|
+
customColor
|
|
3611
|
+
?disabled=${this.disabled}
|
|
3612
|
+
>
|
|
3613
|
+
</${this.iconTag}>
|
|
3614
|
+
</div>
|
|
3615
|
+
` : undefined }
|
|
3616
|
+
</div>
|
|
3617
|
+
<auro-helptext part="helpText" ?error="${this.error}">
|
|
3618
|
+
<slot name="helpText"></slot>
|
|
3619
|
+
</auro-helptext>
|
|
3620
|
+
<div class="slotContent">
|
|
3621
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
3622
|
+
</div>
|
|
3623
|
+
<div id="bibSizer" part="size"></div>
|
|
3624
|
+
<${this.dropdownBibTag}
|
|
3625
|
+
id="bib"
|
|
3626
|
+
role="tooltip"
|
|
3627
|
+
?isfullscreen="${this.isBibFullscreen}"
|
|
3628
|
+
?common="${this.common}"
|
|
3629
|
+
?rounded="${this.common || this.rounded}"
|
|
3630
|
+
?inset="${this.common || this.inset}">
|
|
3631
|
+
</${this.dropdownBibTag}>
|
|
3632
|
+
</div>
|
|
3633
|
+
`;
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
|
|
3637
|
+
var dropdownVersion = '3.0.0';
|
|
3638
|
+
|
|
3639
|
+
/**
|
|
3640
|
+
* @license
|
|
3641
|
+
* Copyright 2019 Google LLC
|
|
3642
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3643
|
+
*/
|
|
3644
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===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&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$4.get(s)),void 0===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+"",void 0,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;void 0!==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;
|
|
3645
|
+
|
|
3646
|
+
/**
|
|
3647
|
+
* @license
|
|
3648
|
+
* Copyright 2017 Google LLC
|
|
3649
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3650
|
+
*/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);void 0!==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(),void 0!==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(void 0!==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);void 0!==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 void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,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),void 0!==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(void 0!==e&&true===i.reflect){const r=(void 0!==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(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==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(void 0!==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=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t) true!==i.wrapped||this._$AL.has(s)||void 0===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");
|
|
3651
|
+
|
|
3652
|
+
/**
|
|
3653
|
+
* @license
|
|
3654
|
+
* Copyright 2017 Google LLC
|
|
3655
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3656
|
+
*/
|
|
3657
|
+
const t$1=globalThis,i$3=t$1.trustedTypes,s$1=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,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,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 void 0!==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:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);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=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,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(;void 0!==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) void 0!==s&&(void 0!==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=void 0,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 void 0!==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):void 0!==t._$litType$?this.$(t):void 0!==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):(void 0===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 void 0===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){ void 0===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=void 0,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(void 0===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?void 0: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=void 0,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(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
3658
|
+
|
|
3659
|
+
/**
|
|
3660
|
+
* @license
|
|
3661
|
+
* Copyright 2017 Google LLC
|
|
3662
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3663
|
+
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}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");
|
|
3664
|
+
|
|
3665
|
+
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)}`;
|
|
3666
|
+
|
|
3667
|
+
i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color) !important}`;
|
|
3668
|
+
|
|
3669
|
+
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)}`;
|
|
3670
|
+
|
|
3671
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3672
|
+
// See LICENSE in the project root for license information.
|
|
3673
|
+
|
|
3674
|
+
// ---------------------------------------------------------------------
|
|
3675
|
+
|
|
3676
|
+
/**
|
|
3677
|
+
* Converts value to an array.
|
|
3678
|
+
* If the value is a JSON string representing an array, it will be parsed.
|
|
3679
|
+
* If the value is already an array, it is returned.
|
|
3680
|
+
* If the value is undefined, it returns undefined.
|
|
3681
|
+
* @private
|
|
3682
|
+
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
3683
|
+
* @returns {Array|undefined} - The converted array or undefined.
|
|
3684
|
+
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
3685
|
+
* or if the value cannot be parsed into an array from a JSON string.
|
|
3686
|
+
*/
|
|
3687
|
+
function arrayConverter(value) {
|
|
3688
|
+
// Allow undefined
|
|
3689
|
+
if (value === undefined) {
|
|
3690
|
+
return undefined;
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
// Return the value if it is already an array
|
|
3694
|
+
if (Array.isArray(value)) {
|
|
3695
|
+
return value;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
try {
|
|
3699
|
+
// If value is a JSON string, parse it
|
|
3700
|
+
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
3701
|
+
|
|
3702
|
+
// Check if the parsed value is an array
|
|
3703
|
+
if (Array.isArray(parsed)) {
|
|
3704
|
+
return parsed;
|
|
3705
|
+
}
|
|
3706
|
+
} catch (error) {
|
|
3707
|
+
// If JSON parsing fails, continue to throw an error below
|
|
3708
|
+
/* eslint-disable no-console */
|
|
3709
|
+
console.error('JSON parsing failed:', error);
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
// Throw error if the input is not an array or undefined
|
|
3713
|
+
throw new Error('Invalid value: Input must be an array or undefined');
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
/**
|
|
3717
|
+
* Compare two arrays for equality.
|
|
3718
|
+
* @private
|
|
3719
|
+
* @param {Array} arr1 - First array to compare.
|
|
3720
|
+
* @param {Array} arr2 - Second array to compare.
|
|
3721
|
+
* @returns {boolean} True if arrays are equal.
|
|
3722
|
+
*/
|
|
3723
|
+
function arraysAreEqual(arr1, arr2) {
|
|
3724
|
+
// If both arrays undefined, they are equal (true)
|
|
3725
|
+
if (arr1 === undefined || arr2 === undefined) {
|
|
3726
|
+
return arr1 === arr2;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
// If arrays have different lengths, they are not equal
|
|
3730
|
+
if (arr1.length !== arr2.length) {
|
|
3731
|
+
return false;
|
|
3732
|
+
}
|
|
3733
|
+
|
|
3734
|
+
// If every item at each index is the same, return true
|
|
3735
|
+
for (let index = 0; index < arr1.length; index += 1) {
|
|
3736
|
+
if (arr1[index] !== arr2[index]) {
|
|
3737
|
+
return false;
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
return true;
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
/**
|
|
3744
|
+
* Compares array for changes.
|
|
3745
|
+
* @private
|
|
3746
|
+
* @param {Array|any} newVal - New value to compare.
|
|
3747
|
+
* @param {Array|any} oldVal - Old value to compare.
|
|
3748
|
+
* @returns {boolean} True if arrays have changed.
|
|
3749
|
+
*/
|
|
3750
|
+
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
3751
|
+
try {
|
|
3752
|
+
// Check if values are undefined or arrays
|
|
3753
|
+
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
3754
|
+
|
|
3755
|
+
// If non-array or non-undefined, throw error
|
|
3756
|
+
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
3757
|
+
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
3758
|
+
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
// Return true if arrays have changed, false if they are the same
|
|
3762
|
+
return !arraysAreEqual(newVal, oldVal);
|
|
3763
|
+
} catch (error) {
|
|
3764
|
+
/* eslint-disable no-console */
|
|
3765
|
+
console.error(error);
|
|
3766
|
+
// If validation fails, it has changed
|
|
3767
|
+
return true;
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
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}`;
|
|
3772
|
+
|
|
3773
|
+
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)}`;
|
|
3774
|
+
|
|
3775
|
+
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}`;
|
|
3776
|
+
|
|
3777
|
+
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)}`;
|
|
3778
|
+
|
|
3779
|
+
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)}`;
|
|
3780
|
+
|
|
3781
|
+
var styleCss = i$f`*,*: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}:host([multiselect]) [slot=trigger]{display:flex}:host([multiselect]) auro-menuoption:not(:first-child){margin-left:var(--ds-size-100)}`;
|
|
3782
|
+
|
|
3783
|
+
var colorCss = i$f`*,*: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)}`;
|
|
3784
|
+
|
|
3785
|
+
var tokensCss = i$f`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
|
|
3786
|
+
|
|
3787
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3788
|
+
// See LICENSE in the project root for license information.
|
|
3789
|
+
|
|
3790
|
+
|
|
3791
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
3792
|
+
/**
|
|
3793
|
+
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
3794
|
+
*
|
|
3795
|
+
* @slot - Default slot for the menu content.
|
|
3796
|
+
* @slot label - Defines the content of the label.
|
|
3797
|
+
* @slot helpText - Defines the content of the helpText.
|
|
3798
|
+
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
3799
|
+
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
3800
|
+
* @event input - Notifies every time the value prop of the element is changed.
|
|
3801
|
+
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
3802
|
+
* @csspart helpText - Apply CSS to the help text.
|
|
3803
|
+
*/
|
|
3804
|
+
|
|
3805
|
+
// build the component class
|
|
3806
|
+
class AuroSelect extends r$9 {
|
|
3807
|
+
constructor() {
|
|
3808
|
+
super();
|
|
3809
|
+
|
|
3810
|
+
this.optionSelected = undefined;
|
|
3811
|
+
this.value = undefined;
|
|
3812
|
+
|
|
3813
|
+
const idLength = 36;
|
|
3814
|
+
const idSubstrEnd = 8;
|
|
3815
|
+
const idSubstrStart = 2;
|
|
3816
|
+
|
|
3817
|
+
/**
|
|
3818
|
+
* @private
|
|
3819
|
+
*/
|
|
3820
|
+
this.uniqueId = Math.random().
|
|
3821
|
+
toString(idLength).
|
|
3822
|
+
substring(idSubstrStart, idSubstrEnd);
|
|
3823
|
+
|
|
3824
|
+
/**
|
|
3825
|
+
* @private
|
|
3826
|
+
*/
|
|
3827
|
+
this.validation = new AuroFormValidation();
|
|
3828
|
+
|
|
3829
|
+
/**
|
|
3830
|
+
* @private
|
|
3831
|
+
*/
|
|
3832
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* Generate unique names for dependency components.
|
|
3836
|
+
*/
|
|
3837
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
3838
|
+
|
|
3839
|
+
/**
|
|
3840
|
+
* @private
|
|
3841
|
+
*/
|
|
3842
|
+
this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
|
|
3843
|
+
|
|
3844
|
+
/**
|
|
3845
|
+
* @private
|
|
3846
|
+
*/
|
|
3847
|
+
this.isHiddenWhileLoading = false;
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3850
|
+
/**
|
|
3851
|
+
* @private
|
|
3852
|
+
* @returns {void} Internal defaults.
|
|
3853
|
+
*/
|
|
3854
|
+
privateDefaults() {
|
|
3855
|
+
this.options = [];
|
|
3856
|
+
this.optionActive = null;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
// This function is to define props used within the scope of this component
|
|
3860
|
+
// Be sure to review https://lit-element.polymer-project.org/guide/properties#reflected-attributes
|
|
3861
|
+
// to understand how to use reflected attributes with your property settings.
|
|
3862
|
+
static get properties() {
|
|
3863
|
+
return {
|
|
3864
|
+
|
|
3865
|
+
/**
|
|
3866
|
+
* When attribute is present, element shows disabled state.
|
|
3867
|
+
*/
|
|
3868
|
+
disabled: {
|
|
3869
|
+
type: Boolean,
|
|
3870
|
+
reflect: true
|
|
3871
|
+
},
|
|
3872
|
+
|
|
3873
|
+
/**
|
|
3874
|
+
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
3875
|
+
*/
|
|
3876
|
+
flexMenuWidth: {
|
|
3877
|
+
type: Boolean,
|
|
3878
|
+
reflect: true
|
|
3879
|
+
},
|
|
3880
|
+
|
|
3881
|
+
/**
|
|
3882
|
+
* When true, checkmark on selected option will no longer be present.
|
|
3883
|
+
*/
|
|
3884
|
+
noCheckmark: {
|
|
3885
|
+
type: Boolean,
|
|
3886
|
+
reflect: true
|
|
3887
|
+
},
|
|
3888
|
+
|
|
3889
|
+
/**
|
|
3890
|
+
* If set, disables auto-validation on blur.
|
|
3891
|
+
*/
|
|
3892
|
+
noValidate: {
|
|
3893
|
+
type: Boolean,
|
|
3894
|
+
reflect: true
|
|
3895
|
+
},
|
|
3896
|
+
|
|
3897
|
+
/**
|
|
3898
|
+
* @private
|
|
3899
|
+
*/
|
|
3900
|
+
optionActive: {
|
|
3901
|
+
type: Object
|
|
3902
|
+
},
|
|
3903
|
+
|
|
3904
|
+
/**
|
|
3905
|
+
* Specifies the current selected menuOption.
|
|
3906
|
+
*/
|
|
3907
|
+
optionSelected: {
|
|
3908
|
+
// Allow HTMLElement[] arrays and undefined
|
|
3909
|
+
converter: arrayConverter,
|
|
3910
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
3911
|
+
},
|
|
3912
|
+
|
|
3913
|
+
/**
|
|
3914
|
+
* @private
|
|
3915
|
+
*/
|
|
3916
|
+
options: {
|
|
3917
|
+
type: Array
|
|
3918
|
+
},
|
|
3919
|
+
|
|
3920
|
+
/**
|
|
3921
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
3922
|
+
*/
|
|
3923
|
+
required: {
|
|
3924
|
+
type: Boolean,
|
|
3925
|
+
reflect: true
|
|
3926
|
+
},
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
3930
|
+
*/
|
|
3931
|
+
error: {
|
|
3932
|
+
type: String,
|
|
3933
|
+
reflect: true
|
|
3934
|
+
},
|
|
3935
|
+
|
|
3936
|
+
/**
|
|
3937
|
+
* Sets a custom help text message to display for all validityStates.
|
|
3938
|
+
*/
|
|
3939
|
+
setCustomValidity: {
|
|
3940
|
+
type: String
|
|
3941
|
+
},
|
|
3942
|
+
|
|
3943
|
+
/**
|
|
3944
|
+
* Custom help text message to display when validity = `customError`.
|
|
3945
|
+
*/
|
|
3946
|
+
setCustomValidityCustomError: {
|
|
3947
|
+
type: String
|
|
3948
|
+
},
|
|
3949
|
+
|
|
3950
|
+
/**
|
|
3951
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
3952
|
+
*/
|
|
3953
|
+
setCustomValidityValueMissing: {
|
|
3954
|
+
type: String
|
|
3955
|
+
},
|
|
3956
|
+
|
|
3957
|
+
/**
|
|
3958
|
+
* Specifies the `validityState` this element is in.
|
|
3959
|
+
*/
|
|
3960
|
+
validity: {
|
|
3961
|
+
type: String,
|
|
3962
|
+
reflect: true
|
|
3963
|
+
},
|
|
3964
|
+
|
|
3965
|
+
/**
|
|
3966
|
+
* Value selected for the component.
|
|
3967
|
+
*/
|
|
3968
|
+
value: {
|
|
3969
|
+
// Allow string[] arrays and undefined
|
|
3970
|
+
converter: arrayConverter,
|
|
3971
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
3972
|
+
},
|
|
3973
|
+
|
|
3974
|
+
/**
|
|
3975
|
+
* Sets multi-select mode, allowing multiple options to be selected at once.
|
|
3976
|
+
*/
|
|
3977
|
+
multiSelect: {
|
|
3978
|
+
type: Boolean,
|
|
3979
|
+
reflect: true,
|
|
3980
|
+
attribute: 'multiselect'
|
|
3981
|
+
},
|
|
3982
|
+
};
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
static get styles() {
|
|
3986
|
+
return [
|
|
3987
|
+
colorCss,
|
|
3988
|
+
styleCss,
|
|
3989
|
+
tokensCss
|
|
3990
|
+
];
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
/**
|
|
3994
|
+
* Binds all behavior needed to the dropdown after rendering.
|
|
3995
|
+
* @private
|
|
3996
|
+
* @returns {void}
|
|
3997
|
+
*/
|
|
3998
|
+
configureDropdown() {
|
|
3999
|
+
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
4000
|
+
this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
|
|
4001
|
+
|
|
4002
|
+
if (this.customBibWidth) {
|
|
4003
|
+
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
4004
|
+
}
|
|
4005
|
+
|
|
4006
|
+
// Exposes the CSS parts from the dropdown for styling
|
|
4007
|
+
this.dropdown.exposeCssParts();
|
|
4008
|
+
}
|
|
4009
|
+
|
|
4010
|
+
/**
|
|
4011
|
+
* This will register this element with the browser.
|
|
4012
|
+
* @param {string} [name="auro-select"] - The name of element that you want to register to.
|
|
4013
|
+
*
|
|
4014
|
+
* @example
|
|
4015
|
+
* AuroSelect.register("custom-select") // this will register this element to <custom-select/>
|
|
4016
|
+
*
|
|
4017
|
+
*/
|
|
4018
|
+
static register(name = "auro-select") {
|
|
4019
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroSelect);
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
/**
|
|
4023
|
+
* Updates the displayed value in an Auro dropdown component based on optionSelected.
|
|
4024
|
+
* @private
|
|
4025
|
+
* @returns {void}
|
|
4026
|
+
*/
|
|
4027
|
+
updateDisplayedValue() {
|
|
4028
|
+
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
4029
|
+
|
|
4030
|
+
// Clear everything except placeholder
|
|
4031
|
+
const placeholder = triggerContentEl.querySelector('#placeholder');
|
|
4032
|
+
triggerContentEl.innerHTML = '';
|
|
4033
|
+
if (placeholder) {
|
|
4034
|
+
triggerContentEl.appendChild(placeholder);
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
// Handle selected options
|
|
4038
|
+
if (this.optionSelected && this.optionSelected.length) {
|
|
4039
|
+
// Create display text from selected options
|
|
4040
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
4041
|
+
|
|
4042
|
+
const span = document.createElement('span');
|
|
4043
|
+
span.textContent = displayText;
|
|
4044
|
+
triggerContentEl.appendChild(span);
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
this.dropdown.requestUpdate();
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
/**
|
|
4051
|
+
* Binds all behavior needed to the menu after rendering.
|
|
4052
|
+
* @private
|
|
4053
|
+
* @returns {void}
|
|
4054
|
+
*/
|
|
4055
|
+
configureMenu() {
|
|
4056
|
+
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
4057
|
+
|
|
4058
|
+
// racing condition on custom-select with custom-menu
|
|
4059
|
+
if (!this.menu) {
|
|
4060
|
+
setTimeout(() => {
|
|
4061
|
+
this.configureMenu();
|
|
4062
|
+
}, 0);
|
|
4063
|
+
return;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
4066
|
+
if (this.multiSelect) {
|
|
4067
|
+
this.menu.multiSelect = this.multiSelect;
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
|
|
4071
|
+
this.menu.setAttribute('aria-hidden', 'true');
|
|
4072
|
+
|
|
4073
|
+
this.generateOptionsArray();
|
|
4074
|
+
|
|
4075
|
+
this.menu.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
4076
|
+
this.optionActive = evt.detail;
|
|
4077
|
+
});
|
|
4078
|
+
|
|
4079
|
+
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
4080
|
+
// Get array of selected options from menu
|
|
4081
|
+
this.optionSelected = this.menu.optionSelected;
|
|
4082
|
+
// For single select, we still use arrays but only take first value
|
|
4083
|
+
this.value = this.menu.value;
|
|
4084
|
+
|
|
4085
|
+
if (this.dropdown.isPopoverVisible) {
|
|
4086
|
+
this.dropdown.hide();
|
|
4087
|
+
}
|
|
4088
|
+
});
|
|
4089
|
+
|
|
4090
|
+
/**
|
|
4091
|
+
* When this.value is preset auro-menu.selectByValue(this.value) is called.
|
|
4092
|
+
* However, if this.value does not match one of the menu options,
|
|
4093
|
+
* auro-menu will notify via event. In this case, clear out this.value
|
|
4094
|
+
* so that it is not storing an invalid value which can then later be returned
|
|
4095
|
+
* with `auro-select.value`.
|
|
4096
|
+
*/
|
|
4097
|
+
this.menu.addEventListener('auroMenu-selectValueFailure', () => {
|
|
4098
|
+
this.menu.clearSelection();
|
|
4099
|
+
});
|
|
4100
|
+
|
|
4101
|
+
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
4102
|
+
this.optionSelected = this.menu.optionSelected;
|
|
4103
|
+
this.validation.validate(this);
|
|
4104
|
+
});
|
|
4105
|
+
}
|
|
4106
|
+
|
|
4107
|
+
/**
|
|
4108
|
+
* Binds all behavior needed to the component after rendering.
|
|
4109
|
+
* @private
|
|
4110
|
+
* @returns {void}
|
|
4111
|
+
*/
|
|
4112
|
+
configureSelect() {
|
|
4113
|
+
// inject menu into menuWrapper
|
|
4114
|
+
this.menuWrapper.append(this.menu);
|
|
4115
|
+
|
|
4116
|
+
this.addEventListener('keydown', (evt) => {
|
|
4117
|
+
if (evt.key === 'ArrowUp') {
|
|
4118
|
+
evt.preventDefault();
|
|
4119
|
+
|
|
4120
|
+
this.dropdown.show();
|
|
4121
|
+
|
|
4122
|
+
if (this.dropdown.isPopoverVisible) {
|
|
4123
|
+
this.menu.navigateOptions('up');
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4127
|
+
if (evt.key === 'ArrowDown') {
|
|
4128
|
+
evt.preventDefault();
|
|
4129
|
+
|
|
4130
|
+
this.dropdown.show();
|
|
4131
|
+
|
|
4132
|
+
if (this.dropdown.isPopoverVisible) {
|
|
4133
|
+
this.menu.navigateOptions('down');
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
if (evt.key === 'Enter') {
|
|
4138
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
4139
|
+
evt.preventDefault();
|
|
4140
|
+
this.menu.makeSelection();
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4144
|
+
if (evt.key === 'Tab') {
|
|
4145
|
+
this.dropdown.hide();
|
|
4146
|
+
}
|
|
4147
|
+
});
|
|
4148
|
+
|
|
4149
|
+
this.addEventListener('focusin', this.handleFocusin);
|
|
4150
|
+
|
|
4151
|
+
this.addEventListener('blur', () => {
|
|
4152
|
+
this.validation.validate(this);
|
|
4153
|
+
});
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
/**
|
|
4157
|
+
* Manages the visibility of the dropdown based on loading state changes.
|
|
4158
|
+
*
|
|
4159
|
+
* This method listens for loading state changes and adjusts the visibility of the dropdown accordingly.
|
|
4160
|
+
* If the dropdown is visible and loading is true without any loading placeholders, it hides the dropdown
|
|
4161
|
+
* and sets a flag to indicate it is hidden while loading. If loading is false and the dropdown was previously
|
|
4162
|
+
* hidden, it checks if the active element is within the dropdown and shows it again if true.
|
|
4163
|
+
*
|
|
4164
|
+
* @private
|
|
4165
|
+
* @param {CustomEvent} event - The event object containing details about the loading state change.
|
|
4166
|
+
* @param {boolean} event.detail.loading - Indicates whether the menu is currently loading.
|
|
4167
|
+
* @param {boolean} event.detail.hasLoadingPlaceholder - Indicates if there are loading placeholders present.
|
|
4168
|
+
* @returns {void}
|
|
4169
|
+
*/
|
|
4170
|
+
handleMenuLoadingChange(event) {
|
|
4171
|
+
if (this.dropdown.isPopoverVisible && event.detail.loading && !event.detail.hasLoadingPlaceholder) {
|
|
4172
|
+
this.isHiddenWhileLoading = true;
|
|
4173
|
+
this.dropdown.hide();
|
|
4174
|
+
} else if (!event.detail.loading && this.isHiddenWhileLoading) {
|
|
4175
|
+
if (this.contains(document.activeElement)) {
|
|
4176
|
+
this.dropdown.show();
|
|
4177
|
+
}
|
|
4178
|
+
this.isHiddenWhileLoading = false;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
/**
|
|
4183
|
+
* Function to support @focusin event.
|
|
4184
|
+
* @private
|
|
4185
|
+
* @return {void}
|
|
4186
|
+
*/
|
|
4187
|
+
handleFocusin() {
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* The input is considered to be in it's initial state based on
|
|
4191
|
+
* if this.value === undefined. The first time we interact with the
|
|
4192
|
+
* input manually, by applying focusin, we need to flag the
|
|
4193
|
+
* input as no longer in the initial state.
|
|
4194
|
+
*/
|
|
4195
|
+
if (this.value === undefined) {
|
|
4196
|
+
this.value = undefined;
|
|
4197
|
+
this.removeEventListener('focusin', this.handleFocusin);
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
|
|
4201
|
+
/**
|
|
4202
|
+
* Determines the element error state based on the `required` attribute and input value.
|
|
4203
|
+
* @private
|
|
4204
|
+
* @returns {void}
|
|
4205
|
+
*/
|
|
4206
|
+
generateOptionsArray() {
|
|
4207
|
+
if (this.menu) {
|
|
4208
|
+
this.options = [...this.menu.querySelectorAll('auro-menuoption, [auro-menuoption]')];
|
|
4209
|
+
} else {
|
|
4210
|
+
this.options = [];
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4213
|
+
|
|
4214
|
+
/**
|
|
4215
|
+
* Handle element attributes on update.
|
|
4216
|
+
* @private
|
|
4217
|
+
* @returns {void}
|
|
4218
|
+
*/
|
|
4219
|
+
performUpdate() {
|
|
4220
|
+
super.performUpdate();
|
|
4221
|
+
|
|
4222
|
+
if (this.validity && this.validity !== 'valid') {
|
|
4223
|
+
this.dropdown.setAttribute('error', '');
|
|
4224
|
+
} else {
|
|
4225
|
+
this.dropdown.removeAttribute('error');
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
if (this.disabled) {
|
|
4229
|
+
this.dropdown.setAttribute('disabled', '');
|
|
4230
|
+
} else if (!this.disabled) {
|
|
4231
|
+
this.dropdown.removeAttribute('disabled');
|
|
4232
|
+
}
|
|
4233
|
+
|
|
4234
|
+
if (this.noCheckmark) {
|
|
4235
|
+
this.menu.setAttribute('nocheckmark', '');
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
|
|
4239
|
+
// lifecycle runs only after the element's DOM has been updated the first time
|
|
4240
|
+
firstUpdated() {
|
|
4241
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
4242
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
4243
|
+
|
|
4244
|
+
this.configureMenu();
|
|
4245
|
+
this.configureDropdown();
|
|
4246
|
+
this.configureSelect();
|
|
4247
|
+
|
|
4248
|
+
// Set the initial value in auro-menu if defined
|
|
4249
|
+
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
4250
|
+
this.menu.value = this.value;
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
|
|
4254
|
+
async updated(changedProperties) {
|
|
4255
|
+
if (changedProperties.has('value')) {
|
|
4256
|
+
if (this.value) {
|
|
4257
|
+
this.menu.value = this.value;
|
|
4258
|
+
|
|
4259
|
+
// Wait for menu to finish updating its value
|
|
4260
|
+
await this.menu.updateComplete;
|
|
4261
|
+
|
|
4262
|
+
this.optionSelected = this.menu.optionSelected;
|
|
4263
|
+
} else {
|
|
4264
|
+
this.menu.value = undefined;
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
this.validation.validate(this);
|
|
4268
|
+
|
|
4269
|
+
// LEGACY EVENT
|
|
4270
|
+
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|
|
4271
|
+
bubbles: true,
|
|
4272
|
+
cancelable: false,
|
|
4273
|
+
composed: true,
|
|
4274
|
+
}));
|
|
4275
|
+
|
|
4276
|
+
this.dispatchEvent(new CustomEvent('input', {
|
|
4277
|
+
bubbles: true,
|
|
4278
|
+
cancelable: true,
|
|
4279
|
+
composed: true,
|
|
4280
|
+
}));
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4283
|
+
if (changedProperties.has('optionSelected')) {
|
|
4284
|
+
this.updateDisplayedValue();
|
|
4285
|
+
}
|
|
4286
|
+
|
|
4287
|
+
if (changedProperties.has('error')) {
|
|
4288
|
+
this.validate(true);
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
/**
|
|
4293
|
+
* Resets component to initial state.
|
|
4294
|
+
* @returns {void}
|
|
4295
|
+
*/
|
|
4296
|
+
reset() {
|
|
4297
|
+
this.validation.reset(this);
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4300
|
+
/**
|
|
4301
|
+
* Validates value.
|
|
4302
|
+
* @param {boolean} [force=false] - Whether to force validation.
|
|
4303
|
+
*/
|
|
4304
|
+
validate(force = false) {
|
|
4305
|
+
this.validation.validate(this, force);
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4308
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
4309
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
4310
|
+
|
|
4311
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
4312
|
+
render() {
|
|
4313
|
+
const placeholderClass = {
|
|
4314
|
+
hidden: this.value,
|
|
4315
|
+
};
|
|
4316
|
+
|
|
4317
|
+
return u$5`
|
|
4318
|
+
<div class="outerWrapper">
|
|
4319
|
+
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
4320
|
+
${this.optionActive && this.options.length > 0
|
|
4321
|
+
? u$5`
|
|
4322
|
+
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
4323
|
+
`
|
|
4324
|
+
: undefined
|
|
4325
|
+
};
|
|
4326
|
+
|
|
4327
|
+
${this.optionSelected && this.options.length > 0
|
|
4328
|
+
? u$5`
|
|
4329
|
+
${`${this.optionSelected.innerText} selected`}
|
|
4330
|
+
`
|
|
4331
|
+
: undefined
|
|
4332
|
+
};
|
|
4333
|
+
</div>
|
|
4334
|
+
<${this.dropdownTag}
|
|
4335
|
+
for="selectmenu"
|
|
4336
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
4337
|
+
common
|
|
4338
|
+
fluid
|
|
4339
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
4340
|
+
chevron
|
|
4341
|
+
part="dropdown">
|
|
4342
|
+
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
4343
|
+
<span id="placeholder" class="${e$8(placeholderClass)}"><slot name="placeholder"></slot></span>
|
|
4344
|
+
</span>
|
|
4345
|
+
<div class="menuWrapper">
|
|
4346
|
+
</div>
|
|
4347
|
+
<slot name="label" slot="label"></slot>
|
|
4348
|
+
<p slot="helpText">
|
|
4349
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
4350
|
+
? u$5`
|
|
4351
|
+
<span id="${this.uniqueId}" part="helpText">
|
|
4352
|
+
<slot name="helpText"></slot>
|
|
4353
|
+
</span>`
|
|
4354
|
+
: u$5`
|
|
4355
|
+
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
4356
|
+
${this.errorMessage}
|
|
4357
|
+
</span>`
|
|
4358
|
+
}
|
|
4359
|
+
</p>
|
|
4360
|
+
</${this.dropdownTag}>
|
|
4361
|
+
<!-- Help text and error message template -->
|
|
4362
|
+
</div>
|
|
4363
|
+
`;
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4366
|
+
|
|
4367
|
+
AuroSelect.register();
|