@baloise/ds-core 16.3.0 → 16.4.0-nightly.20240917
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/README.md +1 -1
- package/components/all.d.ts +6 -0
- package/components/all.js +9 -0
- package/components/bal-accordion-summary.js +12 -2
- package/components/bal-accordion-trigger.js +15 -2
- package/components/bal-app.js +1 -85
- package/components/bal-app2.js +87 -0
- package/components/bal-carousel-item2.js +13 -3
- package/components/bal-carousel2.js +50 -20
- package/components/bal-checkbox-group.js +9 -3
- package/components/bal-checkbox2.js +23 -5
- package/components/bal-close2.js +1 -6
- package/components/bal-content.js +1 -69
- package/{dist/esm/bal-content.entry.js → components/bal-content2.js} +31 -12
- package/components/bal-date.js +1 -1
- package/components/bal-datepicker.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +260 -0
- package/components/bal-dropdown.js +3 -3
- package/components/bal-file-upload.js +1 -1
- package/components/bal-icon2.js +1 -1
- package/components/bal-label2.js +3 -2
- package/components/bal-list-item-accordion-head2.js +7 -1
- package/components/bal-nav-menu-bar2.js +1 -1
- package/components/bal-nav-menu-flyout2.js +3 -6
- package/components/bal-nav.js +11 -8
- package/components/bal-option-list.js +27 -2
- package/components/bal-pagination2.js +3 -3
- package/components/bal-progress-bar.js +27 -12
- package/components/bal-radio2.js +2 -2
- package/components/bal-segment-item.d.ts +11 -0
- package/components/bal-segment-item.js +203 -0
- package/components/bal-segment.d.ts +11 -0
- package/components/bal-segment.js +337 -0
- package/components/bal-select2.js +1 -1
- package/components/bal-stack2.js +1 -1
- package/components/bal-steps.js +8 -6
- package/components/bal-tab-item.js +10 -2
- package/components/bal-tabs2.js +149 -31
- package/components/breakpoints.subject.js +3 -3
- package/components/index.esm.js +25 -1
- package/components/index.js +5 -289
- package/components/initialize.js +288 -0
- package/components/option.js +4 -1
- package/components/tokens.esm.js +1 -1
- package/components/window-resize.decorator.js +46 -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-03c0e702.js +1 -0
- package/dist/baloise-design-system/{p-1de6b20b1c.system.entry.js → p-06e93c033b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ae28b86fe5.entry.js → p-0ab43941ba.entry.js} +1 -1
- package/dist/baloise-design-system/p-120f1513.js +1 -0
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/p-17660ffea0.entry.js +1 -0
- package/dist/baloise-design-system/{p-f02ea04390.entry.js → p-17f2b2e25a.entry.js} +1 -1
- package/dist/baloise-design-system/p-18af339b1e.system.entry.js +1 -0
- package/dist/baloise-design-system/p-19d582fb4a.entry.js +1 -0
- package/dist/baloise-design-system/p-1e31a7e4d2.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-b7035c24.system.js → p-261968b2.system.js} +1 -1
- package/dist/baloise-design-system/p-265f9d51c9.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-51c0348938.entry.js → p-2905abdfb8.entry.js} +1 -1
- package/dist/baloise-design-system/p-29ba4f9afe.system.entry.js +1 -0
- package/dist/baloise-design-system/p-2a700c21ae.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-f6599f64b7.entry.js → p-2db4ff4c5b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-39bc49bc3d.entry.js → p-33028eda8b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-692536f9ff.system.entry.js → p-3558e7a64b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-360068a4.system.js +1 -0
- package/dist/baloise-design-system/{p-330b875d9d.system.entry.js → p-3818fa189f.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-381fe5557d.entry.js +1 -0
- package/dist/baloise-design-system/{p-f9db454e37.entry.js → p-396898cf27.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1be257c9cd.system.entry.js → p-3bc2f95cf3.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-47b18581c7.system.entry.js → p-40628589e1.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-40b5ad07c5.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-4afba8511a.system.entry.js → p-47a8ad4d7a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-976ed5bcf1.entry.js → p-488c4a8ce1.entry.js} +1 -1
- package/dist/baloise-design-system/p-4cdec4da61.system.entry.js +1 -0
- package/dist/baloise-design-system/p-4e8fff8409.entry.js +1 -0
- package/dist/baloise-design-system/p-4f1afa9be1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-d319b257.system.js → p-509b566d.system.js} +1 -1
- package/dist/baloise-design-system/{p-b779742f50.entry.js → p-53c92c2d21.entry.js} +1 -1
- package/dist/baloise-design-system/p-53e98a0f71.entry.js +1 -0
- package/dist/baloise-design-system/{p-cef24f8c62.entry.js → p-547aae9610.entry.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-6f4a362824.system.entry.js → p-5db0544e97.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d0d06aa690.entry.js → p-6c038bb4ff.entry.js} +1 -1
- package/dist/baloise-design-system/{p-22b041a511.entry.js → p-6c2bf02eb3.entry.js} +1 -1
- package/dist/baloise-design-system/p-6d1b6215.js +1 -0
- package/dist/baloise-design-system/p-6e3a79cce0.system.entry.js +1 -0
- package/dist/baloise-design-system/p-6e88e337.system.js +1 -0
- package/dist/baloise-design-system/p-71588db3.system.js +1 -0
- package/dist/baloise-design-system/p-7291766c.system.js +1 -0
- package/dist/baloise-design-system/{p-ba14aa7026.system.entry.js → p-8080a1192c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-80c011874c.entry.js +1 -0
- package/dist/baloise-design-system/{p-6ceac3e144.system.entry.js → p-8a2f9c316c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-8b998a54aa.entry.js +1 -0
- package/dist/baloise-design-system/{p-60f45a7b48.entry.js → p-8c2be8bc00.entry.js} +1 -1
- package/dist/baloise-design-system/p-8de1a12660.entry.js +1 -0
- package/dist/baloise-design-system/{p-8870e1f3e0.system.entry.js → p-8e17b76e7c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-12bcc7da.js → p-9b4da619.js} +1 -1
- package/dist/baloise-design-system/{p-b97d9336a7.system.entry.js → p-9bb8778cdc.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-9d051b6527.entry.js +1 -0
- package/dist/baloise-design-system/p-a507ff25cb.system.entry.js +1 -0
- package/dist/baloise-design-system/p-a53f45fab6.entry.js +1 -0
- package/dist/baloise-design-system/{p-ad00d94e7f.entry.js → p-a5ee486a2b.entry.js} +1 -1
- package/dist/baloise-design-system/p-a78d1ca569.system.entry.js +1 -0
- package/dist/baloise-design-system/p-ac800c3208.entry.js +1 -0
- package/dist/baloise-design-system/{p-cf0c50d42a.system.entry.js → p-b0bb64b2b8.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-b51665840d.entry.js +1 -0
- package/dist/baloise-design-system/{p-c572e259f4.system.entry.js → p-b570b77884.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-982fa892e8.system.entry.js → p-b8251b8f68.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-b87c29c80b.entry.js +1 -0
- package/dist/baloise-design-system/{p-80b45dd4d6.system.entry.js → p-bcb892a723.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-301e753d6f.system.entry.js → p-be0a0f5f7e.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bee13e834e.entry.js +1 -0
- package/dist/baloise-design-system/p-c240ee50bb.entry.js +1 -0
- package/dist/baloise-design-system/p-c2de2596d1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3f1c49d0.js → p-caec1f9e.js} +1 -1
- package/dist/baloise-design-system/{p-45e0c0783b.entry.js → p-cafe624e35.entry.js} +1 -1
- package/dist/baloise-design-system/p-cd66014bd1.entry.js +1 -0
- package/dist/baloise-design-system/p-cda868a6a5.entry.js +1 -0
- package/dist/baloise-design-system/{p-a52564d27f.system.entry.js → p-d059465399.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e60c936359.system.entry.js → p-d1c43680a0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d539c1cf.js +1 -0
- package/dist/baloise-design-system/p-d908780376.system.entry.js +1 -0
- package/dist/baloise-design-system/p-dae1f687.system.js +1 -0
- package/dist/baloise-design-system/{p-3bad0907.system.js → p-de36076c.system.js} +1 -1
- package/dist/baloise-design-system/p-e137e273b7.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-55faac1d.system.js → p-e187b9de.system.js} +1 -1
- package/dist/baloise-design-system/{p-7292c6e1a1.entry.js → p-e542aaeb27.entry.js} +1 -1
- package/dist/baloise-design-system/p-e8ffddeb.js +1 -0
- package/dist/baloise-design-system/{p-9e167705ca.entry.js → p-ecab0d67d5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-94efe2aa.js → p-f5940253.js} +1 -1
- package/dist/baloise-design-system/p-f66ea0e663.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-013b4c72.system.js → p-f959646a.system.js} +1 -1
- package/dist/cjs/app-globals-5fd73c0c.js +7 -0
- package/dist/cjs/bal-accordion_4.cjs.entry.js +29 -4
- package/dist/cjs/bal-carousel_2.cjs.entry.js +60 -24
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +15 -4
- package/dist/cjs/bal-close.cjs.entry.js +1 -6
- package/dist/cjs/{bal-label.cjs.entry.js → bal-content_2.cjs.entry.js} +48 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-date.cjs.entry.js +2 -2
- package/dist/cjs/bal-datepicker.cjs.entry.js +4 -4
- package/dist/cjs/bal-doc-app.cjs.entry.js +231 -0
- package/dist/cjs/bal-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bal-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
- package/dist/cjs/bal-icon.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-list_8.cjs.entry.js +12 -4
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +17 -18
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-number-input.cjs.entry.js +1 -1
- package/dist/cjs/bal-option_2.cjs.entry.js +26 -2
- package/dist/cjs/bal-pagination.cjs.entry.js +6 -6
- package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +30 -17
- package/dist/cjs/bal-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-segment-item.cjs.entry.js +156 -0
- package/dist/cjs/bal-segment.cjs.entry.js +319 -0
- package/dist/cjs/bal-select_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stack.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +10 -9
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +158 -34
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-47fd06b2.js → breakpoints.decorator-77a3b464.js} +1 -1
- package/dist/cjs/{breakpoints.subject-06716a68.js → breakpoints.subject-ae73ae55.js} +4 -4
- package/dist/cjs/{date-3e33b208.js → date-20be7524.js} +1 -1
- package/dist/cjs/{app-globals-ae3a8623.js → global-2562a984.js} +2 -4
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{index.esm-4587dbf0.js → index.esm-54a3d84e.js} +28 -0
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{option-c33cf2b8.js → option-4034ca7d.js} +4 -1
- package/dist/cjs/{tokens.esm-dc93a5d7.js → tokens.esm-15025c39.js} +1 -1
- package/dist/cjs/window-resize.decorator-5b9c08d1.js +48 -0
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.css +1 -1
- package/dist/collection/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.js +11 -1
- package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.css +1 -1
- package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.js +14 -1
- package/dist/collection/components/bal-carousel/bal-carousel-item/bal-carousel-item.js +45 -2
- package/dist/collection/components/bal-carousel/bal-carousel.js +76 -13
- package/dist/collection/components/bal-carousel/controls/dot-control.js +2 -2
- package/dist/collection/components/bal-carousel/controls/large-control.js +2 -2
- package/dist/collection/components/bal-carousel/controls/small-control.js +2 -2
- package/dist/collection/components/bal-carousel/controls/tab-control.js +2 -2
- package/dist/collection/components/bal-checkbox/bal-checkbox.js +15 -3
- package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
- package/dist/collection/components/bal-close/bal-close.js +1 -6
- package/dist/collection/components/bal-content/bal-content.css +1 -1
- package/dist/collection/components/bal-content/bal-content.js +1 -1
- package/dist/collection/components/bal-icon/bal-icon.css +1 -1
- package/dist/collection/components/bal-label/bal-label.js +20 -2
- package/dist/collection/components/bal-list/bal-list-item-accordion-head/bal-list-item-accordion-head.js +7 -1
- package/dist/collection/components/bal-nav/bal-nav-menu-bar/bal-nav-menu-bar.css +1 -1
- package/dist/collection/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.js +24 -6
- package/dist/collection/components/bal-nav/bal-nav.css +1 -1
- package/dist/collection/components/bal-nav/bal-nav.js +5 -2
- package/dist/collection/components/bal-nav/models/bal-nav-menu-link-item.js +2 -2
- package/dist/collection/components/bal-nav/models/bal-nav-meta-link-item.js +3 -3
- package/dist/collection/components/bal-option-list/bal-option-list.js +43 -2
- package/dist/collection/components/bal-pagination/bal-pagination.js +3 -3
- package/dist/collection/components/bal-progress-bar/bal-progress-bar.css +1 -1
- package/dist/collection/components/bal-progress-bar/bal-progress-bar.js +49 -12
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.css +1 -0
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +332 -0
- package/dist/collection/components/bal-segment/bal-segment.css +1 -0
- package/dist/collection/components/bal-segment/bal-segment.interfaces.js +4 -0
- package/dist/collection/components/bal-segment/bal-segment.js +537 -0
- package/dist/collection/components/bal-segment/bal-segment.types.js +1 -0
- package/dist/collection/components/bal-stack/bal-stack.css +1 -1
- package/dist/collection/components/bal-steps/bal-steps.css +1 -1
- package/dist/collection/components/bal-steps/bal-steps.js +26 -2
- package/dist/collection/components/bal-steps/components/step-button.js +2 -2
- package/dist/collection/components/bal-tabs/bal-tab-item/bal-tab-item.js +47 -2
- package/dist/collection/components/bal-tabs/bal-tabs.js +124 -21
- package/dist/collection/components/bal-tabs/components/tab-button.js +18 -6
- package/dist/collection/components/bal-tabs/components/tab-nav.js +3 -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 +229 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/date/date.spec.js +0 -1
- package/dist/collection/utils/dropdown/option.js +4 -1
- package/dist/collection/utils/dropdown/popup.js +2 -2
- package/dist/collection/utils/resize/index.js +4 -1
- package/dist/collection/utils/resize/window-resize.decorator.js +20 -0
- package/dist/collection/utils/resize/window-resize.interfaces.js +1 -0
- package/dist/collection/utils/resize/window-resize.listener.js +3 -3
- package/dist/collection/utils/resize/window-resize.subject.js +23 -0
- package/dist/collection/utils/string.js +10 -0
- package/dist/collection/utils/string.spec.js +24 -0
- package/dist/esm/app-globals-970bab17.js +5 -0
- package/dist/esm/bal-accordion_4.entry.js +29 -4
- package/dist/esm/bal-carousel_2.entry.js +61 -25
- package/dist/esm/bal-checkbox_2.entry.js +15 -4
- package/dist/esm/bal-close.entry.js +1 -6
- package/dist/esm/{bal-label.entry.js → bal-content_2.entry.js} +48 -3
- package/dist/esm/bal-date-calendar_2.entry.js +2 -2
- package/dist/esm/bal-date.entry.js +2 -2
- package/dist/esm/bal-datepicker.entry.js +4 -4
- package/dist/esm/bal-doc-app.entry.js +227 -0
- package/dist/esm/bal-dropdown.entry.js +4 -4
- package/dist/esm/bal-file-upload.entry.js +1 -1
- package/dist/esm/bal-footer.entry.js +1 -1
- package/dist/esm/bal-hint_3.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +1 -1
- package/dist/esm/bal-list_8.entry.js +12 -4
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +17 -18
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-number-input.entry.js +1 -1
- package/dist/esm/bal-option_2.entry.js +26 -2
- package/dist/esm/bal-pagination.entry.js +6 -6
- package/dist/esm/bal-popover_2.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +30 -17
- package/dist/esm/bal-radio_2.entry.js +2 -2
- package/dist/esm/bal-segment-item.entry.js +152 -0
- package/dist/esm/bal-segment.entry.js +315 -0
- package/dist/esm/bal-select_2.entry.js +1 -1
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stack.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +10 -9
- package/dist/esm/bal-tab-item_2.entry.js +159 -35
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-f979fe5c.js → breakpoints.decorator-d55790da.js} +1 -1
- package/dist/esm/{breakpoints.subject-9ea7074e.js → breakpoints.subject-ee89b4ec.js} +4 -4
- package/dist/esm/{date-38a0b208.js → date-aba2d404.js} +1 -1
- package/dist/esm/{app-globals-b0dd0fc4.js → global-63f4bcec.js} +2 -4
- package/dist/esm/{index.esm-83b1f9c4.js → index.esm-76abd8e3.js} +25 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{option-37cb0282.js → option-01553dab.js} +4 -1
- package/dist/esm/{tokens.esm-7d2734e1.js → tokens.esm-769d0c71.js} +1 -1
- package/dist/esm/window-resize.decorator-dec8dd72.js +46 -0
- package/dist/esm-es5/app-globals-970bab17.js +1 -0
- package/dist/esm-es5/bal-accordion_4.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-content_2.entry.js +1 -0
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-doc-app.entry.js +1 -0
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-file-upload.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_3.entry.js +1 -1
- package/dist/esm-es5/bal-icon.entry.js +1 -1
- package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-number-input.entry.js +1 -1
- package/dist/esm-es5/bal-option_2.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popover_2.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment-item.entry.js +1 -0
- package/dist/esm-es5/bal-segment.entry.js +1 -0
- 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-stack.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-f979fe5c.js → breakpoints.decorator-d55790da.js} +1 -1
- package/dist/esm-es5/breakpoints.subject-ee89b4ec.js +1 -0
- package/dist/esm-es5/{date-38a0b208.js → date-aba2d404.js} +1 -1
- package/dist/esm-es5/global-63f4bcec.js +1 -0
- package/dist/esm-es5/{index.esm-83b1f9c4.js → index.esm-76abd8e3.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-e216cfe4.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/option-01553dab.js +1 -0
- package/dist/esm-es5/window-resize.decorator-dec8dd72.js +1 -0
- package/dist/html.html-data.json +161 -3
- package/dist/types/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.d.ts +1 -0
- package/dist/types/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.d.ts +1 -0
- package/dist/types/components/bal-carousel/bal-carousel-item/bal-carousel-item.d.ts +6 -0
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +11 -2
- package/dist/types/components/bal-carousel/controls/dot-control.d.ts +1 -0
- package/dist/types/components/bal-carousel/controls/large-control.d.ts +1 -0
- package/dist/types/components/bal-carousel/controls/small-control.d.ts +1 -0
- package/dist/types/components/bal-carousel/controls/tab-control.d.ts +1 -0
- package/dist/types/components/bal-checkbox/bal-checkbox.d.ts +5 -0
- package/dist/types/components/bal-close/bal-close.d.ts +0 -2
- package/dist/types/components/bal-content/bal-content.interfaces.d.ts +1 -1
- package/dist/types/components/bal-icon/bal-icon.interfaces.d.ts +1 -1
- package/dist/types/components/bal-label/bal-label.d.ts +4 -1
- package/dist/types/components/bal-list/bal-list-item-accordion-head/bal-list-item-accordion-head.d.ts +1 -0
- package/dist/types/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.d.ts +4 -1
- package/dist/types/components/bal-nav/models/bal-nav-link-item.d.ts +1 -0
- package/dist/types/components/bal-nav/models/bal-nav-menu-link-item.d.ts +1 -0
- package/dist/types/components/bal-nav/models/bal-nav-meta-link-item.d.ts +3 -1
- package/dist/types/components/bal-option-list/bal-option-list.d.ts +5 -0
- package/dist/types/components/bal-progress-bar/bal-progress-bar.d.ts +8 -2
- package/dist/types/components/bal-progress-bar/bal-progress-bar.interfaces.d.ts +1 -0
- package/dist/types/components/bal-segment/bal-segment-item/bal-segment-item.d.ts +62 -0
- package/dist/types/components/bal-segment/bal-segment.d.ts +111 -0
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +20 -0
- package/dist/types/components/bal-segment/bal-segment.types.d.ts +1 -0
- package/dist/types/components/bal-steps/bal-steps.d.ts +4 -0
- package/dist/types/components/bal-steps/bal-steps.interfaces.d.ts +3 -1
- package/dist/types/components/bal-steps/components/step-button.d.ts +1 -0
- package/dist/types/components/bal-tabs/bal-tab-item/bal-tab-item.d.ts +10 -0
- package/dist/types/components/bal-tabs/bal-tab.type.d.ts +5 -3
- package/dist/types/components/bal-tabs/bal-tabs.d.ts +15 -3
- package/dist/types/components/bal-tabs/bal-tabs.interfaces.d.ts +3 -0
- package/dist/types/components/bal-tabs/components/tab-button.d.ts +1 -0
- package/dist/types/components/bal-tabs/components/tab-nav.d.ts +1 -0
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +272 -10
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +81 -0
- package/dist/types/interfaces.d.ts +1 -0
- package/dist/types/utils/dropdown/option.d.ts +1 -1
- package/dist/types/utils/dropdown/popup.d.ts +1 -1
- package/dist/types/utils/resize/index.d.ts +4 -1
- package/dist/types/utils/resize/window-resize.decorator.d.ts +3 -0
- package/dist/types/utils/resize/window-resize.interfaces.d.ts +5 -0
- package/dist/types/utils/resize/window-resize.listener.d.ts +1 -1
- package/dist/types/utils/resize/window-resize.subject.d.ts +9 -0
- package/dist/types/utils/string.d.ts +1 -0
- package/package.json +9 -9
- package/dist/baloise-design-system/p-0ab7aa0e.js +0 -1
- package/dist/baloise-design-system/p-126c79c9e9.system.entry.js +0 -1
- package/dist/baloise-design-system/p-1502fa2526.entry.js +0 -1
- package/dist/baloise-design-system/p-1e100fd83b.entry.js +0 -1
- package/dist/baloise-design-system/p-254b130be5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2d82b78410.entry.js +0 -1
- package/dist/baloise-design-system/p-2d8bd11634.entry.js +0 -1
- package/dist/baloise-design-system/p-2e2ed7a07f.entry.js +0 -1
- package/dist/baloise-design-system/p-2ebc8f9d0c.system.entry.js +0 -1
- package/dist/baloise-design-system/p-30fc270ec1.entry.js +0 -1
- package/dist/baloise-design-system/p-35aa7ecb24.entry.js +0 -1
- package/dist/baloise-design-system/p-4f3776ea4e.system.entry.js +0 -1
- package/dist/baloise-design-system/p-55f280cf33.system.entry.js +0 -1
- package/dist/baloise-design-system/p-63dfa27862.system.entry.js +0 -1
- package/dist/baloise-design-system/p-6cf5e22bb4.entry.js +0 -1
- package/dist/baloise-design-system/p-7047afd8.system.js +0 -1
- package/dist/baloise-design-system/p-7d498fc5.js +0 -1
- package/dist/baloise-design-system/p-87d9c24d45.system.entry.js +0 -1
- package/dist/baloise-design-system/p-8a87b9a8.system.js +0 -1
- package/dist/baloise-design-system/p-96c55b4f58.entry.js +0 -1
- package/dist/baloise-design-system/p-b22fa7966b.entry.js +0 -1
- package/dist/baloise-design-system/p-bcca1ed3.system.js +0 -1
- package/dist/baloise-design-system/p-c304d5fa9c.entry.js +0 -1
- package/dist/baloise-design-system/p-cee7a0dd73.system.entry.js +0 -1
- package/dist/baloise-design-system/p-cf47f1f53c.entry.js +0 -1
- package/dist/baloise-design-system/p-d585a3ad56.system.entry.js +0 -1
- package/dist/baloise-design-system/p-dbc2d22240.system.entry.js +0 -1
- package/dist/baloise-design-system/p-e71a27141c.entry.js +0 -1
- package/dist/baloise-design-system/p-e78a6409.js +0 -1
- package/dist/baloise-design-system/p-e7a4d97c51.entry.js +0 -1
- package/dist/baloise-design-system/p-e93d9571f5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-ecd39e3bec.entry.js +0 -1
- package/dist/baloise-design-system/p-f076d1ed4f.system.entry.js +0 -1
- package/dist/baloise-design-system/p-f0ee1b670b.system.entry.js +0 -1
- package/dist/cjs/bal-content.cjs.entry.js +0 -56
- package/dist/esm-es5/app-globals-b0dd0fc4.js +0 -1
- package/dist/esm-es5/bal-content.entry.js +0 -1
- package/dist/esm-es5/bal-label.entry.js +0 -1
- package/dist/esm-es5/breakpoints.subject-9ea7074e.js +0 -1
- package/dist/esm-es5/option-37cb0282.js +0 -1
- /package/dist/baloise-design-system/{p-fc80aa3e.system.js → p-1a742a5b.system.js} +0 -0
- /package/dist/baloise-design-system/{p-6b5343bd.js → p-3f4bb3a8.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-7d2734e1.js → tokens.esm-769d0c71.js} +0 -0
package/components/bal-tabs2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
-
import {
|
|
4
|
-
import { l as raf, e as deepReady, t as transitionEndAsync, m as debounceEvent, o as hasParent, p as isChildOfEventTarget, i as isDescendant } from './helpers.js';
|
|
3
|
+
import { b as areArraysEqual } from './index.esm.js';
|
|
4
|
+
import { l as raf, e as deepReady, t as transitionEndAsync, m as debounceEvent, o as hasParent, p as isChildOfEventTarget, i as isDescendant, b as waitAfterFramePaint } from './helpers.js';
|
|
5
5
|
import { B as BEM } from './bem.js';
|
|
6
6
|
import { L as Logger } from './log.js';
|
|
7
7
|
import { n as newBalTabOption } from './bal-tab.util.js';
|
|
@@ -67,7 +67,19 @@ const TabLabel = ({ item, inverted, hasBubble, isVertical, context }) => {
|
|
|
67
67
|
hasBubble ? (h("bal-badge", { class: Object.assign({}, bemEl.element('bubble').class()), size: "small" }, item.bubble)) : ('')));
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
const
|
|
70
|
+
const toKebabCase = (string) => {
|
|
71
|
+
if (typeof string === 'string') {
|
|
72
|
+
return string
|
|
73
|
+
.replace(/([a-z])([0-9])/g, '$1-$2')
|
|
74
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
75
|
+
.replace(/[\s_]+/g, '-')
|
|
76
|
+
.toLowerCase();
|
|
77
|
+
}
|
|
78
|
+
return '';
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const TabButton = ({ item, tabsId, isFirst, isLast, isMobile, isVertical, accordion, isAccordionOpen, isLinkList, inverted, expanded, spaceless, clickable, iconPosition, context, onSelectTab, }) => {
|
|
82
|
+
var _a;
|
|
71
83
|
const bemEl = BEM.block('tabs').element('nav').element('item');
|
|
72
84
|
if (item.invisible) {
|
|
73
85
|
return;
|
|
@@ -80,28 +92,38 @@ const TabButton = ({ item, tabsId, isFirst, isLast, isMobile, isVertical, accord
|
|
|
80
92
|
const hasLabelBubble = (!hasIcon && hasBubble && !accordion) ||
|
|
81
93
|
(hasBubble && !isMobile && iconPosition === 'horizontal' && !accordion) ||
|
|
82
94
|
(hasBubble && isVertical && !accordion);
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
|
|
95
|
+
const isTabButton = item.href === undefined || item.href === '';
|
|
96
|
+
const TagType = isTabButton ? 'button' : 'a';
|
|
97
|
+
const attrs = isTabButton
|
|
98
|
+
? {
|
|
99
|
+
'type': 'button',
|
|
100
|
+
'role': 'tab',
|
|
101
|
+
'aria-controls': ((_a = item.aria) === null || _a === void 0 ? void 0 : _a.controls) || item.tabPanelID || undefined,
|
|
102
|
+
'aria-expanded': item.active ? 'true' : 'false',
|
|
103
|
+
'aria-disabled': `${item.disabled}`,
|
|
104
|
+
'aria-label': item.label,
|
|
105
|
+
}
|
|
86
106
|
: {
|
|
87
107
|
href: item.href,
|
|
88
108
|
target: item.target,
|
|
89
109
|
};
|
|
90
|
-
|
|
110
|
+
if (!isLinkList) {
|
|
111
|
+
attrs['tabindex'] = item.active ? '0' : '-1';
|
|
112
|
+
}
|
|
113
|
+
return (h(TagType, Object.assign({ id: `${tabsId}-button-${toKebabCase(item.value)}`, 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({}, bemEl.class()), bemEl.modifier('active').class(item.active)), bemEl.modifier('disabled').class(item.disabled)), bemEl.modifier('clickable').class(clickable)), bemEl.modifier('accordion').class(accordion)), bemEl.modifier('inverted').class(inverted)), bemEl.modifier('expanded').class(expanded)), bemEl.modifier('spaceless').class(spaceless)), bemEl.modifier('first').class(isFirst)), bemEl.modifier('last').class(isLast)), bemEl.modifier('passed').class(item.passed)), bemEl.modifier('vertical').class(isVertical)), bemEl.modifier(`context-${context}`).class(context !== undefined)), bemEl.modifier(`icon-position-${iconPosition}`).class(iconPosition !== 'horizontal')), { 'bal-focusable': !item.disabled && !item.invisible }), draggable: false, "data-tabs": tabsId, "data-label": item.label, "data-value": item.value, "data-index": item.index, "data-testid": "bal-tabs-item", "aria-selected": !isTabButton ? undefined : item.active ? 'true' : 'false' }, attrs, { onClick: (ev) => onSelectTab(ev, item) }),
|
|
91
114
|
item.icon ? (h(TabIcon, { accordion: false, item: item, isMobile: isMobile, hasBubble: hasIconBubble, inverted: inverted })) : (''),
|
|
92
115
|
h(TabLabel, { item: item, isMobile: isMobile, isVertical: isVertical, hasBubble: hasLabelBubble, inverted: inverted, context: context }),
|
|
93
116
|
accordion && !item.href ? (h(TabIcon, { accordion: accordion, isAccordionOpen: isAccordionOpen, item: item, isMobile: isMobile, hasBubble: hasAccordionIconBubble, inverted: inverted })) : ('')));
|
|
94
117
|
};
|
|
95
|
-
let TabButtonIds = 0;
|
|
96
118
|
|
|
97
|
-
const TabNav = ({ items, tabsId, hasCarousel, isVertical, inNavbar, isMobile, isTouch, lineActive, border, accordion, isAccordionOpen, inverted, clickable, animated, spaceless, expanded, verticalColSize, iconPosition, context, onSelectTab, }) => {
|
|
119
|
+
const TabNav = ({ items, tabsId, hasCarousel, isVertical, inNavbar, isMobile, isTouch, lineActive, isLinkList, border, accordion, isAccordionOpen, inverted, clickable, animated, spaceless, expanded, verticalColSize, iconPosition, context, onSelectTab, }) => {
|
|
98
120
|
const bemEl = BEM.block('tabs').element('nav');
|
|
99
121
|
const tabs = items.filter(tab => !tab.invisible);
|
|
100
122
|
const isFullHeight = inNavbar && !isTouch;
|
|
101
|
-
const Button = ({ item, index }) => (h(TabButton, { item: item, tabsId: tabsId, isFirst: index === 0, isLast: index === tabs.length - 1, isMobile: isMobile, isVertical: isVertical, iconPosition: iconPosition, spaceless: spaceless, inverted: inverted, accordion: accordion, isAccordionOpen: isAccordionOpen, context: context, expanded: expanded, clickable: clickable && !item.disabled, onSelectTab: onSelectTab }));
|
|
102
|
-
return (h("div", {
|
|
103
|
-
hasCarousel ? (h("bal-carousel", { id: `${tabsId}-carousel`, class: Object.assign({}, bemEl.element('carousel').class()), fullHeight: isFullHeight, border: border, inverted: inverted, controls: "small", "items-per-view": "auto", steps: 3, onBalChange: stopEventBubbling },
|
|
104
|
-
tabs.map((tab, index) => (h("bal-carousel-item", { key: tab.value, class: Object.assign(Object.assign({}, bemEl.element('carousel').element('item').class()), bemEl.element('carousel').element('item').modifier('expanded').class(expanded)) },
|
|
123
|
+
const Button = ({ item, index }) => (h(TabButton, { item: item, isLinkList: isLinkList, tabsId: tabsId, isFirst: index === 0, isLast: index === tabs.length - 1, isMobile: isMobile, isVertical: isVertical, iconPosition: iconPosition, spaceless: spaceless, inverted: inverted, accordion: accordion, isAccordionOpen: isAccordionOpen, context: context, expanded: expanded, clickable: clickable && !item.disabled, onSelectTab: onSelectTab }));
|
|
124
|
+
return (h("div", { id: `${tabsId}-nav`, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, bemEl.class()), bemEl.modifier(`full-height`).class(isFullHeight)), bemEl.modifier(`border`).class(border)), bemEl.modifier(`animated`).class(animated)), bemEl.modifier(`vertical`).class(isVertical)), bemEl.modifier(`expanded`).class(expanded && !isVertical)), bemEl.modifier(`vertical-col-${verticalColSize}`).class(isVertical)) },
|
|
125
|
+
hasCarousel ? (h("bal-carousel", { id: `${tabsId}-carousel`, class: Object.assign({}, bemEl.element('carousel').class()), htmlRole: 'tablist', fullHeight: isFullHeight, border: border, inverted: inverted, controls: "small", "items-per-view": "auto", steps: 3, onBalChange: stopEventBubbling },
|
|
126
|
+
tabs.map((tab, index) => (h("bal-carousel-item", { key: tab.value, htmlRole: '', class: Object.assign(Object.assign({}, bemEl.element('carousel').element('item').class()), bemEl.element('carousel').element('item').modifier('expanded').class(expanded)) },
|
|
105
127
|
h(Button, { item: tab, index: index })))),
|
|
106
128
|
h("div", { id: `${tabsId}-line`, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, bemEl.element('line').class()), bemEl.element('line').modifier(`active`).class(lineActive)), bemEl.element('line').modifier(`inverted`).class(inverted)), bemEl.element('line').modifier(`animated`).class(animated)), bemEl.element('line').modifier(`vertical`).class(isVertical)) }))) : (tabs.map((tab, index) => h(Button, { item: tab, index: index }))),
|
|
107
129
|
!hasCarousel ? (h("div", { id: `${tabsId}-border`, class: Object.assign(Object.assign(Object.assign({}, bemEl.element('border').class()), bemEl.element('border').modifier(`inverted`).class(inverted)), bemEl.element('border').modifier(`vertical`).class(isVertical)) })) : (''),
|
|
@@ -137,8 +159,8 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
137
159
|
this.store = newStore;
|
|
138
160
|
}
|
|
139
161
|
else if (!this.optionalTabSelection && !this.accordion && this.value === undefined && this.store.length > 0) {
|
|
140
|
-
const
|
|
141
|
-
this.value =
|
|
162
|
+
const firstTab = this.store[0];
|
|
163
|
+
this.value = firstTab.value;
|
|
142
164
|
}
|
|
143
165
|
};
|
|
144
166
|
this.setActiveItem = () => {
|
|
@@ -150,7 +172,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
150
172
|
};
|
|
151
173
|
this.setActiveContent = () => {
|
|
152
174
|
if (this.options.length === 0) {
|
|
153
|
-
this.items.forEach(item => item.setActive(this.
|
|
175
|
+
this.items.forEach(item => item.setActive(this.isTabActive(item)));
|
|
154
176
|
}
|
|
155
177
|
};
|
|
156
178
|
this.getLineSize = (element, padding) => {
|
|
@@ -345,25 +367,26 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
345
367
|
console.warn('[WARN] - Could not read tab options');
|
|
346
368
|
}
|
|
347
369
|
};
|
|
348
|
-
this.onSelectTab = async (ev,
|
|
349
|
-
if (
|
|
370
|
+
this.onSelectTab = async (ev, tab) => {
|
|
371
|
+
if (tab.prevent || tab.disabled || !this.clickable) {
|
|
350
372
|
stopEventBubbling(ev);
|
|
351
373
|
}
|
|
352
|
-
if (!
|
|
374
|
+
if (!tab.disabled && this.clickable) {
|
|
353
375
|
if (this.accordion) {
|
|
354
|
-
if (
|
|
376
|
+
if (tab.value === this.value) {
|
|
355
377
|
this.toggleAccordionState();
|
|
356
378
|
}
|
|
357
379
|
else {
|
|
358
380
|
this.expandAccordion();
|
|
359
381
|
}
|
|
360
382
|
}
|
|
361
|
-
if (
|
|
362
|
-
|
|
383
|
+
if (tab.navigate) {
|
|
384
|
+
tab.navigate.emit(ev);
|
|
363
385
|
}
|
|
364
|
-
if (
|
|
365
|
-
this.balChange.emit(
|
|
366
|
-
await this.select(
|
|
386
|
+
if (tab.value !== this.value) {
|
|
387
|
+
this.balChange.emit(tab.value);
|
|
388
|
+
await this.select(tab);
|
|
389
|
+
await this.focus(tab);
|
|
367
390
|
}
|
|
368
391
|
}
|
|
369
392
|
};
|
|
@@ -461,6 +484,26 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
461
484
|
isChildOfEventTarget(ev, this.el, () => this.animateLine());
|
|
462
485
|
this.isUsedInNavbar(ev);
|
|
463
486
|
}
|
|
487
|
+
listenToKeyDown(ev) {
|
|
488
|
+
if (this.isTabList) {
|
|
489
|
+
if (this.vertical !== false) {
|
|
490
|
+
if (ev.code === 'ArrowDown') {
|
|
491
|
+
this.tabListSelectNext(ev);
|
|
492
|
+
}
|
|
493
|
+
else if (ev.code === 'ArrowUp') {
|
|
494
|
+
this.tabListSelectPrevious(ev);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
if (ev.code === 'ArrowRight') {
|
|
499
|
+
this.tabListSelectNext(ev);
|
|
500
|
+
}
|
|
501
|
+
else if (ev.code === 'ArrowLeft') {
|
|
502
|
+
this.tabListSelectPrevious(ev);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
464
507
|
isUsedInNavbar(ev) {
|
|
465
508
|
const target = ev.target;
|
|
466
509
|
const parentNavbar = target.closest('bal-navbar');
|
|
@@ -512,11 +555,17 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
512
555
|
* PRIVATE METHODS
|
|
513
556
|
* ------------------------------------------------------
|
|
514
557
|
*/
|
|
558
|
+
get isTabList() {
|
|
559
|
+
return this.store.filter(tab => !!tab.href).length === 0;
|
|
560
|
+
}
|
|
515
561
|
get items() {
|
|
516
562
|
return Array.from(this.el.querySelectorAll(`#${this.tabsId} > bal-tab-item`));
|
|
517
563
|
}
|
|
518
|
-
|
|
519
|
-
return
|
|
564
|
+
isTabActive(tab) {
|
|
565
|
+
return tab.value === this.value;
|
|
566
|
+
}
|
|
567
|
+
isTabVisible(tab) {
|
|
568
|
+
return !tab.hidden;
|
|
520
569
|
}
|
|
521
570
|
parseVertical() {
|
|
522
571
|
if (this.vertical === 'true' || this.vertical === '') {
|
|
@@ -554,6 +603,73 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
554
603
|
getCarouselElement() {
|
|
555
604
|
return this.el.querySelector(`#${this.tabsId}-carousel`);
|
|
556
605
|
}
|
|
606
|
+
/**
|
|
607
|
+
* PRIVATE Tab Navigation with Arrow Keys
|
|
608
|
+
* ------------------------------------------------------
|
|
609
|
+
*/
|
|
610
|
+
findNextTab(previous = false) {
|
|
611
|
+
const indexOfActive = this.store.findIndex(t => this.isTabActive(t));
|
|
612
|
+
let tabs = this.store.map((tab, index) => ({
|
|
613
|
+
index,
|
|
614
|
+
visible: !tab.hidden && !tab.disabled,
|
|
615
|
+
}));
|
|
616
|
+
if (previous) {
|
|
617
|
+
tabs = tabs.reverse();
|
|
618
|
+
}
|
|
619
|
+
const visibleTabs = tabs.filter(t => t.visible).map(t => t.index);
|
|
620
|
+
const findNextTabReducer = (acc, index) => {
|
|
621
|
+
// found a new higher index need to break out
|
|
622
|
+
if (acc > indexOfActive) {
|
|
623
|
+
return acc;
|
|
624
|
+
}
|
|
625
|
+
if (index <= acc) {
|
|
626
|
+
return acc;
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
return index;
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
const findPreviousTabReducer = (acc, index) => {
|
|
633
|
+
// found a new lower index need to break out
|
|
634
|
+
if (acc < indexOfActive) {
|
|
635
|
+
return acc;
|
|
636
|
+
}
|
|
637
|
+
if (index >= acc) {
|
|
638
|
+
return acc;
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
return index;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
const reducer = previous ? findPreviousTabReducer : findNextTabReducer;
|
|
645
|
+
const nextIndex = visibleTabs.reduce((acc, value) => reducer(acc, value), indexOfActive);
|
|
646
|
+
return this.store[nextIndex];
|
|
647
|
+
}
|
|
648
|
+
findPreviousTab() {
|
|
649
|
+
return this.findNextTab(true);
|
|
650
|
+
}
|
|
651
|
+
tabListSelectNext(ev) {
|
|
652
|
+
const nextTab = this.findNextTab();
|
|
653
|
+
if (nextTab) {
|
|
654
|
+
this.onSelectTab(ev, nextTab);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
tabListSelectPrevious(ev) {
|
|
658
|
+
const previousTab = this.findPreviousTab();
|
|
659
|
+
if (previousTab) {
|
|
660
|
+
this.onSelectTab(ev, previousTab);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
async focus(tab) {
|
|
664
|
+
await waitAfterFramePaint();
|
|
665
|
+
const hasKeyboardFocus = this.el.querySelector(`button.bal-focused`) !== null;
|
|
666
|
+
if (hasKeyboardFocus) {
|
|
667
|
+
const tabEl = this.el.querySelector(`#${this.tabsId}-button-${toKebabCase(tab.value)}`);
|
|
668
|
+
if (tabEl) {
|
|
669
|
+
tabEl.focus({ preventScroll: true });
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
557
673
|
/**
|
|
558
674
|
* RENDER
|
|
559
675
|
* ------------------------------------------------------
|
|
@@ -570,13 +686,15 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
570
686
|
const tabs = this.store.map(tab => (Object.assign(Object.assign({}, tab), { active: tab.value === this.value })));
|
|
571
687
|
const expanded = this.accordionState === 4 /* AccordionState.Expanded */ || this.accordionState === 8 /* AccordionState.Expanding */;
|
|
572
688
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
689
|
+
const valueExists = this.value !== undefined && !!this.store.find(o => o.value === this.value);
|
|
690
|
+
const isLinkList = !this.isTabList;
|
|
573
691
|
return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('navbar').class(this.inNavbar)), block.modifier('vertical').class(isVertical)), block.modifier('fullwidth').class(this.expanded || this.fullwidth)), block.modifier('accordion').class(this.accordion)), block.modifier('animated').class(this.animated)), block.modifier('expanding').class(this.accordionState === 8 /* AccordionState.Expanding */)), block.modifier('expanded').class(this.accordionState === 4 /* AccordionState.Expanded */)), block.modifier('collapsing').class(this.accordionState === 2 /* AccordionState.Collapsing */)), block.modifier('collapsed').class(this.accordionState === 1 /* AccordionState.Collapsed */)), "data-value": this.store
|
|
574
|
-
.filter(t => this.
|
|
692
|
+
.filter(t => this.isTabActive(t))
|
|
575
693
|
.map(t => t.value)
|
|
576
694
|
.join(','), "data-label": this.store
|
|
577
|
-
.filter(t => this.
|
|
695
|
+
.filter(t => this.isTabActive(t))
|
|
578
696
|
.map(t => t.label)
|
|
579
|
-
.join(',') }, isSelect ? (h(TabSelect, { value: this.value, items: tabs, onSelectTab: this.onSelectTab })) : (h(TabNav, { items: tabs,
|
|
697
|
+
.join(',') }, isSelect ? (h(TabSelect, { value: this.value, items: tabs, onSelectTab: this.onSelectTab })) : (h(TabNav, { items: tabs, isLinkList: isLinkList, tabsId: this.tabsId, clickable: this.clickable, accordion: this.accordion, isAccordionOpen: this.isAccordionOpen, lineActive: valueExists, inverted: isInverted, animated: this.animated, context: this.context, border: this.border, spaceless: this.spaceless, expanded: this.expanded, isMobile: isMobile, isTouch: isTouch, isVertical: isVertical, inNavbar: this.inNavbar, hasCarousel: hasCarousel, iconPosition: this.iconPosition, verticalColSize: this.verticalColSize, onSelectTab: this.onSelectTab })), h("div", { part: contentPart, ref: contentEl => (this.contentEl = contentEl), class: Object.assign({}, block.element('tabs').element('content').class()) }, h("div", { id: this.tabsId, class: Object.assign({}, block.element('tabs').element('content').element('wrapper').class()), ref: contentElWrapper => (this.contentElWrapper = contentElWrapper) }, h("slot", null)))));
|
|
580
698
|
}
|
|
581
699
|
get el() { return this; }
|
|
582
700
|
static get watchers() { return {
|
|
@@ -618,7 +736,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
618
736
|
"getOptionByValue": [64],
|
|
619
737
|
"renderLine": [64],
|
|
620
738
|
"closeAccordion": [64]
|
|
621
|
-
}, [[8, "balWillAnimate", "listenToWillAnimate"], [8, "balDidAnimate", "listenToDidAnimate"]], {
|
|
739
|
+
}, [[8, "balWillAnimate", "listenToWillAnimate"], [8, "balDidAnimate", "listenToDidAnimate"], [0, "keydown", "listenToKeyDown"]], {
|
|
622
740
|
"options": ["optionChanged"],
|
|
623
741
|
"debounce": ["debounceChanged"],
|
|
624
742
|
"value": ["valueChanged"]
|
|
@@ -57,15 +57,15 @@ class BalWindowResizeListener extends ListenerAbstract {
|
|
|
57
57
|
constructor() {
|
|
58
58
|
super(...arguments);
|
|
59
59
|
this.resizeHandler = new BalWindowResizeHandler({ onlyListenToWidthChanges: true });
|
|
60
|
-
this.debouncedNotify = debounce(() => this.notify(),
|
|
60
|
+
this.debouncedNotify = debounce(() => this.notify(), 100);
|
|
61
61
|
this.notify = async () => {
|
|
62
62
|
if (await this.resizeHandler.hasResized()) {
|
|
63
63
|
super.notify(undefined);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
connect() {
|
|
68
|
-
super.connect();
|
|
67
|
+
connect(el) {
|
|
68
|
+
super.connect(el);
|
|
69
69
|
if (this.el) {
|
|
70
70
|
addEventListener(this.el, 'resize', this.debouncedNotify, { passive: true });
|
|
71
71
|
}
|
package/components/index.esm.js
CHANGED
|
@@ -7266,6 +7266,30 @@ function isArrowDownKey(event) {
|
|
|
7266
7266
|
function isArrowUpKey(event) {
|
|
7267
7267
|
return event.key === 'ArrowUp' || event.key === 'Up';
|
|
7268
7268
|
}
|
|
7269
|
+
/**
|
|
7270
|
+
* Returns `true` if the keyboard event was triggered by the `ArrowLeft` key
|
|
7271
|
+
*/
|
|
7272
|
+
function isArrowLeftKey(event) {
|
|
7273
|
+
return event.key === 'ArrowLeft' || event.key === 'Left';
|
|
7274
|
+
}
|
|
7275
|
+
/**
|
|
7276
|
+
* Returns `true` if the keyboard event was triggered by the `ArrowRight` key
|
|
7277
|
+
*/
|
|
7278
|
+
function isArrowRightKey(event) {
|
|
7279
|
+
return event.key === 'ArrowRight' || event.key === 'Right';
|
|
7280
|
+
}
|
|
7281
|
+
/**
|
|
7282
|
+
* Returns `true` if the keyboard event was triggered by the `Home` key
|
|
7283
|
+
*/
|
|
7284
|
+
function isHomeKey(event) {
|
|
7285
|
+
return event.key === 'Home';
|
|
7286
|
+
}
|
|
7287
|
+
/**
|
|
7288
|
+
* Returns `true` if the keyboard event was triggered by the `End` key
|
|
7289
|
+
*/
|
|
7290
|
+
function isEndKey(event) {
|
|
7291
|
+
return event.key === 'End';
|
|
7292
|
+
}
|
|
7269
7293
|
/**
|
|
7270
7294
|
* Returns the decimal separator of the given locale
|
|
7271
7295
|
*
|
|
@@ -7370,4 +7394,4 @@ const loadSocialMediaLinks = (lang, region = 'CH') => {
|
|
|
7370
7394
|
.then(res => res);
|
|
7371
7395
|
};
|
|
7372
7396
|
|
|
7373
|
-
export { Language as L,
|
|
7397
|
+
export { isArrowLeftKey as A, isArrowRightKey as B, isHomeKey as C, isEndKey as D, Language as L, isSpaceKey as a, areArraysEqual as b, toInteger$1 as c, dateSeparator as d, isValidIsoString as e, formatDateString as f, getDefaultOptions as g, format as h, isEnterKey as i, getYear as j, getMonth as k, lodash_padstart as l, getDate as m, now as n, isArrowDownKey as o, parse as p, isArrowUpKey as q, requiredArgs as r, isEscapeKey as s, toDate as t, loadFooterLinks as u, loadSocialMediaLinks as v, isBackspaceKey as w, formatLocaleNumber as x, getDecimalSeparator as y, getThousandSeparator as z };
|