@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/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
2
|
export { F as FileUploadRejectionReason } from './bal-file-upload.type.js';
|
|
4
3
|
export { i as i18nBalDate } from './bal-date.i18n.js';
|
|
@@ -7,10 +6,7 @@ export { i as i18nBalDatepicker } from './bal-datepicker.i18n.js';
|
|
|
7
6
|
export { i as i18nBalTimeInput } from './bal-time-input.i18n.js';
|
|
8
7
|
export { i as i18nBalInputStepper } from './bal-input-stepper.i18n.js';
|
|
9
8
|
export { i as i18nBalLabel } from './bal-label.i18n.js';
|
|
10
|
-
|
|
11
|
-
export { b as balBrowser } from './browser.js';
|
|
12
|
-
import { d as defaultConfig } from './config.default.js';
|
|
13
|
-
export { d as defaultConfig } from './config.default.js';
|
|
9
|
+
export { a as BalSnackbarController, B as BalToastController, c as balSnackbarController, b as balToastController, i as initialize, i as initializeBaloiseDesignSystem, s as setupConfig } from './initialize.js';
|
|
14
10
|
export { n as newBalOption } from './option.js';
|
|
15
11
|
export { n as newBalStepOption } from './bal-step.util.js';
|
|
16
12
|
export { n as newBalTabOption } from './bal-tab.util.js';
|
|
@@ -18,6 +14,8 @@ import { g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
|
18
14
|
export { c as componentOnReady, e as deepReady, g as getAppRoot, i as isDescendant, s as shallowReady, f as wait, b as waitAfterFramePaint, d as waitAfterIdleCallback, w as waitForComponent, a as waitForDesignSystem } from './helpers.js';
|
|
19
15
|
export { s as scrollToFirstInvalidField } from './form.js';
|
|
20
16
|
export { B as BalScrollHandler } from './scroll.js';
|
|
17
|
+
import { b as balBrowser } from './browser.js';
|
|
18
|
+
export { b as balBrowser } from './browser.js';
|
|
21
19
|
import { b as balDevice } from './device.js';
|
|
22
20
|
export { B as BalDevice, b as balDevice } from './device.js';
|
|
23
21
|
export { I as INVALID_VALUE } from './mask-util.js';
|
|
@@ -25,160 +23,11 @@ import { g as getOverlays, a as getOverlay } from './overlays.js';
|
|
|
25
23
|
import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
|
|
26
24
|
export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
|
|
27
25
|
export { a as attachToConfig, d as detachFromConfig, o as onBalConfigChange, u as updateBalAllowedLanguages, b as updateBalAnimated, c as updateBalIcons, e as updateBalLanguage, f as updateBalRegion, g as useBalConfig } from './config.utils.js';
|
|
26
|
+
export { d as defaultConfig } from './config.default.js';
|
|
28
27
|
import { S as Subject } from './listener.js';
|
|
29
28
|
export { B as BalSwipeSubject } from './swipe.subject.js';
|
|
30
29
|
export { B as BalDate } from './date.js';
|
|
31
30
|
|
|
32
|
-
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
33
|
-
|
|
34
|
-
class Config {
|
|
35
|
-
constructor() {
|
|
36
|
-
this._componentObservers = [];
|
|
37
|
-
this._observers = [];
|
|
38
|
-
this._config = defaultConfig;
|
|
39
|
-
}
|
|
40
|
-
get locale() {
|
|
41
|
-
return `${this._config.language}-${this._config.region}`;
|
|
42
|
-
}
|
|
43
|
-
get region() {
|
|
44
|
-
return this._config.region;
|
|
45
|
-
}
|
|
46
|
-
set region(region) {
|
|
47
|
-
if (region !== this._config.region) {
|
|
48
|
-
this._config.region = region;
|
|
49
|
-
this._notify();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
get language() {
|
|
53
|
-
return this._config.language;
|
|
54
|
-
}
|
|
55
|
-
set language(language) {
|
|
56
|
-
if (language !== this._config.language) {
|
|
57
|
-
if (this._config.allowedLanguages.includes(language)) {
|
|
58
|
-
this._config.language = language;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this._config.language = this._config.fallbackLanguage;
|
|
62
|
-
}
|
|
63
|
-
this._notify();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
get allowedLanguages() {
|
|
67
|
-
return this._config.allowedLanguages;
|
|
68
|
-
}
|
|
69
|
-
set allowedLanguages(allowedLanguages) {
|
|
70
|
-
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
71
|
-
this._config.allowedLanguages = allowedLanguages;
|
|
72
|
-
this._notify();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
get icons() {
|
|
76
|
-
return this._config.icons;
|
|
77
|
-
}
|
|
78
|
-
set icons(icons) {
|
|
79
|
-
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
80
|
-
this._notify();
|
|
81
|
-
}
|
|
82
|
-
get logger() {
|
|
83
|
-
return this._config.logger;
|
|
84
|
-
}
|
|
85
|
-
set logger(logger) {
|
|
86
|
-
this._config.logger = Object.assign({}, logger);
|
|
87
|
-
this._notify();
|
|
88
|
-
}
|
|
89
|
-
get animated() {
|
|
90
|
-
return this._config.animated;
|
|
91
|
-
}
|
|
92
|
-
set animated(animated) {
|
|
93
|
-
this._config.animated = animated;
|
|
94
|
-
this._notify();
|
|
95
|
-
}
|
|
96
|
-
get httpFormSubmit() {
|
|
97
|
-
return this._config.httpFormSubmit;
|
|
98
|
-
}
|
|
99
|
-
set httpFormSubmit(httpFormSubmit) {
|
|
100
|
-
this._config.httpFormSubmit = httpFormSubmit;
|
|
101
|
-
this._notify();
|
|
102
|
-
}
|
|
103
|
-
attach(observer) {
|
|
104
|
-
const isExist = this._observers.includes(observer);
|
|
105
|
-
if (isExist) {
|
|
106
|
-
return console.log('Subject: Observer has been attached already.');
|
|
107
|
-
}
|
|
108
|
-
this._observers.push(observer);
|
|
109
|
-
observer.configChanged(this._config);
|
|
110
|
-
}
|
|
111
|
-
detach(observer) {
|
|
112
|
-
const observerIndex = this._observers.indexOf(observer);
|
|
113
|
-
if (observerIndex === -1) {
|
|
114
|
-
return console.log('Subject: Nonexistent observer.');
|
|
115
|
-
}
|
|
116
|
-
this._observers.splice(observerIndex, 1);
|
|
117
|
-
}
|
|
118
|
-
attachComponent(observer) {
|
|
119
|
-
const isExist = this._componentObservers.includes(observer);
|
|
120
|
-
if (isExist) {
|
|
121
|
-
return console.log('Subject: Observer has been attached already.');
|
|
122
|
-
}
|
|
123
|
-
this._componentObservers.push(observer);
|
|
124
|
-
observer.configChanged(this._config);
|
|
125
|
-
}
|
|
126
|
-
detachComponent(observer) {
|
|
127
|
-
const observerIndex = this._componentObservers.indexOf(observer);
|
|
128
|
-
if (observerIndex === -1) {
|
|
129
|
-
return console.log('Subject: Nonexistent observer.');
|
|
130
|
-
}
|
|
131
|
-
this._componentObservers.splice(observerIndex, 1);
|
|
132
|
-
}
|
|
133
|
-
toString() {
|
|
134
|
-
return JSON.stringify(this._config);
|
|
135
|
-
}
|
|
136
|
-
reset(config) {
|
|
137
|
-
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
138
|
-
this._notify(false);
|
|
139
|
-
}
|
|
140
|
-
_notify(all = true) {
|
|
141
|
-
for (const observer of this._componentObservers) {
|
|
142
|
-
observer.configChanged(this._config);
|
|
143
|
-
}
|
|
144
|
-
if (all) {
|
|
145
|
-
for (const observer of this._observers) {
|
|
146
|
-
observer.configChanged(this._config);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (balBrowser.hasWindow) {
|
|
150
|
-
saveConfig(window, this._config);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const config = /*@__PURE__*/ new Config();
|
|
155
|
-
const configFromSession = (win) => {
|
|
156
|
-
try {
|
|
157
|
-
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
158
|
-
return configStr !== null ? JSON.parse(configStr) : {};
|
|
159
|
-
}
|
|
160
|
-
catch (e) {
|
|
161
|
-
return {};
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
const saveConfig = (win, c) => {
|
|
165
|
-
try {
|
|
166
|
-
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
const setupConfig = (userConfig = {}, win = {}) => {
|
|
174
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
175
|
-
win = window;
|
|
176
|
-
}
|
|
177
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
178
|
-
config.reset(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
|
|
179
|
-
win.BaloiseDesignSystem.config = config;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
31
|
const i18nBalFieldLabel = {
|
|
183
32
|
de: {
|
|
184
33
|
optional: ' (optional)',
|
|
@@ -212,139 +61,6 @@ const i18nBalFieldLabel = {
|
|
|
212
61
|
},
|
|
213
62
|
};
|
|
214
63
|
|
|
215
|
-
class BalNoticeController {
|
|
216
|
-
constructor(options) {
|
|
217
|
-
this.options = options;
|
|
218
|
-
this.container = null;
|
|
219
|
-
this.queue = [];
|
|
220
|
-
this.preQueue = [];
|
|
221
|
-
this.queueLimit = 5;
|
|
222
|
-
}
|
|
223
|
-
create(options) {
|
|
224
|
-
if (balBrowser.hasDocument) {
|
|
225
|
-
this.setupContainer();
|
|
226
|
-
const clone = this.findClone(options);
|
|
227
|
-
if (clone === undefined) {
|
|
228
|
-
const el = document.createElement(this.options.tag);
|
|
229
|
-
Object.assign(el, options);
|
|
230
|
-
el.addEventListener('balClose', ev => {
|
|
231
|
-
this.removeFromQueue(ev.detail);
|
|
232
|
-
});
|
|
233
|
-
this.preQueue.push(el);
|
|
234
|
-
this.updateQueue();
|
|
235
|
-
return el;
|
|
236
|
-
}
|
|
237
|
-
return clone;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
setQueue(queueLimit) {
|
|
241
|
-
this.queueLimit = queueLimit;
|
|
242
|
-
}
|
|
243
|
-
async dismissAll() {
|
|
244
|
-
var _a;
|
|
245
|
-
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
246
|
-
if (elements) {
|
|
247
|
-
const closingQueue = [];
|
|
248
|
-
for (let index = 0; index < elements.length; index++) {
|
|
249
|
-
const el = elements[index];
|
|
250
|
-
if (el.close) {
|
|
251
|
-
closingQueue.push(el.close());
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
await Promise.all(closingQueue);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* @deprecated use dismissAll instead
|
|
259
|
-
*/
|
|
260
|
-
async clearAll() {
|
|
261
|
-
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
262
|
-
return this.dismissAll();
|
|
263
|
-
}
|
|
264
|
-
findClone(options) {
|
|
265
|
-
for (let index = 0; index < this.queue.length; index++) {
|
|
266
|
-
const el = this.queue[index];
|
|
267
|
-
if (el.message === options.message && el.color === options.color) {
|
|
268
|
-
return el;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
return undefined;
|
|
272
|
-
}
|
|
273
|
-
setupContainer() {
|
|
274
|
-
if (balBrowser.hasDocument) {
|
|
275
|
-
const containerId = `${this.options.tag}-container`;
|
|
276
|
-
this.container = document.getElementById(containerId);
|
|
277
|
-
if (this.container)
|
|
278
|
-
return;
|
|
279
|
-
if (!this.container) {
|
|
280
|
-
this.container = document.createElement('bal-notices');
|
|
281
|
-
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
282
|
-
this.container.id = containerId;
|
|
283
|
-
}
|
|
284
|
-
document.body.appendChild(this.container);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
updateQueue() {
|
|
288
|
-
var _a;
|
|
289
|
-
if (this.queue.length < this.queueLimit) {
|
|
290
|
-
const el = this.preQueue.shift();
|
|
291
|
-
if (el && this.container) {
|
|
292
|
-
this.queue.push(el);
|
|
293
|
-
this.container.insertAdjacentElement('beforeend', el);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if (this.queue.length === 0) {
|
|
297
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
removeFromQueue(toastId) {
|
|
301
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
302
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
class BalToastController extends BalNoticeController {
|
|
307
|
-
constructor() {
|
|
308
|
-
super({
|
|
309
|
-
tag: 'bal-toast',
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
create(options) {
|
|
313
|
-
return super.create(options);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
const balToastController = new BalToastController();
|
|
317
|
-
|
|
318
|
-
class BalSnackbarController extends BalNoticeController {
|
|
319
|
-
constructor() {
|
|
320
|
-
super({
|
|
321
|
-
tag: 'bal-snackbar',
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
create(options) {
|
|
325
|
-
return super.create(options);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
const balSnackbarController = new BalSnackbarController();
|
|
329
|
-
|
|
330
|
-
// generated by .build/version.js
|
|
331
|
-
const VERSION = '16.3.0';
|
|
332
|
-
|
|
333
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
334
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
335
|
-
win = window;
|
|
336
|
-
}
|
|
337
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
338
|
-
if (platformConfig) {
|
|
339
|
-
setPlatformHelpers(platformConfig);
|
|
340
|
-
}
|
|
341
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
342
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
343
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
344
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
345
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
346
|
-
};
|
|
347
|
-
|
|
348
64
|
const newBalCheckboxOption = (option) => {
|
|
349
65
|
return Object.assign(Object.assign({ interface: 'checkbox', labelHidden: false, flat: false, disabled: false, readonly: false, required: false, nonSubmit: false, invalid: false, checked: false }, option), { label: '', html: option.label });
|
|
350
66
|
};
|
|
@@ -462,4 +178,4 @@ const isPlatform = (winOrPlatform, platform) => {
|
|
|
462
178
|
const NewBalOptionValue = newBalOptionValue;
|
|
463
179
|
const NewBalSingleOptionValue = newBalSingleOptionValue;
|
|
464
180
|
|
|
465
|
-
export { BalModalController, BalOrientationSubject,
|
|
181
|
+
export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
|
+
import { b as balBrowser } from './browser.js';
|
|
3
|
+
import { d as defaultConfig } from './config.default.js';
|
|
4
|
+
|
|
5
|
+
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
6
|
+
|
|
7
|
+
class Config {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._componentObservers = [];
|
|
10
|
+
this._observers = [];
|
|
11
|
+
this._config = defaultConfig;
|
|
12
|
+
}
|
|
13
|
+
get locale() {
|
|
14
|
+
return `${this._config.language}-${this._config.region}`;
|
|
15
|
+
}
|
|
16
|
+
get region() {
|
|
17
|
+
return this._config.region;
|
|
18
|
+
}
|
|
19
|
+
set region(region) {
|
|
20
|
+
if (region !== this._config.region) {
|
|
21
|
+
this._config.region = region;
|
|
22
|
+
this._notify();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
get language() {
|
|
26
|
+
return this._config.language;
|
|
27
|
+
}
|
|
28
|
+
set language(language) {
|
|
29
|
+
if (language !== this._config.language) {
|
|
30
|
+
if (this._config.allowedLanguages.includes(language)) {
|
|
31
|
+
this._config.language = language;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this._config.language = this._config.fallbackLanguage;
|
|
35
|
+
}
|
|
36
|
+
this._notify();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
get allowedLanguages() {
|
|
40
|
+
return this._config.allowedLanguages;
|
|
41
|
+
}
|
|
42
|
+
set allowedLanguages(allowedLanguages) {
|
|
43
|
+
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
44
|
+
this._config.allowedLanguages = allowedLanguages;
|
|
45
|
+
this._notify();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
get icons() {
|
|
49
|
+
return this._config.icons;
|
|
50
|
+
}
|
|
51
|
+
set icons(icons) {
|
|
52
|
+
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
53
|
+
this._notify();
|
|
54
|
+
}
|
|
55
|
+
get logger() {
|
|
56
|
+
return this._config.logger;
|
|
57
|
+
}
|
|
58
|
+
set logger(logger) {
|
|
59
|
+
this._config.logger = Object.assign({}, logger);
|
|
60
|
+
this._notify();
|
|
61
|
+
}
|
|
62
|
+
get animated() {
|
|
63
|
+
return this._config.animated;
|
|
64
|
+
}
|
|
65
|
+
set animated(animated) {
|
|
66
|
+
this._config.animated = animated;
|
|
67
|
+
this._notify();
|
|
68
|
+
}
|
|
69
|
+
get httpFormSubmit() {
|
|
70
|
+
return this._config.httpFormSubmit;
|
|
71
|
+
}
|
|
72
|
+
set httpFormSubmit(httpFormSubmit) {
|
|
73
|
+
this._config.httpFormSubmit = httpFormSubmit;
|
|
74
|
+
this._notify();
|
|
75
|
+
}
|
|
76
|
+
attach(observer) {
|
|
77
|
+
const isExist = this._observers.includes(observer);
|
|
78
|
+
if (isExist) {
|
|
79
|
+
return console.log('Subject: Observer has been attached already.');
|
|
80
|
+
}
|
|
81
|
+
this._observers.push(observer);
|
|
82
|
+
observer.configChanged(this._config);
|
|
83
|
+
}
|
|
84
|
+
detach(observer) {
|
|
85
|
+
const observerIndex = this._observers.indexOf(observer);
|
|
86
|
+
if (observerIndex === -1) {
|
|
87
|
+
return console.log('Subject: Nonexistent observer.');
|
|
88
|
+
}
|
|
89
|
+
this._observers.splice(observerIndex, 1);
|
|
90
|
+
}
|
|
91
|
+
attachComponent(observer) {
|
|
92
|
+
const isExist = this._componentObservers.includes(observer);
|
|
93
|
+
if (isExist) {
|
|
94
|
+
return console.log('Subject: Observer has been attached already.');
|
|
95
|
+
}
|
|
96
|
+
this._componentObservers.push(observer);
|
|
97
|
+
observer.configChanged(this._config);
|
|
98
|
+
}
|
|
99
|
+
detachComponent(observer) {
|
|
100
|
+
const observerIndex = this._componentObservers.indexOf(observer);
|
|
101
|
+
if (observerIndex === -1) {
|
|
102
|
+
return console.log('Subject: Nonexistent observer.');
|
|
103
|
+
}
|
|
104
|
+
this._componentObservers.splice(observerIndex, 1);
|
|
105
|
+
}
|
|
106
|
+
toString() {
|
|
107
|
+
return JSON.stringify(this._config);
|
|
108
|
+
}
|
|
109
|
+
reset(config) {
|
|
110
|
+
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
111
|
+
this._notify(false);
|
|
112
|
+
}
|
|
113
|
+
_notify(all = true) {
|
|
114
|
+
for (const observer of this._componentObservers) {
|
|
115
|
+
observer.configChanged(this._config);
|
|
116
|
+
}
|
|
117
|
+
if (all) {
|
|
118
|
+
for (const observer of this._observers) {
|
|
119
|
+
observer.configChanged(this._config);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (balBrowser.hasWindow) {
|
|
123
|
+
saveConfig(window, this._config);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const config = /*@__PURE__*/ new Config();
|
|
128
|
+
const configFromSession = (win) => {
|
|
129
|
+
try {
|
|
130
|
+
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
131
|
+
return configStr !== null ? JSON.parse(configStr) : {};
|
|
132
|
+
}
|
|
133
|
+
catch (e) {
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const saveConfig = (win, c) => {
|
|
138
|
+
try {
|
|
139
|
+
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
140
|
+
}
|
|
141
|
+
catch (e) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const setupConfig = (userConfig = {}, win = {}) => {
|
|
147
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
148
|
+
win = window;
|
|
149
|
+
}
|
|
150
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
151
|
+
config.reset(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
|
|
152
|
+
win.BaloiseDesignSystem.config = config;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
class BalNoticeController {
|
|
156
|
+
constructor(options) {
|
|
157
|
+
this.options = options;
|
|
158
|
+
this.container = null;
|
|
159
|
+
this.queue = [];
|
|
160
|
+
this.preQueue = [];
|
|
161
|
+
this.queueLimit = 5;
|
|
162
|
+
}
|
|
163
|
+
create(options) {
|
|
164
|
+
if (balBrowser.hasDocument) {
|
|
165
|
+
this.setupContainer();
|
|
166
|
+
const clone = this.findClone(options);
|
|
167
|
+
if (clone === undefined) {
|
|
168
|
+
const el = document.createElement(this.options.tag);
|
|
169
|
+
Object.assign(el, options);
|
|
170
|
+
el.addEventListener('balClose', ev => {
|
|
171
|
+
this.removeFromQueue(ev.detail);
|
|
172
|
+
});
|
|
173
|
+
this.preQueue.push(el);
|
|
174
|
+
this.updateQueue();
|
|
175
|
+
return el;
|
|
176
|
+
}
|
|
177
|
+
return clone;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
setQueue(queueLimit) {
|
|
181
|
+
this.queueLimit = queueLimit;
|
|
182
|
+
}
|
|
183
|
+
async dismissAll() {
|
|
184
|
+
var _a;
|
|
185
|
+
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
186
|
+
if (elements) {
|
|
187
|
+
const closingQueue = [];
|
|
188
|
+
for (let index = 0; index < elements.length; index++) {
|
|
189
|
+
const el = elements[index];
|
|
190
|
+
if (el.close) {
|
|
191
|
+
closingQueue.push(el.close());
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
await Promise.all(closingQueue);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @deprecated use dismissAll instead
|
|
199
|
+
*/
|
|
200
|
+
async clearAll() {
|
|
201
|
+
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
202
|
+
return this.dismissAll();
|
|
203
|
+
}
|
|
204
|
+
findClone(options) {
|
|
205
|
+
for (let index = 0; index < this.queue.length; index++) {
|
|
206
|
+
const el = this.queue[index];
|
|
207
|
+
if (el.message === options.message && el.color === options.color) {
|
|
208
|
+
return el;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
setupContainer() {
|
|
214
|
+
if (balBrowser.hasDocument) {
|
|
215
|
+
const containerId = `${this.options.tag}-container`;
|
|
216
|
+
this.container = document.getElementById(containerId);
|
|
217
|
+
if (this.container)
|
|
218
|
+
return;
|
|
219
|
+
if (!this.container) {
|
|
220
|
+
this.container = document.createElement('bal-notices');
|
|
221
|
+
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
222
|
+
this.container.id = containerId;
|
|
223
|
+
}
|
|
224
|
+
document.body.appendChild(this.container);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
updateQueue() {
|
|
228
|
+
var _a;
|
|
229
|
+
if (this.queue.length < this.queueLimit) {
|
|
230
|
+
const el = this.preQueue.shift();
|
|
231
|
+
if (el && this.container) {
|
|
232
|
+
this.queue.push(el);
|
|
233
|
+
this.container.insertAdjacentElement('beforeend', el);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (this.queue.length === 0) {
|
|
237
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
removeFromQueue(toastId) {
|
|
241
|
+
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
242
|
+
setTimeout(() => this.updateQueue(), 0);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
class BalToastController extends BalNoticeController {
|
|
247
|
+
constructor() {
|
|
248
|
+
super({
|
|
249
|
+
tag: 'bal-toast',
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
create(options) {
|
|
253
|
+
return super.create(options);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const balToastController = new BalToastController();
|
|
257
|
+
|
|
258
|
+
class BalSnackbarController extends BalNoticeController {
|
|
259
|
+
constructor() {
|
|
260
|
+
super({
|
|
261
|
+
tag: 'bal-snackbar',
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
create(options) {
|
|
265
|
+
return super.create(options);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const balSnackbarController = new BalSnackbarController();
|
|
269
|
+
|
|
270
|
+
// generated by .build/version.js
|
|
271
|
+
const VERSION = '16.4.0-nightly.20240917';
|
|
272
|
+
|
|
273
|
+
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
274
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
275
|
+
win = window;
|
|
276
|
+
}
|
|
277
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
278
|
+
if (platformConfig) {
|
|
279
|
+
setPlatformHelpers(platformConfig);
|
|
280
|
+
}
|
|
281
|
+
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
282
|
+
win.BaloiseDesignSystem.toastController = balToastController;
|
|
283
|
+
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
284
|
+
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
285
|
+
win.BaloiseDesignSystem.version = VERSION;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export { BalToastController as B, BalSnackbarController as a, balToastController as b, balSnackbarController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
|
package/components/option.js
CHANGED
|
@@ -33,12 +33,15 @@ class DropdownOptionUtil {
|
|
|
33
33
|
this.component.rawOptions = this.component.options.map(mapOption);
|
|
34
34
|
await this.component.valueUtil.updateInputContent();
|
|
35
35
|
}
|
|
36
|
-
async listenToOptionChange(
|
|
36
|
+
async listenToOptionChange(ev) {
|
|
37
37
|
var _a;
|
|
38
38
|
const newSelectedValues = (await ((_a = this.component.listEl) === null || _a === void 0 ? void 0 : _a.getSelectedValues())) || [];
|
|
39
39
|
this.component.valueUtil.updateRawValueBySelection(newSelectedValues);
|
|
40
40
|
if (!this.component.multiple) {
|
|
41
41
|
this.component.popupUtil.collapseList();
|
|
42
|
+
if (this.component.hasFocus) {
|
|
43
|
+
this.component.balBlur.emit(new FocusEvent('blur', { relatedTarget: this.component.el }));
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
}
|
package/components/tokens.esm.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { B as BalWindowResizeListener } from './breakpoints.subject.js';
|
|
2
|
+
import { a as SingleSubject } from './listener.js';
|
|
3
|
+
import { b as balBrowser } from './browser.js';
|
|
4
|
+
|
|
5
|
+
class BalWindowResizeSubject extends SingleSubject {
|
|
6
|
+
constructor() {
|
|
7
|
+
super((observer, _data) => {
|
|
8
|
+
observer.windowResizeListener();
|
|
9
|
+
});
|
|
10
|
+
this.listener = new BalWindowResizeListener();
|
|
11
|
+
}
|
|
12
|
+
attach(observer) {
|
|
13
|
+
super.attach(observer);
|
|
14
|
+
if (balBrowser.hasWindow) {
|
|
15
|
+
this.listener.connect(window);
|
|
16
|
+
this.listener.add(() => super.notify());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
detach() {
|
|
20
|
+
super.detach();
|
|
21
|
+
this.listener.disconnect();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
new BalWindowResizeSubject();
|
|
25
|
+
|
|
26
|
+
function ListenToWindowResize() {
|
|
27
|
+
return function (target, _propertyKey, _descriptor) {
|
|
28
|
+
const { connectedCallback, disconnectedCallback } = target;
|
|
29
|
+
target.connectedCallback = function () {
|
|
30
|
+
if (!this._balWindowResizeSubject) {
|
|
31
|
+
this._balWindowResizeSubject = new BalWindowResizeSubject();
|
|
32
|
+
this._balWindowResizeSubject.attach(this);
|
|
33
|
+
}
|
|
34
|
+
return connectedCallback && connectedCallback.call(this);
|
|
35
|
+
};
|
|
36
|
+
target.disconnectedCallback = function () {
|
|
37
|
+
if (this._balWindowResizeSubject) {
|
|
38
|
+
this._balWindowResizeSubject.detach();
|
|
39
|
+
this._balWindowResizeSubject = undefined;
|
|
40
|
+
}
|
|
41
|
+
return disconnectedCallback && disconnectedCallback.call(this);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { ListenToWindowResize as L };
|