@baloise/ds-core 16.0.3-nightly.20240417 → 16.1.0
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/components/all.d.ts +6 -2
- package/components/all.js +9 -3
- package/components/aria.js +3 -0
- package/components/bal-app.js +85 -1
- package/components/bal-checkbox-button.js +1 -1
- package/components/bal-checkbox2.js +3 -2
- package/components/bal-close2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-dropdown.d.ts +11 -0
- package/components/bal-dropdown.js +710 -0
- package/components/bal-field.js +12 -2
- package/components/bal-footer.js +1 -1
- package/components/bal-option-list.d.ts +11 -0
- package/components/bal-option-list.js +459 -0
- package/components/{bal-doc-app.d.ts → bal-option.d.ts} +4 -4
- package/components/bal-option.js +171 -0
- package/components/bal-popup.js +1 -1
- package/components/bal-radio2.js +1 -1
- package/components/bal-select2.js +3 -3
- package/components/bal-spinner2.js +54 -6
- package/components/bal-tag2.js +1 -1
- package/components/config.default.js +1 -0
- package/components/index.esm.js +1 -1
- package/components/index.js +290 -5
- package/components/option.js +46 -0
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/p-013b4c72.system.js +1 -0
- package/dist/baloise-design-system/p-0639833837.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-0cd70cd814.system.entry.js → p-06e9a468fc.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-0793c0159f.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-45de4b9eab.system.entry.js → p-0fed7a5f26.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f2de9458ad.entry.js → p-10b8686d91.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e113196061.system.entry.js → p-126c79c9e9.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-12bcc7da.js +1 -0
- package/dist/baloise-design-system/{p-3bd244cda7.entry.js → p-135c5759c5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-88c086f8.system.js → p-14ae0709.system.js} +1 -1
- package/dist/baloise-design-system/{p-3bbf43bb.system.js → p-1509eaa7.system.js} +1 -1
- package/dist/baloise-design-system/{p-946e9e784d.system.entry.js → p-1659bb968c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-187f98a1.system.js +1 -0
- package/dist/baloise-design-system/{p-a620678fd4.system.entry.js → p-18e2e391e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-1de6b20b1c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-1c2dee82c4.system.entry.js → p-222bc9b30e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0af6ae59f5.entry.js → p-22b041a511.entry.js} +1 -1
- package/dist/baloise-design-system/{p-45fe099fab.entry.js → p-25da216e4f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3f8e5df9c5.system.entry.js → p-25e0d82e89.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-2d82b78410.entry.js +1 -0
- package/dist/baloise-design-system/{p-a0db085f89.entry.js → p-2d8bd11634.entry.js} +1 -1
- package/dist/baloise-design-system/p-2db9030ad9.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-7d6318e4f1.system.entry.js → p-3128128969.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9a5cb17cb9.entry.js → p-39bc49bc3d.entry.js} +1 -1
- package/dist/baloise-design-system/p-3bad0907.system.js +1 -0
- package/dist/baloise-design-system/{p-0545b101.js → p-3f1c49d0.js} +1 -1
- package/dist/baloise-design-system/{p-2e717f00bb.entry.js → p-4aba4c66ee.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9e4fcb76.js → p-54f81c32.js} +1 -1
- package/dist/baloise-design-system/{p-7c5868cc.system.js → p-55faac1d.system.js} +1 -1
- package/dist/baloise-design-system/{p-34ee3721dd.entry.js → p-5b571a9fb1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a8f6447224.entry.js → p-60e94f8144.entry.js} +1 -1
- package/dist/baloise-design-system/{p-06e959a11a.entry.js → p-6164f99bb8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6608061443.system.entry.js → p-62ab1f0ae2.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-053d572047.system.entry.js → p-62b792a34b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-118e15f5f2.system.entry.js → p-74f4b9818b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-439518e5ed.entry.js → p-77f5e777e6.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6ddfa58338.entry.js → p-7c42a363f3.entry.js} +1 -1
- package/dist/baloise-design-system/p-7cd815d3e8.entry.js +1 -0
- package/dist/baloise-design-system/p-80b45dd4d6.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-af5b58ab1c.system.entry.js → p-8870e1f3e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3cb83cf9.system.js → p-8a87b9a8.system.js} +1 -1
- package/dist/baloise-design-system/{p-99e5872214.system.entry.js → p-8c209ac52b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-8f77c423ad.entry.js +1 -0
- package/dist/baloise-design-system/{p-de726703ce.entry.js → p-8fe94b9e21.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1b76afbf.js → p-94efe2aa.js} +1 -1
- package/dist/baloise-design-system/{p-0ce86357bd.entry.js → p-9658f4a66f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4112f1cc6e.entry.js → p-9a0640d065.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c3bd665a8b.entry.js → p-9e167705ca.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e619be36b2.system.entry.js → p-9ecce014c2.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-a19d1e1d.js +1 -0
- package/dist/baloise-design-system/{p-115c7e47bd.entry.js → p-a8022ee701.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9038dd3550.entry.js → p-a97cbb7dda.entry.js} +1 -1
- package/dist/baloise-design-system/p-acb5cea0.system.js +1 -0
- package/dist/baloise-design-system/p-ae28b86fe5.entry.js +1 -0
- package/dist/baloise-design-system/p-b779742f50.entry.js +1 -0
- package/dist/baloise-design-system/{p-bda509c8.js → p-b8d99064.js} +1 -1
- package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-7ca7b4dad9.system.entry.js → p-b97d9336a7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2b27e981ed.entry.js → p-b9f197815f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-afe91abbd5.system.entry.js → p-bb3914c87a.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bb6304d0.system.js +1 -0
- package/dist/baloise-design-system/p-bcbb5b59f3.system.entry.js +1 -0
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
- package/dist/baloise-design-system/{p-b89bb101d7.entry.js → p-bcebf41b74.entry.js} +1 -1
- package/dist/baloise-design-system/p-bd5de78b2c.entry.js +1 -0
- package/dist/baloise-design-system/p-c304d5fa9c.entry.js +1 -0
- package/dist/baloise-design-system/{p-4e7e0fe4.system.js → p-cc61fac8.system.js} +1 -1
- package/dist/baloise-design-system/{p-f9c9ec626c.system.entry.js → p-cd8e72d87f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e4f6e3047f.system.entry.js → p-d16557d133.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d7a758b3.js +1 -0
- package/dist/baloise-design-system/{p-29f7274983.system.entry.js → p-d919753ed0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d9b38501.js +1 -0
- package/dist/baloise-design-system/p-d9d229a026.entry.js +1 -0
- package/dist/baloise-design-system/{p-13227d037a.system.entry.js → p-dbc2d22240.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a9e5eba8c9.system.entry.js → p-dce3764ee5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1eeee9a37e.entry.js → p-ddf9b2a289.entry.js} +1 -1
- package/dist/baloise-design-system/{p-03ec11adc1.system.entry.js → p-e4de708de1.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e60c936359.system.entry.js +1 -0
- package/dist/baloise-design-system/p-e78a6409.js +1 -0
- package/dist/baloise-design-system/{p-f55c50abfa.system.entry.js → p-f076d1ed4f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-283d037ce7.system.entry.js → p-f0b43f1452.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d78eeb433a.entry.js → p-f12abda2db.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f3ea10dd64.system.entry.js → p-f1b95d78af.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ef373ed3db.entry.js → p-f56fb1a197.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b213175c21.entry.js → p-f8974d743d.entry.js} +1 -1
- package/dist/baloise-design-system/p-f8a98657a1.entry.js +1 -0
- package/dist/cjs/app-globals-ae3a8623.js +11 -0
- package/dist/cjs/aria-c8955a5c.js +5 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-checkbox-button.cjs.entry.js +1 -1
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +3 -2
- package/dist/cjs/bal-close.cjs.entry.js +2 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-datepicker.cjs.entry.js +4 -4
- package/dist/cjs/bal-dropdown.cjs.entry.js +660 -0
- package/dist/cjs/bal-field_5.cjs.entry.js +12 -2
- package/dist/cjs/bal-footer.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
- package/dist/cjs/bal-icon.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-label.cjs.entry.js +1 -1
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +4 -4
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-number-input.cjs.entry.js +1 -1
- package/dist/cjs/bal-option_2.cjs.entry.js +541 -0
- package/dist/cjs/bal-pagination.cjs.entry.js +4 -4
- package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-select_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-spinner.cjs.entry.js +49 -4
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-tag_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
- package/dist/cjs/baloise-design-system.cjs.js +4 -5
- package/dist/cjs/{breakpoints.decorator-5a45d298.js → breakpoints.decorator-47fd6060.js} +1 -1
- package/dist/cjs/{breakpoints.subject-ee6b98cd.js → breakpoints.subject-66093c8f.js} +1 -1
- package/dist/cjs/{config.default-32725178.js → config.default-5bdd6e3d.js} +1 -0
- package/dist/cjs/index.cjs.js +6 -4
- package/dist/cjs/{initialize-e38e7028.js → initialize-2a19d091.js} +9 -2
- package/dist/cjs/loader.cjs.js +4 -5
- package/dist/cjs/option-c33cf2b8.js +49 -0
- package/dist/cjs/{tokens.esm-b37c935b.js → tokens.esm-bb0ef2db.js} +1 -1
- package/dist/collection/collection-manifest.json +15 -2
- package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.css +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox.js +2 -1
- package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
- package/dist/collection/components/bal-close/bal-close.js +1 -1
- package/dist/collection/components/bal-date/bal-date-calendar/components/bal-date-calendar__list.js +1 -1
- package/dist/collection/components/bal-dropdown/bal-dropdown.css +1 -0
- package/dist/collection/components/bal-dropdown/bal-dropdown.interfaces.js +4 -0
- package/dist/collection/components/bal-dropdown/bal-dropdown.js +882 -0
- package/dist/collection/components/bal-field/bal-field.js +12 -2
- package/dist/collection/components/bal-option/bal-option.css +1 -0
- package/dist/collection/components/bal-option/bal-option.interfaces.js +4 -0
- package/dist/collection/components/bal-option/bal-option.js +360 -0
- package/dist/collection/components/bal-option-list/bal-option-list.css +1 -0
- package/dist/collection/components/bal-option-list/bal-option-list.interfaces.js +4 -0
- package/dist/collection/components/bal-option-list/bal-option-list.js +939 -0
- package/dist/collection/components/bal-select/bal-select.js +3 -3
- package/dist/collection/components/bal-spinner/bal-spinner.css +1 -1
- package/dist/collection/components/bal-spinner/bal-spinner.interfaces.js +4 -0
- package/dist/collection/components/bal-spinner/bal-spinner.js +83 -4
- package/dist/collection/components/bal-tag/bal-tag.css +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/aria.js +1 -0
- package/dist/collection/utils/config/config.default.js +1 -0
- package/dist/collection/utils/config/config.js +7 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/dropdown/auto-fill.js +38 -0
- package/dist/collection/utils/dropdown/component.js +1 -0
- package/dist/collection/utils/dropdown/dropdown.i18n.js +52 -0
- package/dist/collection/utils/dropdown/events.js +43 -0
- package/dist/collection/utils/dropdown/filters.js +10 -0
- package/dist/collection/utils/dropdown/focus.js +19 -0
- package/dist/collection/utils/dropdown/form-submit.js +35 -0
- package/dist/collection/utils/dropdown/icon.js +15 -0
- package/dist/collection/utils/dropdown/index.js +13 -0
- package/dist/collection/utils/dropdown/input.js +12 -0
- package/dist/collection/utils/dropdown/option-list.js +8 -0
- package/dist/collection/utils/dropdown/option.js +44 -0
- package/dist/collection/utils/dropdown/popup.js +45 -0
- package/dist/collection/utils/dropdown/value.js +103 -0
- package/dist/esm/app-globals-b0dd0fc4.js +9 -0
- package/dist/esm/aria-d5877698.js +3 -0
- package/dist/esm/bal-carousel_2.entry.js +4 -4
- package/dist/esm/bal-checkbox-button.entry.js +1 -1
- package/dist/esm/bal-checkbox_2.entry.js +4 -3
- package/dist/esm/bal-close.entry.js +2 -2
- package/dist/esm/bal-date-calendar_2.entry.js +4 -4
- package/dist/esm/bal-date.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +5 -5
- package/dist/esm/bal-dropdown.entry.js +656 -0
- package/dist/esm/bal-field_5.entry.js +12 -2
- package/dist/esm/bal-file-upload.entry.js +1 -1
- package/dist/esm/bal-footer.entry.js +2 -2
- package/dist/esm/bal-hint_3.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +2 -2
- package/dist/esm/bal-label.entry.js +1 -1
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +4 -4
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-number-input.entry.js +2 -2
- package/dist/esm/bal-option_2.entry.js +536 -0
- package/dist/esm/bal-pagination.entry.js +4 -4
- package/dist/esm/bal-popover_2.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +3 -3
- package/dist/esm/bal-radio_2.entry.js +2 -2
- package/dist/esm/bal-select_2.entry.js +3 -3
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-spinner.entry.js +50 -5
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +4 -4
- package/dist/esm/bal-tag_2.entry.js +1 -1
- package/dist/esm/bal-time-input.entry.js +1 -1
- package/dist/esm/baloise-design-system.js +4 -5
- package/dist/esm/{breakpoints.decorator-1a7b0912.js → breakpoints.decorator-021fbaf0.js} +1 -1
- package/dist/esm/{breakpoints.subject-c5f9de1c.js → breakpoints.subject-ef464f89.js} +1 -1
- package/dist/esm/{config.default-79f94bf7.js → config.default-7efdc82d.js} +1 -0
- package/dist/esm/{date-f02fdb08.js → date-38a0b208.js} +1 -1
- package/dist/esm/{index.esm-ec4cba26.js → index.esm-83b1f9c4.js} +1 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/{initialize-66615dde.js → initialize-e216cfe4.js} +9 -2
- package/dist/esm/loader.js +4 -5
- package/dist/esm/option-37cb0282.js +46 -0
- package/dist/esm/{tokens.esm-99101350.js → tokens.esm-aab9bd61.js} +1 -1
- package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
- package/dist/esm-es5/aria-d5877698.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox-button.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-close.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -0
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-file-upload.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_3.entry.js +1 -1
- package/dist/esm-es5/bal-icon.entry.js +1 -1
- package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
- package/dist/esm-es5/bal-label.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-number-input.entry.js +1 -1
- package/dist/esm-es5/bal-option_2.entry.js +1 -0
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popover_2.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-select_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-spinner.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/bal-tag_2.entry.js +1 -1
- package/dist/esm-es5/bal-time-input.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-1a7b0912.js → breakpoints.decorator-021fbaf0.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-c5f9de1c.js → breakpoints.subject-ef464f89.js} +1 -1
- package/dist/esm-es5/{config.default-79f94bf7.js → config.default-7efdc82d.js} +1 -1
- package/dist/esm-es5/{date-f02fdb08.js → date-38a0b208.js} +1 -1
- package/dist/esm-es5/{index.esm-ec4cba26.js → index.esm-83b1f9c4.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{initialize-66615dde.js → initialize-e216cfe4.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/option-37cb0282.js +1 -0
- package/dist/html.html-data.json +357 -0
- package/dist/types/components/bal-dropdown/bal-dropdown.d.ts +187 -0
- package/dist/types/components/bal-dropdown/bal-dropdown.interfaces.d.ts +14 -0
- package/dist/types/components/bal-field/bal-field.d.ts +1 -0
- package/dist/types/components/bal-option/bal-option.d.ts +91 -0
- package/dist/types/components/bal-option/bal-option.interfaces.d.ts +19 -0
- package/dist/types/components/bal-option-list/bal-option-list.d.ts +168 -0
- package/dist/types/components/bal-option-list/bal-option-list.interfaces.d.ts +5 -0
- package/dist/types/components/bal-select/bal-select.d.ts +1 -1
- package/dist/types/components/bal-spinner/bal-spinner.d.ts +14 -2
- package/dist/types/components/bal-spinner/bal-spinner.interfaces.d.ts +6 -0
- package/dist/types/components.d.ts +443 -32
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces.d.ts +4 -0
- package/dist/types/utils/aria.d.ts +1 -0
- package/dist/types/utils/config/config.d.ts +2 -0
- package/dist/types/utils/config/config.types.d.ts +2 -0
- package/dist/types/utils/dropdown/auto-fill.d.ts +8 -0
- package/dist/types/utils/dropdown/component.d.ts +34 -0
- package/dist/types/utils/dropdown/dropdown.i18n.d.ts +8 -0
- package/dist/types/utils/dropdown/events.d.ts +13 -0
- package/dist/types/utils/dropdown/filters.d.ts +2 -0
- package/dist/types/utils/dropdown/focus.d.ts +13 -0
- package/dist/types/utils/dropdown/form-submit.d.ts +22 -0
- package/dist/types/utils/dropdown/icon.d.ts +13 -0
- package/dist/types/utils/dropdown/index.d.ts +13 -0
- package/dist/types/utils/dropdown/input.d.ts +27 -0
- package/dist/types/utils/dropdown/option-list.d.ts +17 -0
- package/dist/types/utils/dropdown/option.d.ts +25 -0
- package/dist/types/utils/dropdown/popup.d.ts +9 -0
- package/dist/types/utils/dropdown/value.d.ts +28 -0
- package/package.json +7 -7
- package/components/bal-app2.js +0 -87
- package/components/bal-doc-app.js +0 -260
- package/components/initialize.js +0 -281
- package/dist/baloise-design-system/p-1e0e5892a3.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2ae9656e.system.js +0 -1
- package/dist/baloise-design-system/p-2dda46c5f8.entry.js +0 -1
- package/dist/baloise-design-system/p-320dd651.js +0 -1
- package/dist/baloise-design-system/p-4e218ac923.system.entry.js +0 -1
- package/dist/baloise-design-system/p-4f4df156.js +0 -1
- package/dist/baloise-design-system/p-87067c24.js +0 -1
- package/dist/baloise-design-system/p-8ea27b553e.system.entry.js +0 -1
- package/dist/baloise-design-system/p-96647117d9.entry.js +0 -1
- package/dist/baloise-design-system/p-9d114fae.js +0 -1
- package/dist/baloise-design-system/p-9ee6326d8f.entry.js +0 -1
- package/dist/baloise-design-system/p-a4d60ac8af.system.entry.js +0 -1
- package/dist/baloise-design-system/p-a8d19cb362.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b0870e2498.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b1c7ddc442.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b1e3fc0bc8.entry.js +0 -1
- package/dist/baloise-design-system/p-c0a3d422.system.js +0 -1
- package/dist/baloise-design-system/p-c34504aa32.entry.js +0 -1
- package/dist/baloise-design-system/p-d6fc0dd434.entry.js +0 -1
- package/dist/baloise-design-system/p-db3e6b861f.entry.js +0 -1
- package/dist/baloise-design-system/p-e960037ef1.entry.js +0 -1
- package/dist/baloise-design-system/p-f15be367.system.js +0 -1
- package/dist/baloise-design-system/p-f8c2d916.system.js +0 -1
- package/dist/baloise-design-system/p-fa8f56c6.system.js +0 -1
- package/dist/cjs/app-globals-1a8f18e4.js +0 -7
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
- package/dist/cjs/global-6ea60588.js +0 -9
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
- package/dist/esm/app-globals-e3e23c19.js +0 -5
- package/dist/esm/bal-doc-app.entry.js +0 -227
- package/dist/esm/global-d54e7c09.js +0 -7
- package/dist/esm-es5/app-globals-e3e23c19.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/global-d54e7c09.js +0 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
- /package/dist/baloise-design-system/{p-8f430e01.system.js → p-03c136e2.system.js} +0 -0
- /package/dist/baloise-design-system/{p-2b04a8d8.js → p-7b9c33ba.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-99101350.js → tokens.esm-aab9bd61.js} +0 -0
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
+
import { a as areArraysEqual, o as isArrowDownKey, q as isArrowUpKey, h as isEnterKey, s as isEscapeKey, i as isSpaceKey } from './index.esm.js';
|
|
4
|
+
import { B as BEM } from './bem.js';
|
|
5
|
+
import { L as Logger } from './log.js';
|
|
6
|
+
import { s as stopEventBubbling } from './form-input.js';
|
|
7
|
+
import { i as inheritAttributes } from './attributes.js';
|
|
8
|
+
import { d as defaultBalAriaForm } from './form.js';
|
|
9
|
+
import { b as waitAfterFramePaint, d as waitAfterIdleCallback } from './helpers.js';
|
|
10
|
+
import { l as lodash_isnil } from './index2.js';
|
|
11
|
+
import { c as computePosition, a as autoUpdate, f as flip, s as shift } from './floating-ui.dom.esm.js';
|
|
12
|
+
import { D as DropdownOptionUtil } from './option.js';
|
|
13
|
+
import { a as ariaBooleanToString } from './aria.js';
|
|
14
|
+
import { d as defaultConfig } from './config.default.js';
|
|
15
|
+
import { L as ListenToConfig } from './config.decorator.js';
|
|
16
|
+
|
|
17
|
+
class DropdownAutoFillUtil {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.handleAutoFill = async (ev) => {
|
|
20
|
+
stopEventBubbling(ev);
|
|
21
|
+
if (this.isAutoFillAllowed()) {
|
|
22
|
+
this.component.isAutoFilled = true;
|
|
23
|
+
const autoFillValue = this.component.nativeEl.value;
|
|
24
|
+
const newValue = await this.parseAutoFillValueWithOptions(autoFillValue);
|
|
25
|
+
if (newValue === undefined) {
|
|
26
|
+
this.component.isAutoFilled = false;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (!areArraysEqual(newValue, this.component.rawValue)) {
|
|
30
|
+
this.component.valueUtil.updateRawValueBySelection(newValue, true);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
connectedCallback(component) {
|
|
36
|
+
this.component = component;
|
|
37
|
+
}
|
|
38
|
+
isAutoFillAllowed() {
|
|
39
|
+
return !this.component.multiple;
|
|
40
|
+
}
|
|
41
|
+
async parseAutoFillValueWithOptions(autoFillValue) {
|
|
42
|
+
const options = await this.component.listEl.getOptions();
|
|
43
|
+
const value = undefined;
|
|
44
|
+
for (let index = 0; index < options.length; index++) {
|
|
45
|
+
const option = options[index];
|
|
46
|
+
if (option.value === autoFillValue || option.label === autoFillValue) {
|
|
47
|
+
return [option.value];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const i18nBalDropdown = {
|
|
55
|
+
de: {
|
|
56
|
+
clearable: 'Löschen',
|
|
57
|
+
open: 'Öffnen',
|
|
58
|
+
close: 'Schließen',
|
|
59
|
+
},
|
|
60
|
+
en: {
|
|
61
|
+
clearable: 'clear',
|
|
62
|
+
open: 'Open',
|
|
63
|
+
close: 'Close',
|
|
64
|
+
},
|
|
65
|
+
fr: {
|
|
66
|
+
clearable: 'Effacer',
|
|
67
|
+
open: 'Ouvrir',
|
|
68
|
+
close: 'Fermer',
|
|
69
|
+
},
|
|
70
|
+
it: {
|
|
71
|
+
clearable: 'Cancellare',
|
|
72
|
+
open: 'Apri',
|
|
73
|
+
close: 'Chiudi',
|
|
74
|
+
},
|
|
75
|
+
nl: {
|
|
76
|
+
clearable: 'Wissen',
|
|
77
|
+
open: 'Open',
|
|
78
|
+
close: 'Sluiten',
|
|
79
|
+
},
|
|
80
|
+
es: {
|
|
81
|
+
clearable: 'Limpiar',
|
|
82
|
+
open: 'Abrir',
|
|
83
|
+
close: 'Cerrar',
|
|
84
|
+
},
|
|
85
|
+
pl: {
|
|
86
|
+
clearable: 'Wyczyść',
|
|
87
|
+
open: 'Otwórz',
|
|
88
|
+
close: 'Zamknij',
|
|
89
|
+
},
|
|
90
|
+
pt: {
|
|
91
|
+
clearable: 'Limpar',
|
|
92
|
+
open: 'Abrir',
|
|
93
|
+
close: 'Fechar',
|
|
94
|
+
},
|
|
95
|
+
sv: {
|
|
96
|
+
clearable: 'Rensa',
|
|
97
|
+
open: 'Öppna',
|
|
98
|
+
close: 'Stäng',
|
|
99
|
+
},
|
|
100
|
+
fi: {
|
|
101
|
+
clearable: 'Tyhjennä',
|
|
102
|
+
open: 'Avaa',
|
|
103
|
+
close: 'Sulje',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
class DropdownEventsUtil {
|
|
108
|
+
connectedCallback(component) {
|
|
109
|
+
this.component = component;
|
|
110
|
+
}
|
|
111
|
+
handleFocus(ev) {
|
|
112
|
+
this.component.hasFocus = true;
|
|
113
|
+
this.component.balFocus.emit(ev);
|
|
114
|
+
}
|
|
115
|
+
handleBlur(ev) {
|
|
116
|
+
this.component.hasFocus = false;
|
|
117
|
+
this.component.balBlur.emit(ev);
|
|
118
|
+
}
|
|
119
|
+
handleClick(ev) {
|
|
120
|
+
if (!this.component.valueUtil.isDisabled()) {
|
|
121
|
+
if (this.component.chips) {
|
|
122
|
+
const targetEl = ev.target;
|
|
123
|
+
const closeEl = targetEl.closest('bal-close');
|
|
124
|
+
if (closeEl) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (this.component.clearable) {
|
|
129
|
+
const targetEl = ev.target;
|
|
130
|
+
const clearEl = targetEl.closest('.bal-dropdown__clear');
|
|
131
|
+
if (clearEl) {
|
|
132
|
+
this.component.valueUtil.updateRawValueBySelection([]);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
this.component.popupUtil.toggleList();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// @Listen('click', { target: 'document' })
|
|
140
|
+
handleOutsideClick(ev) {
|
|
141
|
+
var _a;
|
|
142
|
+
if (this.component.isExpanded) {
|
|
143
|
+
if (!this.component.el.contains(ev.target)) {
|
|
144
|
+
this.component.isExpanded = false;
|
|
145
|
+
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.resetFocus();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
class DropdownFocusUtil {
|
|
152
|
+
connectedCallback(component) {
|
|
153
|
+
this.component = component;
|
|
154
|
+
}
|
|
155
|
+
focusOptionByLabel(key, options = {}) {
|
|
156
|
+
this.component.labelToFocus = (this.component.labelToFocus + key).trim();
|
|
157
|
+
if (this.component.labelToFocus.length > 0) {
|
|
158
|
+
clearTimeout(this.keyHitTimeout);
|
|
159
|
+
this.keyHitTimeout = setTimeout(() => {
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.focusByLabel(this.component.labelToFocus, options);
|
|
162
|
+
}, 100);
|
|
163
|
+
clearTimeout(this.timeout);
|
|
164
|
+
this.timeout = setTimeout(async () => {
|
|
165
|
+
this.component.labelToFocus = '';
|
|
166
|
+
}, 1000);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
class DropdownFormSubmitUtil {
|
|
172
|
+
connectedCallback(component) {
|
|
173
|
+
this.component = component;
|
|
174
|
+
this.component.initialValue = this.component.value;
|
|
175
|
+
}
|
|
176
|
+
componentDidRender() {
|
|
177
|
+
if (this.component.selectEl) {
|
|
178
|
+
const options = this.component.selectEl.querySelectorAll('option');
|
|
179
|
+
options.forEach(option => {
|
|
180
|
+
if (this.component.rawValue.includes(option.value)) {
|
|
181
|
+
option.selected = true;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// @Listen('reset', { capture: true, target: 'document' })
|
|
187
|
+
handle(ev) {
|
|
188
|
+
const formElement = ev.target;
|
|
189
|
+
if (formElement === null || formElement === void 0 ? void 0 : formElement.contains(this.component.el)) {
|
|
190
|
+
if (this.resetHandlerTimer) {
|
|
191
|
+
clearTimeout(this.resetHandlerTimer);
|
|
192
|
+
}
|
|
193
|
+
this.resetHandlerTimer = setTimeout(() => {
|
|
194
|
+
const newRawValue = this.component.valueUtil.parseValueString(this.component.initialValue);
|
|
195
|
+
this.component.valueUtil.updateRawValueBySelection(newRawValue);
|
|
196
|
+
}, 0);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const DropdownNativeSelect = ({ name, httpFormSubmit, multiple, required, disabled, rawValue, refSelectEl, }) => {
|
|
201
|
+
const block = BEM.block('dropdown');
|
|
202
|
+
return httpFormSubmit ? (h("select", { class: Object.assign({}, block.element('root').element('select').class()), "aria-hidden": "true", name: name, multiple: multiple, required: required, disabled: disabled, tabindex: -1, ref: refSelectEl }, rawValue.map((value) => (h("option", { key: value, value: value, selected: true }, value))))) : ('');
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const DropdownIcon = ({ icon, language, loading, clearable, invalid, filled, expanded, disabled, }) => {
|
|
206
|
+
const block = BEM.block('dropdown');
|
|
207
|
+
if (loading) {
|
|
208
|
+
return h("bal-spinner", { class: Object.assign({}, block.element('rear').class()), small: true, variation: "circle" });
|
|
209
|
+
}
|
|
210
|
+
else if (clearable && filled && !disabled) {
|
|
211
|
+
return (h("button", { title: i18nBalDropdown[language].clearable, class: Object.assign(Object.assign(Object.assign({}, block.element('rear').class()), block.element('clear').class()), block.element('clear').modifier('invalid').class(invalid)) },
|
|
212
|
+
h("bal-icon", { class: Object.assign({}, block.element('rear').class()), name: 'close-circle', size: "", color: 'grey' })));
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
return (h("bal-icon", { class: Object.assign({}, block.element('rear').class()), name: icon, turn: expanded, color: disabled ? 'grey' : invalid ? 'danger' : 'primary' }));
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const DropdownOptionList = ({ inputId, isExpanded, rawOptions, isDisabled, hasPropOptions, required, filter, multiple, contentHeight, refPanelEl, refListEl, }) => {
|
|
220
|
+
const block = BEM.block('dropdown');
|
|
221
|
+
return (h("div", { id: `${inputId}-menu`, class: Object.assign(Object.assign({}, block.element('list').class()), block.element('list').modifier('expanded').class(isExpanded)), ref: refPanelEl },
|
|
222
|
+
h("bal-option-list", { multiple: multiple, disabled: isDisabled, filter: filter, required: required, contentHeight: contentHeight, ref: refListEl },
|
|
223
|
+
h("slot", null),
|
|
224
|
+
hasPropOptions
|
|
225
|
+
? rawOptions.map(option => (h("bal-option", { key: option.value, value: option.value, label: option.label, disabled: option.disabled, multiline: option.multiline, invalid: option.invalid, hidden: option.hidden, selected: option.selected, focused: option.focused }, option.label)))
|
|
226
|
+
: '')));
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
class DropdownPopupUtil {
|
|
230
|
+
constructor() {
|
|
231
|
+
this.updatePanelPosition = (referenceEl, floatingEl) => () => {
|
|
232
|
+
computePosition(referenceEl, floatingEl, {
|
|
233
|
+
placement: 'bottom-start',
|
|
234
|
+
middleware: [flip(), shift()],
|
|
235
|
+
}).then(({ x, y }) => {
|
|
236
|
+
Object.assign(floatingEl.style, {
|
|
237
|
+
left: `${x}px`,
|
|
238
|
+
top: `${y}px`,
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
connectedCallback(component) {
|
|
244
|
+
this.component = component;
|
|
245
|
+
}
|
|
246
|
+
toggleList() {
|
|
247
|
+
if (!this.component.valueUtil.isDisabled()) {
|
|
248
|
+
if (this.component.isExpanded) {
|
|
249
|
+
this.collapseList();
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
this.expandList();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
expandList() {
|
|
257
|
+
var _a;
|
|
258
|
+
if (this.component.panelEl) {
|
|
259
|
+
this.component.panelCleanup = autoUpdate(this.component.el, this.component.panelEl, this.updatePanelPosition(this.component.el, this.component.panelEl));
|
|
260
|
+
}
|
|
261
|
+
this.component.isExpanded = true;
|
|
262
|
+
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.focusFirst();
|
|
263
|
+
}
|
|
264
|
+
collapseList() {
|
|
265
|
+
var _a;
|
|
266
|
+
this.component.isExpanded = false;
|
|
267
|
+
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.resetFocus();
|
|
268
|
+
if (this.component.panelCleanup) {
|
|
269
|
+
this.component.panelCleanup();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
class DropdownValueUtil {
|
|
275
|
+
connectedCallback(component) {
|
|
276
|
+
this.component = component;
|
|
277
|
+
}
|
|
278
|
+
componentDidLoad() {
|
|
279
|
+
setTimeout(() => this.valueChanged(this.component.value, undefined), 0);
|
|
280
|
+
}
|
|
281
|
+
isDisabled() {
|
|
282
|
+
return this.component.disabled || this.component.readonly;
|
|
283
|
+
}
|
|
284
|
+
isFilled() {
|
|
285
|
+
return this.component.rawValue && this.component.rawValue.length > 0;
|
|
286
|
+
}
|
|
287
|
+
valueChanged(newValue, oldValue) {
|
|
288
|
+
const newValueType = typeof newValue;
|
|
289
|
+
const oldValueType = typeof oldValue;
|
|
290
|
+
if (newValueType !== oldValueType) {
|
|
291
|
+
this.updateRawValueByValueProp(newValue);
|
|
292
|
+
}
|
|
293
|
+
if (newValueType === 'string' && newValue !== oldValue) {
|
|
294
|
+
this.updateRawValueByValueProp(newValue);
|
|
295
|
+
}
|
|
296
|
+
if (Array.isArray(newValue) && Array.isArray(oldValue) && !areArraysEqual(newValue, oldValue)) {
|
|
297
|
+
this.updateRawValueByValueProp(newValue);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
updateRawValueBySelection(newRawValue = [], isAutoFilled = false) {
|
|
301
|
+
this.component.isAutoFilled = isAutoFilled;
|
|
302
|
+
this.updateRawValue(newRawValue);
|
|
303
|
+
if (this.component.multiple) {
|
|
304
|
+
this.component.balChange.emit(this.component.rawValue);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
this.component.balChange.emit(this.component.rawValue[0]);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
parseValueString(newValue = []) {
|
|
311
|
+
let newRawValue = [];
|
|
312
|
+
if (!lodash_isnil(newValue) && newValue !== '') {
|
|
313
|
+
if (Array.isArray(newValue)) {
|
|
314
|
+
newRawValue = [...newValue.filter(v => !lodash_isnil(v))];
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
if (newValue.split('').includes(',')) {
|
|
318
|
+
newRawValue = [
|
|
319
|
+
...newValue
|
|
320
|
+
.split(',')
|
|
321
|
+
.filter(v => v)
|
|
322
|
+
.map(v => v.trim()),
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
newRawValue = [newValue];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return newRawValue;
|
|
331
|
+
}
|
|
332
|
+
updateRawValueByValueProp(newValue = []) {
|
|
333
|
+
const newRawValue = this.parseValueString(newValue);
|
|
334
|
+
this.updateRawValue(newRawValue);
|
|
335
|
+
}
|
|
336
|
+
async updateRawValue(newRawValue = []) {
|
|
337
|
+
this.component.rawValue = newRawValue;
|
|
338
|
+
if (this.component.listEl) {
|
|
339
|
+
await this.component.listEl.updateSelected(this.component.rawValue);
|
|
340
|
+
}
|
|
341
|
+
await this.updateInputContent();
|
|
342
|
+
}
|
|
343
|
+
removeOption(option) {
|
|
344
|
+
const newRawValue = this.component.rawValue.filter(value => value !== option.value);
|
|
345
|
+
this.updateRawValueBySelection(newRawValue);
|
|
346
|
+
}
|
|
347
|
+
async updateInputContent() {
|
|
348
|
+
await waitAfterFramePaint();
|
|
349
|
+
if (this.component.listEl) {
|
|
350
|
+
this.component.choices = await this.component.listEl.getSelectedOptions(this.component.rawValue);
|
|
351
|
+
this.component.inputLabel = this.component.choices
|
|
352
|
+
.map(option => option.label.trim())
|
|
353
|
+
.sort()
|
|
354
|
+
.join(',');
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
const DropdownValue = ({ filled, chips, placeholder, choices, invalid, disabled, readonly, onRemoveChip, }) => {
|
|
359
|
+
const block = BEM.block('dropdown');
|
|
360
|
+
if (filled) {
|
|
361
|
+
if (chips) {
|
|
362
|
+
return (h("div", { class: Object.assign({}, block.element('root').element('content').element('chips').class()) }, choices.map(option => (h("bal-tag", { key: option.value, "data-test": "bal-dropdown-chip", size: "small", invalid: invalid, disabled: disabled || readonly, closable: !(disabled || readonly), onBalCloseClick: () => onRemoveChip(option) }, option.label)))));
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
return choices.map(option => option.label).join(', ');
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
return placeholder;
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
const DropdownInput = ({ name, inputId, httpFormSubmit, ariaForm, rawValue, autocomplete, required, disabled, readonly, placeholder, expanded, invalid, language, inputLabel, inheritedAttributes, refInputEl, onChange, onFocus, onBlur, onKeyDown, }) => {
|
|
374
|
+
const block = BEM.block('dropdown');
|
|
375
|
+
const Input = () => (h("input", Object.assign({ id: ariaForm.controlId || `${inputId}-ctrl`, class: Object.assign({}, block.element('root').element('input').class()), type: "text", size: 1, inputmode: "none", tabindex: "0", name: name, autoComplete: autocomplete, value: rawValue.join(','), required: required, disabled: disabled, readonly: readonly, placeholder: placeholder, title: expanded ? i18nBalDropdown[language].close : i18nBalDropdown[language].open, "aria-label": expanded ? i18nBalDropdown[language].close : i18nBalDropdown[language].open, "aria-owns": `${inputId}-menu`, "aria-invalid": ariaBooleanToString(invalid), "aria-disabled": ariaBooleanToString(disabled || readonly), "aria-labelledby": ariaForm.labelId, "aria-describedby": ariaForm.messageId, "aria-haspopup": 'listbox', "data-native": true, "data-label": inputLabel, "data-value": rawValue.join(','), ref: el => refInputEl(el), onChange: ev => onChange(ev), onFocus: ev => onFocus(ev), onBlur: ev => onBlur(ev), onKeyDown: ev => onKeyDown(ev) }, inheritedAttributes)));
|
|
376
|
+
if (httpFormSubmit) {
|
|
377
|
+
return h(Input, null);
|
|
378
|
+
}
|
|
379
|
+
return (h("form", { novalidate: true },
|
|
380
|
+
h(Input, null)));
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
const balDropdownCss = ":root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-2);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-2);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1}.bal-dropdown__root{border-width:.125rem;border-style:solid;border-color:var(--bal-dropdown-control-border-color);border-radius:var(--bal-dropdown-control-border-radius);background:var(--bal-dropdown-control-background);font-size:var(--bal-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-dropdown-control-text-color);outline:none;-webkit-box-shadow:var(--bal-shadow-none);box-shadow:var(--bal-shadow-none);padding-right:1rem;height:auto;min-height:3rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;width:100%;text-align:left;gap:.5rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}.bal-dropdown__root__content__chips{--bal-tag-size-small-font-size:var(--bal-text-size-normal);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-xx-small);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-x-small)}.bal-dropdown__root__content__chips>bal-tag{z-index:1}.bal-dropdown__root__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);position:absolute;right:var(--bal-border-width-normal);left:var(--bal-border-width-normal);top:var(--bal-border-width-normal);bottom:var(--bal-border-width-normal);opacity:0;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));cursor:pointer}.bal-dropdown__root__input:disabled{cursor:default}.bal-dropdown__root__input:-webkit-autofill{opacity:1}.bal-dropdown__root__input:autofill{opacity:1}.bal-dropdown__root__input:-internal-autofill-selected{opacity:0}.bal-dropdown__root__select{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-dropdown__root--autofill .bal-dropdown__root__input{opacity:0}.bal-dropdown__list{display:block;visibility:hidden;opacity:0;min-width:100%;width:100%;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}.bal-dropdown__list--expanded{visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__rear{z-index:1}";
|
|
384
|
+
const BalDropdownStyle0 = balDropdownCss;
|
|
385
|
+
|
|
386
|
+
const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLElement {
|
|
387
|
+
constructor() {
|
|
388
|
+
super();
|
|
389
|
+
this.__registerHost();
|
|
390
|
+
this.balChange = createEvent(this, "balChange", 7);
|
|
391
|
+
this.balFocus = createEvent(this, "balFocus", 7);
|
|
392
|
+
this.balBlur = createEvent(this, "balBlur", 7);
|
|
393
|
+
this.inputId = `bal-dropdown-${balDropdownIds++}`;
|
|
394
|
+
this.inheritedAttributes = {};
|
|
395
|
+
this.initialValue = [];
|
|
396
|
+
this.nativeOptions = [];
|
|
397
|
+
this.valueUtil = new DropdownValueUtil();
|
|
398
|
+
this.eventsUtil = new DropdownEventsUtil();
|
|
399
|
+
this.popupUtil = new DropdownPopupUtil();
|
|
400
|
+
this.optionUtil = new DropdownOptionUtil();
|
|
401
|
+
this.formSubmitUtil = new DropdownFormSubmitUtil();
|
|
402
|
+
this.focusUtil = new DropdownFocusUtil();
|
|
403
|
+
this.autoFillUtil = new DropdownAutoFillUtil();
|
|
404
|
+
/**
|
|
405
|
+
* EVENT BINDING
|
|
406
|
+
* ------------------------------------------------------
|
|
407
|
+
*/
|
|
408
|
+
this.handleAutoFill = async (ev) => {
|
|
409
|
+
this.log('(handleAutoFill)', ev, this.nativeEl.value);
|
|
410
|
+
this.autoFillUtil.handleAutoFill(ev);
|
|
411
|
+
};
|
|
412
|
+
this.handleKeyDown = (ev) => {
|
|
413
|
+
var _a, _b, _c, _d, _e;
|
|
414
|
+
if (ev && ev.key) {
|
|
415
|
+
if (this.isExpanded) {
|
|
416
|
+
/**
|
|
417
|
+
* ⬇️ Arrow up key
|
|
418
|
+
*/
|
|
419
|
+
if (isArrowDownKey(ev)) {
|
|
420
|
+
stopEventBubbling(ev);
|
|
421
|
+
(_a = this.listEl) === null || _a === void 0 ? void 0 : _a.focusNext();
|
|
422
|
+
/**
|
|
423
|
+
* ⬆️ Arrow up key
|
|
424
|
+
*/
|
|
425
|
+
}
|
|
426
|
+
else if (isArrowUpKey(ev)) {
|
|
427
|
+
stopEventBubbling(ev);
|
|
428
|
+
(_b = this.listEl) === null || _b === void 0 ? void 0 : _b.focusPrevious();
|
|
429
|
+
/**
|
|
430
|
+
* Go to top of the list
|
|
431
|
+
*/
|
|
432
|
+
}
|
|
433
|
+
else if (ev.key === 'Home' || ev.key === 'PageUp') {
|
|
434
|
+
stopEventBubbling(ev);
|
|
435
|
+
(_c = this.listEl) === null || _c === void 0 ? void 0 : _c.focusFirst();
|
|
436
|
+
/**
|
|
437
|
+
* Go to bottom of the list
|
|
438
|
+
*/
|
|
439
|
+
}
|
|
440
|
+
else if (ev.key === 'End' || ev.key === 'PageDown') {
|
|
441
|
+
stopEventBubbling(ev);
|
|
442
|
+
(_d = this.listEl) === null || _d === void 0 ? void 0 : _d.focusLast();
|
|
443
|
+
/**
|
|
444
|
+
* Select focused option
|
|
445
|
+
*/
|
|
446
|
+
}
|
|
447
|
+
else if (isEnterKey(ev)) {
|
|
448
|
+
stopEventBubbling(ev);
|
|
449
|
+
(_e = this.listEl) === null || _e === void 0 ? void 0 : _e.selectByFocus();
|
|
450
|
+
/**
|
|
451
|
+
* Close list
|
|
452
|
+
*/
|
|
453
|
+
}
|
|
454
|
+
else if (ev.key === 'Tab' || isEscapeKey(ev)) {
|
|
455
|
+
this.popupUtil.collapseList();
|
|
456
|
+
/**
|
|
457
|
+
* Focus on label
|
|
458
|
+
*/
|
|
459
|
+
}
|
|
460
|
+
else if (ev.key.length === 1) {
|
|
461
|
+
this.focusUtil.focusOptionByLabel(ev.key);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
/**
|
|
466
|
+
* Open list
|
|
467
|
+
*/
|
|
468
|
+
if (isEnterKey(ev) || isSpaceKey(ev)) {
|
|
469
|
+
stopEventBubbling(ev);
|
|
470
|
+
this.popupUtil.expandList();
|
|
471
|
+
/**
|
|
472
|
+
* Focus on label
|
|
473
|
+
*/
|
|
474
|
+
}
|
|
475
|
+
else if (ev.key.length === 1) {
|
|
476
|
+
this.focusUtil.focusOptionByLabel(ev.key, { select: true });
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
// Close the popup on autofill
|
|
482
|
+
if (this.isExpanded) {
|
|
483
|
+
this.popupUtil.collapseList();
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
this.rawOptions = [];
|
|
488
|
+
this.choices = [];
|
|
489
|
+
this.rawValue = [];
|
|
490
|
+
this.hasFocus = false;
|
|
491
|
+
this.isExpanded = false;
|
|
492
|
+
this.isAutoFilled = false;
|
|
493
|
+
this.inputLabel = '';
|
|
494
|
+
this.ariaForm = defaultBalAriaForm;
|
|
495
|
+
this.language = defaultConfig.language;
|
|
496
|
+
this.region = defaultConfig.region;
|
|
497
|
+
this.httpFormSubmit = defaultConfig.httpFormSubmit;
|
|
498
|
+
this.labelToFocus = '';
|
|
499
|
+
this.autocomplete = 'off';
|
|
500
|
+
this.name = this.inputId;
|
|
501
|
+
this.placeholder = '';
|
|
502
|
+
this.icon = 'caret-down';
|
|
503
|
+
this.disabled = false;
|
|
504
|
+
this.readonly = false;
|
|
505
|
+
this.multiple = false;
|
|
506
|
+
this.chips = false;
|
|
507
|
+
this.clearable = false;
|
|
508
|
+
this.invalid = false;
|
|
509
|
+
this.required = false;
|
|
510
|
+
this.loading = false;
|
|
511
|
+
this.filter = 'includes';
|
|
512
|
+
this.contentHeight = 262;
|
|
513
|
+
this.inverted = false;
|
|
514
|
+
this.options = [];
|
|
515
|
+
this.value = [];
|
|
516
|
+
}
|
|
517
|
+
createLogger(log) {
|
|
518
|
+
this.log = log;
|
|
519
|
+
}
|
|
520
|
+
async optionChanged() {
|
|
521
|
+
this.optionUtil.optionChanged();
|
|
522
|
+
}
|
|
523
|
+
valueChanged(newValue, oldValue) {
|
|
524
|
+
this.valueUtil.valueChanged(newValue, oldValue);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* LIFECYCLE
|
|
528
|
+
* ------------------------------------------------------
|
|
529
|
+
*/
|
|
530
|
+
connectedCallback() {
|
|
531
|
+
this.eventsUtil.connectedCallback(this);
|
|
532
|
+
this.valueUtil.connectedCallback(this);
|
|
533
|
+
this.popupUtil.connectedCallback(this);
|
|
534
|
+
this.optionUtil.connectedCallback(this);
|
|
535
|
+
this.formSubmitUtil.connectedCallback(this);
|
|
536
|
+
this.focusUtil.connectedCallback(this);
|
|
537
|
+
this.autoFillUtil.connectedCallback(this);
|
|
538
|
+
}
|
|
539
|
+
async componentWillRender() {
|
|
540
|
+
this.inheritedAttributes = inheritAttributes(this.el, ['tabindex']);
|
|
541
|
+
await this.optionUtil.componentWillRender();
|
|
542
|
+
}
|
|
543
|
+
componentDidRender() {
|
|
544
|
+
this.formSubmitUtil.componentDidRender();
|
|
545
|
+
}
|
|
546
|
+
componentDidLoad() {
|
|
547
|
+
this.valueUtil.componentDidLoad();
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* LISTENERS
|
|
551
|
+
* ------------------------------------------------------
|
|
552
|
+
*/
|
|
553
|
+
/**
|
|
554
|
+
* @internal define config for the component
|
|
555
|
+
*/
|
|
556
|
+
async configChanged(state) {
|
|
557
|
+
this.language = state.language;
|
|
558
|
+
this.region = state.region;
|
|
559
|
+
this.httpFormSubmit = state.httpFormSubmit;
|
|
560
|
+
}
|
|
561
|
+
async listenToOptionChange(ev) {
|
|
562
|
+
this.optionUtil.listenToOptionChange(ev);
|
|
563
|
+
}
|
|
564
|
+
listenOnClickOutside(ev) {
|
|
565
|
+
this.eventsUtil.handleOutsideClick(ev);
|
|
566
|
+
}
|
|
567
|
+
resetHandler(ev) {
|
|
568
|
+
this.formSubmitUtil.handle(ev);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* PUBLIC METHODS
|
|
572
|
+
* ------------------------------------------------------
|
|
573
|
+
*/
|
|
574
|
+
/**
|
|
575
|
+
* Sets the focus on the input element
|
|
576
|
+
*/
|
|
577
|
+
async setFocus() {
|
|
578
|
+
if (this.nativeEl && !this.valueUtil.isDisabled()) {
|
|
579
|
+
await waitAfterIdleCallback();
|
|
580
|
+
this.nativeEl.focus();
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Returns the value of the component
|
|
585
|
+
*/
|
|
586
|
+
async getValue() {
|
|
587
|
+
return this.rawValue;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Sets the value to `[]`, the input value to ´''´ and the focus index to ´0´.
|
|
591
|
+
*/
|
|
592
|
+
async clear() {
|
|
593
|
+
this.valueUtil.updateRawValueBySelection([]);
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Opens the popup with option list
|
|
597
|
+
*/
|
|
598
|
+
async open() {
|
|
599
|
+
if (!this.valueUtil.isDisabled() && this.panelEl) {
|
|
600
|
+
await this.popupUtil.expandList();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Closes the popup with option list
|
|
605
|
+
*/
|
|
606
|
+
async close() {
|
|
607
|
+
if (!this.valueUtil.isDisabled() && this.panelEl) {
|
|
608
|
+
await this.popupUtil.collapseList();
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Select option by passed value
|
|
613
|
+
*/
|
|
614
|
+
async select(newValue) {
|
|
615
|
+
const parsedNewValue = this.valueUtil.parseValueString(newValue);
|
|
616
|
+
this.valueUtil.updateRawValueBySelection(parsedNewValue);
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* @internal
|
|
620
|
+
*/
|
|
621
|
+
async setAriaForm(ariaForm) {
|
|
622
|
+
this.ariaForm = Object.assign({}, ariaForm);
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* RENDER
|
|
626
|
+
* ------------------------------------------------------
|
|
627
|
+
*/
|
|
628
|
+
render() {
|
|
629
|
+
const block = BEM.block('dropdown');
|
|
630
|
+
return (h(Host, { class: Object.assign({}, block.class()), tabindex: "-1", id: `${this.inputId}` }, h("div", { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('root').class()), block.element('root').modifier('focused').class(this.hasFocus)), block.element('root').modifier('invalid').class(this.invalid)), block.element('root').modifier('disabled').class(this.valueUtil.isDisabled())), block.element('root').modifier('autofill').class(this.isAutoFilled)), "data-test": "bal-dropdown-trigger", onClick: ev => this.eventsUtil.handleClick(ev) }, h("span", { class: Object.assign(Object.assign(Object.assign({}, block.element('root').element('content').class()), block.element('root').element('content').modifier('disabled').class(this.valueUtil.isDisabled())), block.element('root').element('content').modifier('placeholder').class(!this.valueUtil.isFilled())) }, h(DropdownValue, { filled: this.valueUtil.isFilled(), chips: this.chips, placeholder: this.placeholder, choices: this.choices, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, onRemoveChip: option => this.valueUtil.removeOption(option) })), h(DropdownInput, { name: this.name, inputId: this.inputId, httpFormSubmit: this.httpFormSubmit, ariaForm: this.ariaForm, rawValue: this.rawValue, autocomplete: this.autocomplete, required: this.required, disabled: this.disabled, readonly: this.readonly, placeholder: this.placeholder, expanded: this.isExpanded, invalid: this.invalid, language: this.language, inputLabel: this.inputLabel, inheritedAttributes: this.inheritedAttributes, refInputEl: el => (this.nativeEl = el), onChange: ev => this.handleAutoFill(ev), onFocus: ev => this.eventsUtil.handleFocus(ev), onBlur: ev => this.eventsUtil.handleBlur(ev), onKeyDown: ev => this.handleKeyDown(ev) }), h(DropdownNativeSelect, { name: this.name, httpFormSubmit: this.httpFormSubmit, multiple: this.multiple, required: this.required, disabled: this.valueUtil.isDisabled(), rawValue: this.rawValue, refSelectEl: el => (this.selectEl = el) }), h(DropdownIcon, { icon: this.icon, language: this.language, loading: this.loading, clearable: this.clearable, invalid: this.invalid, expanded: this.isExpanded, filled: this.valueUtil.isFilled(), disabled: this.valueUtil.isDisabled() })), h(DropdownOptionList, { inputId: this.inputId, block: this.inputId, filter: this.filter, required: this.required, isExpanded: this.isExpanded, isDisabled: this.valueUtil.isDisabled(), hasPropOptions: this.optionUtil.hasPropOptions(), multiple: this.multiple, contentHeight: this.contentHeight, rawOptions: this.rawOptions, refPanelEl: el => (this.panelEl = el), refListEl: el => (this.listEl = el) }, h("slot", null))));
|
|
631
|
+
}
|
|
632
|
+
get el() { return this; }
|
|
633
|
+
static get watchers() { return {
|
|
634
|
+
"options": ["optionChanged"],
|
|
635
|
+
"value": ["valueChanged"]
|
|
636
|
+
}; }
|
|
637
|
+
static get style() { return BalDropdownStyle0; }
|
|
638
|
+
}, [4, "bal-dropdown", {
|
|
639
|
+
"autocomplete": [1],
|
|
640
|
+
"name": [1],
|
|
641
|
+
"placeholder": [1],
|
|
642
|
+
"icon": [1],
|
|
643
|
+
"disabled": [4],
|
|
644
|
+
"readonly": [4],
|
|
645
|
+
"multiple": [4],
|
|
646
|
+
"chips": [4],
|
|
647
|
+
"clearable": [4],
|
|
648
|
+
"invalid": [4],
|
|
649
|
+
"required": [4],
|
|
650
|
+
"loading": [4],
|
|
651
|
+
"filter": [1],
|
|
652
|
+
"contentHeight": [2, "content-height"],
|
|
653
|
+
"inverted": [4],
|
|
654
|
+
"options": [16],
|
|
655
|
+
"value": [1],
|
|
656
|
+
"rawOptions": [32],
|
|
657
|
+
"choices": [32],
|
|
658
|
+
"rawValue": [32],
|
|
659
|
+
"hasFocus": [32],
|
|
660
|
+
"isExpanded": [32],
|
|
661
|
+
"isAutoFilled": [32],
|
|
662
|
+
"inputLabel": [32],
|
|
663
|
+
"ariaForm": [32],
|
|
664
|
+
"language": [32],
|
|
665
|
+
"region": [32],
|
|
666
|
+
"httpFormSubmit": [32],
|
|
667
|
+
"labelToFocus": [32],
|
|
668
|
+
"configChanged": [64],
|
|
669
|
+
"setFocus": [64],
|
|
670
|
+
"getValue": [64],
|
|
671
|
+
"clear": [64],
|
|
672
|
+
"open": [64],
|
|
673
|
+
"close": [64],
|
|
674
|
+
"select": [64],
|
|
675
|
+
"setAriaForm": [64]
|
|
676
|
+
}, [[0, "balOptionChange", "listenToOptionChange"], [4, "click", "listenOnClickOutside"], [6, "reset", "resetHandler"]], {
|
|
677
|
+
"options": ["optionChanged"],
|
|
678
|
+
"value": ["valueChanged"]
|
|
679
|
+
}]);
|
|
680
|
+
__decorate([
|
|
681
|
+
Logger('bal-dropdown'),
|
|
682
|
+
__metadata("design:type", Function),
|
|
683
|
+
__metadata("design:paramtypes", [Function]),
|
|
684
|
+
__metadata("design:returntype", void 0)
|
|
685
|
+
], Dropdown.prototype, "createLogger", null);
|
|
686
|
+
__decorate([
|
|
687
|
+
ListenToConfig(),
|
|
688
|
+
__metadata("design:type", Function),
|
|
689
|
+
__metadata("design:paramtypes", [Object]),
|
|
690
|
+
__metadata("design:returntype", Promise)
|
|
691
|
+
], Dropdown.prototype, "configChanged", null);
|
|
692
|
+
let balDropdownIds = 0;
|
|
693
|
+
function defineCustomElement$1() {
|
|
694
|
+
if (typeof customElements === "undefined") {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
const components = ["bal-dropdown"];
|
|
698
|
+
components.forEach(tagName => { switch (tagName) {
|
|
699
|
+
case "bal-dropdown":
|
|
700
|
+
if (!customElements.get(tagName)) {
|
|
701
|
+
customElements.define(tagName, Dropdown);
|
|
702
|
+
}
|
|
703
|
+
break;
|
|
704
|
+
} });
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const BalDropdown = Dropdown;
|
|
708
|
+
const defineCustomElement = defineCustomElement$1;
|
|
709
|
+
|
|
710
|
+
export { BalDropdown, defineCustomElement };
|