@baloise/ds-core 19.2.0 → 19.3.0-nightly.20250627
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 +2 -0
- package/components/all.js +3 -0
- package/components/bal-accordion.js +1 -1
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-carousel-item.js +1 -1
- package/components/bal-checkbox-group.js +3 -3
- package/components/bal-checkbox2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-date.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-dropdown.js +1 -1
- package/components/bal-field.js +1 -1
- package/components/bal-form.js +1 -1
- package/components/bal-modal.js +1 -1
- package/components/bal-nav-menu-flyout2.js +10 -3
- package/components/bal-nav-meta-bar2.js +4 -2
- package/components/bal-nav.js +155 -33
- package/components/bal-navbar-brand.js +1 -1
- package/components/bal-navbar-menu.js +1 -1
- package/components/bal-option-list.js +1 -1
- package/components/bal-radio-group.js +3 -3
- package/components/bal-radio2.js +1 -1
- package/components/bal-segment.js +3 -3
- package/components/bal-select2.js +7 -9
- package/components/bal-tab-item.js +4 -2
- package/components/bal-tabs2.js +5 -2
- package/components/focus.decorator.js +1 -1
- package/components/form-input.js +1 -1
- package/components/helpers.js +1 -1
- package/components/index.js +13 -320
- package/components/initialize.js +312 -0
- package/components/mutation.decorator.js +1 -1
- package/components/swiper.util.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/components/visibility.decorator.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-863f4e4e.system.js → p-01cd830b.system.js} +1 -1
- package/dist/baloise-design-system/{p-1d4ea7e42b.system.entry.js → p-02509f2aa1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9c8bb7777c.system.entry.js → p-0317350487.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8ebf048b7b.system.entry.js → p-04515987c7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5bb661c59b.entry.js → p-046c0b642c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-dba2c7bb14.system.entry.js → p-05b9ef4994.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5fcfbec540.system.entry.js → p-0783dc98dd.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6bb4e22ace.system.entry.js → p-0aa6f3518b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c43a56b7.system.js → p-0ae449ae.system.js} +1 -1
- package/dist/baloise-design-system/{p-5638fe223b.entry.js → p-0b2b3dbe1b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4b3b969747.entry.js → p-0c336d76f5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-237de03b.system.js → p-0c34ba75.system.js} +1 -1
- package/dist/baloise-design-system/p-0c352526.system.js +1 -0
- package/dist/baloise-design-system/{p-b147ff1ced.entry.js → p-1118211276.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5b20afcac4.system.entry.js → p-11230944ba.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b794110da2.system.entry.js → p-1272e3f9c5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-06d14aacfc.system.entry.js → p-12b975fee6.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-13d44256.system.js +1 -0
- package/dist/baloise-design-system/{p-748e3f7c7d.entry.js → p-14df54b760.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f1052416.js → p-15f86fd2.js} +1 -1
- package/dist/baloise-design-system/{p-a7963df92a.entry.js → p-16f5c678f5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-191cb463ef.entry.js → p-1cfbf3093b.entry.js} +1 -1
- package/dist/baloise-design-system/p-241cd947.system.js +1 -0
- package/dist/baloise-design-system/{p-7cbb14c480.entry.js → p-27b9d8e173.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f52a27c1.system.js → p-2908a4b8.system.js} +1 -1
- package/dist/baloise-design-system/{p-ade9437f.system.js → p-2d3770e7.system.js} +1 -1
- package/dist/baloise-design-system/{p-654bc5873c.entry.js → p-2e18d162c7.entry.js} +1 -1
- package/dist/baloise-design-system/p-2ef1a60a7f.entry.js +1 -0
- package/dist/baloise-design-system/{p-5f32b4f3.system.js → p-3131f323.system.js} +1 -1
- package/dist/baloise-design-system/p-348a5769a3.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-211a37e8.js → p-350a85a9.js} +1 -1
- package/dist/baloise-design-system/p-36c605b7ed.entry.js +1 -0
- package/dist/baloise-design-system/{p-a7de0bf339.system.entry.js → p-371f93bd95.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c24c3e208f.entry.js → p-37433f4fd6.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7be57b6.js → p-3d3aa421.js} +1 -1
- package/dist/baloise-design-system/{p-6149950bb1.system.entry.js → p-3f6fcc1a25.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-72414b93ef.system.entry.js → p-3fcfe14a45.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2a27350c.js → p-4191bdf0.js} +1 -1
- package/dist/baloise-design-system/{p-0c40a0d86b.entry.js → p-41ab9f8b73.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e3fb1f185f.system.entry.js → p-42d1374d6f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6700e35d71.entry.js → p-4936cce309.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8fc7e9ca.js → p-4a0012fa.js} +1 -1
- package/dist/baloise-design-system/{p-e2c982954d.entry.js → p-4ad57bd1ee.entry.js} +1 -1
- package/dist/baloise-design-system/{p-24fe64c5.js → p-4af5f1f9.js} +1 -1
- package/dist/baloise-design-system/{p-3913c6ae.js → p-4ca4dff6.js} +1 -1
- package/dist/baloise-design-system/{p-875de117.js → p-4d5477db.js} +1 -1
- package/dist/baloise-design-system/{p-2c909ec2ed.entry.js → p-4e8633942b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a86c09c64f.system.entry.js → p-4f1232cf16.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-4fea94e0.js +1 -0
- package/dist/baloise-design-system/p-5420740f.system.js +1 -0
- package/dist/baloise-design-system/{p-6e85cd1a.js → p-548ca0b3.js} +1 -1
- package/dist/baloise-design-system/{p-c0173fff.js → p-55ebd30d.js} +1 -1
- package/dist/baloise-design-system/{p-2c5c5716e7.system.entry.js → p-576fea8fe0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-41f36f7375.entry.js → p-584601ed8d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-aee1b9619a.system.entry.js → p-5945d28f5a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-72c837904a.system.entry.js → p-599fe1aecd.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-da804f45a6.system.entry.js → p-5aa8bc3088.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ad14e9f9.js → p-5b163efa.js} +1 -1
- package/dist/baloise-design-system/{p-a64c7a3b82.system.entry.js → p-5c391c5415.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1d7c3cf2.system.js → p-5d94ecd9.system.js} +1 -1
- package/dist/baloise-design-system/{p-a35a951800.entry.js → p-5e506fea89.entry.js} +1 -1
- package/dist/baloise-design-system/{p-eaed1f800c.entry.js → p-5fbe1e715b.entry.js} +1 -1
- package/dist/baloise-design-system/p-62817e8ac6.entry.js +1 -0
- package/dist/baloise-design-system/{p-ae3df5bebc.system.entry.js → p-64110b0bb5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3032d4ad66.entry.js → p-6461e0dc8c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-abd6896e.system.js → p-659270e6.system.js} +1 -1
- package/dist/baloise-design-system/{p-32db85222c.entry.js → p-68f3a1d5de.entry.js} +1 -1
- package/dist/baloise-design-system/{p-088aef322b.system.entry.js → p-694808374d.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-6abaa3f6.js +1 -0
- package/dist/baloise-design-system/{p-b50f4c4e.system.js → p-6c080ebc.system.js} +1 -1
- package/dist/baloise-design-system/{p-a8955719.system.js → p-6d05ba15.system.js} +1 -1
- package/dist/baloise-design-system/{p-1345eac467.system.entry.js → p-6d3d176967.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9df176a81a.system.entry.js → p-6df2900b29.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-6e3ed83858.entry.js +1 -0
- package/dist/baloise-design-system/{p-bdec7c17.system.js → p-6fea4b10.system.js} +1 -1
- package/dist/baloise-design-system/{p-5ce42985d4.system.entry.js → p-70a29a3cf9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-afd41db0.js → p-77c7a0b0.js} +1 -1
- package/dist/baloise-design-system/{p-4f49822899.system.entry.js → p-7ace6bb2b2.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-47825fdf.system.js → p-835cf9d5.system.js} +1 -1
- package/dist/baloise-design-system/p-86621bd1a3.system.entry.js +1 -0
- package/dist/baloise-design-system/p-8b791b36.js +1 -0
- package/dist/baloise-design-system/p-913996fe90.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3c15fb83.system.js → p-924b576e.system.js} +1 -1
- package/dist/baloise-design-system/{p-3c39fe4b16.system.entry.js → p-9cf523ec81.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-9d152de178.entry.js +1 -0
- package/dist/baloise-design-system/{p-0d3584a65f.system.entry.js → p-9fe6f3f427.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-19821082de.entry.js → p-a0800932bc.entry.js} +1 -1
- package/dist/baloise-design-system/p-a5567131.js +1 -0
- package/dist/baloise-design-system/p-a6cc1489f0.entry.js +1 -0
- package/dist/baloise-design-system/{p-848aa73224.entry.js → p-a6f19c8102.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cb0ff37f.js → p-a7894ace.js} +1 -1
- package/dist/baloise-design-system/{p-3e0254a61f.entry.js → p-a7f480e29e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9df40521e4.system.entry.js → p-a82d082286.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-20eba37f.js → p-aae6003e.js} +1 -1
- package/dist/baloise-design-system/p-ab6510f1.system.js +1 -0
- package/dist/baloise-design-system/{p-de44e8a65c.entry.js → p-ad848b32cc.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3ccf4ae8.js → p-aeddf40d.js} +1 -1
- package/dist/baloise-design-system/{p-fa5198a0.system.js → p-b0471793.system.js} +1 -1
- package/dist/baloise-design-system/{p-a255c9b3.js → p-b0cf4731.js} +1 -1
- package/dist/baloise-design-system/{p-9a5b77d8.system.js → p-b11947af.system.js} +1 -1
- package/dist/baloise-design-system/{p-00e36bd710.system.entry.js → p-b651c3be06.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c1181d7258.entry.js → p-ba04f59382.entry.js} +1 -1
- package/dist/baloise-design-system/{p-83ac9b11.js → p-bb3d79e0.js} +1 -1
- package/dist/baloise-design-system/{p-fa4494e0.system.js → p-bd816cbc.system.js} +1 -1
- package/dist/baloise-design-system/{p-57b41c6504.system.entry.js → p-bdf651c552.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f817eedc81.entry.js → p-c1df952485.entry.js} +1 -1
- package/dist/baloise-design-system/{p-38bca05d45.system.entry.js → p-c32da9e7b6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-61b67b07b2.system.entry.js → p-c75b737789.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-659ecadc.system.js → p-c942d04f.system.js} +1 -1
- package/dist/baloise-design-system/{p-9577a33b58.entry.js → p-cb603b661e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-da86fecd46.entry.js → p-cb9a61cf9f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b5b4c144a0.system.entry.js → p-ce0bb62f88.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1bd08e1e63.system.entry.js → p-cfaa78f1a3.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-af1086f717.entry.js → p-d173afff50.entry.js} +1 -1
- package/dist/baloise-design-system/p-d4b9af3900.entry.js +1 -0
- package/dist/baloise-design-system/{p-301a6b23.js → p-d96b1ee9.js} +1 -1
- package/dist/baloise-design-system/{p-01f07b49.system.js → p-dac493c4.system.js} +1 -1
- package/dist/baloise-design-system/{p-97bb957512.entry.js → p-dc1f26ed82.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7625d0abde.system.entry.js → p-ddfc39d563.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d2b585ae74.entry.js → p-de214c5ded.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b80f4f2be5.entry.js → p-e004afb272.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b3a9499f8e.entry.js → p-e1daa037f5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34b6d66663.entry.js → p-e442bfd948.entry.js} +1 -1
- package/dist/baloise-design-system/{p-31baba8382.system.entry.js → p-e53cf246d6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-78b209fdb3.system.entry.js → p-ea96959c66.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-eb70745672.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ec375851.js → p-ec1863d2.js} +1 -1
- package/dist/baloise-design-system/{p-6b690346.system.js → p-eec38fbd.system.js} +1 -1
- package/dist/baloise-design-system/{p-79f6f58b.js → p-f19930db.js} +1 -1
- package/dist/baloise-design-system/p-f35f030868.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-e87f91527f.entry.js → p-f8db562aa1.entry.js} +1 -1
- package/dist/baloise-design-system/p-fbce8119.system.js +1 -0
- package/dist/baloise-design-system/{p-20bc89d933.entry.js → p-fd273f8f1e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-565f9976.system.js → p-fe2ef334.system.js} +1 -1
- package/dist/cjs/app-globals-f63c33e7.js +7 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- 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 +167 -38
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-segment_2.cjs.entry.js +7 -7
- package/dist/cjs/bal-select_2.cjs.entry.js +6 -8
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +11 -6
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-e93836f7.js → breakpoints.decorator-5d7d7138.js} +1 -1
- package/dist/cjs/{breakpoints.subject-46e29594.js → breakpoints.subject-c585e3d2.js} +1 -1
- package/dist/cjs/{app-globals-0d8db19e.js → global-2a76769b.js} +2 -4
- package/dist/cjs/index.cjs.js +18 -18
- package/dist/cjs/initialize-2e8978a4.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{tokens.esm-b4bf229a.js → tokens.esm-93ea8ed2.js} +1 -1
- package/dist/cjs/{window-resize.decorator-6954c7a2.js → window-resize.decorator-a7daac9d.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox-group/bal-checkbox-group.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-focus.util.js +87 -0
- package/dist/collection/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.js +40 -2
- package/dist/collection/components/bal-nav/bal-nav-meta-bar/bal-nav-meta-bar.css +1 -1
- package/dist/collection/components/bal-nav/bal-nav-meta-bar/bal-nav-meta-bar.js +22 -1
- package/dist/collection/components/bal-nav/bal-nav.css +1 -1
- package/dist/collection/components/bal-nav/bal-nav.js +43 -8
- package/dist/collection/components/bal-nav/models/bal-nav-menu-link-item.js +6 -5
- package/dist/collection/components/bal-radio/bal-radio-group/bal-radio-group.js +2 -2
- package/dist/collection/components/bal-segment/bal-segment.js +3 -3
- package/dist/collection/components/bal-select/bal-select.js +6 -8
- package/dist/collection/components/bal-tabs/bal-tab-item/bal-tab-item.js +23 -2
- package/dist/collection/components/bal-tabs/components/tab-button.js +6 -3
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +1 -0
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +247 -0
- package/dist/collection/index.js +27 -21
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{animation.decorator-49923a4a.js → animation.decorator-7fca988f.js} +1 -1
- package/dist/esm/app-globals-47f73608.js +5 -0
- package/dist/esm/bal-accordion_4.entry.js +5 -5
- package/dist/esm/bal-app.entry.js +2 -2
- package/dist/esm/bal-button_2.entry.js +2 -2
- package/dist/esm/bal-carousel_2.entry.js +14 -14
- package/dist/esm/bal-checkbox_2.entry.js +8 -8
- package/dist/esm/bal-close.entry.js +3 -3
- package/dist/esm/bal-date-calendar-cell.entry.js +3 -3
- package/dist/esm/bal-date-calendar_2.entry.js +8 -8
- package/dist/esm/bal-date.entry.js +7 -7
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-dropdown.entry.js +6 -6
- package/dist/esm/bal-field_5.entry.js +3 -3
- package/dist/esm/bal-file-upload.entry.js +3 -3
- package/dist/esm/bal-footer.entry.js +4 -4
- package/dist/esm/bal-form.entry.js +2 -2
- package/dist/esm/bal-hint_5.entry.js +6 -6
- package/dist/esm/bal-icon.entry.js +3 -3
- package/dist/esm/bal-input-slider.entry.js +3 -3
- package/dist/esm/bal-input-stepper.entry.js +6 -6
- package/dist/esm/bal-input.entry.js +3 -3
- package/dist/esm/bal-label.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +9 -9
- package/dist/esm/bal-logo.entry.js +6 -6
- package/dist/esm/bal-modal_3.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +173 -44
- package/dist/esm/bal-navbar_5.entry.js +7 -7
- package/dist/esm/bal-number-input.entry.js +6 -6
- package/dist/esm/bal-option_2.entry.js +4 -4
- package/dist/esm/bal-pagination.entry.js +7 -7
- package/dist/esm/bal-popup.entry.js +4 -4
- package/dist/esm/bal-progress-bar.entry.js +6 -6
- package/dist/esm/bal-radio_2.entry.js +8 -8
- package/dist/esm/bal-segment_2.entry.js +13 -13
- package/dist/esm/bal-select_2.entry.js +9 -11
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-spinner.entry.js +4 -4
- package/dist/esm/bal-stage_6.entry.js +2 -2
- package/dist/esm/bal-steps.entry.js +7 -7
- package/dist/esm/bal-tab-item_2.entry.js +23 -18
- package/dist/esm/bal-textarea.entry.js +3 -3
- package/dist/esm/bal-time-input.entry.js +5 -5
- package/dist/esm/bal-tooltip.entry.js +3 -3
- package/dist/esm/baloise-design-system.js +7 -6
- package/dist/esm/{breakpoints.decorator-133a72bf.js → breakpoints.decorator-fff4bba9.js} +1 -1
- package/dist/esm/{breakpoints.subject-76dd4b56.js → breakpoints.subject-794d0e94.js} +2 -2
- package/dist/esm/{config.decorator-42dba864.js → config.decorator-6795d1fe.js} +1 -1
- package/dist/esm/{config.default-8e11a860.js → config.default-53a04699.js} +1 -1
- package/dist/esm/{config.utils-cd529084.js → config.utils-f3793464.js} +1 -1
- package/dist/esm/{date-a9304ff8.js → date-87bdb1d1.js} +1 -1
- package/dist/esm/{element-states.decorator-0688a178.js → element-states.decorator-d99dc83c.js} +1 -1
- package/dist/esm/{floating-ui-775ee3d1.js → floating-ui-8ffbc979.js} +1 -1
- package/dist/esm/{focus.decorator-5575312f.js → focus.decorator-988245d7.js} +1 -1
- package/dist/esm/{form-input-263e6f5b.js → form-input-1ebdb905.js} +1 -1
- package/dist/esm/global-85ac0fa5.js +7 -0
- package/dist/esm/{helpers-94c3fbac.js → helpers-51d51cc5.js} +2 -2
- package/dist/esm/index.js +15 -15
- package/dist/esm/{initialize-be160cc4.js → initialize-c00194b2.js} +4 -4
- package/dist/esm/loader.js +7 -6
- package/dist/esm/{mutation.decorator-e915d053.js → mutation.decorator-6a69cedb.js} +1 -1
- package/dist/esm/{number-d75635a2.js → number-ccf3fbd0.js} +2 -2
- package/dist/esm/{overlays-3f81f45d.js → overlays-cee3838b.js} +1 -1
- package/dist/esm/{resize.decorator-08f6286b.js → resize.decorator-3c8e5ee2.js} +1 -1
- package/dist/esm/{swipe.decorator-902c4936.js → swipe.decorator-3d3585e7.js} +1 -1
- package/dist/esm/{swipe.subject-fbdb665a.js → swipe.subject-26a9e5a5.js} +1 -1
- package/dist/esm/{swiper.util-5f92ac1c.js → swiper.util-8e17b8c4.js} +2 -2
- package/dist/esm/{tokens.esm-dc280d50.js → tokens.esm-628f0bc7.js} +1 -1
- package/dist/esm/{visibility.decorator-ee4b6682.js → visibility.decorator-5db91610.js} +1 -1
- package/dist/esm/{window-resize.decorator-aa625d55.js → window-resize.decorator-49ed4e99.js} +1 -1
- package/dist/esm-es5/{animation.decorator-49923a4a.js → animation.decorator-7fca988f.js} +1 -1
- package/dist/esm-es5/app-globals-47f73608.js +1 -0
- package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
- package/dist/esm-es5/bal-app.entry.js +1 -1
- package/dist/esm-es5/bal-button_2.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_2.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-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-doc-app.entry.js +1 -0
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- 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-form.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.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-input.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-modal_3.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 -1
- package/dist/esm-es5/bal-pagination.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-segment_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-stage_6.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-textarea.entry.js +1 -1
- package/dist/esm-es5/bal-time-input.entry.js +1 -1
- package/dist/esm-es5/bal-tooltip.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-fff4bba9.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-76dd4b56.js → breakpoints.subject-794d0e94.js} +1 -1
- package/dist/esm-es5/config.decorator-6795d1fe.js +1 -0
- package/dist/esm-es5/{config.default-8e11a860.js → config.default-53a04699.js} +1 -1
- package/dist/esm-es5/{config.utils-cd529084.js → config.utils-f3793464.js} +1 -1
- package/dist/esm-es5/{date-a9304ff8.js → date-87bdb1d1.js} +1 -1
- package/dist/esm-es5/{element-states.decorator-0688a178.js → element-states.decorator-d99dc83c.js} +1 -1
- package/dist/esm-es5/{floating-ui-775ee3d1.js → floating-ui-8ffbc979.js} +1 -1
- package/dist/esm-es5/{focus.decorator-5575312f.js → focus.decorator-988245d7.js} +1 -1
- package/dist/esm-es5/{form-input-263e6f5b.js → form-input-1ebdb905.js} +1 -1
- package/dist/esm-es5/global-85ac0fa5.js +1 -0
- package/dist/esm-es5/{helpers-94c3fbac.js → helpers-51d51cc5.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{initialize-be160cc4.js → initialize-c00194b2.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{mutation.decorator-e915d053.js → mutation.decorator-6a69cedb.js} +1 -1
- package/dist/esm-es5/number-ccf3fbd0.js +1 -0
- package/dist/esm-es5/{overlays-3f81f45d.js → overlays-cee3838b.js} +1 -1
- package/dist/esm-es5/{resize.decorator-08f6286b.js → resize.decorator-3c8e5ee2.js} +1 -1
- package/dist/esm-es5/{swipe.decorator-902c4936.js → swipe.decorator-3d3585e7.js} +1 -1
- package/dist/esm-es5/{swipe.subject-fbdb665a.js → swipe.subject-26a9e5a5.js} +1 -1
- package/dist/esm-es5/{swiper.util-5f92ac1c.js → swiper.util-8e17b8c4.js} +1 -1
- package/dist/esm-es5/{visibility.decorator-ee4b6682.js → visibility.decorator-5db91610.js} +1 -1
- package/dist/esm-es5/{window-resize.decorator-aa625d55.js → window-resize.decorator-49ed4e99.js} +1 -1
- package/dist/html.html-data.json +4 -0
- package/dist/types/components/bal-checkbox/bal-checkbox-group/bal-checkbox-group.d.ts +2 -2
- package/dist/types/components/bal-nav/bal-nav-focus.util.d.ts +33 -0
- package/dist/types/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.d.ts +6 -1
- package/dist/types/components/bal-nav/bal-nav-meta-bar/bal-nav-meta-bar.d.ts +4 -0
- package/dist/types/components/bal-nav/bal-nav.interfaces.d.ts +7 -1
- package/dist/types/components/bal-nav/models/bal-nav-menu-link-item.d.ts +1 -0
- package/dist/types/components/bal-radio/bal-radio-group/bal-radio-group.d.ts +2 -2
- package/dist/types/components/bal-segment/bal-segment.d.ts +2 -2
- package/dist/types/components/bal-tabs/bal-tab-item/bal-tab-item.d.ts +5 -0
- package/dist/types/components/bal-tabs/bal-tab.type.d.ts +1 -0
- package/dist/types/components/bal-tabs/bal-tabs.interfaces.d.ts +2 -0
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +69 -0
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
- package/dist/types/index.d.ts +25 -23
- package/package.json +6 -6
- package/dist/baloise-design-system/p-002d7bb9.js +0 -1
- package/dist/baloise-design-system/p-00c2788841.entry.js +0 -1
- package/dist/baloise-design-system/p-1a3fd0b20d.system.entry.js +0 -1
- package/dist/baloise-design-system/p-1f91745ab3.system.entry.js +0 -1
- package/dist/baloise-design-system/p-279dbfbe05.entry.js +0 -1
- package/dist/baloise-design-system/p-345aa92d.system.js +0 -1
- package/dist/baloise-design-system/p-38aa6fee.js +0 -1
- package/dist/baloise-design-system/p-456114b8.system.js +0 -1
- package/dist/baloise-design-system/p-48bee822ce.entry.js +0 -1
- package/dist/baloise-design-system/p-5298de0e.system.js +0 -1
- package/dist/baloise-design-system/p-6c1136af87.entry.js +0 -1
- package/dist/baloise-design-system/p-92964b4937.entry.js +0 -1
- package/dist/baloise-design-system/p-92b665e7.system.js +0 -1
- package/dist/baloise-design-system/p-9c3f458e6c.entry.js +0 -1
- package/dist/baloise-design-system/p-a397da94.system.js +0 -1
- package/dist/baloise-design-system/p-af0585f6.js +0 -1
- package/dist/baloise-design-system/p-c5fc0e842c.system.entry.js +0 -1
- package/dist/baloise-design-system/p-df94de7fb8.system.entry.js +0 -1
- package/dist/esm/app-globals-5dd5fe6b.js +0 -9
- package/dist/esm-es5/app-globals-5dd5fe6b.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-133a72bf.js +0 -1
- package/dist/esm-es5/config.decorator-42dba864.js +0 -1
- package/dist/esm-es5/number-d75635a2.js +0 -1
- /package/dist/baloise-design-system/{p-f35655f3.js → p-57bcec5c.js} +0 -0
- /package/dist/baloise-design-system/{p-fd6073b5.system.js → p-7c271a2a.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-dc280d50.js → tokens.esm-628f0bc7.js} +0 -0
package/dist/baloise-design-system/{p-e3fb1f185f.system.entry.js → p-42d1374d6f.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,r,t,e){function n(o){return o instanceof t?o:new t((function(r){r(o)}))}return new(t||(t=Promise))((function(t,i){function a(o){try{l(e.next(o))}catch(o){i(o)}}function d(o){try{l(e["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):n(o.value).then(a,d)}l((e=e.apply(o,r||[])).next())}))};var __generator=this&&this.__generator||function(o,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,n,i,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(o){return function(r){return l([o,r])}}function l(d){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(t=0)),t)try{if(e=1,n&&(i=d[0]&2?n["return"]:d[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;if(n=0,i)d=[d[0]&2,i.value];switch(d[0]){case 0:case 1:i=d;break;case 4:t.label++;return{value:d[1],done:false};case 5:t.label++;n=d[1];d=[0];continue;case 7:d=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){t.label=d[1];break}if(d[0]===6&&t.label<i[1]){t.label=i[1];i=d;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(d);break}if(i[2])t.ops.pop();t.trys.pop();continue}d=r.call(o,t)}catch(o){d=[6,o];n=0}finally{e=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,r,t){if(t||arguments.length===2)for(var e=0,n=r.length,i;e<n;e++){if(i||!(e in r)){if(!i)i=Array.prototype.slice.call(r,0,e);i[e]=r[e]}}return o.concat(i||Array.prototype.slice.call(r))};System.register(["./p-7961e095.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-c43a56b7.system.js","./p-7720b262.system.js","./p-907368ff.system.js","./p-863f4e4e.system.js","./p-a1f6e944.system.js","./p-1c41de53.system.js","./p-6913b916.system.js","./p-16395ece.system.js","./p-92b665e7.system.js","./p-278aed95.system.js","./p-4e642b63.system.js","./p-2da669b4.system.js","./p-6b690346.system.js","./p-fa5198a0.system.js","./p-ade9437f.system.js","./p-df907af8.system.js","./p-2880433e.system.js"],(function(o){"use strict";var r,t,e,n,i,a,d,l,s,p,c,u,b,h,_,f,w,v,m,g,x,y,k,j,O,z,C,A,F,S,T;return{setters:[function(o){r=o.h;t=o.r;e=o.c;n=o.H;i=o.g},function(o){a=o._;d=o.a},function(o){l=o.B},function(o){s=o.L},function(o){p=o.s},function(o){c=o.i},function(o){u=o.d},function(o){b=o.n;h=o.b;_=o.l;f=o.r;w=o.d},function(o){v=o.b},function(o){m=o.a},function(o){g=o.l},function(o){x=o.F},function(o){y=o.b},function(o){k=o.D},function(o){j=o.i;O=o.a;z=o.b;C=o.c;A=o.d},function(o){F=o.a},function(o){S=o.d},function(o){T=o.L},function(){},function(){},function(){}],execute:function(){var E=function(){function o(){var o=this;this.handleAutoFill=function(r){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){switch(e.label){case 0:p(r);if(!this.isAutoFillAllowed())return[3,2];this.component.isAutoFilled=true;o=this.component.nativeEl.value;return[4,this.parseAutoFillValueWithOptions(o)];case 1:t=e.sent();if(t===undefined){this.component.isAutoFilled=false;return[2]}if(!m(t,this.component.rawValue)){this.component.valueUtil.updateRawValueBySelection(t,true)}e.label=2;case 2:return[2]}}))}))}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.isAutoFillAllowed=function(){return!this.component.multiple};o.prototype.parseAutoFillValueWithOptions=function(o){return __awaiter(this,void 0,void 0,(function(){var r,t,e,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.component.listEl.getOptions()];case 1:r=i.sent();t=undefined;for(e=0;e<r.length;e++){n=r[e];if(n.value===o||n.label===o){return[2,[n.value]]}}return[2,t]}}))}))};return o}();var L={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};var q=function(){function o(){var o=this;this.handlePointerDown=function(){o.component.isKeyboardMode=false};this.handleKeydown=function(r){o.component.isKeyboardMode=x.includes(r.key)}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.handleFocus=function(o){this.component.hasFocus=true;this.component.balFocus.emit(o)};o.prototype.handleBlur=function(o){var r=this;if(!this.component.isExpanded){this.component.hasFocus=false;b((function(){return r.component.balBlur.emit(o)}))}};o.prototype.handleClick=function(o){if(!this.component.valueUtil.isDisabled()){if(this.component.chips){var r=o.target;var t=r.closest("bal-close");if(t){return}}if(this.component.clearable){var r=o.target;var e=r.closest(".bal-dropdown__clear");if(e){this.component.valueUtil.updateRawValueBySelection([]);return}}this.component.popupUtil.toggleList()}};o.prototype.handleOutsideClick=function(o){var r=this;var t;if(this.component.isExpanded){if(!this.component.el.contains(o.target)){this.component.isExpanded=false;(t=this.component.listEl)===null||t===void 0?void 0:t.resetFocus();this.component.hasFocus=false;b((function(){return r.component.balBlur.emit(o)}))}}};return o}();var P=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.focusOptionByLabel=function(o,r){var t=this;if(r===void 0){r={}}this.component.labelToFocus=(this.component.labelToFocus+o).trim();if(this.component.labelToFocus.length>0){clearTimeout(this.keyHitTimeout);this.keyHitTimeout=setTimeout((function(){var o;(o=t.component.listEl)===null||o===void 0?void 0:o.focusByLabel(t.component.labelToFocus,r)}),100);clearTimeout(this.timeout);this.timeout=setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){this.component.labelToFocus="";return[2]}))}))}),1e3)}};return o}();var B=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o;this.component.initialValue=this.component.value};o.prototype.componentDidRender=function(){var o=this;if(this.component.selectEl){var r=this.component.selectEl.querySelectorAll("option");r.forEach((function(r){if(o.component.rawValue.includes(r.value)){r.selected=true}}))}};o.prototype.handle=function(o){var r=this;var t=o.target;if(t===null||t===void 0?void 0:t.contains(this.component.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){var o=r.component.valueUtil.parseValueString(r.component.initialValue);r.component.valueUtil.updateRawValueBySelection(o)}),0)}};return o}();var D=function(o){var t=o.name,e=o.httpFormSubmit,n=o.multiple,i=o.required,a=o.disabled,d=o.rawValue,s=o.refSelectEl;var p=l.block("dropdown");return e?r("select",{class:Object.assign({},p.element("root").element("select").class()),"aria-hidden":"true",name:t,multiple:n,required:i,disabled:a,tabindex:-1,ref:s},d.map((function(o){return r("option",{key:o,value:o,selected:true},o)}))):""};var I=function(o){var t=o.size,e=o.theme,n=o.icon,i=o.language,a=o.loading,d=o.clearable,s=o.invalid,p=o.filled,c=o.expanded,u=o.disabled;var b=l.block("dropdown");if(a){return r("bal-spinner",{class:Object.assign({},b.element("rear").class()),small:true,variation:"circle",color:"white"})}else if(d&&p&&!u){return r("button",{title:L[i].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},b.element("rear").class()),b.element("clear").class()),b.element("clear").modifier("invalid").class(s)),b.element("clear").modifier("theme-purple").class(e==="purple"))},r("bal-icon",{class:Object.assign({},b.element("rear").class()),name:e==="purple"?"close":"close-circle",size:t,color:e==="purple"?"primary":"grey"}))}else{return r("bal-icon",{class:Object.assign({},b.element("rear").class()),name:n,size:t,turn:c,color:u?"grey":s?"danger":"primary"})}};var H=function(o){var t=o.inputId,e=o.isExpanded,n=o.rawOptions,i=o.isDisabled,a=o.hasPropOptions,d=o.required,s=o.filter,p=o.multiple,c=o.contentHeight,u=o.refPanelEl,b=o.refListEl;var h=l.block("dropdown");return r("div",{id:"".concat(t,"-menu"),class:Object.assign(Object.assign({},h.element("list").class()),h.element("list").modifier("expanded").class(e)),ref:u},r("bal-option-list",{multiple:p,disabled:i,filter:s,required:d,contentHeight:c,ref:b},r("slot",null),a?n.map((function(o){return r("bal-option",{key:o.value,value:o.value,label:o.label,disabled:o.disabled,multiline:o.multiline,invalid:o.invalid,hidden:o.hidden,selected:o.selected,focused:o.focused},o.label)})):""))};var K=function(){function o(){this.updatePanelPosition=function(o,r,t){return function(){o.computePosition(r,t,{placement:"bottom-start",middleware:[o.flip(),o.shift()]}).then((function(o){var r=o.x,e=o.y;Object.assign(t.style,{left:"".concat(r,"px"),top:"".concat(e,"px")})}))}}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.toggleList=function(){if(!this.component.valueUtil.isDisabled()){if(this.component.isExpanded){this.collapseList()}else{this.expandList()}}};o.prototype.expandList=function(){return __awaiter(this,void 0,void 0,(function(){var o,r;return __generator(this,(function(t){switch(t.label){case 0:if(!this.component.panelEl)return[3,2];return[4,y.load()];case 1:r=t.sent();this.component.panelCleanup=r.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(r,this.component.el,this.component.panelEl));t.label=2;case 2:this.component.isExpanded=true;return[4,(o=this.component.listEl)===null||o===void 0?void 0:o.focusSelected()];case 3:t.sent();return[2]}}))}))};o.prototype.collapseList=function(){var o;this.component.isExpanded=false;(o=this.component.listEl)===null||o===void 0?void 0:o.resetFocus();if(this.component.panelCleanup){this.component.panelCleanup()}};return o}();var R=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.componentDidLoad=function(){var o=this;setTimeout((function(){return o.valueChanged(o.component.value,undefined)}),0)};o.prototype.isDisabled=function(){return this.component.disabled||this.component.readonly};o.prototype.isFilled=function(){return this.component.rawValue&&this.component.rawValue.length>0};o.prototype.valueChanged=function(o,r){var t=typeof o;var e=typeof r;if(t!==e){this.updateRawValueByValueProp(o)}if(t==="string"&&o!==r){this.updateRawValueByValueProp(o)}if(Array.isArray(o)&&Array.isArray(r)&&!m(o,r)){this.updateRawValueByValueProp(o)}};o.prototype.updateRawValueBySelection=function(o,r){if(o===void 0){o=[]}if(r===void 0){r=false}this.component.isAutoFilled=r;this.updateRawValue(o);if(this.component.multiple){this.component.balChange.emit(this.component.rawValue)}else{this.component.balChange.emit(this.component.rawValue[0])}};o.prototype.parseValueString=function(o){if(o===void 0){o=[]}var r=[];if(!g(o)&&o!==""){if(Array.isArray(o)){r=__spreadArray([],o.filter((function(o){return!g(o)})),true)}else{if(o.split("").includes(",")){r=__spreadArray([],o.split(",").filter((function(o){return o})).map((function(o){return o.trim()})),true)}else{r=[o]}}}return r};o.prototype.updateRawValueByValueProp=function(o){if(o===void 0){o=[]}var r=this.parseValueString(o);this.updateRawValue(r)};o.prototype.updateRawValue=function(){return __awaiter(this,arguments,void 0,(function(o){if(o===void 0){o=[]}return __generator(this,(function(r){switch(r.label){case 0:this.component.rawValue=o;if(!this.component.listEl)return[3,2];return[4,this.component.listEl.updateSelected(this.component.rawValue)];case 1:r.sent();r.label=2;case 2:return[4,this.updateInputContent()];case 3:r.sent();return[2]}}))}))};o.prototype.removeOption=function(o){var r=this.component.rawValue.filter((function(r){return r!==o.value}));this.updateRawValueBySelection(r)};o.prototype.updateInputContent=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){switch(r.label){case 0:return[4,h()];case 1:r.sent();if(!this.component.listEl)return[3,3];o=this.component;return[4,this.component.listEl.getSelectedOptions(this.component.rawValue)];case 2:o.choices=r.sent();this.component.inputLabel=this.component.choices.map((function(o){return o.label.trim()})).sort().join(",");r.label=3;case 3:return[2]}}))}))};return o}();var V=function(o){var t=o.inlineLabel,e=o.filled,n=o.chips,i=o.placeholder,a=o.choices,d=o.invalid,s=o.disabled,p=o.readonly,c=o.onRemoveChip;var u=l.block("dropdown");if(e){if(n){return r("div",{class:Object.assign({},u.element("root").element("content").element("chips").class())},a.map((function(o){return r("bal-tag",{key:o.value,"data-test":"bal-dropdown-chip",size:"small",invalid:d,disabled:s||p,closable:!(s||p),onBalCloseClick:function(){return c(o)}},o.label)})))}else{return(t&&"".concat(t,": "))+a.map((function(o){return o.label})).join(", ")}}else{return i}};var W=function(o){var t=o.inputId,e=o.httpFormSubmit,n=o.ariaForm,i=o.rawValue,a=o.autocomplete,d=o.required,s=o.disabled,p=o.readonly,c=o.placeholder,u=o.expanded,b=o.invalid,h=o.language,_=o.inputLabel,f=o.inheritedAttributes,w=o.refInputEl,v=o.onChange,m=o.onFocus,g=o.onBlur,x=o.onKeyDown;var y=l.block("dropdown");var k=function(){return r("input",Object.assign({id:n.controlId||"".concat(t,"-ctrl"),class:Object.assign({},y.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:a,value:i.join(","),required:d,disabled:s,readonly:p,placeholder:c,title:u?L[h].close:L[h].open,"aria-label":u?L[h].close:L[h].open,"aria-owns":"".concat(t,"-menu"),"aria-invalid":F(b),"aria-disabled":F(s||p),"aria-labelledby":n.labelId,"aria-describedby":n.messageId,"aria-haspopup":"listbox","data-native":true,"data-label":_,"data-value":i.join(","),ref:function(o){return w(o)},onChange:function(o){return v(o)},onFocus:function(o){return m(o)},onBlur:function(o){return g(o)},onKeyDown:function(o){return x(o)}},f))};if(e){return r(k,null)}return r("form",{novalidate:true},r(k,null))};var G=':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-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--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;width:100%}.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-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);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:1rem;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)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.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:none;visibility:hidden;opacity:0;width:100vw;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)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;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__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';var U=G;var Z=o("bal_dropdown",function(){function o(o){var r=this;t(this,o);this.balChange=e(this,"balChange",7);this.balFocus=e(this,"balFocus",7);this.balBlur=e(this,"balBlur",7);this.inputId="bal-dropdown-".concat(J++);this.inheritedAttributes={};this.initialValue=[];this.nativeOptions=[];this.valueUtil=new R;this.eventsUtil=new q;this.popupUtil=new K;this.optionUtil=new k;this.formSubmitUtil=new B;this.focusUtil=new P;this.autoFillUtil=new E;this.hasConnected=false;this.listenToOptionChange=function(o){r.optionUtil.listenToOptionChange(o)};this.listenOnClickOutside=function(o){r.eventsUtil.handleOutsideClick(o)};this.resetHandler=function(o){r.formSubmitUtil.handle(o)};this.handleAutoFill=function(o){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){this.log("(handleAutoFill)",o,this.nativeEl.value);this.autoFillUtil.handleAutoFill(o);return[2]}))}))};this.handleKeyDown=function(o){var t,e,n,i,a;if(o&&o.key){if(r.isExpanded){if(j(o)){p(o);(t=r.listEl)===null||t===void 0?void 0:t.focusNext()}else if(O(o)){p(o);(e=r.listEl)===null||e===void 0?void 0:e.focusPrevious()}else if(o.key==="Home"||o.key==="PageUp"){p(o);(n=r.listEl)===null||n===void 0?void 0:n.focusFirst()}else if(o.key==="End"||o.key==="PageDown"){p(o);(i=r.listEl)===null||i===void 0?void 0:i.focusLast()}else if(z(o)){p(o);(a=r.listEl)===null||a===void 0?void 0:a.selectByFocus()}else if(o.key==="Tab"||C(o)){r.popupUtil.collapseList()}else if(o.key.length===1){r.focusUtil.focusOptionByLabel(o.key)}}else{if(z(o)||A(o)){p(o);r.popupUtil.expandList()}else if(o.key.length===1){r.focusUtil.focusOptionByLabel(o.key,{select:true})}}}else{if(r.isExpanded){r.popupUtil.collapseList()}}};this.rawOptions=[];this.choices=[];this.rawValue=[];this.hasFocus=false;this.isExpanded=false;this.isAutoFilled=false;this.isKeyboardMode=false;this.inputLabel="";this.ariaForm=u;this.language=S.language;this.region=S.region;this.httpFormSubmit=S.httpFormSubmit;this.labelToFocus="";this.autocomplete="off";this.name=this.inputId;this.placeholder="";this.inlineLabel="";this.icon="caret-down";this.size="";this.theme="";this.disabled=false;this.readonly=false;this.multiple=false;this.chips=false;this.clearable=false;this.invalid=false;this.required=false;this.loading=false;this.filter="includes";this.contentHeight=262;this.inverted=false;this.options=[];this.value=[]}o.prototype.createLogger=function(o){this.log=o};o.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.optionUtil.optionChanged();return[2]}))}))};o.prototype.valueChanged=function(o,r){this.valueUtil.valueChanged(o,r)};o.prototype.connectedCallback=function(){if(!this.hasConnected){this.eventsUtil.connectedCallback(this);this.valueUtil.connectedCallback(this);this.popupUtil.connectedCallback(this);this.optionUtil.connectedCallback(this);this.formSubmitUtil.connectedCallback(this);this.focusUtil.connectedCallback(this);this.autoFillUtil.connectedCallback(this)}_(this.el,"balOptionChange",this.listenToOptionChange);if(v.hasDocument){_(document,"keydown",this.eventsUtil.handleKeydown);_(document,"touchstart",this.eventsUtil.handlePointerDown);_(document,"mousedown",this.eventsUtil.handlePointerDown);_(document,"click",this.listenOnClickOutside);_(document,"reset",this.resetHandler,{capture:true})}this.hasConnected=true};o.prototype.disconnectedCallback=function(){f(this.el,"balOptionChange",this.listenToOptionChange);if(v.hasDocument){f(document,"keydown",this.eventsUtil.handleKeydown);f(document,"touchstart",this.eventsUtil.handlePointerDown);f(document,"mousedown",this.eventsUtil.handlePointerDown);f(document,"click",this.listenOnClickOutside);f(document,"reset",this.resetHandler,{capture:true})}};o.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.inheritedAttributes=c(this.el,["tabindex"]);return[4,this.optionUtil.componentWillRender()];case 1:o.sent();return[2]}}))}))};o.prototype.componentDidRender=function(){this.formSubmitUtil.componentDidRender()};o.prototype.componentDidLoad=function(){this.valueUtil.componentDidLoad()};o.prototype.configChanged=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.language=o.language;this.region=o.region;this.httpFormSubmit=o.httpFormSubmit;return[2]}))}))};o.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(this.nativeEl&&!this.valueUtil.isDisabled()))return[3,2];return[4,w()];case 1:o.sent();this.nativeEl.focus();o.label=2;case 2:return[2]}}))}))};o.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.rawValue]}))}))};o.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.valueUtil.updateRawValueBySelection([]);return[2]}))}))};o.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.expandList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.collapseList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.select=function(o){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.valueUtil.parseValueString(o);this.valueUtil.updateRawValueBySelection(r);return[2]}))}))};o.prototype.setAriaForm=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.ariaForm=Object.assign({},o);return[2]}))}))};o.prototype.render=function(){var o=this;var t=l.block("dropdown");var e=this.valueUtil.isFilled();var i=this.size!=="";var a="size-".concat(this.size);var d=this.theme!=="";var s="theme-".concat(this.theme);var p=this.theme==="purple"?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return r(n,{key:"1b075647fbe8923e1d12974c621e391e6557cc48",class:Object.assign({},t.class()),tabindex:"-1",id:"".concat(this.inputId)},r("div",{key:"a71a4bd3a2c803b6890f89a78fdfb611fbde8f5a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").class()),t.element("root").modifier("focused").class(p)),t.element("root").modifier("invalid").class(this.invalid)),t.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").modifier("autofill").class(this.isAutoFilled)),t.element("root").modifier(a).class(i)),t.element("root").modifier(s).class(d)),t.element("root").modifier(s+"-filled").class(e&&d)),t.element("root").modifier(s+"-expanded").class(this.isExpanded&&d)),"data-test":"bal-dropdown-trigger",onClick:function(r){return o.eventsUtil.handleClick(r)}},r("span",{key:"a65ae5081e4c747a9c16fe8b499c67b23763d806",class:Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").element("content").class()),t.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),t.element("root").element("content").modifier(a).class(i))},r(V,{key:"174ce02d638806795cccbc8dc9990d07f4cfe630",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,onRemoveChip:function(r){return o.valueUtil.removeOption(r)}})),r(W,{key:"e7b31122122f29e7f9dd52b4caeb797ae5584c38",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:function(r){return o.nativeEl=r},onChange:function(r){return o.handleAutoFill(r)},onFocus:function(r){return o.eventsUtil.handleFocus(r)},onBlur:function(r){return o.eventsUtil.handleBlur(r)},onKeyDown:function(r){return o.handleKeyDown(r)}}),r(D,{key:"86c3712230c6610e8b96280f91d5b6069d82edbf",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:function(r){return o.selectEl=r}}),r(I,{key:"36fdd2af649f0ccc5f7d30df90c6a1cce14eda2e",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:e,disabled:this.valueUtil.isDisabled()})),r(H,{key:"ba4a9e84148ea1431033da83477e7563a61e0826",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:function(r){return o.panelEl=r},refListEl:function(r){return o.listEl=r}},r("slot",{key:"046f4677bcf864dcd9f6d8e5e55ff95276cd9166"})))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return o}());a([s("bal-dropdown"),d("design:type",Function),d("design:paramtypes",[Function]),d("design:returntype",void 0)],Z.prototype,"createLogger",null);a([T(),d("design:type",Function),d("design:paramtypes",[Object]),d("design:returntype",Promise)],Z.prototype,"configChanged",null);var J=0;Z.style=U}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,r,t,e){function n(o){return o instanceof t?o:new t((function(r){r(o)}))}return new(t||(t=Promise))((function(t,i){function a(o){try{l(e.next(o))}catch(o){i(o)}}function d(o){try{l(e["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):n(o.value).then(a,d)}l((e=e.apply(o,r||[])).next())}))};var __generator=this&&this.__generator||function(o,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,n,i,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(o){return function(r){return l([o,r])}}function l(d){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(t=0)),t)try{if(e=1,n&&(i=d[0]&2?n["return"]:d[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;if(n=0,i)d=[d[0]&2,i.value];switch(d[0]){case 0:case 1:i=d;break;case 4:t.label++;return{value:d[1],done:false};case 5:t.label++;n=d[1];d=[0];continue;case 7:d=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){t.label=d[1];break}if(d[0]===6&&t.label<i[1]){t.label=i[1];i=d;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(d);break}if(i[2])t.ops.pop();t.trys.pop();continue}d=r.call(o,t)}catch(o){d=[6,o];n=0}finally{e=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,r,t){if(t||arguments.length===2)for(var e=0,n=r.length,i;e<n;e++){if(i||!(e in r)){if(!i)i=Array.prototype.slice.call(r,0,e);i[e]=r[e]}}return o.concat(i||Array.prototype.slice.call(r))};System.register(["./p-7961e095.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-0ae449ae.system.js","./p-7720b262.system.js","./p-907368ff.system.js","./p-01cd830b.system.js","./p-a1f6e944.system.js","./p-1c41de53.system.js","./p-6913b916.system.js","./p-16395ece.system.js","./p-5420740f.system.js","./p-278aed95.system.js","./p-4e642b63.system.js","./p-2da669b4.system.js","./p-eec38fbd.system.js","./p-b0471793.system.js","./p-2d3770e7.system.js","./p-df907af8.system.js","./p-2880433e.system.js"],(function(o){"use strict";var r,t,e,n,i,a,d,l,s,p,c,u,b,h,_,f,w,v,m,g,x,y,k,j,O,z,C,A,F,S,T;return{setters:[function(o){r=o.h;t=o.r;e=o.c;n=o.H;i=o.g},function(o){a=o._;d=o.a},function(o){l=o.B},function(o){s=o.L},function(o){p=o.s},function(o){c=o.i},function(o){u=o.d},function(o){b=o.n;h=o.b;_=o.l;f=o.r;w=o.e},function(o){v=o.b},function(o){m=o.a},function(o){g=o.l},function(o){x=o.F},function(o){y=o.b},function(o){k=o.D},function(o){j=o.i;O=o.a;z=o.b;C=o.c;A=o.d},function(o){F=o.a},function(o){S=o.d},function(o){T=o.L},function(){},function(){},function(){}],execute:function(){var E=function(){function o(){var o=this;this.handleAutoFill=function(r){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){switch(e.label){case 0:p(r);if(!this.isAutoFillAllowed())return[3,2];this.component.isAutoFilled=true;o=this.component.nativeEl.value;return[4,this.parseAutoFillValueWithOptions(o)];case 1:t=e.sent();if(t===undefined){this.component.isAutoFilled=false;return[2]}if(!m(t,this.component.rawValue)){this.component.valueUtil.updateRawValueBySelection(t,true)}e.label=2;case 2:return[2]}}))}))}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.isAutoFillAllowed=function(){return!this.component.multiple};o.prototype.parseAutoFillValueWithOptions=function(o){return __awaiter(this,void 0,void 0,(function(){var r,t,e,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.component.listEl.getOptions()];case 1:r=i.sent();t=undefined;for(e=0;e<r.length;e++){n=r[e];if(n.value===o||n.label===o){return[2,[n.value]]}}return[2,t]}}))}))};return o}();var L={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};var q=function(){function o(){var o=this;this.handlePointerDown=function(){o.component.isKeyboardMode=false};this.handleKeydown=function(r){o.component.isKeyboardMode=x.includes(r.key)}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.handleFocus=function(o){this.component.hasFocus=true;this.component.balFocus.emit(o)};o.prototype.handleBlur=function(o){var r=this;if(!this.component.isExpanded){this.component.hasFocus=false;b((function(){return r.component.balBlur.emit(o)}))}};o.prototype.handleClick=function(o){if(!this.component.valueUtil.isDisabled()){if(this.component.chips){var r=o.target;var t=r.closest("bal-close");if(t){return}}if(this.component.clearable){var r=o.target;var e=r.closest(".bal-dropdown__clear");if(e){this.component.valueUtil.updateRawValueBySelection([]);return}}this.component.popupUtil.toggleList()}};o.prototype.handleOutsideClick=function(o){var r=this;var t;if(this.component.isExpanded){if(!this.component.el.contains(o.target)){this.component.isExpanded=false;(t=this.component.listEl)===null||t===void 0?void 0:t.resetFocus();this.component.hasFocus=false;b((function(){return r.component.balBlur.emit(o)}))}}};return o}();var P=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.focusOptionByLabel=function(o,r){var t=this;if(r===void 0){r={}}this.component.labelToFocus=(this.component.labelToFocus+o).trim();if(this.component.labelToFocus.length>0){clearTimeout(this.keyHitTimeout);this.keyHitTimeout=setTimeout((function(){var o;(o=t.component.listEl)===null||o===void 0?void 0:o.focusByLabel(t.component.labelToFocus,r)}),100);clearTimeout(this.timeout);this.timeout=setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){this.component.labelToFocus="";return[2]}))}))}),1e3)}};return o}();var B=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o;this.component.initialValue=this.component.value};o.prototype.componentDidRender=function(){var o=this;if(this.component.selectEl){var r=this.component.selectEl.querySelectorAll("option");r.forEach((function(r){if(o.component.rawValue.includes(r.value)){r.selected=true}}))}};o.prototype.handle=function(o){var r=this;var t=o.target;if(t===null||t===void 0?void 0:t.contains(this.component.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){var o=r.component.valueUtil.parseValueString(r.component.initialValue);r.component.valueUtil.updateRawValueBySelection(o)}),0)}};return o}();var D=function(o){var t=o.name,e=o.httpFormSubmit,n=o.multiple,i=o.required,a=o.disabled,d=o.rawValue,s=o.refSelectEl;var p=l.block("dropdown");return e?r("select",{class:Object.assign({},p.element("root").element("select").class()),"aria-hidden":"true",name:t,multiple:n,required:i,disabled:a,tabindex:-1,ref:s},d.map((function(o){return r("option",{key:o,value:o,selected:true},o)}))):""};var I=function(o){var t=o.size,e=o.theme,n=o.icon,i=o.language,a=o.loading,d=o.clearable,s=o.invalid,p=o.filled,c=o.expanded,u=o.disabled;var b=l.block("dropdown");if(a){return r("bal-spinner",{class:Object.assign({},b.element("rear").class()),small:true,variation:"circle",color:"white"})}else if(d&&p&&!u){return r("button",{title:L[i].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},b.element("rear").class()),b.element("clear").class()),b.element("clear").modifier("invalid").class(s)),b.element("clear").modifier("theme-purple").class(e==="purple"))},r("bal-icon",{class:Object.assign({},b.element("rear").class()),name:e==="purple"?"close":"close-circle",size:t,color:e==="purple"?"primary":"grey"}))}else{return r("bal-icon",{class:Object.assign({},b.element("rear").class()),name:n,size:t,turn:c,color:u?"grey":s?"danger":"primary"})}};var H=function(o){var t=o.inputId,e=o.isExpanded,n=o.rawOptions,i=o.isDisabled,a=o.hasPropOptions,d=o.required,s=o.filter,p=o.multiple,c=o.contentHeight,u=o.refPanelEl,b=o.refListEl;var h=l.block("dropdown");return r("div",{id:"".concat(t,"-menu"),class:Object.assign(Object.assign({},h.element("list").class()),h.element("list").modifier("expanded").class(e)),ref:u},r("bal-option-list",{multiple:p,disabled:i,filter:s,required:d,contentHeight:c,ref:b},r("slot",null),a?n.map((function(o){return r("bal-option",{key:o.value,value:o.value,label:o.label,disabled:o.disabled,multiline:o.multiline,invalid:o.invalid,hidden:o.hidden,selected:o.selected,focused:o.focused},o.label)})):""))};var K=function(){function o(){this.updatePanelPosition=function(o,r,t){return function(){o.computePosition(r,t,{placement:"bottom-start",middleware:[o.flip(),o.shift()]}).then((function(o){var r=o.x,e=o.y;Object.assign(t.style,{left:"".concat(r,"px"),top:"".concat(e,"px")})}))}}}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.toggleList=function(){if(!this.component.valueUtil.isDisabled()){if(this.component.isExpanded){this.collapseList()}else{this.expandList()}}};o.prototype.expandList=function(){return __awaiter(this,void 0,void 0,(function(){var o,r;return __generator(this,(function(t){switch(t.label){case 0:if(!this.component.panelEl)return[3,2];return[4,y.load()];case 1:r=t.sent();this.component.panelCleanup=r.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(r,this.component.el,this.component.panelEl));t.label=2;case 2:this.component.isExpanded=true;return[4,(o=this.component.listEl)===null||o===void 0?void 0:o.focusSelected()];case 3:t.sent();return[2]}}))}))};o.prototype.collapseList=function(){var o;this.component.isExpanded=false;(o=this.component.listEl)===null||o===void 0?void 0:o.resetFocus();if(this.component.panelCleanup){this.component.panelCleanup()}};return o}();var R=function(){function o(){}o.prototype.connectedCallback=function(o){this.component=o};o.prototype.componentDidLoad=function(){var o=this;setTimeout((function(){return o.valueChanged(o.component.value,undefined)}),0)};o.prototype.isDisabled=function(){return this.component.disabled||this.component.readonly};o.prototype.isFilled=function(){return this.component.rawValue&&this.component.rawValue.length>0};o.prototype.valueChanged=function(o,r){var t=typeof o;var e=typeof r;if(t!==e){this.updateRawValueByValueProp(o)}if(t==="string"&&o!==r){this.updateRawValueByValueProp(o)}if(Array.isArray(o)&&Array.isArray(r)&&!m(o,r)){this.updateRawValueByValueProp(o)}};o.prototype.updateRawValueBySelection=function(o,r){if(o===void 0){o=[]}if(r===void 0){r=false}this.component.isAutoFilled=r;this.updateRawValue(o);if(this.component.multiple){this.component.balChange.emit(this.component.rawValue)}else{this.component.balChange.emit(this.component.rawValue[0])}};o.prototype.parseValueString=function(o){if(o===void 0){o=[]}var r=[];if(!g(o)&&o!==""){if(Array.isArray(o)){r=__spreadArray([],o.filter((function(o){return!g(o)})),true)}else{if(o.split("").includes(",")){r=__spreadArray([],o.split(",").filter((function(o){return o})).map((function(o){return o.trim()})),true)}else{r=[o]}}}return r};o.prototype.updateRawValueByValueProp=function(o){if(o===void 0){o=[]}var r=this.parseValueString(o);this.updateRawValue(r)};o.prototype.updateRawValue=function(){return __awaiter(this,arguments,void 0,(function(o){if(o===void 0){o=[]}return __generator(this,(function(r){switch(r.label){case 0:this.component.rawValue=o;if(!this.component.listEl)return[3,2];return[4,this.component.listEl.updateSelected(this.component.rawValue)];case 1:r.sent();r.label=2;case 2:return[4,this.updateInputContent()];case 3:r.sent();return[2]}}))}))};o.prototype.removeOption=function(o){var r=this.component.rawValue.filter((function(r){return r!==o.value}));this.updateRawValueBySelection(r)};o.prototype.updateInputContent=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){switch(r.label){case 0:return[4,h()];case 1:r.sent();if(!this.component.listEl)return[3,3];o=this.component;return[4,this.component.listEl.getSelectedOptions(this.component.rawValue)];case 2:o.choices=r.sent();this.component.inputLabel=this.component.choices.map((function(o){return o.label.trim()})).sort().join(",");r.label=3;case 3:return[2]}}))}))};return o}();var V=function(o){var t=o.inlineLabel,e=o.filled,n=o.chips,i=o.placeholder,a=o.choices,d=o.invalid,s=o.disabled,p=o.readonly,c=o.onRemoveChip;var u=l.block("dropdown");if(e){if(n){return r("div",{class:Object.assign({},u.element("root").element("content").element("chips").class())},a.map((function(o){return r("bal-tag",{key:o.value,"data-test":"bal-dropdown-chip",size:"small",invalid:d,disabled:s||p,closable:!(s||p),onBalCloseClick:function(){return c(o)}},o.label)})))}else{return(t&&"".concat(t,": "))+a.map((function(o){return o.label})).join(", ")}}else{return i}};var W=function(o){var t=o.inputId,e=o.httpFormSubmit,n=o.ariaForm,i=o.rawValue,a=o.autocomplete,d=o.required,s=o.disabled,p=o.readonly,c=o.placeholder,u=o.expanded,b=o.invalid,h=o.language,_=o.inputLabel,f=o.inheritedAttributes,w=o.refInputEl,v=o.onChange,m=o.onFocus,g=o.onBlur,x=o.onKeyDown;var y=l.block("dropdown");var k=function(){return r("input",Object.assign({id:n.controlId||"".concat(t,"-ctrl"),class:Object.assign({},y.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:a,value:i.join(","),required:d,disabled:s,readonly:p,placeholder:c,title:u?L[h].close:L[h].open,"aria-label":u?L[h].close:L[h].open,"aria-owns":"".concat(t,"-menu"),"aria-invalid":F(b),"aria-disabled":F(s||p),"aria-labelledby":n.labelId,"aria-describedby":n.messageId,"aria-haspopup":"listbox","data-native":true,"data-label":_,"data-value":i.join(","),ref:function(o){return w(o)},onChange:function(o){return v(o)},onFocus:function(o){return m(o)},onBlur:function(o){return g(o)},onKeyDown:function(o){return x(o)}},f))};if(e){return r(k,null)}return r("form",{novalidate:true},r(k,null))};var G=':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-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--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;width:100%}.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-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);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:1rem;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)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.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:none;visibility:hidden;opacity:0;width:100vw;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)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;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__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';var U=G;var Z=o("bal_dropdown",function(){function o(o){var r=this;t(this,o);this.balChange=e(this,"balChange",7);this.balFocus=e(this,"balFocus",7);this.balBlur=e(this,"balBlur",7);this.inputId="bal-dropdown-".concat(J++);this.inheritedAttributes={};this.initialValue=[];this.nativeOptions=[];this.valueUtil=new R;this.eventsUtil=new q;this.popupUtil=new K;this.optionUtil=new k;this.formSubmitUtil=new B;this.focusUtil=new P;this.autoFillUtil=new E;this.hasConnected=false;this.listenToOptionChange=function(o){r.optionUtil.listenToOptionChange(o)};this.listenOnClickOutside=function(o){r.eventsUtil.handleOutsideClick(o)};this.resetHandler=function(o){r.formSubmitUtil.handle(o)};this.handleAutoFill=function(o){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(r){this.log("(handleAutoFill)",o,this.nativeEl.value);this.autoFillUtil.handleAutoFill(o);return[2]}))}))};this.handleKeyDown=function(o){var t,e,n,i,a;if(o&&o.key){if(r.isExpanded){if(j(o)){p(o);(t=r.listEl)===null||t===void 0?void 0:t.focusNext()}else if(O(o)){p(o);(e=r.listEl)===null||e===void 0?void 0:e.focusPrevious()}else if(o.key==="Home"||o.key==="PageUp"){p(o);(n=r.listEl)===null||n===void 0?void 0:n.focusFirst()}else if(o.key==="End"||o.key==="PageDown"){p(o);(i=r.listEl)===null||i===void 0?void 0:i.focusLast()}else if(z(o)){p(o);(a=r.listEl)===null||a===void 0?void 0:a.selectByFocus()}else if(o.key==="Tab"||C(o)){r.popupUtil.collapseList()}else if(o.key.length===1){r.focusUtil.focusOptionByLabel(o.key)}}else{if(z(o)||A(o)){p(o);r.popupUtil.expandList()}else if(o.key.length===1){r.focusUtil.focusOptionByLabel(o.key,{select:true})}}}else{if(r.isExpanded){r.popupUtil.collapseList()}}};this.rawOptions=[];this.choices=[];this.rawValue=[];this.hasFocus=false;this.isExpanded=false;this.isAutoFilled=false;this.isKeyboardMode=false;this.inputLabel="";this.ariaForm=u;this.language=S.language;this.region=S.region;this.httpFormSubmit=S.httpFormSubmit;this.labelToFocus="";this.autocomplete="off";this.name=this.inputId;this.placeholder="";this.inlineLabel="";this.icon="caret-down";this.size="";this.theme="";this.disabled=false;this.readonly=false;this.multiple=false;this.chips=false;this.clearable=false;this.invalid=false;this.required=false;this.loading=false;this.filter="includes";this.contentHeight=262;this.inverted=false;this.options=[];this.value=[]}o.prototype.createLogger=function(o){this.log=o};o.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.optionUtil.optionChanged();return[2]}))}))};o.prototype.valueChanged=function(o,r){this.valueUtil.valueChanged(o,r)};o.prototype.connectedCallback=function(){if(!this.hasConnected){this.eventsUtil.connectedCallback(this);this.valueUtil.connectedCallback(this);this.popupUtil.connectedCallback(this);this.optionUtil.connectedCallback(this);this.formSubmitUtil.connectedCallback(this);this.focusUtil.connectedCallback(this);this.autoFillUtil.connectedCallback(this)}_(this.el,"balOptionChange",this.listenToOptionChange);if(v.hasDocument){_(document,"keydown",this.eventsUtil.handleKeydown);_(document,"touchstart",this.eventsUtil.handlePointerDown);_(document,"mousedown",this.eventsUtil.handlePointerDown);_(document,"click",this.listenOnClickOutside);_(document,"reset",this.resetHandler,{capture:true})}this.hasConnected=true};o.prototype.disconnectedCallback=function(){f(this.el,"balOptionChange",this.listenToOptionChange);if(v.hasDocument){f(document,"keydown",this.eventsUtil.handleKeydown);f(document,"touchstart",this.eventsUtil.handlePointerDown);f(document,"mousedown",this.eventsUtil.handlePointerDown);f(document,"click",this.listenOnClickOutside);f(document,"reset",this.resetHandler,{capture:true})}};o.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.inheritedAttributes=c(this.el,["tabindex"]);return[4,this.optionUtil.componentWillRender()];case 1:o.sent();return[2]}}))}))};o.prototype.componentDidRender=function(){this.formSubmitUtil.componentDidRender()};o.prototype.componentDidLoad=function(){this.valueUtil.componentDidLoad()};o.prototype.configChanged=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.language=o.language;this.region=o.region;this.httpFormSubmit=o.httpFormSubmit;return[2]}))}))};o.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(this.nativeEl&&!this.valueUtil.isDisabled()))return[3,2];return[4,w()];case 1:o.sent();this.nativeEl.focus();o.label=2;case 2:return[2]}}))}))};o.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,this.rawValue]}))}))};o.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.valueUtil.updateRawValueBySelection([]);return[2]}))}))};o.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.expandList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.collapseList()];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};o.prototype.select=function(o){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.valueUtil.parseValueString(o);this.valueUtil.updateRawValueBySelection(r);return[2]}))}))};o.prototype.setAriaForm=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.ariaForm=Object.assign({},o);return[2]}))}))};o.prototype.render=function(){var o=this;var t=l.block("dropdown");var e=this.valueUtil.isFilled();var i=this.size!=="";var a="size-".concat(this.size);var d=this.theme!=="";var s="theme-".concat(this.theme);var p=this.theme==="purple"?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return r(n,{key:"1b075647fbe8923e1d12974c621e391e6557cc48",class:Object.assign({},t.class()),tabindex:"-1",id:"".concat(this.inputId)},r("div",{key:"a71a4bd3a2c803b6890f89a78fdfb611fbde8f5a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").class()),t.element("root").modifier("focused").class(p)),t.element("root").modifier("invalid").class(this.invalid)),t.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").modifier("autofill").class(this.isAutoFilled)),t.element("root").modifier(a).class(i)),t.element("root").modifier(s).class(d)),t.element("root").modifier(s+"-filled").class(e&&d)),t.element("root").modifier(s+"-expanded").class(this.isExpanded&&d)),"data-test":"bal-dropdown-trigger",onClick:function(r){return o.eventsUtil.handleClick(r)}},r("span",{key:"a65ae5081e4c747a9c16fe8b499c67b23763d806",class:Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").element("content").class()),t.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),t.element("root").element("content").modifier(a).class(i))},r(V,{key:"174ce02d638806795cccbc8dc9990d07f4cfe630",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,onRemoveChip:function(r){return o.valueUtil.removeOption(r)}})),r(W,{key:"e7b31122122f29e7f9dd52b4caeb797ae5584c38",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:function(r){return o.nativeEl=r},onChange:function(r){return o.handleAutoFill(r)},onFocus:function(r){return o.eventsUtil.handleFocus(r)},onBlur:function(r){return o.eventsUtil.handleBlur(r)},onKeyDown:function(r){return o.handleKeyDown(r)}}),r(D,{key:"86c3712230c6610e8b96280f91d5b6069d82edbf",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:function(r){return o.selectEl=r}}),r(I,{key:"36fdd2af649f0ccc5f7d30df90c6a1cce14eda2e",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:e,disabled:this.valueUtil.isDisabled()})),r(H,{key:"ba4a9e84148ea1431033da83477e7563a61e0826",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:function(r){return o.panelEl=r},refListEl:function(r){return o.listEl=r}},r("slot",{key:"046f4677bcf864dcd9f6d8e5e55ff95276cd9166"})))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return o}());a([s("bal-dropdown"),d("design:type",Function),d("design:paramtypes",[Function]),d("design:returntype",void 0)],Z.prototype,"createLogger",null);a([T(),d("design:type",Function),d("design:paramtypes",[Object]),d("design:returntype",Promise)],Z.prototype,"configChanged",null);var J=0;Z.style=U}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c,h as o,H as a,g as b}from"./p-2ccbe55a.js";import{_ as l,a as t}from"./p-43c9f5e9.js";import{a as r}from"./p-8f2e9a7f.js";import{i}from"./p-063808d7.js";import{B as h}from"./p-ae86d0a0.js";import{F as d}from"./p-d4e5093b.js";import{d as n}from"./p-5eb3fbb9.js";import{s,c as x,d as k}from"./p-79f6f58b.js";import{j as v,v as u}from"./p-a255c9b3.js";import{L as p}from"./p-b77e3348.js";import{L as m}from"./p-f1052416.js";import{d as g}from"./p-dc98854c.js";import{a as _}from"./p-00b37ea2.js";import{L as f}from"./p-afd41db0.js";import{L as y}from"./p-83ac9b11.js";import"./p-a65354df.js";import"./p-a7be57b6.js";import"./p-acf222fd.js";import"./p-9a3d9e17.js";import"./p-166d571e.js";import"./p-4573c419.js";const w=class{constructor(o){e(this,o),this.balFocus=c(this,"balFocus",7),this.balBlur=c(this,"balBlur",7),this.balChange=c(this,"balChange",7),this.inputId="bal-cb-"+j++,this.inheritedAttributes={},this.keyboardMode=!0,this.outerElementState={hovered:!1,pressed:!1},this.innerElementState={hovered:!1,pressed:!1},this.initialValue=!1,this.setChecked=e=>{this.checked=e,this.balChange.emit(this.checked)},this.toggleChecked=e=>{e.preventDefault(),this.setFocus(),this.setChecked(!this.checked)},this.onClick=e=>{if(this.disabled)return;const c=e.target;c&&c.href||(this.wasFocused&&(this.focused=!0),this.toggleChecked(e))},this.onFocus=e=>{if(this.disabled||this.readonly)return this.focused=!1,s(e);this.balFocus.emit(e),this.keyboardMode&&(this.focused=!0,this.wasFocused=!0)},this.onBlur=e=>{if(this.disabled||this.readonly)return s(e);this.balBlur.emit(e),this.focused=!1},this.onPointerDown=()=>this.keyboardMode=!1,this.onKeydown=e=>{g(e)||(this.wasFocused=!1),this.keyboardMode=d.includes(e.key)},this.hasLabel=!0,this.focused=!1,this.buttonTabindex=void 0,this.ariaForm=n,this.wasFocused=!1,this.mergedElementState={hovered:!1,pressed:!1},this.name=this.inputId,this.label="",this.labelHidden=!1,this.flat=!1,this.interface="checkbox",this.value="on",this.checked=!1,this.disabled=!1,this.readonly=!1,this.required=!1,this.autoInvalidOff=!1,this.nonSubmit=!1,this.invalid=!1,this.hovered=!1,this.pressed=!1,this.color=void 0,this.colSize=1,this.colSizeTablet=1,this.colSizeMobile=1}createLogger(e){this.log=e}hoveredChanged(){this.innerElementState={hovered:this.hovered,pressed:this.pressed},this.mergeElementState()}pressedChanged(){this.innerElementState={hovered:this.hovered,pressed:this.pressed},this.mergeElementState()}connectedCallback(){this.hoveredChanged(),this.group&&(this.updateState(),this.group.addEventListener("balChange",(()=>this.updateState()))),this.initialValue=this.checked,this.el.addEventListener("keydown",this.onKeydown),this.el.addEventListener("touchstart",this.onPointerDown),this.el.addEventListener("mousedown",this.onPointerDown)}componentWillLoad(){this.inheritedAttributes=i(this.el,["aria-label","tabindex","title"])}componentWillRender(){this.interactionChildElements.forEach((e=>{e.disabled=this.disabled||this.readonly,e.invalid=this.invalid,e.checked=this.checked}))}disconnectedCallback(){this.group&&this.group.removeEventListener("balChange",(()=>this.updateState())),this.el.removeEventListener("keydown",this.onKeydown),this.el.removeEventListener("touchstart",this.onPointerDown),this.el.removeEventListener("mousedown",this.onPointerDown)}listenOnClick(e){(this.disabled||this.readonly)&&e.target&&(e.target===this.el||v(this.el,e.target))&&s(e)}resetHandler(e){const c=e.target;(null==c?void 0:c.contains(this.el))&&(this.checked=this.initialValue)}elementStateListener(e){this.outerElementState=e,this.mergeElementState()}async setFocus(){x(this)}async setBlur(){k(this)}getInputElement(){return Promise.resolve(this.nativeInput)}async getOption(){return this.option}async updateState(){if(this.group&&this.group.control&&Array.isArray(this.group.value)){const e=this.group.value.includes(this.value);e!==this.checked&&(this.checked=e)}}async setAriaForm(e){this.ariaForm=Object.assign({},e)}get group(){return this.el.closest("bal-checkbox-group")}get interactionChildElements(){return Array.from(this.el.querySelectorAll("bal-check, bal-switch, bal-icon"))}get option(){return{name:this.name,value:this.value,checked:this.checked,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invalid:this.invalid}}mergeElementState(){this.mergedElementState={hovered:this.outerElementState.hovered||this.innerElementState.hovered,pressed:this.outerElementState.pressed||this.innerElementState.pressed},this.interactionChildElements.forEach((e=>{e.hovered=this.mergedElementState.hovered,e.pressed=this.mergedElementState.pressed}))}render(){const e=h.block("checkbox"),c=e.element("input"),b=e.element("label"),l=b.element("text"),t=b.element("icon"),i=this.focused&&-1!==this.buttonTabindex,d=this.inheritedAttributes;void 0!==this.buttonTabindex&&(d.tabIndex=this.buttonTabindex);const n=!this.nonSubmit,s=this.ariaForm.controlId||this.inputId,x=this.ariaForm.labelId||null,k=n?"label":"span",v="switch"===this.interface?"bal-switch":"bal-check";return o(a,{key:"eaa9cf2ba9de2a203b98515939ff117c89dc16cf","aria-checked":`${this.checked}`,"aria-disabled":r(this.disabled),"aria-invalid":!0===this.invalid?"true":"false","aria-hidden":r(this.disabled||this.nonSubmit),"aria-focused":i?"true":null,"aria-labelledby":x,"aria-describedby":this.ariaForm.messageId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":i},e.class()),e.modifier("checkbox").class()),e.modifier("button").class("button"===this.interface)),e.modifier("switch").class("switch"===this.interface)),e.modifier("tile").class("tile"===this.interface)),e.modifier(`tile-color-${this.color}`).class("tile"===this.interface&&!!this.color)),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.mergedElementState.hovered)),e.modifier("pressed").class(this.mergedElementState.pressed)),e.modifier(`column-${this.colSize}`).class("tile"===this.interface&&this.colSize>1)),e.modifier(`column-tablet-${this.colSizeTablet}`).class("tile"===this.interface&&this.colSizeTablet>1)),e.modifier(`column-mobile-${this.colSizeMobile}`).class("tile"===this.interface&&this.colSizeMobile>1)),onClick:this.onClick},o(k,{key:"6fd849f4768bc7155eb5db297713bc82aeab6dfe",class:Object.assign({},b.class()),"data-testid":"bal-checkbox-label"},n?o("input",Object.assign({id:s,type:"checkbox","data-testid":"bal-checkbox-input",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,class:Object.assign({},c.class()),"aria-hidden":r(this.nonSubmit),"aria-invalid":!0===this.invalid?"true":"false","aria-describedby":this.ariaForm.messageId,onChange:e=>this.toggleChecked(e),onFocus:e=>this.onFocus(e),onBlur:e=>this.onBlur(e),ref:e=>this.nativeInput=e},d)):"","tile"!==this.interface?o("div",{class:Object.assign({},t.class())},o(v,{checked:this.checked,disabled:this.disabled||this.readonly,invalid:this.invalid,inverted:"button"===this.interface&&this.checked,hovered:this.mergedElementState.hovered,pressed:this.mergedElementState.pressed})):"",o("div",{key:"ca1ec209d9211082db1d0905e599eea5e6803244",class:Object.assign(Object.assign({},l.class()),l.modifier("hidden").class(this.labelHidden))},o("slot",{key:"a2a3c8124d7d47bf300b229fe01e62fa198961c0"}))))}get el(){return b(this)}static get watchers(){return{hovered:["hoveredChanged"],pressed:["pressedChanged"]}}};l([p("bal-checkbox"),t("design:type",Function),t("design:paramtypes",[Function]),t("design:returntype",void 0)],w.prototype,"createLogger",null),l([m(),t("design:type",Function),t("design:paramtypes",[Object]),t("design:returntype",void 0)],w.prototype,"elementStateListener",null);let j=0;w.style="@media (hover: hover)and (pointer: fine){.bal-checkbox.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-checkbox-symbol-size:1.5rem;--bal-checkbox-symbol-border-width:2px;--bal-checkbox-symbol-background:transparent;--bal-checkbox-label-min-height:1.5rem;--bal-checkbox-button-background-hover:var(--bal-color-grey-2);--bal-checkbox-button-background-active:var(--bal-color-grey-2);--bal-checkbox-button-background-checked:var(--bal-color-primary);--bal-checkbox-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-background-checked-active:var(--bal-color-primary-6);--bal-checkbox-button-background-invalid:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-checkbox-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-background:transparent;--bal-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-checkbox-button-border-color:var(--bal-color-primary);--bal-checkbox-button-border-color-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-border-color-active:var(--bal-color-primary-6);--bal-checkbox-button-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-tile-background:transparent;--bal-checkbox-tile-background-hover:var(--bal-color-grey-1);--bal-checkbox-tile-background-disabled:var(--bal-color-grey-1);--bal-checkbox-tile-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-tile-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-tile-background-checked-green:var(--bal-color-green-1);--bal-checkbox-tile-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-tile-background-checked-red:var(--bal-color-red-1);--bal-checkbox-tile-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-tile-border-style:var(--bal-form-field-control-border-style);--bal-checkbox-tile-border-radius:var(--bal-form-field-control-radius);--bal-checkbox-tile-border-width:var(--bal-form-field-control-border-width);--bal-checkbox-tile-padding:var(--bal-text-size-medium);--bal-checkbox-tile-border-color:var(--bal-color-border);--bal-checkbox-tile-border-color-hover:var(--bal-color-border-primary-hovered);--bal-checkbox-tile-border-color-active:var(--bal-color-border-primary-pressed);--bal-checkbox-tile-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-checkbox-tile-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-checkbox-tile-border-color-checked:var(--bal-color-border-primary);--bal-checkbox-tile-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-tile-border-color-disabled:var(--bal-color-border-grey-dark)}.bal-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:var(--bal-checkbox-symbol-size);border-radius:var(--bal-radius-normal);cursor:pointer}.bal-checkbox .bal-checkbox__label{cursor:pointer}.bal-checkbox--invisible{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-checkbox.bal-checkbox--flat{min-height:var(--bal-checkbox-symbol-size)}.bal-checkbox:not(.bal-checkbox--flat){min-height:3rem}.bal-checkbox--invalid{color:var(--bal-form-field-label-danger-color)}.bal-checkbox--disabled,.bal-checkbox--disabled .bal-checkbox__label{color:var(--bal-form-field-label-disabled-color);cursor:default}.bal-checkbox__input{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;width:100%;height:100%}.bal-checkbox__label{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;gap:.5rem;-ms-flex-direction:row;flex-direction:row}.bal-checkbox__label__text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:left;contain:layout style;font-family:var(--bal-font-family-text);padding-top:.25rem;padding-bottom:.25rem;width:100%}.bal-checkbox__label__text--hidden{display:none}.bal-checkbox__label__icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}@media (hover: hover)and (pointer: fine){.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__icon{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__icon{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__icon{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__icon{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-x-small);-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-checkbox-button-border-color)}.bal-checkbox--button.bal-checkbox--checked{background:var(--bal-checkbox-button-background-checked);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--invalid{border-color:var(--bal-color-border-danger);color:var(--bal-color-text-danger-hovered);background:var(--bal-color-danger-1)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked{color:var(--bal-color-white);background:var(--bal-color-border-danger)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled{border-color:var(--bal-color-grey-4);background:var(--bal-color-grey-2)}.bal-checkbox--button.bal-checkbox--disabled .bal-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked{background:var(--bal-color-grey-4);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-border-primary-hovered);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-border-primary-pressed);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover{background:var(--bal-color-border-danger-hovered);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active{background:var(--bal-color-border-danger-pressed);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-white)}.bal-checkbox--tile{display:block;-ms-flex:0 0 100%;flex:0 0 100%;background:var(--bal-checkbox-tile-background);border-style:var(--bal-checkbox-tile-border-style);border-radius:var(--bal-checkbox-tile-border-radius);border-width:var(--bal-checkbox-tile-border-width);border-color:var(--bal-checkbox-tile-border-color);padding:var(--bal-checkbox-tile-padding)}.bal-checkbox--tile .bal-checkbox__label{height:100%;-ms-flex-align:stretch;align-items:stretch}.bal-checkbox--tile.bal-checkbox--checked{border-color:var(--bal-checkbox-tile-border-color-checked)}.bal-checkbox--tile.bal-checkbox--invalid{border-color:var(--bal-checkbox-tile-border-color-invalid)}.bal-checkbox--tile.bal-checkbox--disabled{background:var(--bal-checkbox-tile-background-disabled);border-color:var(--bal-checkbox-tile-border-color-disabled);cursor:default}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-hover)}}.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-active)}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-checkbox-tile-background-invalid-hover);border-color:var(--bal-checkbox-tile-border-color-invalid-hover)}}.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-checkbox-tile-background-invalid-active);border-color:var(--bal-checkbox-tile-border-color-invalid-active)}.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-green)}.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-red)}.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-purple)}.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-yellow)}@media screen and (min-width: 769px),print{.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (max-width: 768px){.bal-checkbox--column-mobile-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-mobile-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-mobile-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 769px),print{.bal-checkbox--column-tablet-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-tablet-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-tablet-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 1024px){.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}";const O=class{constructor(o){e(this,o),this.balChange=c(this,"balChange",7),this.balFocus=c(this,"balFocus",7),this.balBlur=c(this,"balBlur",7),this.inputId="bal-cg-"+C++,this.inheritedAttributes={},this.hasFocus=!1,this.mutationObserverActive=!0,this.onClick=e=>{if(!this.control)return;if(e.target.href)return;const c=e.target&&e.target.closest("bal-checkbox");if(c&&(c.disabled||c.readonly))return e.stopPropagation();this.updateValues()},this.onOptionChange=async()=>{this.sync()},this.ariaForm=n,this.options=void 0,this.interface=void 0,this.control=!1,this.name=this.inputId,this.vertical=!1,this.verticalOnMobile=!1,this.expanded=!1,this.invalid=void 0,this.disabled=void 0,this.readonly=void 0,this.value=[],this.columns=1,this.columnsTablet=1,this.columnsMobile=1,this.autoInvalidOff=!1}createLogger(e){this.log=e}async optionChanged(){this.control&&(this.onOptionChange(),this.mutationObserverActive=void 0===this.options)}invalidChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.invalid=e}))}disabledChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.disabled=e}))}readonlyChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.readonly=e}))}valueChanged(e,c){this.control&&_(this.value,c)||this.onOptionChange()}columnsChanged(e){this.getCheckboxes().forEach((c=>c.colSize=e))}columnsTabletChanged(e){this.getCheckboxes().forEach((c=>c.colSizeTablet=e))}columnsMobileChanged(e){this.getCheckboxes().forEach((c=>c.colSizeMobile=e))}connectedCallback(){this.control&&(this.mutationObserverActive=void 0===this.options,this.valueChanged(this.value,[]))}componentWillLoad(){this.control&&(this.inheritedAttributes=i(this.el,["aria-label","tabindex","title"]),this.disabledChanged(this.disabled),this.invalidChanged(this.invalid),this.readonlyChanged(this.readonly)),this.columnsChanged(this.columns),this.columnsTabletChanged(this.columnsTablet),this.columnsMobileChanged(this.columnsMobile),this.onOptionChange()}focusInListener(e){this.balFocus.emit(e)}focusOutListener(e){this.balBlur.emit(e)}mutationListener(){this.control&&(this.disabledChanged(this.disabled),this.readonlyChanged(this.readonly)),this.columnsChanged(this.columns),this.columnsTabletChanged(this.columnsTablet),this.columnsMobileChanged(this.columnsMobile),this.onOptionChange()}listenOnCheckboxChange(e){this.control&&v(this.el,e.target)&&(s(e),this.updateValues())}resetHandler(e){const c=e.target;(null==c?void 0:c.contains(this.el))&&(this.control&&(this.value=[]),this.onOptionChange())}checkboxFocusListener(e){const{target:c}=e;c&&v(this.el,c)&&u(c,"bal-checkbox")&&s(e)}checkboxBlurListener(e){const{target:c}=e;c&&v(this.el,c)&&u(c,"bal-checkbox")&&s(e)}async setValue(e){this.control&&(this.value=e)}async getOptionByValue(e){const c=this.options;if(c)return c.find((c=>c.value===e))}async setAriaForm(e){this.ariaForm=Object.assign({},e)}sync(){if(this.control){const e=e=>{for(let c=0;c<this.value.length;c++){const o=this.value[c];if(void 0!==o&&o.toString()===e.value.toString())return!0}return!1};this.getCheckboxes().forEach((c=>{c.checked=e(c)}))}this.getCheckboxes().forEach((e=>{this.interface&&(e.interface=this.interface)}))}getCheckboxes(){return Array.from(this.el.querySelectorAll("bal-checkbox"))}updateValues(){const e=[];this.getCheckboxes().forEach((c=>{c.checked&&e.push(c.value)})),_(this.value,e)||(this.value=[...e],this.balChange.emit(this.value))}render(){const e=h.block("checkbox-group"),c=e.element("inner"),b=(this.options||[]).map((e=>"function"==typeof e.html?Object.assign(Object.assign({},e),{html:e.html()}):e));return o(a,Object.assign({class:Object.assign({},e.class()),role:"group","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":r(this.disabled),"aria-invalid":r(this.invalid),onClick:this.onClick},this.inheritedAttributes),o("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("vertical-mobile").class(this.verticalOnMobile)),c.modifier("vertical").class(this.vertical)),c.modifier("expanded").class(this.expanded)),c.modifier("button").class("button"===this.interface))},o("slot",null),b.map((e=>o("bal-checkbox",{key:e.value,name:e.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})))))}get el(){return b(this)}static get watchers(){return{options:["optionChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],value:["valueChanged"],columns:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}}};l([p("bal-checkbox-group"),t("design:type",Function),t("design:paramtypes",[Function]),t("design:returntype",void 0)],O.prototype,"createLogger",null),l([f(),t("design:type",Function),t("design:paramtypes",[FocusEvent]),t("design:returntype",void 0)],O.prototype,"focusInListener",null),l([f(),t("design:type",Function),t("design:paramtypes",[FocusEvent]),t("design:returntype",void 0)],O.prototype,"focusOutListener",null),l([y({tags:["bal-checkbox-group","bal-checkbox"],attributes:!1,characterData:!1}),t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],O.prototype,"mutationListener",null);let C=0;O.style=".bal-checkbox-group{display:inline-block;position:relative;width:100%}.bal-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-checkbox-group__inner--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--button{-ms-flex-direction:row;flex-direction:row}}.bal-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-checkbox-group__inner--expanded .bal-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-checkbox-group__inner--expanded .bal-checkbox{width:100%}}.bal-checkbox-group__inner--button.bal-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}";export{w as bal_checkbox,O as bal_checkbox_group}
|
|
1
|
+
import{r as e,c,h as o,H as a,g as b}from"./p-2ccbe55a.js";import{_ as l,a as t}from"./p-43c9f5e9.js";import{a as r}from"./p-8f2e9a7f.js";import{i}from"./p-063808d7.js";import{B as h}from"./p-ae86d0a0.js";import{F as d}from"./p-d4e5093b.js";import{d as n}from"./p-5eb3fbb9.js";import{s,c as x,d as k}from"./p-f19930db.js";import{i as v,v as u}from"./p-b0cf4731.js";import{L as p}from"./p-b77e3348.js";import{L as m}from"./p-15f86fd2.js";import{d as g}from"./p-dc98854c.js";import{a as _}from"./p-00b37ea2.js";import{L as f}from"./p-77c7a0b0.js";import{L as y}from"./p-bb3d79e0.js";import"./p-a65354df.js";import"./p-3d3aa421.js";import"./p-acf222fd.js";import"./p-9a3d9e17.js";import"./p-166d571e.js";import"./p-4573c419.js";const w=class{constructor(o){e(this,o),this.balFocus=c(this,"balFocus",7),this.balBlur=c(this,"balBlur",7),this.balChange=c(this,"balChange",7),this.inputId="bal-cb-"+j++,this.inheritedAttributes={},this.keyboardMode=!0,this.outerElementState={hovered:!1,pressed:!1},this.innerElementState={hovered:!1,pressed:!1},this.initialValue=!1,this.setChecked=e=>{this.checked=e,this.balChange.emit(this.checked)},this.toggleChecked=e=>{e.preventDefault(),this.setFocus(),this.setChecked(!this.checked)},this.onClick=e=>{if(this.disabled)return;const c=e.target;c&&c.href||(this.wasFocused&&(this.focused=!0),this.toggleChecked(e))},this.onFocus=e=>{if(this.disabled||this.readonly)return this.focused=!1,s(e);this.balFocus.emit(e),this.keyboardMode&&(this.focused=!0,this.wasFocused=!0)},this.onBlur=e=>{if(this.disabled||this.readonly)return s(e);this.balBlur.emit(e),this.focused=!1},this.onPointerDown=()=>this.keyboardMode=!1,this.onKeydown=e=>{g(e)||(this.wasFocused=!1),this.keyboardMode=d.includes(e.key)},this.hasLabel=!0,this.focused=!1,this.buttonTabindex=void 0,this.ariaForm=n,this.wasFocused=!1,this.mergedElementState={hovered:!1,pressed:!1},this.name=this.inputId,this.label="",this.labelHidden=!1,this.flat=!1,this.interface="checkbox",this.value="on",this.checked=!1,this.disabled=!1,this.readonly=!1,this.required=!1,this.autoInvalidOff=!1,this.nonSubmit=!1,this.invalid=!1,this.hovered=!1,this.pressed=!1,this.color=void 0,this.colSize=1,this.colSizeTablet=1,this.colSizeMobile=1}createLogger(e){this.log=e}hoveredChanged(){this.innerElementState={hovered:this.hovered,pressed:this.pressed},this.mergeElementState()}pressedChanged(){this.innerElementState={hovered:this.hovered,pressed:this.pressed},this.mergeElementState()}connectedCallback(){this.hoveredChanged(),this.group&&(this.updateState(),this.group.addEventListener("balChange",(()=>this.updateState()))),this.initialValue=this.checked,this.el.addEventListener("keydown",this.onKeydown),this.el.addEventListener("touchstart",this.onPointerDown),this.el.addEventListener("mousedown",this.onPointerDown)}componentWillLoad(){this.inheritedAttributes=i(this.el,["aria-label","tabindex","title"])}componentWillRender(){this.interactionChildElements.forEach((e=>{e.disabled=this.disabled||this.readonly,e.invalid=this.invalid,e.checked=this.checked}))}disconnectedCallback(){this.group&&this.group.removeEventListener("balChange",(()=>this.updateState())),this.el.removeEventListener("keydown",this.onKeydown),this.el.removeEventListener("touchstart",this.onPointerDown),this.el.removeEventListener("mousedown",this.onPointerDown)}listenOnClick(e){(this.disabled||this.readonly)&&e.target&&(e.target===this.el||v(this.el,e.target))&&s(e)}resetHandler(e){const c=e.target;(null==c?void 0:c.contains(this.el))&&(this.checked=this.initialValue)}elementStateListener(e){this.outerElementState=e,this.mergeElementState()}async setFocus(){x(this)}async setBlur(){k(this)}getInputElement(){return Promise.resolve(this.nativeInput)}async getOption(){return this.option}async updateState(){if(this.group&&this.group.control&&Array.isArray(this.group.value)){const e=this.group.value.includes(this.value);e!==this.checked&&(this.checked=e)}}async setAriaForm(e){this.ariaForm=Object.assign({},e)}get group(){return this.el.closest("bal-checkbox-group")}get interactionChildElements(){return Array.from(this.el.querySelectorAll("bal-check, bal-switch, bal-icon"))}get option(){return{name:this.name,value:this.value,checked:this.checked,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invalid:this.invalid}}mergeElementState(){this.mergedElementState={hovered:this.outerElementState.hovered||this.innerElementState.hovered,pressed:this.outerElementState.pressed||this.innerElementState.pressed},this.interactionChildElements.forEach((e=>{e.hovered=this.mergedElementState.hovered,e.pressed=this.mergedElementState.pressed}))}render(){const e=h.block("checkbox"),c=e.element("input"),b=e.element("label"),l=b.element("text"),t=b.element("icon"),i=this.focused&&-1!==this.buttonTabindex,d=this.inheritedAttributes;void 0!==this.buttonTabindex&&(d.tabIndex=this.buttonTabindex);const n=!this.nonSubmit,s=this.ariaForm.controlId||this.inputId,x=this.ariaForm.labelId||null,k=n?"label":"span",v="switch"===this.interface?"bal-switch":"bal-check";return o(a,{key:"eaa9cf2ba9de2a203b98515939ff117c89dc16cf","aria-checked":`${this.checked}`,"aria-disabled":r(this.disabled),"aria-invalid":!0===this.invalid?"true":"false","aria-hidden":r(this.disabled||this.nonSubmit),"aria-focused":i?"true":null,"aria-labelledby":x,"aria-describedby":this.ariaForm.messageId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":i},e.class()),e.modifier("checkbox").class()),e.modifier("button").class("button"===this.interface)),e.modifier("switch").class("switch"===this.interface)),e.modifier("tile").class("tile"===this.interface)),e.modifier(`tile-color-${this.color}`).class("tile"===this.interface&&!!this.color)),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.mergedElementState.hovered)),e.modifier("pressed").class(this.mergedElementState.pressed)),e.modifier(`column-${this.colSize}`).class("tile"===this.interface&&this.colSize>1)),e.modifier(`column-tablet-${this.colSizeTablet}`).class("tile"===this.interface&&this.colSizeTablet>1)),e.modifier(`column-mobile-${this.colSizeMobile}`).class("tile"===this.interface&&this.colSizeMobile>1)),onClick:this.onClick},o(k,{key:"6fd849f4768bc7155eb5db297713bc82aeab6dfe",class:Object.assign({},b.class()),"data-testid":"bal-checkbox-label"},n?o("input",Object.assign({id:s,type:"checkbox","data-testid":"bal-checkbox-input",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,class:Object.assign({},c.class()),"aria-hidden":r(this.nonSubmit),"aria-invalid":!0===this.invalid?"true":"false","aria-describedby":this.ariaForm.messageId,onChange:e=>this.toggleChecked(e),onFocus:e=>this.onFocus(e),onBlur:e=>this.onBlur(e),ref:e=>this.nativeInput=e},d)):"","tile"!==this.interface?o("div",{class:Object.assign({},t.class())},o(v,{checked:this.checked,disabled:this.disabled||this.readonly,invalid:this.invalid,inverted:"button"===this.interface&&this.checked,hovered:this.mergedElementState.hovered,pressed:this.mergedElementState.pressed})):"",o("div",{key:"ca1ec209d9211082db1d0905e599eea5e6803244",class:Object.assign(Object.assign({},l.class()),l.modifier("hidden").class(this.labelHidden))},o("slot",{key:"a2a3c8124d7d47bf300b229fe01e62fa198961c0"}))))}get el(){return b(this)}static get watchers(){return{hovered:["hoveredChanged"],pressed:["pressedChanged"]}}};l([p("bal-checkbox"),t("design:type",Function),t("design:paramtypes",[Function]),t("design:returntype",void 0)],w.prototype,"createLogger",null),l([m(),t("design:type",Function),t("design:paramtypes",[Object]),t("design:returntype",void 0)],w.prototype,"elementStateListener",null);let j=0;w.style="@media (hover: hover)and (pointer: fine){.bal-checkbox.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-checkbox-symbol-size:1.5rem;--bal-checkbox-symbol-border-width:2px;--bal-checkbox-symbol-background:transparent;--bal-checkbox-label-min-height:1.5rem;--bal-checkbox-button-background-hover:var(--bal-color-grey-2);--bal-checkbox-button-background-active:var(--bal-color-grey-2);--bal-checkbox-button-background-checked:var(--bal-color-primary);--bal-checkbox-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-background-checked-active:var(--bal-color-primary-6);--bal-checkbox-button-background-invalid:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-checkbox-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-background:transparent;--bal-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-checkbox-button-border-color:var(--bal-color-primary);--bal-checkbox-button-border-color-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-border-color-active:var(--bal-color-primary-6);--bal-checkbox-button-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-tile-background:transparent;--bal-checkbox-tile-background-hover:var(--bal-color-grey-1);--bal-checkbox-tile-background-disabled:var(--bal-color-grey-1);--bal-checkbox-tile-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-tile-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-tile-background-checked-green:var(--bal-color-green-1);--bal-checkbox-tile-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-tile-background-checked-red:var(--bal-color-red-1);--bal-checkbox-tile-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-tile-border-style:var(--bal-form-field-control-border-style);--bal-checkbox-tile-border-radius:var(--bal-form-field-control-radius);--bal-checkbox-tile-border-width:var(--bal-form-field-control-border-width);--bal-checkbox-tile-padding:var(--bal-text-size-medium);--bal-checkbox-tile-border-color:var(--bal-color-border);--bal-checkbox-tile-border-color-hover:var(--bal-color-border-primary-hovered);--bal-checkbox-tile-border-color-active:var(--bal-color-border-primary-pressed);--bal-checkbox-tile-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-checkbox-tile-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-checkbox-tile-border-color-checked:var(--bal-color-border-primary);--bal-checkbox-tile-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-tile-border-color-disabled:var(--bal-color-border-grey-dark)}.bal-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:var(--bal-checkbox-symbol-size);border-radius:var(--bal-radius-normal);cursor:pointer}.bal-checkbox .bal-checkbox__label{cursor:pointer}.bal-checkbox--invisible{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-checkbox.bal-checkbox--flat{min-height:var(--bal-checkbox-symbol-size)}.bal-checkbox:not(.bal-checkbox--flat){min-height:3rem}.bal-checkbox--invalid{color:var(--bal-form-field-label-danger-color)}.bal-checkbox--disabled,.bal-checkbox--disabled .bal-checkbox__label{color:var(--bal-form-field-label-disabled-color);cursor:default}.bal-checkbox__input{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;width:100%;height:100%}.bal-checkbox__label{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;gap:.5rem;-ms-flex-direction:row;flex-direction:row}.bal-checkbox__label__text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:left;contain:layout style;font-family:var(--bal-font-family-text);padding-top:.25rem;padding-bottom:.25rem;width:100%}.bal-checkbox__label__text--hidden{display:none}.bal-checkbox__label__icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}@media (hover: hover)and (pointer: fine){.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__icon{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__icon{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__icon{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__icon{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-x-small);-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-checkbox-button-border-color)}.bal-checkbox--button.bal-checkbox--checked{background:var(--bal-checkbox-button-background-checked);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--invalid{border-color:var(--bal-color-border-danger);color:var(--bal-color-text-danger-hovered);background:var(--bal-color-danger-1)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked{color:var(--bal-color-white);background:var(--bal-color-border-danger)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled{border-color:var(--bal-color-grey-4);background:var(--bal-color-grey-2)}.bal-checkbox--button.bal-checkbox--disabled .bal-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked{background:var(--bal-color-grey-4);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-border-primary-hovered);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-border-primary-pressed);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover{background:var(--bal-color-border-danger-hovered);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active{background:var(--bal-color-border-danger-pressed);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-white)}.bal-checkbox--tile{display:block;-ms-flex:0 0 100%;flex:0 0 100%;background:var(--bal-checkbox-tile-background);border-style:var(--bal-checkbox-tile-border-style);border-radius:var(--bal-checkbox-tile-border-radius);border-width:var(--bal-checkbox-tile-border-width);border-color:var(--bal-checkbox-tile-border-color);padding:var(--bal-checkbox-tile-padding)}.bal-checkbox--tile .bal-checkbox__label{height:100%;-ms-flex-align:stretch;align-items:stretch}.bal-checkbox--tile.bal-checkbox--checked{border-color:var(--bal-checkbox-tile-border-color-checked)}.bal-checkbox--tile.bal-checkbox--invalid{border-color:var(--bal-checkbox-tile-border-color-invalid)}.bal-checkbox--tile.bal-checkbox--disabled{background:var(--bal-checkbox-tile-background-disabled);border-color:var(--bal-checkbox-tile-border-color-disabled);cursor:default}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-hover)}}.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-active)}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-checkbox-tile-background-invalid-hover);border-color:var(--bal-checkbox-tile-border-color-invalid-hover)}}.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-checkbox-tile-background-invalid-active);border-color:var(--bal-checkbox-tile-border-color-invalid-active)}.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-green)}.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-red)}.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-purple)}.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-yellow)}@media screen and (min-width: 769px),print{.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (max-width: 768px){.bal-checkbox--column-mobile-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-mobile-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-mobile-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 769px),print{.bal-checkbox--column-tablet-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-tablet-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-tablet-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 1024px){.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}";const O=class{constructor(o){e(this,o),this.balChange=c(this,"balChange",7),this.balFocus=c(this,"balFocus",7),this.balBlur=c(this,"balBlur",7),this.inputId="bal-cg-"+C++,this.inheritedAttributes={},this.hasFocus=!1,this.mutationObserverActive=!0,this.onClick=e=>{if(!this.control)return;if(e.target.href)return;const c=e.target&&e.target.closest("bal-checkbox");if(c&&(c.disabled||c.readonly))return e.stopPropagation();this.updateValues()},this.onOptionChange=async()=>{this.sync()},this.ariaForm=n,this.options=void 0,this.interface=void 0,this.control=!1,this.name=this.inputId,this.vertical=!1,this.verticalOnMobile=!1,this.expanded=!1,this.invalid=void 0,this.disabled=void 0,this.readonly=void 0,this.value=[],this.columns=1,this.columnsTablet=1,this.columnsMobile=1,this.autoInvalidOff=!1}createLogger(e){this.log=e}async optionChanged(){this.control&&(this.onOptionChange(),this.mutationObserverActive=void 0===this.options)}invalidChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.invalid=e}))}disabledChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.disabled=e}))}readonlyChanged(e){this.control&&void 0!==e&&this.getCheckboxes().forEach((c=>{c.readonly=e}))}valueChanged(e,c){this.control&&_(this.value,c)||this.onOptionChange()}columnsChanged(e){this.getCheckboxes().forEach((c=>c.colSize=e))}columnsTabletChanged(e){this.getCheckboxes().forEach((c=>c.colSizeTablet=e))}columnsMobileChanged(e){this.getCheckboxes().forEach((c=>c.colSizeMobile=e))}connectedCallback(){this.control&&(this.mutationObserverActive=void 0===this.options,this.valueChanged(this.value,[]))}componentWillLoad(){this.control&&(this.inheritedAttributes=i(this.el,["aria-label","tabindex","title"]),this.disabledChanged(this.disabled),this.invalidChanged(this.invalid),this.readonlyChanged(this.readonly)),this.columnsChanged(this.columns),this.columnsTabletChanged(this.columnsTablet),this.columnsMobileChanged(this.columnsMobile),this.onOptionChange()}focusInListener(e){this.balFocus.emit(e)}focusOutListener(e){this.balBlur.emit(e)}mutationListener(){this.control&&(this.disabledChanged(this.disabled),this.readonlyChanged(this.readonly)),this.columnsChanged(this.columns),this.columnsTabletChanged(this.columnsTablet),this.columnsMobileChanged(this.columnsMobile),this.onOptionChange()}listenOnCheckboxChange(e){this.control&&v(this.el,e.target)&&(s(e),this.updateValues())}resetHandler(e){const c=e.target;(null==c?void 0:c.contains(this.el))&&(this.control&&(this.value=[]),this.onOptionChange())}checkboxFocusListener(e){const{target:c}=e;c&&v(this.el,c)&&u(c,"bal-checkbox")&&s(e)}checkboxBlurListener(e){const{target:c}=e;c&&v(this.el,c)&&u(c,"bal-checkbox")&&s(e)}async setValue(e){this.control&&(this.value=e)}async getOptionByValue(e){const c=this.options;if(c)return c.find((c=>c.value===e))}async setAriaForm(e){this.ariaForm=Object.assign({},e)}sync(){if(this.control){const e=e=>{for(let c=0;c<this.value.length;c++){const o=this.value[c];if(void 0!==o&&o.toString()===e.value.toString())return!0}return!1};this.getCheckboxes().forEach((c=>{c.checked=e(c)}))}this.getCheckboxes().forEach((e=>{this.interface&&(e.interface=this.interface)}))}getCheckboxes(){return Array.from(this.el.querySelectorAll("bal-checkbox"))}updateValues(){const e=[];this.getCheckboxes().forEach((c=>{c.checked&&e.push(c.value)})),_(this.value,e)||(this.value=[...e],this.balChange.emit(this.value))}render(){const e=h.block("checkbox-group"),c=e.element("inner"),b=(this.options||[]).map((e=>"function"==typeof e.html?Object.assign(Object.assign({},e),{html:e.html()}):e));return o(a,Object.assign({class:Object.assign({},e.class()),role:"group","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":r(this.disabled),"aria-invalid":r(this.invalid),onClick:this.onClick},this.inheritedAttributes),o("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("vertical-mobile").class(this.verticalOnMobile)),c.modifier("vertical").class(this.vertical)),c.modifier("expanded").class(this.expanded)),c.modifier("button").class("button"===this.interface))},o("slot",null),b.map((e=>o("bal-checkbox",{key:e.value,name:e.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})))))}get el(){return b(this)}static get watchers(){return{options:["optionChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],value:["valueChanged"],columns:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}}};l([p("bal-checkbox-group"),t("design:type",Function),t("design:paramtypes",[Function]),t("design:returntype",void 0)],O.prototype,"createLogger",null),l([f(),t("design:type",Function),t("design:paramtypes",[Object]),t("design:returntype",void 0)],O.prototype,"focusInListener",null),l([f(),t("design:type",Function),t("design:paramtypes",[Object]),t("design:returntype",void 0)],O.prototype,"focusOutListener",null),l([y({tags:["bal-checkbox-group","bal-checkbox"],attributes:!1,characterData:!1}),t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],O.prototype,"mutationListener",null);let C=0;O.style=".bal-checkbox-group{display:inline-block;position:relative;width:100%}.bal-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-checkbox-group__inner--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--button{-ms-flex-direction:row;flex-direction:row}}.bal-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-checkbox-group__inner--expanded .bal-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-checkbox-group__inner--expanded .bal-checkbox{width:100%}}.bal-checkbox-group__inner--button.bal-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}";export{w as bal_checkbox,O as bal_checkbox_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as t,b as s,k as i}from"./p-b0cf4731.js";import{L as n,a as e}from"./p-acf222fd.js";class o extends n{constructor(){super(...arguments),this.waitAfterFramePrint=!1,this.intersectionObserver=void 0,this.intersectionCallback=t=>{t.some((t=>t.isIntersecting))&&this.notify()}}async connect(i){super.connect(i),"undefined"!=typeof IntersectionObserver&&(this.waitAfterFramePrint&&(await t(i),await s()),this.destroyMutationObserver(),this.intersectionObserver=new IntersectionObserver(this.intersectionCallback,{root:null,threshold:.5}),this.intersectionObserver.observe(i))}disconnect(){super.disconnect(),this.destroyMutationObserver()}destroyMutationObserver(){void 0!==this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0)}}class r extends e{constructor(){super((t=>{t.visibilityListener()})),this.debouncedNotify=i((()=>this.notify()),50),this.listener=new o}attach(t){var s,i;super.attach(t),null===(s=this.listener)||void 0===s||s.connect(t.el),null===(i=this.listener)||void 0===i||i.add((()=>this.debouncedNotify()))}detach(){var t;super.detach(),null===(t=this.listener)||void 0===t||t.disconnect()}}function h(){return function(t){const{connectedCallback:s,componentDidLoad:i,disconnectedCallback:n}=t;t.connectedCallback=function(){return this._balVisibilitySubject||(this._balVisibilitySubject=new r),s&&s.call(this)},t.componentDidLoad=function(){return this._balVisibilitySubject.attach(this),i&&i.call(this)},t.disconnectedCallback=function(){return this._balVisibilitySubject&&(this._balVisibilitySubject.detach(),this._balVisibilitySubject=void 0),n&&n.call(this)}}}export{h as L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as r}from"./p-2ccbe55a.js";import{_ as a,a as h}from"./p-43c9f5e9.js";import{p as n}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as r}from"./p-2ccbe55a.js";import{_ as a,a as h}from"./p-43c9f5e9.js";import{p as n}from"./p-b0cf4731.js";import{i as c}from"./p-063808d7.js";import{g as o,a as u,b as l,e as d,s as b,f,i as m,h as p,j as $,c as g,d as v}from"./p-f19930db.js";import{l as k}from"./p-9a3d9e17.js";import{i as y,A as j,N as w}from"./p-ec1efe3d.js";import{B as x}from"./p-ae86d0a0.js";import{L as D}from"./p-b77e3348.js";import{d as B}from"./p-5eb3fbb9.js";import{a as C}from"./p-8f2e9a7f.js";import"./p-a65354df.js";import"./p-3d3aa421.js";function E(t){if(!t)return"";const s=`${t}`.trim().toUpperCase(),i=[s.substring(0,2),s.substring(2,8),s.substring(8,10),s.substring(10,11)].filter((t=>t.length>0));switch(i.length){case 1:return`${t}`;case 2:return`${i[0]}/${i[1]}`;case 3:return`${i[0]}/${i[1]}/${i[2]}`;default:return`${i[0]}/${i[1]}/${i[2]}.${i[3]}`}}function F(t){if(!t)return"";let s=`${t}`.trim();const i=[s.substring(0,9),s.substring(9,10)].filter((t=>t.length>0));return s=L(i[0]),i[1]?`${s}-${i[1]}`:s}function L(t){if(!t)return"";const s=`${t}`.trim(),i=[s.substring(0,2),s.substring(2,3),s.substring(3,6),s.substring(6,9)].filter((t=>t.length>0));switch(i.length){case 1:return`${s}`;case 2:return`${i[0]}/${i[1]}`;case 3:return`${i[0]}/${i[1]}.${i[2]}`;default:return`${i[0]}/${i[1]}.${i[2]}.${i[3]}`}}function K(t){if(!t)return"";const s=`${t}`.trim(),i=[s.substring(0,4),s.substring(4,7),s.substring(7,10)].filter((t=>t.length>0));switch(i.length){case 1:return`${s}`;case 2:return`${i[0]}.${i[1]}`;default:return`${i[0]}.${i[1]}.${i[2]}`}}function O(t){if(!t)return"";const s=`${t}`.trim(),i=[s.substring(0,2),s.substring(2,6),s.substring(6,10),s.substring(10,14)].filter((t=>t.length>0));switch(i.length){case 1:return`BE${s}`;case 2:return`BE${i[0]} ${i[1]}`;case 3:return`BE${i[0]} ${i[1]} ${i[2]}`;default:return`BE${i[0]} ${i[1]} ${i[2]} ${i[3]}`}}const A=class{constructor(i){t(this,i),this.balInput=s(this,"balInput",7),this.balBlur=s(this,"balBlur",7),this.balKeyPress=s(this,"balKeyPress",7),this.balFocus=s(this,"balFocus",7),this.balChange=s(this,"balChange",7),this.inputId="bal-input-"+I++,this.inheritedAttributes={},this.inputValue=this.value,this.initialValue=this.value||"",this.getInputValue=()=>{var t;const s=this.nativeInput;let i="";if(s){if(this.allowedKeyPress&&s&&!this.mask){const t=new RegExp("^"+this.allowedKeyPress+"$"),i=s.value.split("").filter((s=>t.test(s))).join("");return s.value=i,i}if(s.value){if(this.mask)switch(this.mask){case"contract-number":return i=s.value.replace(/\D/g,""),"0"===i.charAt(0)&&(i=i.substring(1)),i.length>10&&(i=i.substring(0,10)),i;case"basic-contract-number":return i=s.value.replace(/\D/g,""),"0"===i.charAt(0)&&(i=i.substring(1)),i.length>9&&(i=i.substring(0,9)),i;case"offer-number":return i=s.value.replace(/\D/g,""),i.length>9&&(i=i.substring(0,9)),i;case"claim-number":{i=s.value.replace(/[^\dXx]/g,"");const e=[i.substring(0,10),i.substring(10,11),i.substring(11)].filter((t=>t.length>0));switch(e.length){case 1:i=`${e[0].replace(/\D/g,"")}`;break;case 2:i=`${e[0].replace(/\D/g,"")}${e[1]}`;break;default:i=`${e[0].replace(/\D/g,"")}${e[1]}${null===(t=e[2])||void 0===t?void 0:t.replace(/\D/g,"")}`}return i.length>11&&(i=i.substring(0,11)),i}case"be-enterprise-number":return i=s.value.replace(/\D/g,""),i.length>10&&(i=i.substring(0,10)),i;case"be-iban":return i=s.value.replace(/\D/g,""),i.length>14&&(i=i.substring(0,14)),i;default:return s.value}}else this.inputValue=s.value}return""},this.onInput=t=>{var s,i;const e=o(t),r=null===(s=t.target)||void 0===s?void 0:s.selectionStart,a=null===(i=t.target)||void 0===i?void 0:i.selectionEnd;if(this.inputValue=this.getInputValue(),e)if(e.value)switch(this.mask){case"contract-number":case"basic-contract-number":e.value=F(this.inputValue),r<this.inputValue.length&&e.setSelectionRange(r,a);break;case"offer-number":e.value=L(this.inputValue),r<this.inputValue.length&&e.setSelectionRange(r,a);break;case"claim-number":e.value=E(this.inputValue),r<this.inputValue.length&&e.setSelectionRange(r,a);break;case"be-enterprise-number":e.value=K(this.inputValue),r<this.inputValue.length&&e.setSelectionRange(r,a);break;case"be-iban":e.value=O(this.inputValue),r<this.inputValue.length&&e.setSelectionRange(r,a);break;default:this.inputValue=e.value}else this.inputValue=e.value;this.balInput.emit(this.inputValue)},this.onFocus=t=>u(this,t),this.onBlur=t=>{l(this,t);const s=t.target;s&&(void 0===this.mask&&(s.value=this.getFormattedValue()),d(this))},this.onKeydown=t=>{if(void 0!==this.mask&&!k(t)&&!y(t)){let s=0;if(this.inputValue&&(s=this.inputValue.length),!(this.getMaskAllowedKeys().includes(t.key)||"claim-number"===this.mask&&("X"===t.key||"x"===t.key)&&s>=10))return b(t)}if(this.allowedKeyPress&&!this.mask&&!k(t)&&!y(t)&&!new RegExp("^"+this.allowedKeyPress+"$").test(t.key)&&![...j].includes(t.key))return b(t)},this.onClick=t=>f(this,t),this.handleClick=t=>m(this,t),this.focused=!1,this.ariaForm=B,this.name=this.inputId,this.invalid=!1,this.textAlign="left",this.type="text",this.accept=void 0,this.autocapitalize="off",this.autocomplete="off",this.autocorrect="off",this.autofocus=!1,this.debounce=0,this.placeholder=void 0,this.max=void 0,this.maxLength=void 0,this.min=void 0,this.minLength=void 0,this.multiple=void 0,this.pattern=void 0,this.allowedKeyPress=void 0,this.required=!1,this.spellcheck=!1,this.disabled=!1,this.readonly=!1,this.clickable=!1,this.suffix=void 0,this.hasIconRight=!1,this.inputmode=void 0,this.value=void 0,this.mask=void 0,this.autoInvalidOff=!1}createLogger(t){this.log=t}debounceChanged(){this.balChange=n(this.balChange,this.debounce)}listenOnClick(t){p(this,t)}resetHandler(t){const s=t.target;(null==s?void 0:s.contains(this.el))&&$(this,this.initialValue,this.resetHandlerTimer)}connectedCallback(){this.debounceChanged(),this.initialValue=this.value||""}componentWillLoad(){this.inheritedAttributes=c(this.el,["aria-label","tabindex","title"])}componentDidLoad(){this.inputValue=this.value}async setFocus(){g(this)}async setBlur(){v(this)}getInputElement(){return Promise.resolve(this.nativeInput)}async setAriaForm(t){this.ariaForm=Object.assign({},t)}getRawValue(){return(this.value||"").toString()}getFormattedValue(){const t=this.getRawValue();return`${t}${void 0!==this.suffix&&void 0!==t&&""!==t?" "+this.suffix:""}`}getMaskAllowedKeys(){return[...w,...j]}render(){let t=this.focused?this.getRawValue():this.getFormattedValue();if(void 0!==this.mask)switch(this.mask){case"contract-number":case"basic-contract-number":t=F(t);break;case"claim-number":t=E(t);break;case"offer-number":t=L(t);break;case"be-enterprise-number":t=K(t);break;case"be-iban":t=O(t)}let s={};this.pattern&&(s={pattern:this.pattern});const r=x.block("input"),a=this.ariaForm.controlId||this.inputId;return i(e,{key:"c247683cd5ac331743d71c8872a59ccfacbcae83",onClick:this.handleClick,"aria-disabled":C(this.disabled),class:Object.assign({},r.class())},i("input",Object.assign({key:"992f567fd137664f50f73443fdc283ed7622297d",class:{input:!0,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid,"is-clickable":this.clickable,"bal-focusable":!this.disabled,"has-icon-right":this.hasIconRight,"has-text-centered":"center"===this.textAlign,"has-text-right":"right"===this.textAlign},"data-testid":"bal-input",ref:t=>this.nativeInput=t,id:a,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":C(this.disabled),disabled:this.disabled,accept:this.accept,inputMode:this.inputmode,autoCapitalize:this.autocapitalize,autocomplete:this.autocomplete,autocorrect:this.autocorrect,autofocus:this.autofocus,min:this.min,max:this.max,minLength:this.minLength,maxLength:this.maxLength,multiple:this.multiple,name:this.name,placeholder:this.placeholder||"",readonly:this.readonly,required:this.required,spellcheck:this.spellcheck,type:this.type,value:t,onFocus:this.onFocus,onInput:t=>this.onInput(t),onKeyDown:t=>this.onKeydown(t),onBlur:this.onBlur,onClick:this.onClick,onKeyPress:t=>this.balKeyPress.emit(t)},s,this.inheritedAttributes)))}get el(){return r(this)}static get watchers(){return{debounce:["debounceChanged"]}}};a([D("bal-input"),h("design:type",Function),h("design:paramtypes",[Function]),h("design:returntype",void 0)],A.prototype,"createLogger",null);let I=0;A.style=".bal-input{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text);padding:0}";export{A as bal_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./p-a65354df.js";import{l as t,r as o}from"./p-
|
|
1
|
+
import{b as n}from"./p-a65354df.js";import{l as t,r as o}from"./p-b0cf4731.js";const e='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .bal-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .bal-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',a=(n,t)=>{const o=n.querySelector(e);l(o,null!=t?t:n)},d=(n,t)=>{const o=Array.from(n.querySelectorAll(e));l(o.length>0?o[o.length-1]:null,null!=t?t:n)},l=(n,t)=>{let o=n;const a=null==n?void 0:n.shadowRoot;a&&(o=a.querySelector(e)||n),o?s(o):t.focus({preventScroll:!0})},s=n=>{if(n.focus({preventScroll:!0}),n.classList.contains("bal-focusable")){const t=n.closest("bal-app");t&&t.setFocus([n])}};let i=0;const r=t=>{n.hasDocument&&u(document);const o=i++;t.overlayIndex=o,t.el.hasAttribute("id")||(t.el.id=`bal-overlay-${o}`)},b=(n,t)=>(void 0===t&&(t="bal-modal,bal-snackbar,bal-toast"),Array.from(n.querySelectorAll(t)).filter((n=>n.overlayIndex>0))),c=(n,t,o)=>{const e=b(n,t);return void 0===o?e[e.length-1]:e.find((n=>n.id===o))},u=n=>{0===i&&(i=1,n.addEventListener("focus",(t=>{p(t,n)}),!0),n.addEventListener("keyup",(t=>{if("Escape"===t.key){const t=c(n);t&&t.dismiss(void 0,"backdrop")}})))},f=n=>n.classList.contains("is-hidden"),p=(n,t)=>{const o=(n=>{const t=((n,t)=>b(n,t).filter((n=>!f(n))))(n,"bal-modal");return t[t.length-1]})(t),e=n.target;o&&e&&(o.shadowRoot?(()=>{if(o.contains(e))o.lastFocus=e;else if("BAL-TOAST"===e.tagName)x(o.lastFocus,o);else{const n=o.lastFocus;a(o),n===t.activeElement&&d(o),o.lastFocus=t.activeElement}})():(()=>{if(o===e)o.lastFocus=void 0;else{const n=o,l=n.querySelector(".bal-modal__container");if(!l)return;if(l.contains(e)||e===n.querySelector("bal-modal__background"))o.lastFocus=e;else{const n=o.lastFocus;a(l,o),n===t.activeElement&&d(l,o),o.lastFocus=t.activeElement}}})())},h=async(n,t,o,e)=>{if(!n.presented)return!1;try{n.el.style.setProperty("pointer-events","none"),n.willDismiss.emit({data:t,role:o}),await e(),n.presented=!1,n.didDismiss.emit({data:t,role:o})}catch(t){n.presented=!1,console.error(t)}return n.el.remove(),!0},m=(n,t)=>{let o;const e=new Promise((n=>o=n));return v(n,t,(n=>{o(n.detail)})),e},v=(n,e,a)=>{const d=t=>{o(n,e,d),a(t)};t(n,e,d)},x=(n,t)=>{let o=n;const a=null==n?void 0:n.shadowRoot;a&&(o=a.querySelector(e)||n),o?s(o):t.focus()},y="bal-disable-focus-trap";export{y as F,c as a,h as d,m as e,b as g,r as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./p-2ccbe55a.js";import{b as s}from"./p-a65354df.js";import{w as e}from"./p-
|
|
1
|
+
import{a as t}from"./p-2ccbe55a.js";import{b as s}from"./p-a65354df.js";import{w as e}from"./p-b0cf4731.js";import{d as i}from"./p-ec1863d2.js";const n="baloise-persist-config";class r{constructor(){this._componentObservers=[],this._observers=[],this._config=i}get locale(){return`${this._config.language}-${this._config.region}`}get region(){return this._config.region}set region(t){t!==this._config.region&&(this._config.region=t,this._notify())}get language(){return this._config.language}set language(t){t!==this._config.language&&(this._config.language=this._config.allowedLanguages.includes(t)?t:this._config.fallbackLanguage,this._notify())}get allowedLanguages(){return this._config.allowedLanguages}set allowedLanguages(t){t!==this._config.allowedLanguages&&(this._config.allowedLanguages=t,this._notify())}get icons(){return this._config.icons}set icons(t){this._config.icons=Object.assign(Object.assign({},this._config.icons),t),this._notify()}get logger(){return this._config.logger}set logger(t){this._config.logger=Object.assign({},t),this._notify()}get animated(){return this._config.animated}set animated(t){this._config.animated=t,this._notify()}get httpFormSubmit(){return this._config.httpFormSubmit}set httpFormSubmit(t){this._config.httpFormSubmit=t,this._notify()}attach(t){if(this._observers.includes(t))return console.log("Subject: Observer has been attached already.");this._observers.push(t),t.configChanged(this._config)}detach(t){const s=this._observers.indexOf(t);if(-1===s)return console.log("Subject: Nonexistent observer.");this._observers.splice(s,1)}attachComponent(t){if(this._componentObservers.includes(t))return console.log("Subject: Observer has been attached already.");this._componentObservers.push(t),t.configChanged(this._config)}detachComponent(t){const s=this._componentObservers.indexOf(t);if(-1===s)return console.log("Subject: Nonexistent observer.");this._componentObservers.splice(s,1)}toString(){return JSON.stringify(this._config)}reset(t){this._config=Object.assign(Object.assign(Object.assign({},this._config),t),{icons:Object.assign(Object.assign({},this._config.icons),t.icons)}),this._notify(!1)}_notify(t=!0){for(const t of this._componentObservers)t.configChanged(this._config);if(t)for(const t of this._observers)t.configChanged(this._config);s.hasWindow&&c(window,this._config)}}const h=new r,o=t=>{try{const s=t.sessionStorage.getItem(n);return null!==s?JSON.parse(s):{}}catch(t){return{}}},c=(t,s)=>{try{t.sessionStorage.setItem(n,JSON.stringify(s))}catch(t){return}},a=(t={},e={})=>{0===Object.keys(e).length&&s.hasWindow&&(e=window),e.BaloiseDesignSystem=e.BaloiseDesignSystem||{},h.reset(Object.assign(Object.assign(Object.assign(Object.assign({},o(e)),(t=>{try{const s=JSON.parse(t.localStorage.getItem("baloise-animated"));return null!==s?{animated:s}:{}}catch(t){return{}}})(e)),t),{icons:Object.assign(Object.assign({},o(e).icons),t.icons)})),e.BaloiseDesignSystem.config=h};class u{constructor(t){this.options=t,this.container=null,this.queue=[],this.preQueue=[],this.queueLimit=5}create(t){if(s.hasDocument){this.setupContainer(t);const s=this.findClone(t);if(void 0===s){const s=document.createElement(this.options.tag);return Object.assign(s,t),s.addEventListener("balClose",(t=>{this.removeFromQueue(t.detail)})),this.preQueue.push(s),this.updateQueue(),s}return s}}setQueue(t){this.queueLimit=t}async dismissAll(){var t;const s=null===(t=this.container)||void 0===t?void 0:t.querySelectorAll(this.options.tag);if(s){const t=[];for(let e=0;e<s.length;e++){const i=s[e];i.close&&t.push(i.close())}await Promise.all(t)}}async clearAll(){return console.warn("[DEPRECATED] - use dismissAll() instead"),this.dismissAll()}findClone(t){for(let s=0;s<this.queue.length;s++){const e=this.queue[s];if(e.message===t.message&&e.color===t.color)return e}}setupContainer(t){if(s.hasDocument){const s=`${this.options.tag}-container`;if(this.container=document.getElementById(s),this.container)return;this.container||(this.container=document.createElement("bal-notices"),this.container.setAttribute("interface",this.options.tag.replace("bal-","")),this.container.setAttribute("animated",t.animated?"true":"false"),void 0!==t.container&&this.container.setAttribute("container",!0===t.container?"":t.container),this.container.id=s),document.body.appendChild(this.container)}}async updateQueue(){var t;if(this.queue.length<this.queueLimit){const t=this.preQueue.shift();if(t&&this.container){await e(this.container);const s=this.container.querySelector(".bal-notices__inner");s&&(this.queue.push(t),s.insertAdjacentElement("beforeend",t))}}0===this.queue.length&&(null===(t=this.container)||void 0===t||t.remove())}removeFromQueue(t){this.queue=this.queue.filter((s=>s.id!==t)),setTimeout((()=>this.updateQueue()),0)}}class l extends u{constructor(){super({tag:"bal-toast"})}create(t){return super.create(t)}}const b=new l;class d extends u{constructor(){super({tag:"bal-snackbar"})}create(t){return super.create(t)}}const f=new d,m=(e={},i,n={})=>{0===Object.keys(n).length&&s.hasWindow&&(n=window),n.BaloiseDesignSystem=n.BaloiseDesignSystem||{},i&&t(i),a(Object.assign(Object.assign({},e),i),n),n.BaloiseDesignSystem.toastController=b,n.BaloiseDesignSystem.snackbarController=f,n.BaloiseDesignSystem.initialize=()=>a(n.BaloiseDesignSystem.config,n),n.BaloiseDesignSystem.version="19.3.0-nightly.20250627"};export{d as B,l as a,f as b,b as c,m as i,a as s}
|