@baloise/ds-core 16.0.3 → 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 +234 -0
- package/components/all.js +350 -0
- package/components/aria.js +3 -0
- package/components/bal-accordion-details.js +4 -4
- package/components/bal-card.js +2 -2
- package/components/bal-card2.js +3 -3
- package/components/bal-carousel2.js +1 -1
- package/components/bal-checkbox-button.js +6 -6
- package/components/bal-checkbox-group.js +1 -1
- package/components/bal-checkbox2.js +3 -2
- package/components/bal-close2.js +1 -1
- package/components/bal-content.js +4 -4
- package/components/bal-date-calendar-cell.js +2 -2
- package/components/bal-date-calendar-cell2.js +3 -3
- package/components/bal-date-calendar2.js +3 -3
- package/components/bal-datepicker.js +3 -3
- package/components/bal-divider.js +4 -4
- 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-file-upload.js +1 -1
- package/components/bal-footer.js +4 -4
- package/components/bal-input-slider.js +1 -1
- package/components/bal-label.js +2 -2
- package/components/bal-label2.js +5 -5
- package/components/bal-nav-link-grid-col.js +2 -2
- package/components/bal-nav-link-grid-col2.js +4 -4
- package/components/bal-nav-link-grid.js +2 -2
- package/components/bal-nav-link-grid2.js +4 -4
- package/components/bal-nav-link-group.js +4 -4
- package/components/bal-nav-link.js +2 -2
- package/components/bal-nav-link2.js +4 -4
- package/components/bal-nav.js +8 -8
- package/components/bal-notices.js +3 -3
- package/components/bal-number-input.js +31 -13
- package/components/bal-option-list.d.ts +11 -0
- package/components/bal-option-list.js +459 -0
- package/components/bal-option.d.ts +11 -0
- package/components/bal-option.js +171 -0
- package/components/bal-popup.js +1 -1
- package/components/bal-radio-button.js +5 -5
- package/components/bal-radio-group.js +1 -1
- package/components/bal-radio2.js +1 -1
- package/components/bal-select2.js +4 -4
- package/components/bal-spinner2.js +54 -6
- package/components/bal-stack.js +2 -2
- package/components/bal-stack2.js +4 -4
- package/components/bal-steps.js +1 -1
- package/components/bal-tabs2.js +2 -2
- package/components/bal-tag2.js +1 -1
- package/components/config.default.js +1 -0
- package/components/date.js +5 -1
- package/components/index.esm.js +1 -1
- package/components/index.js +9 -1
- 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-88852ce68d.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-720c90ea90.system.entry.js → p-0fed7a5f26.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-10b8686d91.entry.js +1 -0
- package/dist/baloise-design-system/{p-e113196061.system.entry.js → p-126c79c9e9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb2ec275bb.system.entry.js → p-12bb6ea3e7.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-12bcc7da.js +1 -0
- package/dist/baloise-design-system/{p-762f45ff6f.entry.js → p-135c5759c5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-62770d5d.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-18e2e391e0.system.entry.js +1 -0
- 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-22b041a511.entry.js +1 -0
- package/dist/baloise-design-system/{p-f62222a85d.entry.js → p-25da216e4f.entry.js} +1 -1
- package/dist/baloise-design-system/p-25e0d82e89.system.entry.js +1 -0
- 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-8444cfcbed.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-12786937.js → p-3f1c49d0.js} +1 -1
- package/dist/baloise-design-system/{p-33fca72859.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-922fd809.system.js → p-55faac1d.system.js} +1 -1
- package/dist/baloise-design-system/p-5b571a9fb1.entry.js +1 -0
- package/dist/baloise-design-system/{p-671a986aff.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-62ab1f0ae2.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-6b80dee13f.system.entry.js → p-62b792a34b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8998eeb2a7.system.entry.js → p-74f4b9818b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-77f5e777e6.entry.js +1 -0
- package/dist/baloise-design-system/p-7c42a363f3.entry.js +1 -0
- 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-a5568e05fb.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-32bc2b926a.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-9a0640d065.entry.js +1 -0
- package/dist/baloise-design-system/{p-c3bd665a8b.entry.js → p-9e167705ca.entry.js} +1 -1
- package/dist/baloise-design-system/p-9ecce014c2.system.entry.js +1 -0
- package/dist/baloise-design-system/p-a19d1e1d.js +1 -0
- package/dist/baloise-design-system/p-a7e5ee75e2.entry.js +1 -0
- package/dist/baloise-design-system/{p-9cc5ae9e5c.entry.js → p-a8022ee701.entry.js} +1 -1
- package/dist/baloise-design-system/p-a97cbb7dda.entry.js +1 -0
- 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-cee3cd08.js → p-b8d99064.js} +1 -1
- package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +1 -0
- package/dist/baloise-design-system/p-b97d9336a7.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-b3a2290c0d.entry.js → p-b9f197815f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9e7610a20f.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-1cdfb98b54.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-8177dec3.system.js → p-cc61fac8.system.js} +1 -1
- package/dist/baloise-design-system/{p-ac825842e4.system.entry.js → p-cd8e72d87f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a9300668b4.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-33cd610840.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-aacb0cee66.system.entry.js → p-dce3764ee5.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-ddf9b2a289.entry.js +1 -0
- package/dist/baloise-design-system/{p-49a8bfb790.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-b34e0daa6e.system.entry.js → p-f0b43f1452.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f12abda2db.entry.js +1 -0
- package/dist/baloise-design-system/{p-31d9c875c0.system.entry.js → p-f1b95d78af.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f56fb1a197.entry.js +1 -0
- package/dist/baloise-design-system/{p-681d41fc97.entry.js → p-f8974d743d.entry.js} +1 -1
- package/dist/baloise-design-system/p-f8a98657a1.entry.js +1 -0
- package/dist/cjs/{app-globals-d6bc7866.js → app-globals-ae3a8623.js} +1 -1
- package/dist/cjs/aria-c8955a5c.js +5 -0
- package/dist/cjs/bal-accordion_4.cjs.entry.js +4 -4
- package/dist/cjs/bal-card_6.cjs.entry.js +3 -3
- package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-checkbox-button.cjs.entry.js +6 -6
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +4 -3
- package/dist/cjs/bal-close.cjs.entry.js +2 -2
- package/dist/cjs/bal-content.cjs.entry.js +4 -4
- package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +2 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-date.cjs.entry.js +2 -2
- package/dist/cjs/bal-datepicker.cjs.entry.js +7 -7
- package/dist/cjs/bal-divider.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-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +4 -4
- 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-slider.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-label.cjs.entry.js +6 -6
- 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 +28 -28
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-notices.cjs.entry.js +3 -3
- package/dist/cjs/bal-number-input.cjs.entry.js +32 -14
- 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-button.cjs.entry.js +5 -5
- package/dist/cjs/bal-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-select_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-spinner.cjs.entry.js +49 -4
- package/dist/cjs/bal-stack.cjs.entry.js +4 -4
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +5 -5
- 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 -4
- package/dist/cjs/{breakpoints.decorator-7f888011.js → breakpoints.decorator-47fd6060.js} +1 -1
- package/dist/cjs/{breakpoints.subject-28c980cd.js → breakpoints.subject-66093c8f.js} +1 -1
- package/dist/cjs/{config.default-32725178.js → config.default-5bdd6e3d.js} +1 -0
- package/dist/cjs/{date-df1d61a8.js → date-3e33b208.js} +5 -1
- package/dist/cjs/index.cjs.js +7 -5
- package/dist/cjs/{initialize-e38e7028.js → initialize-2a19d091.js} +9 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/option-c33cf2b8.js +49 -0
- package/dist/cjs/{tokens.esm-89d0f18d.js → tokens.esm-bb0ef2db.js} +1 -1
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/bal-accordion/bal-accordion-details/bal-accordion-details.js +2 -2
- package/dist/collection/components/bal-card/bal-card.js +1 -1
- package/dist/collection/components/bal-carousel/controls/tab-control.js +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.css +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.js +3 -3
- package/dist/collection/components/bal-checkbox/bal-checkbox-group/bal-checkbox-group.js +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-content/bal-content.js +2 -2
- package/dist/collection/components/bal-date/bal-date-calendar/components/bal-date-calendar__gird.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-date/bal-date-calendar-cell/bal-date-calendar-cell.js +1 -1
- package/dist/collection/components/bal-datepicker/bal-datepicker.js +3 -3
- package/dist/collection/components/bal-divider/bal-divider.js +2 -2
- 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-file-upload/components/file-list.js +1 -1
- package/dist/collection/components/bal-footer/bal-footer.js +3 -3
- package/dist/collection/components/bal-input-slider/bal-input-slider.js +1 -1
- package/dist/collection/components/bal-label/bal-label.js +3 -3
- package/dist/collection/components/bal-nav/bal-nav-link/bal-nav-link.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-grid/bal-nav-link-grid.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-grid-col/bal-nav-link-grid-col.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-group/bal-nav-link-group.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav.js +6 -6
- package/dist/collection/components/bal-nav/components/section-list.js +2 -2
- package/dist/collection/components/bal-nav/components/service-list.js +2 -2
- package/dist/collection/components/bal-notices/bal-notices.js +1 -1
- package/dist/collection/components/bal-number-input/bal-number-input.js +5 -0
- package/dist/collection/components/bal-number-input/bal-number-input.utils.js +27 -14
- package/dist/collection/components/bal-number-input/bal-number-input.utils.spec.js +82 -0
- 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-radio/bal-radio-button/bal-radio-button.js +3 -3
- package/dist/collection/components/bal-radio/bal-radio-group/bal-radio-group.js +1 -1
- package/dist/collection/components/bal-select/bal-select.js +4 -4
- 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-stack/bal-stack.js +2 -2
- package/dist/collection/components/bal-steps/bal-steps.js +1 -1
- package/dist/collection/components/bal-tabs/components/tab-nav.js +1 -1
- package/dist/collection/components/bal-tabs/components/tab-select.js +1 -1
- 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/date/date.js +5 -1
- package/dist/collection/utils/date/date.spec.js +11 -5
- 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-89691d80.js → app-globals-b0dd0fc4.js} +1 -1
- package/dist/esm/aria-d5877698.js +3 -0
- package/dist/esm/bal-accordion_4.entry.js +4 -4
- package/dist/esm/bal-card_6.entry.js +3 -3
- package/dist/esm/bal-carousel_2.entry.js +5 -5
- package/dist/esm/bal-checkbox-button.entry.js +6 -6
- package/dist/esm/bal-checkbox_2.entry.js +5 -4
- package/dist/esm/bal-close.entry.js +2 -2
- package/dist/esm/bal-content.entry.js +4 -4
- package/dist/esm/bal-date-calendar-cell.entry.js +2 -2
- package/dist/esm/bal-date-calendar_2.entry.js +6 -6
- package/dist/esm/bal-date.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +8 -8
- package/dist/esm/bal-divider.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/bal-footer.entry.js +5 -5
- package/dist/esm/bal-hint_3.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-input-slider.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +2 -2
- package/dist/esm/bal-label.entry.js +6 -6
- 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 +24 -24
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-notices.entry.js +3 -3
- package/dist/esm/bal-number-input.entry.js +33 -15
- 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-button.entry.js +5 -5
- package/dist/esm/bal-radio_2.entry.js +3 -3
- package/dist/esm/bal-select_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-spinner.entry.js +50 -5
- package/dist/esm/bal-stack.entry.js +4 -4
- package/dist/esm/bal-steps.entry.js +5 -5
- package/dist/esm/bal-tab-item_2.entry.js +6 -6
- 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 -4
- package/dist/esm/{breakpoints.decorator-52979d29.js → breakpoints.decorator-021fbaf0.js} +1 -1
- package/dist/esm/{breakpoints.subject-64327a3b.js → breakpoints.subject-ef464f89.js} +1 -1
- package/dist/esm/{config.default-79f94bf7.js → config.default-7efdc82d.js} +1 -0
- package/dist/esm/{date-db6afc26.js → date-38a0b208.js} +6 -2
- 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 -4
- package/dist/esm/option-37cb0282.js +46 -0
- package/dist/esm/{tokens.esm-12daa3af.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-accordion_4.entry.js +1 -1
- package/dist/esm-es5/bal-card_6.entry.js +1 -1
- 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-content.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar-cell.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-divider.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-slider.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-notices.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-button.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-stack.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-021fbaf0.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-64327a3b.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-db6afc26.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-accordion/bal-accordion-details/bal-accordion-details.d.ts +1 -1
- package/dist/types/components/bal-card/bal-card.d.ts +1 -1
- package/dist/types/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.d.ts +1 -1
- package/dist/types/components/bal-content/bal-content.d.ts +1 -1
- package/dist/types/components/bal-date/bal-date-calendar-cell/bal-date-calendar-cell.d.ts +1 -1
- package/dist/types/components/bal-divider/bal-divider.d.ts +1 -1
- 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-label/bal-label.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link/bal-nav-link.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-grid/bal-nav-link-grid.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-grid-col/bal-nav-link-grid-col.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-group/bal-nav-link-group.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav.d.ts +1 -1
- package/dist/types/components/bal-notices/bal-notices.d.ts +1 -1
- package/dist/types/components/bal-number-input/bal-number-input.d.ts +1 -0
- package/dist/types/components/bal-number-input/bal-number-input.utils.d.ts +3 -1
- 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-radio/bal-radio-button/bal-radio-button.d.ts +1 -1
- 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/bal-stack/bal-stack.d.ts +1 -1
- package/dist/types/components.d.ts +451 -3
- 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/date/date.d.ts +1 -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 +8 -7
- package/dist/baloise-design-system/p-05b55c958d.system.entry.js +0 -1
- package/dist/baloise-design-system/p-0d30cbfab8.entry.js +0 -1
- package/dist/baloise-design-system/p-15ca43f2.system.js +0 -1
- package/dist/baloise-design-system/p-1e0e5892a3.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2c3370fdbe.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2d10e25c6b.entry.js +0 -1
- package/dist/baloise-design-system/p-2dda46c5f8.entry.js +0 -1
- package/dist/baloise-design-system/p-34a9557f.system.js +0 -1
- package/dist/baloise-design-system/p-34d1472a.system.js +0 -1
- package/dist/baloise-design-system/p-3990d97696.entry.js +0 -1
- package/dist/baloise-design-system/p-48a2de5d.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-5eea406ac6.system.entry.js +0 -1
- package/dist/baloise-design-system/p-6496dcd5.js +0 -1
- package/dist/baloise-design-system/p-67f25817a6.entry.js +0 -1
- package/dist/baloise-design-system/p-6dd26958d2.system.entry.js +0 -1
- package/dist/baloise-design-system/p-7e180ac10f.system.entry.js +0 -1
- package/dist/baloise-design-system/p-8ea27b553e.system.entry.js +0 -1
- package/dist/baloise-design-system/p-90c4c1a5c0.system.entry.js +0 -1
- package/dist/baloise-design-system/p-99dcda2fcd.entry.js +0 -1
- package/dist/baloise-design-system/p-a9d8b71709.entry.js +0 -1
- package/dist/baloise-design-system/p-af8604cef2.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-bb291d6067.system.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-c6900b09e7.entry.js +0 -1
- package/dist/baloise-design-system/p-cf6ccb4dd1.entry.js +0 -1
- package/dist/baloise-design-system/p-d4fd428711.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-eba35b2adf.entry.js +0 -1
- package/dist/baloise-design-system/p-ec180f9bbf.entry.js +0 -1
- package/dist/baloise-design-system/p-f15b12d84f.entry.js +0 -1
- package/dist/esm-es5/app-globals-89691d80.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-52979d29.js +0 -1
- /package/dist/baloise-design-system/{p-61eda028.system.js → p-03c136e2.system.js} +0 -0
- /package/dist/baloise-design-system/{p-979368af.js → p-7b9c33ba.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-12daa3af.js → tokens.esm-aab9bd61.js} +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
+
import { l as lodash_isnil } from './index2.js';
|
|
4
|
+
import { i as inheritAttributes } from './attributes.js';
|
|
5
|
+
import { B as BEM } from './bem.js';
|
|
6
|
+
import { b as waitAfterFramePaint, l as raf } from './helpers.js';
|
|
7
|
+
import { L as Logger } from './log.js';
|
|
8
|
+
import { s as startsWith, i as includes } from './utils.js';
|
|
9
|
+
import { d as defaultBalAriaForm } from './form.js';
|
|
10
|
+
|
|
11
|
+
const balOptionListCss = ".bal-option-list{display:block;position:relative;width:100%;list-style:none;margin:0;outline:0;max-height:var(--bal-option-list-max-height);border-radius:var(--bal-radius-normal);overflow:hidden auto}";
|
|
12
|
+
const BalOptionListStyle0 = balOptionListCss;
|
|
13
|
+
|
|
14
|
+
const OptionList = /*@__PURE__*/ proxyCustomElement(class OptionList extends HTMLElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.__registerHost();
|
|
18
|
+
this.inputId = `bal-option-list-${balOptionListIds++}`;
|
|
19
|
+
this.inheritAttributes = {};
|
|
20
|
+
this.ariaForm = defaultBalAriaForm;
|
|
21
|
+
this.multiple = false;
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.required = false;
|
|
24
|
+
this.focusIndex = -1;
|
|
25
|
+
this.labelledby = undefined;
|
|
26
|
+
this.filter = 'includes';
|
|
27
|
+
this.contentHeight = 262;
|
|
28
|
+
}
|
|
29
|
+
createLogger(log) {
|
|
30
|
+
this.log = log;
|
|
31
|
+
}
|
|
32
|
+
contentHeightChanged(value) {
|
|
33
|
+
if (value === undefined) {
|
|
34
|
+
this.el.style.removeProperty('--bal-option-list-max-height');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.el.style.setProperty('--bal-option-list-max-height', `${value}px`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* LIFECYCLE
|
|
42
|
+
* ------------------------------------------------------
|
|
43
|
+
*/
|
|
44
|
+
componentDidLoad() {
|
|
45
|
+
this.contentHeightChanged(this.contentHeight);
|
|
46
|
+
}
|
|
47
|
+
componentWillRender() {
|
|
48
|
+
this.inheritAttributes = inheritAttributes(this.el, ['aria-multiselectable', 'aria-labelledby']);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* LISTENERS
|
|
52
|
+
* ------------------------------------------------------
|
|
53
|
+
*/
|
|
54
|
+
listenToMouseEnter(ev) {
|
|
55
|
+
const options = this.options;
|
|
56
|
+
const indexToFocus = this.getOptionIndex(options, ev.detail.value);
|
|
57
|
+
if (indexToFocus !== undefined) {
|
|
58
|
+
this.updateFocus(options, indexToFocus);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
listenToOptionChange({ detail }) {
|
|
62
|
+
if (!this.multiple) {
|
|
63
|
+
this.options.filter(option => option.value !== detail.value).forEach(option => (option.selected = false));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* PUBLIC METHODS
|
|
68
|
+
* ------------------------------------------------------
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Focus the first visible option in the list
|
|
72
|
+
* @returns focusIndex
|
|
73
|
+
*/
|
|
74
|
+
async focusFirst() {
|
|
75
|
+
const options = this.options;
|
|
76
|
+
const indexToFocus = this.getFirstOptionIndex(options);
|
|
77
|
+
this.updateFocus(options, indexToFocus);
|
|
78
|
+
const option = options[indexToFocus];
|
|
79
|
+
this.updateScrollTopPosition(option);
|
|
80
|
+
await waitAfterFramePaint();
|
|
81
|
+
return indexToFocus;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Focus the last visible option in the list
|
|
85
|
+
* @returns focusIndex
|
|
86
|
+
*/
|
|
87
|
+
async focusLast() {
|
|
88
|
+
const options = this.options;
|
|
89
|
+
const indexToFocus = this.getLastOptionIndex(options);
|
|
90
|
+
this.updateFocus(options, indexToFocus);
|
|
91
|
+
const option = options[indexToFocus];
|
|
92
|
+
this.updateScrollBottomPosition(option);
|
|
93
|
+
await waitAfterFramePaint();
|
|
94
|
+
return indexToFocus;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Focus the next visible option in the list
|
|
98
|
+
* @returns focusIndex
|
|
99
|
+
*/
|
|
100
|
+
async focusNext() {
|
|
101
|
+
const options = this.options;
|
|
102
|
+
const indexToFocus = this.getNextOptionIndex(options);
|
|
103
|
+
this.updateFocus(options, indexToFocus);
|
|
104
|
+
const option = options[indexToFocus];
|
|
105
|
+
this.updateScrollBottomPosition(option);
|
|
106
|
+
await waitAfterFramePaint();
|
|
107
|
+
return indexToFocus;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Focus the previous visible option in the list
|
|
111
|
+
* @returns focusIndex
|
|
112
|
+
*/
|
|
113
|
+
async focusPrevious() {
|
|
114
|
+
const options = this.options;
|
|
115
|
+
const indexToFocus = this.getPreviousOptionIndex(options);
|
|
116
|
+
this.updateFocus(options, indexToFocus);
|
|
117
|
+
const option = options[indexToFocus];
|
|
118
|
+
this.updateScrollTopPosition(option);
|
|
119
|
+
await waitAfterFramePaint();
|
|
120
|
+
return indexToFocus;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Focus the option with the label that starts with the search property
|
|
124
|
+
* @returns focusIndex
|
|
125
|
+
*/
|
|
126
|
+
async focusByLabel(search, config) {
|
|
127
|
+
const options = this.options;
|
|
128
|
+
const indexToFocus = this.getOptionIndexByLabel(options, search);
|
|
129
|
+
this.updateFocus(options, indexToFocus);
|
|
130
|
+
const option = options[indexToFocus];
|
|
131
|
+
this.updateScrollTopPosition(option);
|
|
132
|
+
await waitAfterFramePaint();
|
|
133
|
+
if (config.select) {
|
|
134
|
+
await option.select();
|
|
135
|
+
}
|
|
136
|
+
return indexToFocus;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Filter the options by the given filter property and hides options
|
|
140
|
+
* @returns focusIndex
|
|
141
|
+
*/
|
|
142
|
+
async filterByContent(search) {
|
|
143
|
+
const options = this.allOptions;
|
|
144
|
+
this.filterOptions(options, search);
|
|
145
|
+
await waitAfterFramePaint();
|
|
146
|
+
return this.focusFirst();
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Shows or hides all options
|
|
150
|
+
*/
|
|
151
|
+
async resetHidden(hidden = false) {
|
|
152
|
+
this.options.forEach(option => (option.hidden = hidden));
|
|
153
|
+
await waitAfterFramePaint();
|
|
154
|
+
this.resetFocus();
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Selects or deselects all options
|
|
158
|
+
*/
|
|
159
|
+
async resetSelected(selected = false) {
|
|
160
|
+
this.options.forEach(option => (option.selected = selected));
|
|
161
|
+
await waitAfterFramePaint();
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Updates options
|
|
165
|
+
*/
|
|
166
|
+
async updateSelected(values) {
|
|
167
|
+
this.options.forEach(option => (option.selected = values.includes(option.value)));
|
|
168
|
+
await waitAfterFramePaint();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Resets the focus index to pristine and scrolls to the top of the list
|
|
172
|
+
*/
|
|
173
|
+
async resetFocus() {
|
|
174
|
+
const options = this.options;
|
|
175
|
+
const indexToFocus = -1;
|
|
176
|
+
this.updateFocus(options, indexToFocus);
|
|
177
|
+
this.scrollTo(0);
|
|
178
|
+
await waitAfterFramePaint();
|
|
179
|
+
return indexToFocus;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Returns a list of option values
|
|
183
|
+
*/
|
|
184
|
+
async getSelectedValues() {
|
|
185
|
+
const options = this.options;
|
|
186
|
+
return options.filter(option => option.selected).map(option => option.value);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Returns a list of option labels
|
|
190
|
+
*/
|
|
191
|
+
async getSelectedOptions(values) {
|
|
192
|
+
const options = this.options;
|
|
193
|
+
if (values && values.length > 0) {
|
|
194
|
+
return options.filter(option => values.includes(option.value)).map(option => option);
|
|
195
|
+
}
|
|
196
|
+
return options.filter(option => option.selected).map(option => option);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Returns a list of options
|
|
200
|
+
*/
|
|
201
|
+
async getValues() {
|
|
202
|
+
return this.options.map(option => option.value);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Returns a list of options
|
|
206
|
+
*/
|
|
207
|
+
async getLabels() {
|
|
208
|
+
return this.options.map(option => option.label);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Returns a list of accessible options
|
|
212
|
+
*/
|
|
213
|
+
async getOptions() {
|
|
214
|
+
return this.options.filter(o => !o.disabled || !o.hidden);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Selects the option with the current focus
|
|
218
|
+
*/
|
|
219
|
+
async selectByFocus() {
|
|
220
|
+
const options = this.options;
|
|
221
|
+
const option = options[this.focusIndex];
|
|
222
|
+
if (option) {
|
|
223
|
+
if (this.multiple) {
|
|
224
|
+
option.select(!option.selected);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
option.select(true);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @internal
|
|
233
|
+
*/
|
|
234
|
+
async setAriaForm(ariaForm) {
|
|
235
|
+
this.ariaForm = Object.assign({}, ariaForm);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* GETTERS
|
|
239
|
+
* ------------------------------------------------------
|
|
240
|
+
*/
|
|
241
|
+
get options() {
|
|
242
|
+
return Array.from(this.el.querySelectorAll('bal-option')).filter(o => !o.hidden);
|
|
243
|
+
}
|
|
244
|
+
get allOptions() {
|
|
245
|
+
return Array.from(this.el.querySelectorAll('bal-option'));
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* PRIVATE METHODS
|
|
249
|
+
* ------------------------------------------------------
|
|
250
|
+
*/
|
|
251
|
+
filterOptions(options, search) {
|
|
252
|
+
const filteredOptions = [];
|
|
253
|
+
const filter = this.filter === 'includes' ? includes : startsWith;
|
|
254
|
+
for (let index = 0; index < options.length; index++) {
|
|
255
|
+
const option = options[index];
|
|
256
|
+
const content = option.textContent || '';
|
|
257
|
+
if (filter(content, search)) {
|
|
258
|
+
filteredOptions.push(option);
|
|
259
|
+
option.hidden = false;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
option.hidden = true;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return filteredOptions;
|
|
266
|
+
}
|
|
267
|
+
isOptionVisible(option) {
|
|
268
|
+
const visibleHeight = this.el.clientHeight;
|
|
269
|
+
const topPosition = this.el.scrollTop;
|
|
270
|
+
const bottomPosition = topPosition + visibleHeight;
|
|
271
|
+
const isVisible = topPosition <= option.offsetTop && option.offsetTop + option.clientHeight <= bottomPosition;
|
|
272
|
+
return isVisible;
|
|
273
|
+
}
|
|
274
|
+
updateScrollTopPosition(option) {
|
|
275
|
+
if (option) {
|
|
276
|
+
const isVisible = this.isOptionVisible(option);
|
|
277
|
+
if (!isVisible) {
|
|
278
|
+
this.scrollTo(this.getScrollTopForTopPosition(option));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
updateScrollBottomPosition(option) {
|
|
283
|
+
if (option) {
|
|
284
|
+
const isVisible = this.isOptionVisible(option);
|
|
285
|
+
if (!isVisible) {
|
|
286
|
+
this.scrollTo(this.getScrollTopForBottomPosition(option));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
getScrollTopForTopPosition(option) {
|
|
291
|
+
const topPosition = option.offsetTop;
|
|
292
|
+
const scrollTop = topPosition;
|
|
293
|
+
if (scrollTop < 0) {
|
|
294
|
+
return 0;
|
|
295
|
+
}
|
|
296
|
+
return scrollTop;
|
|
297
|
+
}
|
|
298
|
+
getScrollTopForBottomPosition(option) {
|
|
299
|
+
const visibleHeight = this.el.clientHeight;
|
|
300
|
+
const bottomPosition = option.offsetTop + option.clientHeight;
|
|
301
|
+
const scrollTop = bottomPosition - visibleHeight;
|
|
302
|
+
if (scrollTop < 0) {
|
|
303
|
+
return 0;
|
|
304
|
+
}
|
|
305
|
+
return scrollTop;
|
|
306
|
+
}
|
|
307
|
+
async scrollTo(scrollTop) {
|
|
308
|
+
if (scrollTop !== undefined && scrollTop !== null) {
|
|
309
|
+
if (this.focusRaf !== undefined) {
|
|
310
|
+
cancelAnimationFrame(this.focusRaf);
|
|
311
|
+
}
|
|
312
|
+
this.focusRaf = raf(async () => {
|
|
313
|
+
this.el.scrollTop = scrollTop;
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
updateFocus(options, indexToFocus) {
|
|
318
|
+
this.focusIndex = indexToFocus;
|
|
319
|
+
for (let index = 0; index < options.length; index++) {
|
|
320
|
+
const option = options[index];
|
|
321
|
+
option.focused = index === indexToFocus;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
getOptionIndex(options, value) {
|
|
325
|
+
for (let index = 0; index < options.length; index++) {
|
|
326
|
+
const option = options[index];
|
|
327
|
+
if (option.value === value) {
|
|
328
|
+
return index;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return undefined;
|
|
332
|
+
}
|
|
333
|
+
getFirstOptionIndex(options) {
|
|
334
|
+
for (let index = 0; index < options.length; index++) {
|
|
335
|
+
const option = options[index];
|
|
336
|
+
if (!option.disabled) {
|
|
337
|
+
return index;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return this.focusIndex;
|
|
341
|
+
}
|
|
342
|
+
getNextOptionIndex(options, index = this.focusIndex) {
|
|
343
|
+
if (index < 0) {
|
|
344
|
+
return this.getFirstOptionIndex(options);
|
|
345
|
+
}
|
|
346
|
+
const lastIndex = this.getLength(options);
|
|
347
|
+
let newIndex = index;
|
|
348
|
+
if (index < lastIndex) {
|
|
349
|
+
newIndex = index + 1;
|
|
350
|
+
if (options[newIndex].disabled) {
|
|
351
|
+
return this.getNextOptionIndex(options, newIndex);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return newIndex;
|
|
355
|
+
}
|
|
356
|
+
getPreviousOptionIndex(options, index = this.focusIndex) {
|
|
357
|
+
const firstIndex = this.getFirstOptionIndex(options);
|
|
358
|
+
if (index <= firstIndex) {
|
|
359
|
+
return firstIndex;
|
|
360
|
+
}
|
|
361
|
+
let newIndex = index;
|
|
362
|
+
newIndex = index - 1;
|
|
363
|
+
if (options[newIndex].disabled) {
|
|
364
|
+
return this.getPreviousOptionIndex(options, newIndex);
|
|
365
|
+
}
|
|
366
|
+
return newIndex;
|
|
367
|
+
}
|
|
368
|
+
getLastOptionIndex(options) {
|
|
369
|
+
for (let index = options.length - 1; index >= 0; index--) {
|
|
370
|
+
const option = options[index];
|
|
371
|
+
if (!option.disabled) {
|
|
372
|
+
return index;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return this.focusIndex;
|
|
376
|
+
}
|
|
377
|
+
getOptionIndexByLabel(options, label) {
|
|
378
|
+
if (label === undefined || label === '') {
|
|
379
|
+
return this.focusIndex;
|
|
380
|
+
}
|
|
381
|
+
const option = options.find(o => startsWith(o.label || '', label));
|
|
382
|
+
if (!lodash_isnil(option) && option.id) {
|
|
383
|
+
return options.indexOf(option);
|
|
384
|
+
}
|
|
385
|
+
return this.focusIndex;
|
|
386
|
+
}
|
|
387
|
+
getLength(options) {
|
|
388
|
+
const indexes = options.map((option, index) => (option.disabled ? 0 : index));
|
|
389
|
+
const length = Math.max(...indexes);
|
|
390
|
+
return length;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* RENDER
|
|
394
|
+
* ------------------------------------------------------
|
|
395
|
+
*/
|
|
396
|
+
render() {
|
|
397
|
+
const block = BEM.block('option-list');
|
|
398
|
+
const labelledby = this.labelledby || this.ariaForm.labelId;
|
|
399
|
+
return (h(Host, { class: Object.assign({}, block.class()), id: this.inputId, tabIndex: -1 }, h("div", Object.assign({ role: "listbox", "aria-labelledby": labelledby, "aria-disabled": this.disabled, class: Object.assign({}, block.element('container').class()) }, this.inheritAttributes), h("slot", null))));
|
|
400
|
+
}
|
|
401
|
+
get el() { return this; }
|
|
402
|
+
static get watchers() { return {
|
|
403
|
+
"contentHeight": ["contentHeightChanged"]
|
|
404
|
+
}; }
|
|
405
|
+
static get style() { return BalOptionListStyle0; }
|
|
406
|
+
}, [4, "bal-option-list", {
|
|
407
|
+
"multiple": [4],
|
|
408
|
+
"disabled": [4],
|
|
409
|
+
"required": [4],
|
|
410
|
+
"focusIndex": [1026, "focus-index"],
|
|
411
|
+
"labelledby": [1],
|
|
412
|
+
"filter": [1],
|
|
413
|
+
"contentHeight": [2, "content-height"],
|
|
414
|
+
"ariaForm": [32],
|
|
415
|
+
"focusFirst": [64],
|
|
416
|
+
"focusLast": [64],
|
|
417
|
+
"focusNext": [64],
|
|
418
|
+
"focusPrevious": [64],
|
|
419
|
+
"focusByLabel": [64],
|
|
420
|
+
"filterByContent": [64],
|
|
421
|
+
"resetHidden": [64],
|
|
422
|
+
"resetSelected": [64],
|
|
423
|
+
"updateSelected": [64],
|
|
424
|
+
"resetFocus": [64],
|
|
425
|
+
"getSelectedValues": [64],
|
|
426
|
+
"getSelectedOptions": [64],
|
|
427
|
+
"getValues": [64],
|
|
428
|
+
"getLabels": [64],
|
|
429
|
+
"getOptions": [64],
|
|
430
|
+
"selectByFocus": [64],
|
|
431
|
+
"setAriaForm": [64]
|
|
432
|
+
}, [[1, "balOptionFocus", "listenToMouseEnter"], [0, "balOptionChange", "listenToOptionChange"]], {
|
|
433
|
+
"contentHeight": ["contentHeightChanged"]
|
|
434
|
+
}]);
|
|
435
|
+
__decorate([
|
|
436
|
+
Logger('bal-option-list'),
|
|
437
|
+
__metadata("design:type", Function),
|
|
438
|
+
__metadata("design:paramtypes", [Function]),
|
|
439
|
+
__metadata("design:returntype", void 0)
|
|
440
|
+
], OptionList.prototype, "createLogger", null);
|
|
441
|
+
let balOptionListIds = 0;
|
|
442
|
+
function defineCustomElement$1() {
|
|
443
|
+
if (typeof customElements === "undefined") {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
const components = ["bal-option-list"];
|
|
447
|
+
components.forEach(tagName => { switch (tagName) {
|
|
448
|
+
case "bal-option-list":
|
|
449
|
+
if (!customElements.get(tagName)) {
|
|
450
|
+
customElements.define(tagName, OptionList);
|
|
451
|
+
}
|
|
452
|
+
break;
|
|
453
|
+
} });
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const BalOptionList = OptionList;
|
|
457
|
+
const defineCustomElement = defineCustomElement$1;
|
|
458
|
+
|
|
459
|
+
export { BalOptionList, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface BalOption extends Components.BalOption, HTMLElement {}
|
|
4
|
+
export const BalOption: {
|
|
5
|
+
prototype: BalOption;
|
|
6
|
+
new (): BalOption;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
+
import { B as BEM } from './bem.js';
|
|
4
|
+
import { L as Logger } from './log.js';
|
|
5
|
+
import { a as ariaBooleanToString } from './aria.js';
|
|
6
|
+
import { s as stopEventBubbling } from './form-input.js';
|
|
7
|
+
import { B as BalElementStateListener, L as ListenToElementStates } from './element-states.decorator.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './bal-checkbox2.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './bal-icon2.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './bal-stack2.js';
|
|
11
|
+
|
|
12
|
+
const balOptionCss = ":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-2);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-radio-checkbox-symbol-size:1.125rem;--bal-radio-checkbox-symbol-width:calc(0.375rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.656rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.375rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.188rem;--bal-radio-checkbox-label-min-height:1.125rem}";
|
|
13
|
+
const BalOptionStyle0 = balOptionCss;
|
|
14
|
+
|
|
15
|
+
const Option = /*@__PURE__*/ proxyCustomElement(class Option extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.balOptionChange = createEvent(this, "balOptionChange", 7);
|
|
20
|
+
this.balOptionFocus = createEvent(this, "balOptionFocus", 7);
|
|
21
|
+
this.inputId = `bal-option-${balOptionIds++}`;
|
|
22
|
+
/**
|
|
23
|
+
* EVENT BINDING
|
|
24
|
+
* ------------------------------------------------------
|
|
25
|
+
*/
|
|
26
|
+
this.onClick = (ev) => {
|
|
27
|
+
const listEl = this.el.closest('bal-option-list');
|
|
28
|
+
if (this.disabled || (listEl && listEl.disabled)) {
|
|
29
|
+
stopEventBubbling(ev);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (listEl && listEl.required && !listEl.multiple) {
|
|
33
|
+
if (!this.selected) {
|
|
34
|
+
this.select(true);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.select(!this.selected);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this.checkbox = false;
|
|
43
|
+
this.interactionState = BalElementStateListener.DefaultState;
|
|
44
|
+
this.label = '';
|
|
45
|
+
this.value = '';
|
|
46
|
+
this.disabled = false;
|
|
47
|
+
this.multiline = false;
|
|
48
|
+
this.invalid = false;
|
|
49
|
+
this.selected = false;
|
|
50
|
+
this.focused = false;
|
|
51
|
+
this.hidden = false;
|
|
52
|
+
}
|
|
53
|
+
createLogger(log) {
|
|
54
|
+
this.log = log;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* LIFECYCLE
|
|
58
|
+
* ------------------------------------------------------
|
|
59
|
+
*/
|
|
60
|
+
componentWillRender() {
|
|
61
|
+
if (this.el) {
|
|
62
|
+
const optionListEl = this.el.closest('bal-option-list');
|
|
63
|
+
if (optionListEl) {
|
|
64
|
+
this.checkbox = !!optionListEl.multiple;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* LISTENERS
|
|
70
|
+
* ------------------------------------------------------
|
|
71
|
+
*/
|
|
72
|
+
listenToMouseEnter() {
|
|
73
|
+
const { label, value, selected, disabled, hidden } = this;
|
|
74
|
+
if (!hidden && !disabled) {
|
|
75
|
+
this.balOptionFocus.emit({ label, value, selected });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
elementStateListener(info) {
|
|
79
|
+
this.interactionChildElements.forEach(element => {
|
|
80
|
+
element.hovered = info.hovered;
|
|
81
|
+
element.pressed = info.pressed;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* PUBLIC METHODS
|
|
86
|
+
* ------------------------------------------------------
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Selects or deselects the option and informs other components
|
|
90
|
+
*/
|
|
91
|
+
async select(selected = true) {
|
|
92
|
+
this.selected = selected;
|
|
93
|
+
const { label, value } = this;
|
|
94
|
+
this.balOptionChange.emit({ label, value, selected });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* PRIVATE METHODS
|
|
98
|
+
* ------------------------------------------------------
|
|
99
|
+
*/
|
|
100
|
+
get interactionChildElements() {
|
|
101
|
+
return Array.from(this.el.querySelectorAll('bal-checkbox'));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* RENDER
|
|
105
|
+
* ------------------------------------------------------
|
|
106
|
+
*/
|
|
107
|
+
render() {
|
|
108
|
+
const block = BEM.block('option');
|
|
109
|
+
return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('checkbox').class(this.checkbox)), block.modifier('focused').class(this.focused)), block.modifier('invalid').class(this.invalid)), block.modifier('selected').class(this.selected)), block.modifier('disabled').class(this.disabled)), block.modifier('hidden').class(this.hidden)), role: "option", id: this.inputId, "data-value": this.value, "data-label": this.label, "aria-label": this.label, "aria-hidden": ariaBooleanToString(this.hidden), "aria-selected": ariaBooleanToString(this.selected), "aria-checked": ariaBooleanToString(this.selected), "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": ariaBooleanToString(this.invalid), tabIndex: -1, onClick: this.onClick }, h("bal-stack", { py: "small", space: "x-small" }, this.checkbox ? (h("bal-checkbox", { flat: true, nonSubmit: true, "label-hidden": true, checked: this.selected, disabled: this.disabled, invalid: this.invalid, tabindex: -1 })) : (''), h("div", { class: Object.assign(Object.assign({}, block.element('inner').class()), block.element('inner').modifier('multiline').class(this.multiline)) }, h("slot", null)), this.selected && !this.checkbox ? (h("bal-icon", { name: "check", size: "small", color: this.disabled ? 'grey' : this.invalid ? 'danger' : 'primary' })) : (''))));
|
|
110
|
+
}
|
|
111
|
+
get el() { return this; }
|
|
112
|
+
static get style() { return BalOptionStyle0; }
|
|
113
|
+
}, [4, "bal-option", {
|
|
114
|
+
"label": [1],
|
|
115
|
+
"value": [1],
|
|
116
|
+
"disabled": [4],
|
|
117
|
+
"multiline": [4],
|
|
118
|
+
"invalid": [4],
|
|
119
|
+
"selected": [1028],
|
|
120
|
+
"focused": [1028],
|
|
121
|
+
"hidden": [4],
|
|
122
|
+
"checkbox": [32],
|
|
123
|
+
"interactionState": [32],
|
|
124
|
+
"select": [64]
|
|
125
|
+
}, [[1, "mouseenter", "listenToMouseEnter"]]]);
|
|
126
|
+
__decorate([
|
|
127
|
+
Logger('bal-option'),
|
|
128
|
+
__metadata("design:type", Function),
|
|
129
|
+
__metadata("design:paramtypes", [Function]),
|
|
130
|
+
__metadata("design:returntype", void 0)
|
|
131
|
+
], Option.prototype, "createLogger", null);
|
|
132
|
+
__decorate([
|
|
133
|
+
ListenToElementStates(),
|
|
134
|
+
__metadata("design:type", Function),
|
|
135
|
+
__metadata("design:paramtypes", [Object]),
|
|
136
|
+
__metadata("design:returntype", void 0)
|
|
137
|
+
], Option.prototype, "elementStateListener", null);
|
|
138
|
+
let balOptionIds = 0;
|
|
139
|
+
function defineCustomElement$1() {
|
|
140
|
+
if (typeof customElements === "undefined") {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const components = ["bal-option", "bal-checkbox", "bal-icon", "bal-stack"];
|
|
144
|
+
components.forEach(tagName => { switch (tagName) {
|
|
145
|
+
case "bal-option":
|
|
146
|
+
if (!customElements.get(tagName)) {
|
|
147
|
+
customElements.define(tagName, Option);
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case "bal-checkbox":
|
|
151
|
+
if (!customElements.get(tagName)) {
|
|
152
|
+
defineCustomElement$4();
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
case "bal-icon":
|
|
156
|
+
if (!customElements.get(tagName)) {
|
|
157
|
+
defineCustomElement$3();
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case "bal-stack":
|
|
161
|
+
if (!customElements.get(tagName)) {
|
|
162
|
+
defineCustomElement$2();
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
} });
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const BalOption = Option;
|
|
169
|
+
const defineCustomElement = defineCustomElement$1;
|
|
170
|
+
|
|
171
|
+
export { BalOption, defineCustomElement };
|
package/components/bal-popup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
-
import {
|
|
3
|
+
import { s as isEscapeKey } from './index.esm.js';
|
|
4
4
|
import { B as BEM } from './bem.js';
|
|
5
5
|
import { b as balBrowser } from './browser.js';
|
|
6
6
|
import { s as stopEventBubbling } from './form-input.js';
|