@baloise/ds-core 17.2.4 → 17.2.5-nightly.20250115
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/animation.decorator.js +75 -0
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-carousel.js +12 -5
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-dropdown.js +771 -1
- package/components/bal-hint2.js +1 -1
- package/components/bal-nav.js +72 -48
- package/components/bal-option.js +166 -1
- package/components/bal-segment.js +27 -10
- package/components/bal-select-option.js +1 -45
- package/components/bal-select-option2.js +47 -0
- package/components/bal-select.js +1 -847
- package/components/bal-select2.js +849 -0
- package/components/bal-tabs2.js +67 -35
- package/components/helpers.js +1 -1
- package/components/index.js +5 -304
- package/components/initialize.js +303 -0
- package/components/keyboard.helpers.js +1 -1
- package/components/resize.decorator.js +5 -5
- package/components/swiper.util.js +1 -18
- package/components/tokens.esm.js +1 -1
- package/components/visibility.decorator.js +88 -0
- 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-10ebc871f4.system.entry.js → p-0640709738.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-079850e6.system.js +1 -0
- package/dist/baloise-design-system/p-0b8169c8.js +1 -0
- package/dist/baloise-design-system/p-0bcf20ca69.entry.js +1 -0
- package/dist/baloise-design-system/{p-24e594cd49.entry.js → p-0c3b2d6c8e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6b79e568.js → p-0d7b7182.js} +1 -1
- package/dist/baloise-design-system/{p-46b7cb48d1.entry.js → p-0dd411c03e.entry.js} +1 -1
- package/dist/baloise-design-system/p-0e323fe0.system.js +1 -1
- package/dist/baloise-design-system/{p-c13b1376.system.js → p-0f397293.system.js} +1 -1
- package/dist/baloise-design-system/{p-ff7903eb.js → p-12edf09f.js} +1 -1
- package/dist/baloise-design-system/{p-770f4365f6.system.entry.js → p-14c3418170.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ba4c1ed8a8.entry.js → p-1b11517535.entry.js} +1 -1
- package/dist/baloise-design-system/p-1c191e7d.js +1 -0
- package/dist/baloise-design-system/{p-56cf1ab1.system.js → p-1d22490c.system.js} +1 -1
- package/dist/baloise-design-system/{p-97cd0b900d.system.entry.js → p-1df848f9fc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e099fd9574.entry.js → p-28f96ad58b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e0377a6d84.entry.js → p-32faec4f65.entry.js} +1 -1
- package/dist/baloise-design-system/{p-52cad6cf9f.entry.js → p-36db598b9c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a71cc6d652.entry.js → p-36fe1faedd.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5b85dec39b.system.entry.js → p-38ca9dfde3.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-54ce8c3c.js → p-3980a0a4.js} +1 -1
- package/dist/baloise-design-system/{p-47d7e166.system.js → p-3a1bf825.system.js} +1 -1
- package/dist/baloise-design-system/{p-ccd2ef1106.entry.js → p-3bd47497b5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0c28f0a46f.system.entry.js → p-3d5dc774f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-878cb7914d.entry.js → p-41931a0925.entry.js} +1 -1
- package/dist/baloise-design-system/{p-16baa62182.system.entry.js → p-440f0ed2a6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-37f892f6dc.entry.js → p-448f3dcc96.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2abbd888.js → p-45b89d22.js} +1 -1
- package/dist/baloise-design-system/p-45e4eac2d1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-498c20ac2a.system.entry.js → p-4b7fd117bc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0933f23da2.system.entry.js → p-4c030e87cf.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cad154ad.js → p-4e9084dc.js} +1 -1
- package/dist/baloise-design-system/{p-0400a0cd.system.js → p-55269db4.system.js} +1 -1
- package/dist/baloise-design-system/{p-b77d63ca25.entry.js → p-5591d69c49.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4a80e2c1.system.js → p-56c370cb.system.js} +1 -1
- package/dist/baloise-design-system/p-58d2a0b5.system.js +1 -0
- package/dist/baloise-design-system/{p-27a8f7d1e4.system.entry.js → p-5b93e0df0c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9618956a56.system.entry.js → p-5d2479f2ea.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1334e37be0.system.entry.js → p-5f234e78f6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8360204072.entry.js → p-62251008b0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c642582c09.system.entry.js → p-66df17135c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-6724721b32.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-1ae4dca673.system.entry.js → p-6e6f2f3713.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f7cbcbdbfa.system.entry.js → p-6f7ae58c42.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-932a19ea57.entry.js → p-7449aea98b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3df52a1f.js → p-744daf78.js} +1 -1
- package/dist/baloise-design-system/{p-6cdd068206.system.entry.js → p-769dd49917.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-761cb0e801.system.entry.js → p-79554c4acd.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9db35d91.js → p-7a6a128f.js} +1 -1
- package/dist/baloise-design-system/{p-85479ae3cf.system.entry.js → p-826df305a1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-953cc30ae9.system.entry.js → p-8387007c23.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9ad648deea.system.entry.js → p-85e3b067cf.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-524edfe610.system.entry.js → p-87458c9059.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-8782ba61.system.js +1 -0
- package/dist/baloise-design-system/{p-b1d0256f19.system.entry.js → p-899bc0be9d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f2c398a3.system.js → p-89aaadaf.system.js} +1 -1
- package/dist/baloise-design-system/{p-2a8e0e7149.entry.js → p-8a47461794.entry.js} +1 -1
- package/dist/baloise-design-system/{p-60f5e5faa6.entry.js → p-8b386e9117.entry.js} +1 -1
- package/dist/baloise-design-system/{p-af0f549439.entry.js → p-8baa40b8d9.entry.js} +1 -1
- package/dist/baloise-design-system/p-8c24fdcf6c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-dc6d33fc89.entry.js → p-8d52145b77.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e21ccd9856.entry.js → p-921b0836e1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fabb559661.entry.js → p-96780bdefd.entry.js} +1 -1
- package/dist/baloise-design-system/p-98ef262c8c.entry.js +1 -0
- package/dist/baloise-design-system/{p-7256aa5d97.entry.js → p-9b2657ef04.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2db0f14a2d.system.entry.js → p-a1952399c3.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8227e41299.entry.js → p-a6ff014e4c.entry.js} +1 -1
- package/dist/baloise-design-system/p-ac8a545a5d.entry.js +1 -0
- package/dist/baloise-design-system/p-ad5039de.system.js +1 -0
- package/dist/baloise-design-system/{p-b0a4d40a.js → p-af05a53e.js} +1 -1
- package/dist/baloise-design-system/p-b11c8e09e1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-bcbc8278e2.system.entry.js → p-b1c33848fa.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cd9be615a4.entry.js → p-b4576f5814.entry.js} +1 -1
- package/dist/baloise-design-system/{p-18267b1371.system.entry.js → p-b55c42a4a9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c0e04c2072.system.entry.js → p-bfa5f3ae60.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-c0397a3faa.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-c3877f26cd.entry.js → p-c26fb79884.entry.js} +1 -1
- package/dist/baloise-design-system/p-c4088d90.js +1 -0
- package/dist/baloise-design-system/{p-e430294632.entry.js → p-c487d3770e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-97f3a682.system.js → p-c6a673f7.system.js} +1 -1
- package/dist/baloise-design-system/{p-ed32b0b9.system.js → p-c6dfe80e.system.js} +1 -1
- package/dist/baloise-design-system/{p-39d3eeef8e.entry.js → p-c844e6fbc9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-96122c3e5b.entry.js → p-c8bd61c717.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb7183cd00.entry.js → p-c8db6fb15f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-455872a1.system.js → p-c9b8e360.system.js} +1 -1
- package/dist/baloise-design-system/{p-936070bf.system.js → p-cb045ca0.system.js} +1 -1
- package/dist/baloise-design-system/{p-713640e3ac.system.entry.js → p-cb3920cc26.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-73bec757.js → p-cc35663d.js} +1 -1
- package/dist/baloise-design-system/{p-81894fe8.js → p-cc8cfbf3.js} +1 -1
- package/dist/baloise-design-system/{p-81a3bee001.entry.js → p-d0066a5950.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8f217b03.system.js → p-d1b12bcd.system.js} +1 -1
- package/dist/baloise-design-system/{p-6933b37a08.entry.js → p-d306ec28cf.entry.js} +1 -1
- package/dist/baloise-design-system/{p-67d61a81.js → p-d516d3b1.js} +1 -1
- package/dist/baloise-design-system/{p-42f532a0a8.entry.js → p-d568852b4c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-58a0e8df48.entry.js → p-d60b2e3878.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a2090a9d.system.js → p-d9b32333.system.js} +1 -1
- package/dist/baloise-design-system/{p-90a9f56d71.system.entry.js → p-ddcc5387b5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7cb2ead5.system.js → p-df35ddb8.system.js} +1 -1
- package/dist/baloise-design-system/{p-f7f06d0340.entry.js → p-e283e1cf22.entry.js} +1 -1
- package/dist/baloise-design-system/{p-356f75fd58.system.entry.js → p-e2c3dde206.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-31b6055d92.system.entry.js → p-e3b0312116.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e3b84ed330.entry.js +1 -0
- package/dist/baloise-design-system/{p-90a51218.js → p-e3c1d653.js} +1 -1
- package/dist/baloise-design-system/p-e53217f8.js +1 -1
- package/dist/baloise-design-system/p-e573491b.system.js +1 -0
- package/dist/baloise-design-system/{p-2e830170.system.js → p-e7150a50.system.js} +1 -1
- package/dist/baloise-design-system/{p-b96fd49d.system.js → p-e7d20c82.system.js} +1 -1
- package/dist/baloise-design-system/p-e9445f4362.entry.js +1 -0
- package/dist/baloise-design-system/{p-3541dd16.js → p-ebf5cc68.js} +1 -1
- package/dist/baloise-design-system/p-ee379377.js +1 -0
- package/dist/baloise-design-system/{p-657a3eb3ee.system.entry.js → p-ee53e7c9f6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-dbc7c601d3.entry.js → p-f0200d8f09.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ff46a92a47.system.entry.js → p-f089f4c8c8.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-66d49670b0.system.entry.js → p-f35275e46a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-19162db1a6.system.entry.js → p-f47bafc866.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-47de946676.system.entry.js → p-f5d884a6fa.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-296c7825b7.entry.js → p-f5e11c86e5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-21f87590.js → p-f64319f1.js} +1 -1
- package/dist/baloise-design-system/{p-d0e23ec9f1.entry.js → p-f6f3d8cad0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-18ce5177f9.entry.js → p-f8ca0ec73a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-87b8b65bf6.system.entry.js → p-fba0f8c711.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb0a588d09.system.entry.js → p-fff8faa67f.system.entry.js} +1 -1
- package/dist/cjs/animation.decorator-d160ba91.js +77 -0
- package/dist/cjs/app-globals-25e25924.js +7 -0
- package/dist/cjs/bal-accordion_4.cjs.entry.js +2 -2
- package/dist/cjs/bal-app.cjs.entry.js +1 -1
- package/dist/cjs/bal-button_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +22 -15
- package/dist/cjs/bal-checkbox-button.cjs.entry.js +3 -3
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +2 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-date.cjs.entry.js +3 -3
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- package/dist/cjs/bal-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/bal-field_5.cjs.entry.js +2 -2
- package/dist/cjs/bal-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/bal-footer.cjs.entry.js +1 -1
- package/dist/cjs/bal-form.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_5.cjs.entry.js +5 -5
- package/dist/cjs/bal-input-slider.cjs.entry.js +2 -2
- package/dist/cjs/bal-input-stepper.cjs.entry.js +2 -2
- package/dist/cjs/bal-input.cjs.entry.js +2 -2
- package/dist/cjs/bal-list_8.cjs.entry.js +5 -5
- package/dist/cjs/bal-logo.cjs.entry.js +4 -4
- package/dist/cjs/bal-modal_3.cjs.entry.js +2 -2
- package/dist/cjs/bal-nav_8.cjs.entry.js +6 -6
- package/dist/cjs/bal-navbar_5.cjs.entry.js +4 -4
- package/dist/cjs/bal-number-input.cjs.entry.js +2 -2
- package/dist/cjs/bal-option_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +4 -4
- package/dist/cjs/bal-popup.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +5 -5
- package/dist/cjs/bal-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/bal-radio_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +31 -14
- package/dist/cjs/bal-select_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +6 -6
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +45 -31
- package/dist/cjs/bal-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bal-time-input.cjs.entry.js +2 -2
- package/dist/cjs/bal-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-e22cc15e.js → breakpoints.decorator-cfbd4db9.js} +1 -1
- package/dist/cjs/{breakpoints.subject-5f803b3c.js → breakpoints.subject-7caa8c48.js} +2 -2
- package/dist/cjs/{element-states.decorator-e2bc15ed.js → element-states.decorator-f79681aa.js} +1 -1
- package/dist/cjs/{floating-ui-24577c09.js → floating-ui-5cc3a363.js} +1 -1
- package/dist/cjs/{focus.decorator-b93456af.js → focus.decorator-e6050e24.js} +1 -1
- package/dist/cjs/{form-input-e4fdf58e.js → form-input-be32df30.js} +1 -1
- package/dist/cjs/{app-globals-a3f2765f.js → global-85ebe098.js} +2 -4
- package/dist/cjs/{helpers-94660ab2.js → helpers-240da822.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/initialize-367b85e5.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{mutation.decorator-a000b7ef.js → mutation.decorator-249a9606.js} +1 -1
- package/dist/cjs/{overlays-4c465543.js → overlays-e408bbaf.js} +1 -1
- package/dist/cjs/{resize.decorator-62d31afa.js → resize.decorator-ebed89a1.js} +5 -5
- package/dist/cjs/{swipe.decorator-447ae00e.js → swipe.decorator-8ff8dd2c.js} +1 -1
- package/dist/cjs/{swipe.subject-6deb82da.js → swipe.subject-00bf8c8f.js} +1 -1
- package/dist/cjs/{swiper.util-abdf50f1.js → swiper.util-ef01dd7a.js} +3 -20
- package/dist/cjs/{tokens.esm-e91514ff.js → tokens.esm-53682e74.js} +1 -1
- package/dist/cjs/visibility.decorator-dc8cec8a.js +90 -0
- package/dist/cjs/{window-resize.decorator-17c9b489.js → window-resize.decorator-b5708580.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-carousel/bal-carousel.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +11 -4
- package/dist/collection/components/bal-hint/bal-hint.css +1 -1
- package/dist/collection/components/bal-segment/bal-segment.js +25 -14
- package/dist/collection/components/bal-tabs/bal-tabs.css +1 -1
- package/dist/collection/components/bal-tabs/bal-tabs.js +33 -31
- package/dist/collection/components/bal-tabs/components/tab-select.js +2 -2
- 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/utils/animation/animation.decorator.js +23 -0
- package/dist/collection/utils/animation/animation.interfaces.js +1 -0
- package/dist/collection/utils/animation/animation.listener.js +30 -0
- package/dist/collection/utils/animation/animation.subject.js +20 -0
- package/dist/collection/utils/animation/index.js +2 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/helpers.js +1 -1
- package/dist/collection/utils/resize/resize.listener.js +4 -4
- package/dist/collection/utils/resize/resize.subject.js +2 -1
- package/dist/collection/utils/swiper/controls/dot-control.js +1 -1
- package/dist/collection/utils/swiper/swiper.util.js +0 -17
- package/dist/collection/utils/visibility/index.js +2 -0
- package/dist/collection/utils/visibility/visibility.decorator.js +23 -0
- package/dist/collection/utils/visibility/visibility.interfaces.js +1 -0
- package/dist/collection/utils/visibility/visibility.listener.js +41 -0
- package/dist/collection/utils/visibility/visibility.subject.js +23 -0
- package/dist/esm/animation.decorator-903bd4d2.js +75 -0
- package/dist/esm/app-globals-83570026.js +5 -0
- package/dist/esm/bal-accordion_4.entry.js +2 -2
- package/dist/esm/bal-app.entry.js +1 -1
- package/dist/esm/bal-button_2.entry.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +22 -15
- package/dist/esm/bal-checkbox-button.entry.js +3 -3
- package/dist/esm/bal-checkbox_2.entry.js +4 -4
- package/dist/esm/bal-date-calendar-cell.entry.js +2 -2
- package/dist/esm/bal-date-calendar_2.entry.js +4 -4
- package/dist/esm/bal-date.entry.js +3 -3
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-dropdown.entry.js +3 -3
- package/dist/esm/bal-field_5.entry.js +2 -2
- package/dist/esm/bal-file-upload.entry.js +2 -2
- package/dist/esm/bal-footer.entry.js +1 -1
- package/dist/esm/bal-form.entry.js +1 -1
- package/dist/esm/bal-hint_5.entry.js +5 -5
- package/dist/esm/bal-input-slider.entry.js +2 -2
- package/dist/esm/bal-input-stepper.entry.js +2 -2
- package/dist/esm/bal-input.entry.js +2 -2
- package/dist/esm/bal-list_8.entry.js +5 -5
- package/dist/esm/bal-logo.entry.js +4 -4
- package/dist/esm/bal-modal_3.entry.js +2 -2
- package/dist/esm/bal-nav_8.entry.js +6 -6
- package/dist/esm/bal-navbar_5.entry.js +4 -4
- package/dist/esm/bal-number-input.entry.js +2 -2
- package/dist/esm/bal-option_2.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +4 -4
- package/dist/esm/bal-popup.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +5 -5
- package/dist/esm/bal-radio-button.entry.js +3 -3
- package/dist/esm/bal-radio_2.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +31 -14
- package/dist/esm/bal-select_2.entry.js +2 -2
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-spinner.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +6 -6
- package/dist/esm/bal-tab-item_2.entry.js +45 -31
- package/dist/esm/bal-textarea.entry.js +2 -2
- package/dist/esm/bal-time-input.entry.js +2 -2
- package/dist/esm/bal-tooltip.entry.js +2 -2
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-01f6809e.js → breakpoints.decorator-246ea7b5.js} +1 -1
- package/dist/esm/{breakpoints.subject-cc740608.js → breakpoints.subject-35e43013.js} +2 -2
- package/dist/esm/{element-states.decorator-4cf6af31.js → element-states.decorator-200c85c8.js} +1 -1
- package/dist/esm/{floating-ui-922202fe.js → floating-ui-f930810d.js} +1 -1
- package/dist/esm/{focus.decorator-c2c05d01.js → focus.decorator-a6de858a.js} +1 -1
- package/dist/esm/{form-input-1f3d8337.js → form-input-a5a2b129.js} +1 -1
- package/dist/esm/{app-globals-92fef8fd.js → global-88c7b04e.js} +2 -4
- package/dist/esm/{helpers-32d9e1cc.js → helpers-21ff73ef.js} +2 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/initialize-22c1bebc.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{mutation.decorator-0c202bed.js → mutation.decorator-07d5ba75.js} +1 -1
- package/dist/esm/{overlays-fa0ccf81.js → overlays-b7ba3a20.js} +1 -1
- package/dist/esm/{resize.decorator-bd416c47.js → resize.decorator-28179d27.js} +5 -5
- package/dist/esm/{swipe.decorator-20f4a0cb.js → swipe.decorator-b46cda4b.js} +1 -1
- package/dist/esm/{swipe.subject-e3db5994.js → swipe.subject-1d0412f1.js} +1 -1
- package/dist/esm/{swiper.util-0589b550.js → swiper.util-21981c17.js} +3 -20
- package/dist/esm/{tokens.esm-ddf14bd4.js → tokens.esm-66f8b8c3.js} +1 -1
- package/dist/esm/visibility.decorator-d0cac6a6.js +88 -0
- package/dist/esm/{window-resize.decorator-b9d3c86c.js → window-resize.decorator-a19d2974.js} +1 -1
- package/dist/esm-es5/animation.decorator-903bd4d2.js +1 -0
- package/dist/esm-es5/app-globals-83570026.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-button.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.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-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-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-button.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-246ea7b5.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-cc740608.js → breakpoints.subject-35e43013.js} +1 -1
- package/dist/esm-es5/{element-states.decorator-4cf6af31.js → element-states.decorator-200c85c8.js} +1 -1
- package/dist/esm-es5/{floating-ui-922202fe.js → floating-ui-f930810d.js} +1 -1
- package/dist/esm-es5/{focus.decorator-c2c05d01.js → focus.decorator-a6de858a.js} +1 -1
- package/dist/esm-es5/{form-input-1f3d8337.js → form-input-a5a2b129.js} +1 -1
- package/dist/esm-es5/global-88c7b04e.js +1 -0
- package/dist/esm-es5/{helpers-32d9e1cc.js → helpers-21ff73ef.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-22c1bebc.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{mutation.decorator-0c202bed.js → mutation.decorator-07d5ba75.js} +1 -1
- package/dist/esm-es5/{overlays-fa0ccf81.js → overlays-b7ba3a20.js} +1 -1
- package/dist/esm-es5/{resize.decorator-bd416c47.js → resize.decorator-28179d27.js} +1 -1
- package/dist/esm-es5/{swipe.decorator-20f4a0cb.js → swipe.decorator-b46cda4b.js} +1 -1
- package/dist/esm-es5/{swipe.subject-e3db5994.js → swipe.subject-1d0412f1.js} +1 -1
- package/dist/esm-es5/swiper.util-21981c17.js +1 -0
- package/dist/esm-es5/visibility.decorator-d0cac6a6.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-b9d3c86c.js → window-resize.decorator-a19d2974.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +3 -2
- package/dist/types/components/bal-segment/bal-segment.d.ts +5 -2
- package/dist/types/components/bal-tabs/bal-tabs.d.ts +5 -3
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +37 -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/utils/animation/animation.decorator.d.ts +3 -0
- package/dist/types/utils/animation/animation.interfaces.d.ts +7 -0
- package/dist/types/utils/animation/animation.listener.d.ts +9 -0
- package/dist/types/utils/animation/animation.subject.d.ts +9 -0
- package/dist/types/utils/animation/index.d.ts +2 -0
- package/dist/types/utils/helpers.d.ts +1 -1
- package/dist/types/utils/swiper/swiper.util.d.ts +0 -1
- package/dist/types/utils/visibility/index.d.ts +2 -0
- package/dist/types/utils/visibility/visibility.decorator.d.ts +3 -0
- package/dist/types/utils/visibility/visibility.interfaces.d.ts +4 -0
- package/dist/types/utils/visibility/visibility.listener.d.ts +9 -0
- package/dist/types/utils/visibility/visibility.subject.d.ts +9 -0
- package/package.json +7 -7
- package/components/bal-dropdown2.js +0 -773
- package/components/bal-option2.js +0 -168
- package/dist/baloise-design-system/p-12ff7815.js +0 -1
- package/dist/baloise-design-system/p-288461e687.system.entry.js +0 -1
- package/dist/baloise-design-system/p-349d1c26c6.entry.js +0 -1
- package/dist/baloise-design-system/p-39dba60e75.system.entry.js +0 -1
- package/dist/baloise-design-system/p-5622c208.system.js +0 -1
- package/dist/baloise-design-system/p-70f7b546.system.js +0 -1
- package/dist/baloise-design-system/p-78ba217818.entry.js +0 -1
- package/dist/baloise-design-system/p-7b6c84c359.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b3e4339305.entry.js +0 -1
- package/dist/baloise-design-system/p-ef436fd645.system.entry.js +0 -1
- package/dist/baloise-design-system/p-f67047f5ce.entry.js +0 -1
- package/dist/esm-es5/app-globals-92fef8fd.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-01f6809e.js +0 -1
- package/dist/esm-es5/swiper.util-0589b550.js +0 -1
- /package/dist/baloise-design-system/{p-c9bb496a.system.js → p-6f8e0ebc.system.js} +0 -0
- /package/dist/baloise-design-system/{p-1837eab3.js → p-a2ec67f5.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-ddf14bd4.js → tokens.esm-66f8b8c3.js} +0 -0
|
@@ -1,773 +0,0 @@
|
|
|
1
|
-
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
-
import { B as BEM } from './bem.js';
|
|
4
|
-
import { L as Logger } from './log.js';
|
|
5
|
-
import { s as stopEventBubbling } from './form-input.js';
|
|
6
|
-
import { i as inheritAttributes } from './attributes.js';
|
|
7
|
-
import { d as defaultBalAriaForm } from './form.js';
|
|
8
|
-
import { p as rIC, b as waitAfterFramePaint, l as addEventListener, r as removeEventListener, d as waitAfterIdleCallback } from './helpers.js';
|
|
9
|
-
import { b as balBrowser } from './browser.js';
|
|
10
|
-
import { a as areArraysEqual } from './array.js';
|
|
11
|
-
import { l as lodash_isnil } from './index3.js';
|
|
12
|
-
import { F as FOCUS_KEYS } from './focus-visible.js';
|
|
13
|
-
import { b as balFloatingUi } from './floating-ui.js';
|
|
14
|
-
import { D as DropdownOptionUtil } from './option.js';
|
|
15
|
-
import { c as isArrowDownKey, d as isArrowUpKey, i as isEnterKey, e as isEscapeKey, a as isSpaceKey } from './keyboard.helpers.js';
|
|
16
|
-
import { a as ariaBooleanToString } from './aria.js';
|
|
17
|
-
import { d as defaultConfig } from './config.default.js';
|
|
18
|
-
import { L as ListenToConfig } from './config.decorator.js';
|
|
19
|
-
|
|
20
|
-
class DropdownAutoFillUtil {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.handleAutoFill = async (ev) => {
|
|
23
|
-
stopEventBubbling(ev);
|
|
24
|
-
if (this.isAutoFillAllowed()) {
|
|
25
|
-
this.component.isAutoFilled = true;
|
|
26
|
-
const autoFillValue = this.component.nativeEl.value;
|
|
27
|
-
const newValue = await this.parseAutoFillValueWithOptions(autoFillValue);
|
|
28
|
-
if (newValue === undefined) {
|
|
29
|
-
this.component.isAutoFilled = false;
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (!areArraysEqual(newValue, this.component.rawValue)) {
|
|
33
|
-
this.component.valueUtil.updateRawValueBySelection(newValue, true);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
connectedCallback(component) {
|
|
39
|
-
this.component = component;
|
|
40
|
-
}
|
|
41
|
-
isAutoFillAllowed() {
|
|
42
|
-
return !this.component.multiple;
|
|
43
|
-
}
|
|
44
|
-
async parseAutoFillValueWithOptions(autoFillValue) {
|
|
45
|
-
const options = await this.component.listEl.getOptions();
|
|
46
|
-
const value = undefined;
|
|
47
|
-
for (let index = 0; index < options.length; index++) {
|
|
48
|
-
const option = options[index];
|
|
49
|
-
if (option.value === autoFillValue || option.label === autoFillValue) {
|
|
50
|
-
return [option.value];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return value;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const i18nBalDropdown = {
|
|
58
|
-
de: {
|
|
59
|
-
clearable: 'Löschen',
|
|
60
|
-
open: 'Öffnen',
|
|
61
|
-
close: 'Schließen',
|
|
62
|
-
},
|
|
63
|
-
en: {
|
|
64
|
-
clearable: 'clear',
|
|
65
|
-
open: 'Open',
|
|
66
|
-
close: 'Close',
|
|
67
|
-
},
|
|
68
|
-
fr: {
|
|
69
|
-
clearable: 'Effacer',
|
|
70
|
-
open: 'Ouvrir',
|
|
71
|
-
close: 'Fermer',
|
|
72
|
-
},
|
|
73
|
-
it: {
|
|
74
|
-
clearable: 'Cancellare',
|
|
75
|
-
open: 'Apri',
|
|
76
|
-
close: 'Chiudi',
|
|
77
|
-
},
|
|
78
|
-
nl: {
|
|
79
|
-
clearable: 'Wissen',
|
|
80
|
-
open: 'Open',
|
|
81
|
-
close: 'Sluiten',
|
|
82
|
-
},
|
|
83
|
-
es: {
|
|
84
|
-
clearable: 'Limpiar',
|
|
85
|
-
open: 'Abrir',
|
|
86
|
-
close: 'Cerrar',
|
|
87
|
-
},
|
|
88
|
-
pl: {
|
|
89
|
-
clearable: 'Wyczyść',
|
|
90
|
-
open: 'Otwórz',
|
|
91
|
-
close: 'Zamknij',
|
|
92
|
-
},
|
|
93
|
-
pt: {
|
|
94
|
-
clearable: 'Limpar',
|
|
95
|
-
open: 'Abrir',
|
|
96
|
-
close: 'Fechar',
|
|
97
|
-
},
|
|
98
|
-
sv: {
|
|
99
|
-
clearable: 'Rensa',
|
|
100
|
-
open: 'Öppna',
|
|
101
|
-
close: 'Stäng',
|
|
102
|
-
},
|
|
103
|
-
fi: {
|
|
104
|
-
clearable: 'Tyhjennä',
|
|
105
|
-
open: 'Avaa',
|
|
106
|
-
close: 'Sulje',
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
class DropdownEventsUtil {
|
|
111
|
-
constructor() {
|
|
112
|
-
this.handlePointerDown = () => {
|
|
113
|
-
this.component.isKeyboardMode = false;
|
|
114
|
-
};
|
|
115
|
-
this.handleKeydown = (ev) => {
|
|
116
|
-
this.component.isKeyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
connectedCallback(component) {
|
|
120
|
-
this.component = component;
|
|
121
|
-
}
|
|
122
|
-
handleFocus(ev) {
|
|
123
|
-
this.component.hasFocus = true;
|
|
124
|
-
this.component.balFocus.emit(ev);
|
|
125
|
-
}
|
|
126
|
-
handleBlur(ev) {
|
|
127
|
-
if (!this.component.isExpanded) {
|
|
128
|
-
this.component.hasFocus = false;
|
|
129
|
-
rIC(() => this.component.balBlur.emit(ev));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
handleClick(ev) {
|
|
133
|
-
if (!this.component.valueUtil.isDisabled()) {
|
|
134
|
-
if (this.component.chips) {
|
|
135
|
-
const targetEl = ev.target;
|
|
136
|
-
const closeEl = targetEl.closest('bal-close');
|
|
137
|
-
if (closeEl) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (this.component.clearable) {
|
|
142
|
-
const targetEl = ev.target;
|
|
143
|
-
const clearEl = targetEl.closest('.bal-dropdown__clear');
|
|
144
|
-
if (clearEl) {
|
|
145
|
-
this.component.valueUtil.updateRawValueBySelection([]);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
this.component.popupUtil.toggleList();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
handleOutsideClick(ev) {
|
|
153
|
-
var _a;
|
|
154
|
-
if (this.component.isExpanded) {
|
|
155
|
-
if (!this.component.el.contains(ev.target)) {
|
|
156
|
-
this.component.isExpanded = false;
|
|
157
|
-
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.resetFocus();
|
|
158
|
-
this.component.hasFocus = false;
|
|
159
|
-
rIC(() => this.component.balBlur.emit(ev));
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
class DropdownFocusUtil {
|
|
166
|
-
connectedCallback(component) {
|
|
167
|
-
this.component = component;
|
|
168
|
-
}
|
|
169
|
-
focusOptionByLabel(key, options = {}) {
|
|
170
|
-
this.component.labelToFocus = (this.component.labelToFocus + key).trim();
|
|
171
|
-
if (this.component.labelToFocus.length > 0) {
|
|
172
|
-
clearTimeout(this.keyHitTimeout);
|
|
173
|
-
this.keyHitTimeout = setTimeout(() => {
|
|
174
|
-
var _a;
|
|
175
|
-
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.focusByLabel(this.component.labelToFocus, options);
|
|
176
|
-
}, 100);
|
|
177
|
-
clearTimeout(this.timeout);
|
|
178
|
-
this.timeout = setTimeout(async () => {
|
|
179
|
-
this.component.labelToFocus = '';
|
|
180
|
-
}, 1000);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
class DropdownFormSubmitUtil {
|
|
186
|
-
connectedCallback(component) {
|
|
187
|
-
this.component = component;
|
|
188
|
-
this.component.initialValue = this.component.value;
|
|
189
|
-
}
|
|
190
|
-
componentDidRender() {
|
|
191
|
-
if (this.component.selectEl) {
|
|
192
|
-
const options = this.component.selectEl.querySelectorAll('option');
|
|
193
|
-
options.forEach(option => {
|
|
194
|
-
if (this.component.rawValue.includes(option.value)) {
|
|
195
|
-
option.selected = true;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// @Listen('reset', { capture: true, target: 'document' })
|
|
201
|
-
handle(ev) {
|
|
202
|
-
const formElement = ev.target;
|
|
203
|
-
if (formElement === null || formElement === void 0 ? void 0 : formElement.contains(this.component.el)) {
|
|
204
|
-
if (this.resetHandlerTimer) {
|
|
205
|
-
clearTimeout(this.resetHandlerTimer);
|
|
206
|
-
}
|
|
207
|
-
this.resetHandlerTimer = setTimeout(() => {
|
|
208
|
-
const newRawValue = this.component.valueUtil.parseValueString(this.component.initialValue);
|
|
209
|
-
this.component.valueUtil.updateRawValueBySelection(newRawValue);
|
|
210
|
-
}, 0);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
const DropdownNativeSelect = ({ name, httpFormSubmit, multiple, required, disabled, rawValue, refSelectEl, }) => {
|
|
215
|
-
const block = BEM.block('dropdown');
|
|
216
|
-
return httpFormSubmit ? (h("select", { class: Object.assign({}, block.element('root').element('select').class()), "aria-hidden": "true", name: name, multiple: multiple, required: required, disabled: disabled, tabindex: -1, ref: refSelectEl }, rawValue.map((value) => (h("option", { key: value, value: value, selected: true }, value))))) : ('');
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
const DropdownIcon = ({ size, theme, icon, language, loading, clearable, invalid, filled, expanded, disabled, }) => {
|
|
220
|
-
const block = BEM.block('dropdown');
|
|
221
|
-
if (loading) {
|
|
222
|
-
return h("bal-spinner", { class: Object.assign({}, block.element('rear').class()), small: true, variation: "circle" });
|
|
223
|
-
}
|
|
224
|
-
else if (clearable && filled && !disabled) {
|
|
225
|
-
return (h("button", { title: i18nBalDropdown[language].clearable, type: 'button', tabIndex: -1, class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('rear').class()), block.element('clear').class()), block.element('clear').modifier('invalid').class(invalid)), block
|
|
226
|
-
.element('clear')
|
|
227
|
-
.modifier('theme-purple')
|
|
228
|
-
.class(theme === 'purple')) },
|
|
229
|
-
h("bal-icon", { class: Object.assign({}, block.element('rear').class()), name: theme === 'purple' ? 'close' : 'close-circle', size: size, color: theme === 'purple' ? 'primary' : 'grey' })));
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
return (h("bal-icon", { class: Object.assign({}, block.element('rear').class()), name: icon, size: size, turn: expanded, color: disabled ? 'grey' : invalid ? 'danger' : !filled && theme === 'purple' ? 'primary-light' : 'primary' }));
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const DropdownOptionList = ({ inputId, isExpanded, rawOptions, isDisabled, hasPropOptions, required, filter, multiple, contentHeight, refPanelEl, refListEl, }) => {
|
|
237
|
-
const block = BEM.block('dropdown');
|
|
238
|
-
return (h("div", { id: `${inputId}-menu`, class: Object.assign(Object.assign({}, block.element('list').class()), block.element('list').modifier('expanded').class(isExpanded)), ref: refPanelEl },
|
|
239
|
-
h("bal-option-list", { multiple: multiple, disabled: isDisabled, filter: filter, required: required, contentHeight: contentHeight, ref: refListEl },
|
|
240
|
-
h("slot", null),
|
|
241
|
-
hasPropOptions
|
|
242
|
-
? rawOptions.map(option => (h("bal-option", { key: option.value, value: option.value, label: option.label, disabled: option.disabled, multiline: option.multiline, invalid: option.invalid, hidden: option.hidden, selected: option.selected, focused: option.focused }, option.label)))
|
|
243
|
-
: '')));
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
class DropdownPopupUtil {
|
|
247
|
-
constructor() {
|
|
248
|
-
this.updatePanelPosition = (lib, referenceEl, floatingEl) => () => {
|
|
249
|
-
lib
|
|
250
|
-
.computePosition(referenceEl, floatingEl, {
|
|
251
|
-
placement: 'bottom-start',
|
|
252
|
-
middleware: [lib.flip(), lib.shift()],
|
|
253
|
-
})
|
|
254
|
-
.then(({ x, y }) => {
|
|
255
|
-
Object.assign(floatingEl.style, {
|
|
256
|
-
left: `${x}px`,
|
|
257
|
-
top: `${y}px`,
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
connectedCallback(component) {
|
|
263
|
-
this.component = component;
|
|
264
|
-
}
|
|
265
|
-
toggleList() {
|
|
266
|
-
if (!this.component.valueUtil.isDisabled()) {
|
|
267
|
-
if (this.component.isExpanded) {
|
|
268
|
-
this.collapseList();
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
this.expandList();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
async expandList() {
|
|
276
|
-
var _a;
|
|
277
|
-
if (this.component.panelEl) {
|
|
278
|
-
const lib = await balFloatingUi.load();
|
|
279
|
-
this.component.panelCleanup = lib.autoUpdate(this.component.el, this.component.panelEl, this.updatePanelPosition(lib, this.component.el, this.component.panelEl));
|
|
280
|
-
}
|
|
281
|
-
this.component.isExpanded = true;
|
|
282
|
-
await ((_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.focusSelected());
|
|
283
|
-
}
|
|
284
|
-
collapseList() {
|
|
285
|
-
var _a;
|
|
286
|
-
this.component.isExpanded = false;
|
|
287
|
-
(_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.resetFocus();
|
|
288
|
-
if (this.component.panelCleanup) {
|
|
289
|
-
this.component.panelCleanup();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
class DropdownValueUtil {
|
|
295
|
-
connectedCallback(component) {
|
|
296
|
-
this.component = component;
|
|
297
|
-
}
|
|
298
|
-
componentDidLoad() {
|
|
299
|
-
setTimeout(() => this.valueChanged(this.component.value, undefined), 0);
|
|
300
|
-
}
|
|
301
|
-
isDisabled() {
|
|
302
|
-
return this.component.disabled || this.component.readonly;
|
|
303
|
-
}
|
|
304
|
-
isFilled() {
|
|
305
|
-
return this.component.rawValue && this.component.rawValue.length > 0;
|
|
306
|
-
}
|
|
307
|
-
valueChanged(newValue, oldValue) {
|
|
308
|
-
const newValueType = typeof newValue;
|
|
309
|
-
const oldValueType = typeof oldValue;
|
|
310
|
-
if (newValueType !== oldValueType) {
|
|
311
|
-
this.updateRawValueByValueProp(newValue);
|
|
312
|
-
}
|
|
313
|
-
if (newValueType === 'string' && newValue !== oldValue) {
|
|
314
|
-
this.updateRawValueByValueProp(newValue);
|
|
315
|
-
}
|
|
316
|
-
if (Array.isArray(newValue) && Array.isArray(oldValue) && !areArraysEqual(newValue, oldValue)) {
|
|
317
|
-
this.updateRawValueByValueProp(newValue);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
updateRawValueBySelection(newRawValue = [], isAutoFilled = false) {
|
|
321
|
-
this.component.isAutoFilled = isAutoFilled;
|
|
322
|
-
this.updateRawValue(newRawValue);
|
|
323
|
-
if (this.component.multiple) {
|
|
324
|
-
this.component.balChange.emit(this.component.rawValue);
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
327
|
-
this.component.balChange.emit(this.component.rawValue[0]);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
parseValueString(newValue = []) {
|
|
331
|
-
let newRawValue = [];
|
|
332
|
-
if (!lodash_isnil(newValue) && newValue !== '') {
|
|
333
|
-
if (Array.isArray(newValue)) {
|
|
334
|
-
newRawValue = [...newValue.filter(v => !lodash_isnil(v))];
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
if (newValue.split('').includes(',')) {
|
|
338
|
-
newRawValue = [
|
|
339
|
-
...newValue
|
|
340
|
-
.split(',')
|
|
341
|
-
.filter(v => v)
|
|
342
|
-
.map(v => v.trim()),
|
|
343
|
-
];
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
newRawValue = [newValue];
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
return newRawValue;
|
|
351
|
-
}
|
|
352
|
-
updateRawValueByValueProp(newValue = []) {
|
|
353
|
-
const newRawValue = this.parseValueString(newValue);
|
|
354
|
-
this.updateRawValue(newRawValue);
|
|
355
|
-
}
|
|
356
|
-
async updateRawValue(newRawValue = []) {
|
|
357
|
-
this.component.rawValue = newRawValue;
|
|
358
|
-
if (this.component.listEl) {
|
|
359
|
-
await this.component.listEl.updateSelected(this.component.rawValue);
|
|
360
|
-
}
|
|
361
|
-
await this.updateInputContent();
|
|
362
|
-
}
|
|
363
|
-
removeOption(option) {
|
|
364
|
-
const newRawValue = this.component.rawValue.filter(value => value !== option.value);
|
|
365
|
-
this.updateRawValueBySelection(newRawValue);
|
|
366
|
-
}
|
|
367
|
-
async updateInputContent() {
|
|
368
|
-
await waitAfterFramePaint();
|
|
369
|
-
if (this.component.listEl) {
|
|
370
|
-
this.component.choices = await this.component.listEl.getSelectedOptions(this.component.rawValue);
|
|
371
|
-
this.component.inputLabel = this.component.choices
|
|
372
|
-
.map(option => option.label.trim())
|
|
373
|
-
.sort()
|
|
374
|
-
.join(',');
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
const DropdownValue = ({ inlineLabel, filled, chips, placeholder, choices, invalid, disabled, readonly, onRemoveChip, }) => {
|
|
379
|
-
const block = BEM.block('dropdown');
|
|
380
|
-
if (filled) {
|
|
381
|
-
if (chips) {
|
|
382
|
-
return (h("div", { class: Object.assign({}, block.element('root').element('content').element('chips').class()) }, choices.map(option => (h("bal-tag", { key: option.value, "data-test": "bal-dropdown-chip", size: "small", invalid: invalid, disabled: disabled || readonly, closable: !(disabled || readonly), onBalCloseClick: () => onRemoveChip(option) }, option.label)))));
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
return (inlineLabel && `${inlineLabel}: `) + choices.map(option => option.label).join(', ');
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
return placeholder;
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
const DropdownInput = ({ name, inputId, httpFormSubmit, ariaForm, rawValue, autocomplete, required, disabled, readonly, placeholder, expanded, invalid, language, inputLabel, inheritedAttributes, refInputEl, onChange, onFocus, onBlur, onKeyDown, }) => {
|
|
394
|
-
const block = BEM.block('dropdown');
|
|
395
|
-
const Input = () => (h("input", Object.assign({ id: ariaForm.controlId || `${inputId}-ctrl`, class: Object.assign({}, block.element('root').element('input').class()), type: "text", size: 1, inputmode: "none", tabindex: "0", name: name, autoComplete: autocomplete, value: rawValue.join(','), required: required, disabled: disabled, readonly: readonly, placeholder: placeholder, title: expanded ? i18nBalDropdown[language].close : i18nBalDropdown[language].open, "aria-label": expanded ? i18nBalDropdown[language].close : i18nBalDropdown[language].open, "aria-owns": `${inputId}-menu`, "aria-invalid": ariaBooleanToString(invalid), "aria-disabled": ariaBooleanToString(disabled || readonly), "aria-labelledby": ariaForm.labelId, "aria-describedby": ariaForm.messageId, "aria-haspopup": 'listbox', "data-native": true, "data-label": inputLabel, "data-value": rawValue.join(','), ref: el => refInputEl(el), onChange: ev => onChange(ev), onFocus: ev => onFocus(ev), onBlur: ev => onBlur(ev), onKeyDown: ev => onKeyDown(ev) }, inheritedAttributes)));
|
|
396
|
-
if (httpFormSubmit) {
|
|
397
|
-
return h(Input, null);
|
|
398
|
-
}
|
|
399
|
-
return (h("form", { novalidate: true },
|
|
400
|
-
h(Input, null)));
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
const balDropdownCss = ":root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-2);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-2);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1;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:.5rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}@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:block;visibility:hidden;opacity:0;min-width:100%;width:100%;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}.bal-dropdown__list--expanded{visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__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--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):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):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):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):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):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):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):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded,.bal-dropdown__root--theme-purple-expanded:hover,.bal-dropdown__root--theme-purple-expanded:active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded: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%}";
|
|
404
|
-
const BalDropdownStyle0 = balDropdownCss;
|
|
405
|
-
|
|
406
|
-
const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLElement {
|
|
407
|
-
constructor() {
|
|
408
|
-
super();
|
|
409
|
-
this.__registerHost();
|
|
410
|
-
this.balChange = createEvent(this, "balChange", 7);
|
|
411
|
-
this.balFocus = createEvent(this, "balFocus", 7);
|
|
412
|
-
this.balBlur = createEvent(this, "balBlur", 7);
|
|
413
|
-
this.inputId = `bal-dropdown-${balDropdownIds++}`;
|
|
414
|
-
this.inheritedAttributes = {};
|
|
415
|
-
this.initialValue = [];
|
|
416
|
-
this.nativeOptions = [];
|
|
417
|
-
this.valueUtil = new DropdownValueUtil();
|
|
418
|
-
this.eventsUtil = new DropdownEventsUtil();
|
|
419
|
-
this.popupUtil = new DropdownPopupUtil();
|
|
420
|
-
this.optionUtil = new DropdownOptionUtil();
|
|
421
|
-
this.formSubmitUtil = new DropdownFormSubmitUtil();
|
|
422
|
-
this.focusUtil = new DropdownFocusUtil();
|
|
423
|
-
this.autoFillUtil = new DropdownAutoFillUtil();
|
|
424
|
-
/**
|
|
425
|
-
* LIFECYCLE
|
|
426
|
-
* ------------------------------------------------------
|
|
427
|
-
*/
|
|
428
|
-
this.hasConnected = false;
|
|
429
|
-
this.listenToOptionChange = (ev) => {
|
|
430
|
-
this.optionUtil.listenToOptionChange(ev);
|
|
431
|
-
};
|
|
432
|
-
this.listenOnClickOutside = (ev) => {
|
|
433
|
-
this.eventsUtil.handleOutsideClick(ev);
|
|
434
|
-
};
|
|
435
|
-
this.resetHandler = (ev) => {
|
|
436
|
-
this.formSubmitUtil.handle(ev);
|
|
437
|
-
};
|
|
438
|
-
/**
|
|
439
|
-
* EVENT BINDING
|
|
440
|
-
* ------------------------------------------------------
|
|
441
|
-
*/
|
|
442
|
-
this.handleAutoFill = async (ev) => {
|
|
443
|
-
this.log('(handleAutoFill)', ev, this.nativeEl.value);
|
|
444
|
-
this.autoFillUtil.handleAutoFill(ev);
|
|
445
|
-
};
|
|
446
|
-
this.handleKeyDown = (ev) => {
|
|
447
|
-
var _a, _b, _c, _d, _e;
|
|
448
|
-
if (ev && ev.key) {
|
|
449
|
-
if (this.isExpanded) {
|
|
450
|
-
/**
|
|
451
|
-
* ⬇️ Arrow up key
|
|
452
|
-
*/
|
|
453
|
-
if (isArrowDownKey(ev)) {
|
|
454
|
-
stopEventBubbling(ev);
|
|
455
|
-
(_a = this.listEl) === null || _a === void 0 ? void 0 : _a.focusNext();
|
|
456
|
-
/**
|
|
457
|
-
* ⬆️ Arrow up key
|
|
458
|
-
*/
|
|
459
|
-
}
|
|
460
|
-
else if (isArrowUpKey(ev)) {
|
|
461
|
-
stopEventBubbling(ev);
|
|
462
|
-
(_b = this.listEl) === null || _b === void 0 ? void 0 : _b.focusPrevious();
|
|
463
|
-
/**
|
|
464
|
-
* Go to top of the list
|
|
465
|
-
*/
|
|
466
|
-
}
|
|
467
|
-
else if (ev.key === 'Home' || ev.key === 'PageUp') {
|
|
468
|
-
stopEventBubbling(ev);
|
|
469
|
-
(_c = this.listEl) === null || _c === void 0 ? void 0 : _c.focusFirst();
|
|
470
|
-
/**
|
|
471
|
-
* Go to bottom of the list
|
|
472
|
-
*/
|
|
473
|
-
}
|
|
474
|
-
else if (ev.key === 'End' || ev.key === 'PageDown') {
|
|
475
|
-
stopEventBubbling(ev);
|
|
476
|
-
(_d = this.listEl) === null || _d === void 0 ? void 0 : _d.focusLast();
|
|
477
|
-
/**
|
|
478
|
-
* Select focused option
|
|
479
|
-
*/
|
|
480
|
-
}
|
|
481
|
-
else if (isEnterKey(ev)) {
|
|
482
|
-
stopEventBubbling(ev);
|
|
483
|
-
(_e = this.listEl) === null || _e === void 0 ? void 0 : _e.selectByFocus();
|
|
484
|
-
/**
|
|
485
|
-
* Close list
|
|
486
|
-
*/
|
|
487
|
-
}
|
|
488
|
-
else if (ev.key === 'Tab' || isEscapeKey(ev)) {
|
|
489
|
-
this.popupUtil.collapseList();
|
|
490
|
-
/**
|
|
491
|
-
* Focus on label
|
|
492
|
-
*/
|
|
493
|
-
}
|
|
494
|
-
else if (ev.key.length === 1) {
|
|
495
|
-
this.focusUtil.focusOptionByLabel(ev.key);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
/**
|
|
500
|
-
* Open list
|
|
501
|
-
*/
|
|
502
|
-
if (isEnterKey(ev) || isSpaceKey(ev)) {
|
|
503
|
-
stopEventBubbling(ev);
|
|
504
|
-
this.popupUtil.expandList();
|
|
505
|
-
/**
|
|
506
|
-
* Focus on label
|
|
507
|
-
*/
|
|
508
|
-
}
|
|
509
|
-
else if (ev.key.length === 1) {
|
|
510
|
-
this.focusUtil.focusOptionByLabel(ev.key, { select: true });
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
else {
|
|
515
|
-
// Close the popup on autofill
|
|
516
|
-
if (this.isExpanded) {
|
|
517
|
-
this.popupUtil.collapseList();
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
this.rawOptions = [];
|
|
522
|
-
this.choices = [];
|
|
523
|
-
this.rawValue = [];
|
|
524
|
-
this.hasFocus = false;
|
|
525
|
-
this.isExpanded = false;
|
|
526
|
-
this.isAutoFilled = false;
|
|
527
|
-
this.isKeyboardMode = false;
|
|
528
|
-
this.inputLabel = '';
|
|
529
|
-
this.ariaForm = defaultBalAriaForm;
|
|
530
|
-
this.language = defaultConfig.language;
|
|
531
|
-
this.region = defaultConfig.region;
|
|
532
|
-
this.httpFormSubmit = defaultConfig.httpFormSubmit;
|
|
533
|
-
this.labelToFocus = '';
|
|
534
|
-
this.autocomplete = 'off';
|
|
535
|
-
this.name = this.inputId;
|
|
536
|
-
this.placeholder = '';
|
|
537
|
-
this.inlineLabel = '';
|
|
538
|
-
this.icon = 'caret-down';
|
|
539
|
-
this.size = '';
|
|
540
|
-
this.theme = '';
|
|
541
|
-
this.disabled = false;
|
|
542
|
-
this.readonly = false;
|
|
543
|
-
this.multiple = false;
|
|
544
|
-
this.chips = false;
|
|
545
|
-
this.clearable = false;
|
|
546
|
-
this.invalid = false;
|
|
547
|
-
this.required = false;
|
|
548
|
-
this.loading = false;
|
|
549
|
-
this.filter = 'includes';
|
|
550
|
-
this.contentHeight = 262;
|
|
551
|
-
this.inverted = false;
|
|
552
|
-
this.options = [];
|
|
553
|
-
this.value = [];
|
|
554
|
-
}
|
|
555
|
-
createLogger(log) {
|
|
556
|
-
this.log = log;
|
|
557
|
-
}
|
|
558
|
-
async optionChanged() {
|
|
559
|
-
this.optionUtil.optionChanged();
|
|
560
|
-
}
|
|
561
|
-
valueChanged(newValue, oldValue) {
|
|
562
|
-
this.valueUtil.valueChanged(newValue, oldValue);
|
|
563
|
-
}
|
|
564
|
-
connectedCallback() {
|
|
565
|
-
if (!this.hasConnected) {
|
|
566
|
-
this.eventsUtil.connectedCallback(this);
|
|
567
|
-
this.valueUtil.connectedCallback(this);
|
|
568
|
-
this.popupUtil.connectedCallback(this);
|
|
569
|
-
this.optionUtil.connectedCallback(this);
|
|
570
|
-
this.formSubmitUtil.connectedCallback(this);
|
|
571
|
-
this.focusUtil.connectedCallback(this);
|
|
572
|
-
this.autoFillUtil.connectedCallback(this);
|
|
573
|
-
}
|
|
574
|
-
addEventListener(this.el, 'balOptionChange', this.listenToOptionChange);
|
|
575
|
-
if (balBrowser.hasDocument) {
|
|
576
|
-
addEventListener(document, 'keydown', this.eventsUtil.handleKeydown);
|
|
577
|
-
addEventListener(document, 'touchstart', this.eventsUtil.handlePointerDown);
|
|
578
|
-
addEventListener(document, 'mousedown', this.eventsUtil.handlePointerDown);
|
|
579
|
-
addEventListener(document, 'click', this.listenOnClickOutside);
|
|
580
|
-
addEventListener(document, 'reset', this.resetHandler, {
|
|
581
|
-
capture: true,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
this.hasConnected = true;
|
|
585
|
-
}
|
|
586
|
-
disconnectedCallback() {
|
|
587
|
-
removeEventListener(this.el, 'balOptionChange', this.listenToOptionChange);
|
|
588
|
-
if (balBrowser.hasDocument) {
|
|
589
|
-
removeEventListener(document, 'keydown', this.eventsUtil.handleKeydown);
|
|
590
|
-
removeEventListener(document, 'touchstart', this.eventsUtil.handlePointerDown);
|
|
591
|
-
removeEventListener(document, 'mousedown', this.eventsUtil.handlePointerDown);
|
|
592
|
-
removeEventListener(document, 'click', this.listenOnClickOutside);
|
|
593
|
-
removeEventListener(document, 'reset', this.resetHandler, {
|
|
594
|
-
capture: true,
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
async componentWillRender() {
|
|
599
|
-
this.inheritedAttributes = inheritAttributes(this.el, ['tabindex']);
|
|
600
|
-
await this.optionUtil.componentWillRender();
|
|
601
|
-
}
|
|
602
|
-
componentDidRender() {
|
|
603
|
-
this.formSubmitUtil.componentDidRender();
|
|
604
|
-
}
|
|
605
|
-
componentDidLoad() {
|
|
606
|
-
this.valueUtil.componentDidLoad();
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* LISTENERS
|
|
610
|
-
* ------------------------------------------------------
|
|
611
|
-
*/
|
|
612
|
-
/**
|
|
613
|
-
* @internal define config for the component
|
|
614
|
-
*/
|
|
615
|
-
async configChanged(state) {
|
|
616
|
-
this.language = state.language;
|
|
617
|
-
this.region = state.region;
|
|
618
|
-
this.httpFormSubmit = state.httpFormSubmit;
|
|
619
|
-
}
|
|
620
|
-
/**
|
|
621
|
-
* PUBLIC METHODS
|
|
622
|
-
* ------------------------------------------------------
|
|
623
|
-
*/
|
|
624
|
-
/**
|
|
625
|
-
* Sets the focus on the input element
|
|
626
|
-
*/
|
|
627
|
-
async setFocus() {
|
|
628
|
-
if (this.nativeEl && !this.valueUtil.isDisabled()) {
|
|
629
|
-
await waitAfterIdleCallback();
|
|
630
|
-
this.nativeEl.focus();
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Returns the value of the component
|
|
635
|
-
*/
|
|
636
|
-
async getValue() {
|
|
637
|
-
return this.rawValue;
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* Sets the value to `[]`, the input value to ´''´ and the focus index to ´0´.
|
|
641
|
-
*/
|
|
642
|
-
async clear() {
|
|
643
|
-
this.valueUtil.updateRawValueBySelection([]);
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Opens the popup with option list
|
|
647
|
-
*/
|
|
648
|
-
async open() {
|
|
649
|
-
if (!this.valueUtil.isDisabled() && this.panelEl) {
|
|
650
|
-
await this.popupUtil.expandList();
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Closes the popup with option list
|
|
655
|
-
*/
|
|
656
|
-
async close() {
|
|
657
|
-
if (!this.valueUtil.isDisabled() && this.panelEl) {
|
|
658
|
-
await this.popupUtil.collapseList();
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* Select option by passed value
|
|
663
|
-
*/
|
|
664
|
-
async select(newValue) {
|
|
665
|
-
const parsedNewValue = this.valueUtil.parseValueString(newValue);
|
|
666
|
-
this.valueUtil.updateRawValueBySelection(parsedNewValue);
|
|
667
|
-
}
|
|
668
|
-
/**
|
|
669
|
-
* @internal
|
|
670
|
-
*/
|
|
671
|
-
async setAriaForm(ariaForm) {
|
|
672
|
-
this.ariaForm = Object.assign({}, ariaForm);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* RENDER
|
|
676
|
-
* ------------------------------------------------------
|
|
677
|
-
*/
|
|
678
|
-
render() {
|
|
679
|
-
const block = BEM.block('dropdown');
|
|
680
|
-
const isFilled = this.valueUtil.isFilled();
|
|
681
|
-
const hasSize = this.size !== '';
|
|
682
|
-
const size = `size-${this.size}`;
|
|
683
|
-
const hasTheme = this.theme !== '';
|
|
684
|
-
const theme = `theme-${this.theme}`;
|
|
685
|
-
const focused = this.theme === 'purple' ? this.hasFocus && this.isKeyboardMode : this.hasFocus;
|
|
686
|
-
return (h(Host, { key: '76447733642f7e5cfafaee1d23b7db1d458fea13', class: Object.assign({}, block.class()), tabindex: "-1", id: `${this.inputId}` }, h("div", { key: 'f15d237a0aa27c7bc6d578b107547c2ba7b36ad3', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('root').class()), block.element('root').modifier('focused').class(focused)), block.element('root').modifier('invalid').class(this.invalid)), block.element('root').modifier('disabled').class(this.valueUtil.isDisabled())), block.element('root').modifier('autofill').class(this.isAutoFilled)), block.element('root').modifier(size).class(hasSize)), block.element('root').modifier(theme).class(hasTheme)), block
|
|
687
|
-
.element('root')
|
|
688
|
-
.modifier(theme + '-filled')
|
|
689
|
-
.class(isFilled && hasTheme)), block
|
|
690
|
-
.element('root')
|
|
691
|
-
.modifier(theme + '-expanded')
|
|
692
|
-
.class(this.isExpanded && hasTheme)), "data-test": "bal-dropdown-trigger", onClick: ev => this.eventsUtil.handleClick(ev) }, h("span", { key: '8cd1f403f473212d52bb1d992e506e0db483ad11', class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('root').element('content').class()), block.element('root').element('content').modifier('disabled').class(this.valueUtil.isDisabled())), block.element('root').element('content').modifier('placeholder').class(!this.valueUtil.isFilled())), block.element('root').element('content').modifier(size).class(hasSize)) }, h(DropdownValue, { key: '5e58e0734c37d2827515449e5fe61f3fe489ad01', 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: option => this.valueUtil.removeOption(option) })), h(DropdownInput, { key: 'f289ba14f7120bfad09dfdfc2f034bdacaf52d74', name: this.name, inputId: this.inputId, httpFormSubmit: this.httpFormSubmit, ariaForm: this.ariaForm, rawValue: this.rawValue, autocomplete: this.autocomplete, required: this.required, disabled: this.disabled, readonly: this.readonly, placeholder: this.placeholder, expanded: this.isExpanded, invalid: this.invalid, language: this.language, inputLabel: this.inputLabel, inheritedAttributes: this.inheritedAttributes, refInputEl: el => (this.nativeEl = el), onChange: ev => this.handleAutoFill(ev), onFocus: ev => this.eventsUtil.handleFocus(ev), onBlur: ev => this.eventsUtil.handleBlur(ev), onKeyDown: ev => this.handleKeyDown(ev) }), h(DropdownNativeSelect, { key: 'c32cb85f707db22ed5774d0a6bbd904bc63ea69c', name: this.name, httpFormSubmit: this.httpFormSubmit, multiple: this.multiple, required: this.required, disabled: this.valueUtil.isDisabled(), rawValue: this.rawValue, refSelectEl: el => (this.selectEl = el) }), h(DropdownIcon, { key: 'b263377bf16e268d3f555242e15325ba36d2b91f', 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: isFilled, disabled: this.valueUtil.isDisabled() })), h(DropdownOptionList, { key: 'cdfb11f2ef449f82ddf32f944cea8faea9027372', inputId: this.inputId, block: this.inputId, filter: this.filter, required: this.required, isExpanded: this.isExpanded, isDisabled: this.valueUtil.isDisabled(), hasPropOptions: this.optionUtil.hasPropOptions(), multiple: this.multiple, contentHeight: this.contentHeight, rawOptions: this.rawOptions, refPanelEl: el => (this.panelEl = el), refListEl: el => (this.listEl = el) }, h("slot", { key: '0a281eed8eea22ec5a345d8a1db295ad85b874ed' }))));
|
|
693
|
-
}
|
|
694
|
-
get el() { return this; }
|
|
695
|
-
static get watchers() { return {
|
|
696
|
-
"options": ["optionChanged"],
|
|
697
|
-
"value": ["valueChanged"]
|
|
698
|
-
}; }
|
|
699
|
-
static get style() { return BalDropdownStyle0; }
|
|
700
|
-
}, [4, "bal-dropdown", {
|
|
701
|
-
"autocomplete": [1],
|
|
702
|
-
"name": [1],
|
|
703
|
-
"placeholder": [1],
|
|
704
|
-
"inlineLabel": [1, "inline-label"],
|
|
705
|
-
"icon": [1],
|
|
706
|
-
"size": [1],
|
|
707
|
-
"theme": [1],
|
|
708
|
-
"disabled": [4],
|
|
709
|
-
"readonly": [4],
|
|
710
|
-
"multiple": [4],
|
|
711
|
-
"chips": [4],
|
|
712
|
-
"clearable": [4],
|
|
713
|
-
"invalid": [4],
|
|
714
|
-
"required": [4],
|
|
715
|
-
"loading": [4],
|
|
716
|
-
"filter": [1],
|
|
717
|
-
"contentHeight": [2, "content-height"],
|
|
718
|
-
"inverted": [4],
|
|
719
|
-
"options": [16],
|
|
720
|
-
"value": [1],
|
|
721
|
-
"rawOptions": [32],
|
|
722
|
-
"choices": [32],
|
|
723
|
-
"rawValue": [32],
|
|
724
|
-
"hasFocus": [32],
|
|
725
|
-
"isExpanded": [32],
|
|
726
|
-
"isAutoFilled": [32],
|
|
727
|
-
"isKeyboardMode": [32],
|
|
728
|
-
"inputLabel": [32],
|
|
729
|
-
"ariaForm": [32],
|
|
730
|
-
"language": [32],
|
|
731
|
-
"region": [32],
|
|
732
|
-
"httpFormSubmit": [32],
|
|
733
|
-
"labelToFocus": [32],
|
|
734
|
-
"configChanged": [64],
|
|
735
|
-
"setFocus": [64],
|
|
736
|
-
"getValue": [64],
|
|
737
|
-
"clear": [64],
|
|
738
|
-
"open": [64],
|
|
739
|
-
"close": [64],
|
|
740
|
-
"select": [64],
|
|
741
|
-
"setAriaForm": [64]
|
|
742
|
-
}, undefined, {
|
|
743
|
-
"options": ["optionChanged"],
|
|
744
|
-
"value": ["valueChanged"]
|
|
745
|
-
}]);
|
|
746
|
-
__decorate([
|
|
747
|
-
Logger('bal-dropdown'),
|
|
748
|
-
__metadata("design:type", Function),
|
|
749
|
-
__metadata("design:paramtypes", [Function]),
|
|
750
|
-
__metadata("design:returntype", void 0)
|
|
751
|
-
], Dropdown.prototype, "createLogger", null);
|
|
752
|
-
__decorate([
|
|
753
|
-
ListenToConfig(),
|
|
754
|
-
__metadata("design:type", Function),
|
|
755
|
-
__metadata("design:paramtypes", [Object]),
|
|
756
|
-
__metadata("design:returntype", Promise)
|
|
757
|
-
], Dropdown.prototype, "configChanged", null);
|
|
758
|
-
let balDropdownIds = 0;
|
|
759
|
-
function defineCustomElement() {
|
|
760
|
-
if (typeof customElements === "undefined") {
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
const components = ["bal-dropdown"];
|
|
764
|
-
components.forEach(tagName => { switch (tagName) {
|
|
765
|
-
case "bal-dropdown":
|
|
766
|
-
if (!customElements.get(tagName)) {
|
|
767
|
-
customElements.define(tagName, Dropdown);
|
|
768
|
-
}
|
|
769
|
-
break;
|
|
770
|
-
} });
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
export { Dropdown as D, defineCustomElement as d };
|