@baloise/ds-core 16.5.0 → 16.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bal-field.js +3 -0
- package/components/bal-input-date2.js +2 -3
- package/components/bal-input.js +1 -1
- package/components/bal-number-input.js +1 -1
- package/components/bal-segment-item.js +64 -47
- package/components/bal-segment.js +61 -17
- package/components/bal-textarea.js +1 -1
- package/components/bal-time-input.js +1 -1
- package/components/form-input.js +14 -1
- package/components/index.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-dd30661db2.system.entry.js → p-00014af866.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b0c22ff9d1.entry.js → p-08b0e345a2.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3eb68d7e.js → p-0db6b19e.js} +1 -1
- package/dist/baloise-design-system/{p-9bb8778cdc.system.entry.js → p-10c13a369c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-09ea5913.js → p-15a85377.js} +1 -1
- package/dist/baloise-design-system/p-15c5fe4d6d.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-cda868a6a5.entry.js → p-16b50b08e4.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5fae3f5478.entry.js → p-27bc71c322.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0530e008e9.system.entry.js → p-2aa4f352d9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8080a1192c.system.entry.js → p-2e498736fc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6e3a79cce0.system.entry.js → p-2e8508812d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f798011b48.system.entry.js → p-2ea7550d1b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-380aabd5bc.entry.js → p-3180888825.entry.js} +1 -1
- package/dist/baloise-design-system/{p-305cffd8aa.entry.js → p-342b27632b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-39bf8adcde.entry.js → p-34671b9410.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e187b9de.system.js → p-368bd6ac.system.js} +1 -1
- package/dist/baloise-design-system/p-449ffc7a7e.entry.js +1 -0
- package/dist/baloise-design-system/{p-0ab43941ba.entry.js → p-462b20f382.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f5940253.js → p-4ae121b6.js} +1 -1
- package/dist/baloise-design-system/p-4f083c5352.entry.js +1 -0
- package/dist/baloise-design-system/{p-df40272425.system.entry.js → p-52a4a89073.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-4809d5c4.system.js → p-590da25b.system.js} +1 -1
- package/dist/baloise-design-system/{p-e137e273b7.system.entry.js → p-5b5d1c626d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-71588db3.system.js → p-5c0b0099.system.js} +1 -1
- package/dist/baloise-design-system/{p-3befc6f9.system.js → p-5de0bd8a.system.js} +1 -1
- package/dist/baloise-design-system/{p-0fb6cbda.system.js → p-60a6af04.system.js} +1 -1
- package/dist/baloise-design-system/{p-d3fabdb142.system.entry.js → p-60e74d3515.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-6139ff78d7.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-47a8ad4d7a.system.entry.js → p-619afa0ba5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4192ad4350.entry.js → p-63c685b62d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-77350b27fc.entry.js → p-648814edf8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2905abdfb8.entry.js → p-663cc3242c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2db4ff4c5b.entry.js → p-6f18ca5500.entry.js} +1 -1
- package/dist/baloise-design-system/{p-12bb6ea3e7.system.entry.js → p-760797ae02.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-190b5cd469.entry.js → p-784c10d48f.entry.js} +1 -1
- package/dist/baloise-design-system/p-7957c3c0.system.js +1 -0
- package/dist/baloise-design-system/{p-8e17b76e7c.system.entry.js → p-7d2709b193.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7c586fb89f.entry.js → p-80e59744a7.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7e5ee75e2.entry.js → p-82333c3ce3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bcb892a723.system.entry.js → p-82afff07ac.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-488c4a8ce1.entry.js → p-83c70a6b53.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f62d0ccdd1.system.entry.js → p-8613444e15.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9658f4a66f.entry.js → p-898f7862e4.entry.js} +1 -1
- package/dist/baloise-design-system/p-8f89168b60.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-88eb14fd.system.js → p-910b2f3d.system.js} +1 -1
- package/dist/baloise-design-system/{p-3818fa189f.system.entry.js → p-959fc8c170.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ecab0d67d5.entry.js → p-9f5eda0e22.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9f54cac588.system.entry.js → p-a7de2305e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c0153f8edf.system.entry.js → p-ac6d5570d8.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4fe64c3ec6.system.entry.js → p-aed4d3ac0f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-372474e989.system.entry.js → p-b4941441f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bee13e834e.entry.js → p-b4c5b5e53f.entry.js} +1 -1
- package/dist/baloise-design-system/p-b60576a064.entry.js +1 -0
- package/dist/baloise-design-system/{p-853fe65e14.system.entry.js → p-b7ceb9e59e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-caec1f9e.js → p-b7cef472.js} +1 -1
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -1
- package/dist/baloise-design-system/{p-8f77c423ad.entry.js → p-be366c8428.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cafe624e35.entry.js → p-c00e0f64c8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6c2bf02eb3.entry.js → p-c442bb2db2.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a5ee486a2b.entry.js → p-c4e11d3813.entry.js} +1 -1
- package/dist/baloise-design-system/{p-420d88737c.entry.js → p-c539ee8edf.entry.js} +1 -1
- package/dist/baloise-design-system/{p-407ffd9c55.entry.js → p-c716d30de1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7c7e593e07.entry.js → p-c7338c255f.entry.js} +1 -1
- package/dist/baloise-design-system/p-cfa901cb.js +1 -0
- package/dist/baloise-design-system/{p-0639833837.system.entry.js → p-d800ecde35.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fb0af77320.system.entry.js → p-d8a71bc5b4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d7d6937d59.system.entry.js → p-d94b2cb869.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3801afd625.entry.js → p-d9f2d48be1.entry.js} +1 -1
- package/dist/baloise-design-system/p-dd162dc12e.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ad9a7657.js → p-de08fd27.js} +1 -1
- package/dist/baloise-design-system/{p-d1b16f9cc2.entry.js → p-dec8453a4d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e1ccb7023c.system.entry.js → p-e227dcfaa1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f03e63bd1e.system.entry.js → p-e2316d2aea.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e45eb6121d.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ef916aafa5.entry.js → p-e6162b978e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d059465399.system.entry.js → p-e7bcca66c5.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e829652c7a.entry.js +1 -0
- package/dist/baloise-design-system/p-e833841822.entry.js +1 -0
- package/dist/baloise-design-system/{p-2cd1f1dedb.entry.js → p-e8cab53413.entry.js} +1 -1
- package/dist/baloise-design-system/p-ec044ce124.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-23b7426d09.system.entry.js → p-efe5a8806d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1659bb968c.system.entry.js → p-f00b5e9fa4.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f22c8e0c59.entry.js +1 -0
- package/dist/baloise-design-system/{p-445d2e1c70.system.entry.js → p-f3bb565972.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b8251b8f68.system.entry.js → p-fad86a959d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f819d47031.entry.js → p-fcfee1c692.entry.js} +1 -1
- package/dist/cjs/bal-accordion_4.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-checkbox-button.cjs.entry.js +1 -1
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-content.cjs.entry.js +56 -0
- package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +1 -1
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +2 -3
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-datepicker.cjs.entry.js +4 -4
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bal-field_5.cjs.entry.js +3 -0
- 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-popover_2.cjs.entry.js → bal-hint_5.cjs.entry.js} +172 -3
- package/dist/cjs/bal-input-slider.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-input.cjs.entry.js +1 -1
- package/dist/cjs/{bal-content_2.cjs.entry.js → bal-label.cjs.entry.js} +0 -46
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +5 -5
- package/dist/cjs/bal-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-segment_2.cjs.entry.js +516 -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-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-textarea.cjs.entry.js +1 -1
- package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
- package/dist/cjs/baloise-design-system.cjs.js +1 -1
- package/dist/cjs/{breakpoints.decorator-a4a5bd7a.js → breakpoints.decorator-f4da1834.js} +1 -1
- package/dist/cjs/{breakpoints.subject-fbf85930.js → breakpoints.subject-6fc372a8.js} +1 -1
- package/dist/cjs/{form-input-134c5116.js → form-input-b61eb894.js} +14 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tokens.esm-aa4bb7f7.js → tokens.esm-cd3fab6c.js} +1 -1
- package/dist/cjs/{window-resize.decorator-c7a521b0.js → window-resize.decorator-67e1f4de.js} +1 -1
- package/dist/collection/collection-manifest.json +15 -13
- package/dist/collection/components/bal-field/bal-field.js +3 -0
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +92 -69
- package/dist/collection/components/bal-segment/bal-segment.js +115 -19
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/form-input.js +13 -0
- package/dist/collection/utils/form-input.spec.js +30 -0
- package/dist/collection/utils/mask/context/mask-context.js +2 -2
- package/dist/esm/bal-accordion_4.entry.js +2 -2
- package/dist/esm/bal-carousel_2.entry.js +4 -4
- package/dist/esm/bal-checkbox-button.entry.js +1 -1
- package/dist/esm/bal-checkbox_2.entry.js +2 -2
- package/dist/esm/bal-content.entry.js +52 -0
- package/dist/esm/bal-date-calendar-cell.entry.js +1 -1
- package/dist/esm/bal-date-calendar_2.entry.js +4 -5
- package/dist/esm/bal-date.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +5 -5
- package/dist/esm/bal-dropdown.entry.js +2 -2
- package/dist/esm/bal-field_5.entry.js +3 -0
- package/dist/esm/bal-file-upload.entry.js +2 -2
- package/dist/esm/bal-footer.entry.js +2 -2
- package/dist/esm/{bal-popover_2.entry.js → bal-hint_5.entry.js} +171 -5
- package/dist/esm/bal-input-slider.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +2 -2
- package/dist/esm/bal-input.entry.js +1 -1
- package/dist/esm/{bal-content_2.entry.js → bal-label.entry.js} +1 -46
- package/dist/esm/bal-list_8.entry.js +4 -4
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-number-input.entry.js +2 -2
- package/dist/esm/bal-option_2.entry.js +1 -1
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +2 -2
- package/dist/esm/bal-progress-bar.entry.js +5 -5
- package/dist/esm/bal-radio-button.entry.js +1 -1
- package/dist/esm/bal-radio_2.entry.js +2 -2
- package/dist/esm/bal-segment_2.entry.js +511 -0
- package/dist/esm/bal-select_2.entry.js +2 -2
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +5 -5
- package/dist/esm/bal-tab-item_2.entry.js +5 -5
- package/dist/esm/bal-textarea.entry.js +1 -1
- package/dist/esm/bal-time-input.entry.js +1 -1
- package/dist/esm/baloise-design-system.js +1 -1
- package/dist/esm/{breakpoints.decorator-f2ac9963.js → breakpoints.decorator-8a50482f.js} +1 -1
- package/dist/esm/{breakpoints.subject-3605e395.js → breakpoints.subject-e3538fe7.js} +1 -1
- package/dist/esm/{date-aba2d404.js → date-6e8f5617.js} +1 -1
- package/dist/esm/{form-input-28a08ec5.js → form-input-a8fdaaef.js} +14 -1
- package/dist/esm/{index.esm-76abd8e3.js → index.esm-cc299511.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tokens.esm-337782ae.js → tokens.esm-7cf87670.js} +1 -1
- package/dist/esm/{window-resize.decorator-d5198831.js → window-resize.decorator-9c08027e.js} +1 -1
- 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-button.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-content.entry.js +1 -0
- package/dist/esm-es5/bal-date-calendar-cell.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-file-upload.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -0
- package/dist/esm-es5/bal-input-slider.entry.js +1 -1
- package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
- package/dist/esm-es5/bal-input.entry.js +1 -1
- package/dist/esm-es5/bal-label.entry.js +1 -0
- 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-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio-button.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -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-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/bal-textarea.entry.js +1 -1
- package/dist/esm-es5/bal-time-input.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-f2ac9963.js → breakpoints.decorator-8a50482f.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-3605e395.js → breakpoints.subject-e3538fe7.js} +1 -1
- package/dist/esm-es5/{date-aba2d404.js → date-6e8f5617.js} +1 -1
- package/dist/esm-es5/{form-input-28a08ec5.js → form-input-a8fdaaef.js} +1 -1
- package/dist/esm-es5/{index.esm-76abd8e3.js → index.esm-cc299511.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/{window-resize.decorator-d5198831.js → window-resize.decorator-9c08027e.js} +1 -1
- package/dist/types/components/bal-segment/bal-segment-item/bal-segment-item.d.ts +17 -13
- package/dist/types/components/bal-segment/bal-segment.d.ts +22 -3
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +2 -0
- package/dist/types/components.d.ts +7 -19
- package/dist/types/utils/form-input.d.ts +3 -0
- package/package.json +7 -7
- package/dist/baloise-design-system/p-265f9d51c9.system.entry.js +0 -1
- package/dist/baloise-design-system/p-370575b8cb.system.entry.js +0 -1
- package/dist/baloise-design-system/p-3c25811c44.entry.js +0 -1
- package/dist/baloise-design-system/p-487816db33.system.entry.js +0 -1
- package/dist/baloise-design-system/p-53e98a0f71.entry.js +0 -1
- package/dist/baloise-design-system/p-547aae9610.entry.js +0 -1
- package/dist/baloise-design-system/p-5db0544e97.system.entry.js +0 -1
- package/dist/baloise-design-system/p-8de1a12660.entry.js +0 -1
- package/dist/baloise-design-system/p-a507ff25cb.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-c1c17f8edc.system.entry.js +0 -1
- package/dist/baloise-design-system/p-ced37553e2.entry.js +0 -1
- package/dist/baloise-design-system/p-d2ee9b0a.system.js +0 -1
- package/dist/baloise-design-system/p-d9d229a026.entry.js +0 -1
- package/dist/baloise-design-system/p-e0384bfc0c.entry.js +0 -1
- package/dist/baloise-design-system/p-e75ccb92.js +0 -1
- package/dist/cjs/bal-hint_3.cjs.entry.js +0 -186
- package/dist/cjs/bal-segment-item.cjs.entry.js +0 -156
- package/dist/cjs/bal-segment.cjs.entry.js +0 -319
- package/dist/esm/bal-hint_3.entry.js +0 -180
- package/dist/esm/bal-segment-item.entry.js +0 -152
- package/dist/esm/bal-segment.entry.js +0 -315
- package/dist/esm-es5/bal-content_2.entry.js +0 -1
- package/dist/esm-es5/bal-hint_3.entry.js +0 -1
- package/dist/esm-es5/bal-popover_2.entry.js +0 -1
- package/dist/esm-es5/bal-segment-item.entry.js +0 -1
- package/dist/esm-es5/bal-segment.entry.js +0 -1
- /package/dist/baloise-design-system/{p-e1994e2c.js → p-46bed129.js} +0 -0
- /package/dist/baloise-design-system/{p-36074466.system.js → p-9ffefe27.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-337782ae.js → tokens.esm-7cf87670.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as o,g as s}from"./p-d7c752c6.js";import{_ as l,a as r}from"./p-43c9f5e9.js";import{l as a}from"./p-9a3d9e17.js";import{k as n,d as c,e as h,i as b,h as d}from"./p-88f18fbc.js";import{e as p,o as u,q as m,s as v,h as f,u as g,y as _}from"./p-f5940253.js";import{r as y,p as k,l as x,g as w,i as j,s as O,a as C,f as T,b as L,v as z}from"./p-c0c91eb1.js";import{s as F}from"./p-ad9a7657.js";import{B as A}from"./p-ae86d0a0.js";import{L as B}from"./p-b77e3348.js";import{d as M}from"./p-f385e205.js";import"./p-a65354df.js";import"./p-2229e98e.js";import"./p-aafb6696.js";import"./p-4573c419.js";const I=!0,P=class{constructor(i){t(this,i),this.balChange=e(this,"balChange",7),this.balInputClick=e(this,"balInputClick",7),this.balInput=e(this,"balInput",7),this.balBlur=e(this,"balBlur",7),this.balFocus=e(this,"balFocus",7),this.balCancel=e(this,"balCancel",7),this.balKeyPress=e(this,"balKeyPress",7),this.didInit=!1,this.inputId="bal-select-"+V++,this.initialValue=[],this.removeValue=t=>{this.disabled||(this.updateRawValue(y(this.rawValue,t),I),this.multiple&&this.typeahead&&this.setFocus(),this.fireBlur())},this.fireBlur=(t=new CustomEvent("blur"))=>{this.isPopoverOpen||this.hasFocus||n((()=>this.balBlur.emit(t)))},this.handleClick=t=>{(this.disabled||this.readonly)&&k(t)},this.handlePopoverChange=t=>{t.stopPropagation(),this.isPopoverOpen!==t.detail&&(this.isPopoverOpen=t.detail,this.isPopoverOpen?this.updateFocus():(this.focusIndex=-1,this.multiple&&this.typeahead&&this.updateInputValue(""),this.fireBlur(t)))},this.handleInputBlur=t=>{k(t);const e=t.relatedTarget;(null===e||e&&e.nodeName&&("BAL-MODAL"===e.nodeName||"INPUT"===e.nodeName||"BUTTON"===e.nodeName))&&this.validateAfterBlur(I),this.hasFocus=!1,this.fireBlur(t)},this.handleInputFocus=t=>{this.balFocus.emit(t),this.hasFocus=!0},this.handleInputClick=async(t,e=!1)=>{var i,o,s,l;F(t),this.isChipClicked(t)||(this.disabled||this.readonly?k(t):(this.focusIndex=-1,this.balInputClick.emit(t),this.typeahead?this.isPopoverOpen&&e?await(null===(i=this.popoverElement)||void 0===i?void 0:i.dismiss()):await(null===(o=this.popoverElement)||void 0===o?void 0:o.present()):this.isPopoverOpen?await(null===(s=this.popoverElement)||void 0===s?void 0:s.dismiss()):await(null===(l=this.popoverElement)||void 0===l?void 0:l.present())))},this.handleKeyPress=async t=>{!this.isPopoverOpen&&p(t)&&(k(t),await this.open()),this.balKeyPress.emit(t)},this.handleInputChange=t=>{this.disabled||this.readonly||(this.inputValue=t.target.value)},this.handleInput=async t=>{this.disabled||this.readonly||(this.inputValue=t.target.value,this.isPopoverOpen||this.popoverElement.present(),this.focusIndex=-1,this.updateFocus(),k(t),this.balInput.emit(this.inputValue))},this.handleOptionMouseEnter=t=>{this.focusIndex=t},this.hasFocus=!1,this.inputValue="",this.focusIndex=-1,this.isPopoverOpen=!1,this.options=new Map,this.labelToScrollTo="",this.labelToSelectTo="",this.ariaForm=M,this.name=this.inputId,this.invalid=!1,this.filter="includes",this.balTabindex=0,this.freeSolo=!1,this.multiple=!1,this.maxLength=void 0,this.noDataLabel=void 0,this.autocomplete="off",this.typeahead=!1,this.selectionOptional=!1,this.disabled=!1,this.readonly=!1,this.required=!1,this.inverted=!1,this.placeholder=void 0,this.scrollable=250,this.loading=!1,this.remote=!1,this.autoInvalidOff=!1,this.value=[],this.rawValue=[]}createLogger(t){this.log=t}valueWatcher(){this.syncRawValue(!1)}updateRawValue(t,e=!0){u(t,this.rawValue||[])||(this.rawValue=[...t],this.syncNativeInput(),this.didInit&&!0===e&&(this.multiple?a(this.rawValue)?this.emitChangeEvent([]):this.emitChangeEvent([...this.rawValue]):a(this.rawValue)||0===x(this.rawValue)?this.emitChangeEvent(void 0):this.emitChangeEvent(this.rawValue[0])))}emitChangeEvent(t){this.balChange.emit(t)}connectedCallback(){const t=d((()=>this.updateOptions()),0);this.initialValue=this.value,t(),this.mutationO=(e=>{if("undefined"==typeof MutationObserver)return;const i=new MutationObserver((e=>{(e=e.filter((t=>t.target.nodeName==="bal-select-option".toUpperCase()||t.target.nodeName==="bal-select".toUpperCase()))).length>0&&t()}));return i.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),i})(this.el)}componentWillLoad(){if(this.waitForOptionsAndThenUpdateRawValues(),this.isInsideOfFooter(),!a(this.rawValue)&&this.options.size>0&&1===x(this.rawValue)){const t=this.options.get(this.rawValue[0]);a(t)||(this.inputValue=t.label)}}componentDidLoad(){this.syncRawValue(!1),this.multiple||(this.inputElement.value=this.inputValue),this.didInit=!0}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}listenOnClick(t){this.disabled&&t.target&&t.target===this.el&&k(t)}resetHandler(t){const e=t.target;(null==e?void 0:e.contains(this.el))&&(this.resetHandlerTimer&&clearTimeout(this.resetHandlerTimer),this.resetHandlerTimer=setTimeout((()=>{this.value=this.initialValue,this.syncRawValue(!1),this.syncNativeInput(),this.nativeSelectEl&&Array.from(this.nativeSelectEl.options).forEach((t=>t.selected=!0))}),0))}async handleKeyDown(t){if(this.isPopoverOpen){if((m(t)||v(t))&&(k(t),this.navigateWithArrowKey(t),this.updateFocus()),f(t)&&(k(t),this.selectedFocusedOption()),g(t)&&this.cancel(),_(t)&&this.typeahead&&this.multiple&&""===this.inputElement.value&&x(this.rawValue)>0){const t=w(this.rawValue);this.removeValue(t[x(this.rawValue)-1])}this.typeahead||1!==t.key.length||this.focusOptionByLabel(t.key),p(t)&&!this.typeahead&&k(t)}else this.hasFocus&&((m(t)||v(t))&&(k(t),await this.open()),this.typeahead||1!==t.key.length||this.selectOptionByLabel(t.key))}async setFocus(){this.inputElement&&!this.disabled&&(await c(),this.inputElement.focus())}async getValue(){return this.rawValue}async clear(){this.focusIndex=-1,this.inputElement&&(this.updateInputValue(""),this.updateRawValue([],I),this.value=this.multiple?[]:"")}async open(){this.disabled||this.readonly||a(this.popoverElement)||await this.popoverElement.present()}async close(){this.disabled||this.readonly||a(this.popoverElement)||this.blurSelect()}async cancel(){this.labelToScrollTo="",this.close(),this.scrollTo(0),this.balCancel.emit()}async select(t){const e=this.options.get(t);a(e)||this.optionSelected(e)}async setAriaForm(t){this.ariaForm=Object.assign({},t)}async waitForOptionsAndThenUpdateRawValues(){clearTimeout(this.waitForOptionsAndThenUpdateRawValuesTimer),await h(this.el),this.options.size>0?this.remote||this.syncRawValue(false):this.waitForOptionsAndThenUpdateRawValuesTimer=setTimeout((()=>this.waitForOptionsAndThenUpdateRawValues()),10)}async updateOptions(){const t=this.getChildOpts(),e=new Map;for(let i=0;i<t.length;i++){const o=t[i];e.set(o.value,{value:o.value,label:o.label,disabled:o.disabled,id:o.for,textContent:o.textContent,innerHTML:o.innerHTML})}if(!this.selectionOptional&&Array.isArray(this.rawValue))for(let t=0;t<this.rawValue.length;t++){const i=this.rawValue[t];if(!e.has(i)){const t=y(this.rawValue,i);this.updateRawValue(t,false)}}this.options=new Map(e),this.typeahead||await this.syncNativeInput(),this.didInit&&!this.remote&&this.validateAfterBlur()}get optionArray(){const t=Array.from(this.options,(([t,e])=>e));return!this.typeahead||this.remote?t:t.filter((t=>"includes"===this.filter?j(t.textContent,this.inputValue):O(t.textContent,this.inputValue)))}hasOptions(){return this.optionArray.length>0}get inputPlaceholder(){return this.multiple?x(this.rawValue)<1?this.placeholder:void 0:!a(this.rawValue)&&x(this.rawValue)>0?void 0:this.placeholder}getChildOpts(){return Array.from(this.el.querySelectorAll("bal-select-option"))}getPopoverContent(){return this.popoverElement.querySelector(".bal-popover__content__inner")}updateFocus(){this.focusIndex<-1&&(this.focusIndex=-1);const t=this.optionArray;if(t.length>0){t.length<=this.focusIndex&&(this.focusIndex=t.length-1);const e=t[this.focusIndex];if(e&&e.id){const t=this.el.querySelector(`button#${e.id}`);t&&(clearTimeout(this.updateFocusTimer),this.updateFocusTimer=setTimeout((()=>{this.scrollToFocusedOption(t)}),0))}}else this.focusIndex=-1}scrollToFocusedOption(t){if(t&&this.popoverElement){const e=this.getPopoverContent();if(e){const i=t.offsetTop;i<e.scrollTop&&(e.scrollTop=i),t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=e.scrollTop+t.clientHeight)}}}scrollTo(t){const e=this.getPopoverContent();e&&(e.scrollTop=t)}selectedFocusedOption(){const t=this.optionArray;if(t.length>this.focusIndex){const e=t[this.focusIndex];e&&this.optionSelected(e)}}navigateWithArrowKey(t){m(t)?this.focusIndex=this.focusIndex+1:v(t)&&(this.focusIndex=this.focusIndex-1)}focusOptionByLabel(t){this.labelToScrollTo=this.labelToScrollTo+t,clearTimeout(this.clearScrollToValue),this.clearScrollToValue=setTimeout((()=>{this.scrollToLabel(this.labelToScrollTo)}),600)}selectOptionByLabel(t){this.labelToSelectTo=this.labelToSelectTo+t,clearTimeout(this.clearSelectValue),this.clearSelectValue=setTimeout((()=>{this.selectLabel(this.labelToSelectTo),this.labelToSelectTo=""}),600)}async selectLabel(t){if(" "!==t){const e=this.optionArray.find((e=>O(e.label||"",t)));if(!a(e)&&e.id){const t=this.el.querySelector(`button#${e.id}`);if(!a(t)){const t=this.optionArray.indexOf(e);this.focusIndex=t,this.select(e.value)}}this.labelToScrollTo=""}}async scrollToLabel(t){if(" "!==t){const e=this.optionArray.find((e=>O(e.label||"",t)));if(!a(e)&&e.id){const t=this.el.querySelector(`button#${e.id}`);if(!a(t)){const i=this.optionArray.indexOf(e);this.focusIndex=i,this.scrollTo(t.offsetTop)}}this.labelToScrollTo=""}}syncRawValue(t=!0){let e=[];a(this.value)||""===this.value||(e=Array.isArray(this.value)?[...this.value.filter((t=>!a(t)))]:this.value.split("").includes(",")?[...this.value.split(",").filter((t=>t)).map((t=>t.trim()))]:[this.value]),this.updateRawValue(e,t)}blurSelect(){this.popoverElement.dismiss()}optionSelected(t){const e=w(this.rawValue).some((e=>e===t.value));this.updateValue(t.value,!e),this.multiple?this.typeahead&&this.setFocus():this.blurSelect()}updateValue(t,e=!0){this.multiple?this.updateRawValue(e?C(this.rawValue,t,this.multiple):y(this.rawValue,t),I):(this.updateRawValue(C(this.rawValue,t,this.multiple),I),this.rawValue&&this.rawValue.length>0&&this.updateInputValue(T(this.options,this.rawValue[0])))}validateAfterBlur(t=!1){let e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){const t=L(this.options,this.inputElement.value);e=t?[t.value]:[this.inputElement.value]}else e=z(this.rawValue,this.options,this.inputElement.value);this.updateRawValue(e,t)}}syncNativeInput(){if(!this.multiple&&x(this.rawValue)>0){const t=w(this.rawValue);let e=T(this.options,t[0]);return!this.multiple&&this.typeahead&&this.selectionOptional&&""===e&&(e=t.join(", ")),this.updateInputValue(e)}return Promise.resolve()}updateInputValue(t){return new Promise((e=>{this.updateInputValueTimer&&clearTimeout(this.updateInputValueTimer),this.updateInputValueTimer=setTimeout((()=>{a(this.inputElement)||(this.inputElement.value=t,this.inputValue=t,e())}),0)}))}isChipClicked(t){let e=!1;if(this.multiple){const i=this.selectionEl.querySelectorAll("bal-tag"),o=t.target;i.forEach((t=>{const i=b(t,o)||t===o;i&&(e=i)}))}return e}isInsideOfFooter(){this.inverted=null!==this.el.closest("bal-footer")}render(){var t;const e=t=>i("bal-tag",{size:"",closable:!this.disabled,disabled:this.disabled,invalid:this.invalid,tabindex:-1,onBalCloseClick:()=>this.removeValue(t.value),"data-testid":"bal-select-chip"},T(this.options,t.value)||t.value),s=w(this.rawValue),l=A.block("select"),r=l.element("native"),a=l.element("control"),n=a.element("icon"),c=a.element("selections"),h=a.element("input"),b=l.element("popover"),d=b.element("empty"),p=l.element("option"),u=p.element("content"),m=u.element("checkbox"),v=u.element("label");return i(o,{role:"listbox",onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,"data-value":null===(t=this.rawValue)||void 0===t?void 0:t.map((t=>T(this.options,t))).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("disabled").class(this.disabled||this.readonly)),l.modifier("inverted").class(this.inverted)),l.modifier("inverted-footer").class(this.inverted))},i("select",{class:Object.assign({},r.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:t=>this.nativeSelectEl=t},s.map((t=>i("option",{key:t,value:t,selected:!0},t)))),i("bal-popover",{onBalChange:this.handlePopoverChange,ref:t=>this.popoverElement=t},i("div",{"bal-popover-trigger":!0,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("invalid").class(this.invalid)),a.modifier("disabled").class(this.disabled||this.readonly)),a.modifier("focused").class(this.isPopoverOpen)),a.modifier("inverted-footer").class(this.inverted))},i("div",{class:Object.assign(Object.assign({},c.class()),c.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:t=>this.selectionEl=t},s.filter((()=>this.multiple)).map((t=>i(e,{value:t}))),i("input",{type:"text",class:Object.assign(Object.assign({},h.class()),{input:!0,"is-inverted":this.inverted,"is-danger":this.invalid,"is-disabled":this.disabled||this.readonly,"is-clickable":!this.isPopoverOpen&&!this.disabled&&!this.readonly,"data-test-select-input":!0}),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-select-input",autocomplete:this.autocomplete,"aria-autocomplete":"off"===this.autocomplete?"none":null,placeholder:this.inputPlaceholder,readonly:!this.typeahead||this.disabled||this.readonly,contentEditable:this.typeahead,disabled:this.disabled,maxLength:this.maxLength,tabindex:this.balTabindex,onInput:this.handleInput,onClick:this.handleInputClick,onChange:this.handleInputChange,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyPress:this.handleKeyPress,ref:t=>this.inputElement=t})),this.freeSolo||this.loading?"":i("bal-icon",{class:Object.assign(Object.assign(Object.assign({},n.class()),n.modifier("loading").class(this.loading)),n.modifier("clickable").class(!this.disabled&&!this.readonly)),name:this.inverted?"caret-up":"caret-down",color:this.disabled||this.readonly?"grey-light":this.inverted?"white":this.invalid?"danger":"primary",turn:this.isPopoverOpen,onClick:t=>this.handleInputClick(t,!0),size:this.inverted?"x-small":""})),i("bal-popover-content",{class:Object.assign({},b.class()),scrollable:this.scrollable,spaceless:!0,expanded:!0},this.optionArray.map(((t,e)=>i("button",{key:t.value,type:"button",role:"option",id:t.id,"data-value":t.value,"data-label":t.label,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p.class()),p.modifier("selected").class(s.includes(t.value)&&!(this.typeahead&&!this.multiple))),p.modifier("focused").class(this.focusIndex===e)),p.modifier("checkbox").class(this.multiple)),p.modifier("disabled").class(!0===t.disabled)),"data-testid":"bal-select-option",disabled:t.disabled,tabIndex:-1,onMouseEnter:()=>this.handleOptionMouseEnter(e),onClick:()=>this.optionSelected(t)},i("div",{class:Object.assign({},u.class())},i("span",{class:Object.assign({},m.class()),style:{display:this.multiple?"flex":"none"}},i("bal-checkbox",{checked:s.includes(t.value),tabindex:-1,nonSubmit:!0,flat:!0,onBalChange:k})),i("span",{class:Object.assign({},v.class()),innerHTML:t.innerHTML}))))),i("div",{class:Object.assign(Object.assign({},d.class()),d.modifier("hidden").class(void 0===this.noDataLabel||this.hasOptions()||!this.typeahead||this.selectionOptional))},this.noDataLabel))))}get el(){return s(this)}static get watchers(){return{value:["valueWatcher"]}}};l([B("bal-select"),r("design:type",Function),r("design:paramtypes",[Function]),r("design:returntype",void 0)],P.prototype,"createLogger",null);let V=0;P.style=":root{--bal-select-control-background:var(--bal-color-white);--bal-select-control-background-hover:var(--bal-form-field-control-background-hover);--bal-select-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-select-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-select-control-input-background:var(--bal-color-grey-1);--bal-select-control-native-input-background:transparent;--bal-select-control-native-input-background-hover:transparent;--bal-select-control-input-inverted-footer-background:transparent;--bal-select-control-input-inverted-footer-background-hover:transparent;--bal-select-control-input-multiple-background:transparent;--bal-select-control-input-multiple-background-read-only-selection:transparent;--bal-select-control-input-option-background:transparent;--bal-select-control-input-option-background-selected:var(--bal-color-primary-1);--bal-select-control-input-option-background-focused:var(--bal-color-grey-2);--bal-select-control-input-option-background-hover:var(--bal-color-grey-2);--bal-select-control-border-radius:var(--bal-form-field-control-radius);--bal-select-popover-border-color:var(--bal-color-grey-2);--bal-select-control-border-color:var(--bal-form-field-control-border-color);--bal-select-control-border-color-focused:var(--bal-color-primary);--bal-select-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-select-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-select-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-select-control-border-color-focus-within:var(--bal-color-primary);--bal-select-option-border-top-color:var(--bal-color-grey-2);--bal-select-popover-empty-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color-focused:var(--bal-color-primary);--bal-select-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-select-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-select-option-content-label-text-color:var(--bal-form-field-control-color)}bal-select-option{display:none !important}.bal-select{display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text)}.bal-select__popover{border:.125rem solid var(--bal-select-popover-border-color)}.bal-select__popover__empty{padding:.5rem 1rem;font-family:var(--bal-font-family-text);color:var(--bal-select-popover-empty-text-color)}.bal-select__popover__empty--hidden{display:none}.bal-select__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-select__control{display:-ms-flexbox;display:flex;border-width:.125rem;border-style:solid;border-color:var(--bal-select-control-border-color);border-radius:var(--bal-select-control-border-radius);background:var(--bal-select-control-background);font-size:var(--bal-font-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-select-control-text-color);outline:none;-webkit-box-shadow:none;box-shadow:none;padding-right:1rem;min-height:3rem}.bal-select__control--focused{border-color:var(--bal-select-control-border-color-focused)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover{border-color:var(--bal-select-control-border-color-hover);background-color:var(--bal-select-control-background-hover)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover .bal-select__control__input{background-color:var(--bal-select-control-input-background)}.bal-select__control--invalid:not(.bal-select__control--disabled){border-color:var(--bal-select-control-border-color-invalid) !important;background:var(--bal-select-control-background-invalid) !important}.bal-select__control:focus-within{border-color:var(--bal-select-control-border-color-focus-within) !important}.bal-select__control--disabled{background-color:var(--bal-select-control-background-disabled) !important;border-color:var(--bal-select-control-border-color-disabled) !important}.bal-select__control--disabled,.bal-select__control--disabled input{cursor:default !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;pointer-events:none !important;color:var(--bal-select-input-text-color-disabled)}.bal-select__control--inverted-footer{border:none;background-color:var(--bal-select-control-input-inverted-footer-background) !important;padding-right:0}.bal-select__control--inverted-footer:hover{background-color:var(--bal-select-control-input-inverted-footer-background-hover) !important}.bal-select__control--inverted-footer .input{color:var(--bal-select-control-inverted-footer-native-input-text-color);background-color:var(--bal-select-control-native-input-background) !important}.bal-select__control--inverted-footer .input:hover{background-color:var(--bal-select-control-native-input-background-hover) !important}.bal-select__control__icon{min-height:100% !important;max-height:100% !important}.bal-select__control__icon--loading{display:none}.bal-select__control__icon--clickable{cursor:pointer}.bal-select__control__selections{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.125rem;max-width:100%;min-width:0;gap:0;padding-left:.375rem}.bal-select__control__selections .bal-tag{margin-left:.25rem;margin-top:.375rem;margin-bottom:.375rem}.bal-select__control__selections .bal-tag+.input{padding-left:.625rem}.bal-select__control__input{border:none !important;outline:none !important;outline-width:0 !important;height:2.75rem !important;-webkit-box-shadow:none !important;box-shadow:none !important;background:var(--bal-select-control-input-multiple-background);-ms-flex:1;flex:1;min-height:2.75rem !important;padding-left:.25rem !important;padding-right:.625rem !important;text-overflow:ellipsis}.bal-select__control__input:-moz-read-only{-moz-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__option{visibility:visible;font-family:var(--bal-font-family-text);background:var(--bal-select-control-input-option-background);border:none;cursor:pointer;outline:none;min-height:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0;margin:0;border-top:.125rem solid var(--bal-select-option-border-top-color);text-align:inherit;white-space:nowrap;width:100%}.bal-select__option:first-child{border-top:none}.bal-select__option::-moz-focus-inner{border:none}.bal-select__option--selected{background:var(--bal-select-control-input-option-background-selected)}.bal-select__option--selected .bal-select__option__content__label{font-weight:var(--bal-font-weight-bold)}.bal-select__option--focused{background:var(--bal-select-control-input-option-background-focused)}.bal-select__option:hover{background:var(--bal-select-control-input-option-background-hover)}.bal-select__option__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;min-height:3rem;padding:.75rem 1rem;gap:.75rem}.bal-select__option__content__checkbox{margin:0;padding:0}.bal-select__option__content__label{margin:0;padding:0;font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-select-option-content-label-text-color);line-height:1.125rem;word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}";const D=class{constructor(e){t(this,e),this.label=void 0,this.disabled=!1,this.value=void 0,this.for="bal-selopt-"+E++}createLogger(t){this.log=t}render(){return i(o,{style:{display:"none"}},i("slot",null))}};l([B("bal-select-option"),r("design:type",Function),r("design:paramtypes",[Function]),r("design:returntype",void 0)],D.prototype,"createLogger",null);let E=0;export{P as bal_select,D as bal_select_option}
|
|
1
|
+
import{r as t,c as e,h as i,H as o,g as s}from"./p-d7c752c6.js";import{_ as l,a as r}from"./p-43c9f5e9.js";import{l as a}from"./p-9a3d9e17.js";import{k as n,d as c,e as h,i as b,h as d}from"./p-88f18fbc.js";import{e as p,o as u,q as m,s as v,h as f,u as g,C as _}from"./p-4ae121b6.js";import{r as y,p as k,l as x,g as w,i as j,s as O,a as C,f as T,b as L,v as z}from"./p-c0c91eb1.js";import{s as F}from"./p-de08fd27.js";import{B as A}from"./p-ae86d0a0.js";import{L as B}from"./p-b77e3348.js";import{d as M}from"./p-f385e205.js";import"./p-a65354df.js";import"./p-2229e98e.js";import"./p-aafb6696.js";import"./p-4573c419.js";const I=!0,P=class{constructor(i){t(this,i),this.balChange=e(this,"balChange",7),this.balInputClick=e(this,"balInputClick",7),this.balInput=e(this,"balInput",7),this.balBlur=e(this,"balBlur",7),this.balFocus=e(this,"balFocus",7),this.balCancel=e(this,"balCancel",7),this.balKeyPress=e(this,"balKeyPress",7),this.didInit=!1,this.inputId="bal-select-"+V++,this.initialValue=[],this.removeValue=t=>{this.disabled||(this.updateRawValue(y(this.rawValue,t),I),this.multiple&&this.typeahead&&this.setFocus(),this.fireBlur())},this.fireBlur=(t=new CustomEvent("blur"))=>{this.isPopoverOpen||this.hasFocus||n((()=>this.balBlur.emit(t)))},this.handleClick=t=>{(this.disabled||this.readonly)&&k(t)},this.handlePopoverChange=t=>{t.stopPropagation(),this.isPopoverOpen!==t.detail&&(this.isPopoverOpen=t.detail,this.isPopoverOpen?this.updateFocus():(this.focusIndex=-1,this.multiple&&this.typeahead&&this.updateInputValue(""),this.fireBlur(t)))},this.handleInputBlur=t=>{k(t);const e=t.relatedTarget;(null===e||e&&e.nodeName&&("BAL-MODAL"===e.nodeName||"INPUT"===e.nodeName||"BUTTON"===e.nodeName))&&this.validateAfterBlur(I),this.hasFocus=!1,this.fireBlur(t)},this.handleInputFocus=t=>{this.balFocus.emit(t),this.hasFocus=!0},this.handleInputClick=async(t,e=!1)=>{var i,o,s,l;F(t),this.isChipClicked(t)||(this.disabled||this.readonly?k(t):(this.focusIndex=-1,this.balInputClick.emit(t),this.typeahead?this.isPopoverOpen&&e?await(null===(i=this.popoverElement)||void 0===i?void 0:i.dismiss()):await(null===(o=this.popoverElement)||void 0===o?void 0:o.present()):this.isPopoverOpen?await(null===(s=this.popoverElement)||void 0===s?void 0:s.dismiss()):await(null===(l=this.popoverElement)||void 0===l?void 0:l.present())))},this.handleKeyPress=async t=>{!this.isPopoverOpen&&p(t)&&(k(t),await this.open()),this.balKeyPress.emit(t)},this.handleInputChange=t=>{this.disabled||this.readonly||(this.inputValue=t.target.value)},this.handleInput=async t=>{this.disabled||this.readonly||(this.inputValue=t.target.value,this.isPopoverOpen||this.popoverElement.present(),this.focusIndex=-1,this.updateFocus(),k(t),this.balInput.emit(this.inputValue))},this.handleOptionMouseEnter=t=>{this.focusIndex=t},this.hasFocus=!1,this.inputValue="",this.focusIndex=-1,this.isPopoverOpen=!1,this.options=new Map,this.labelToScrollTo="",this.labelToSelectTo="",this.ariaForm=M,this.name=this.inputId,this.invalid=!1,this.filter="includes",this.balTabindex=0,this.freeSolo=!1,this.multiple=!1,this.maxLength=void 0,this.noDataLabel=void 0,this.autocomplete="off",this.typeahead=!1,this.selectionOptional=!1,this.disabled=!1,this.readonly=!1,this.required=!1,this.inverted=!1,this.placeholder=void 0,this.scrollable=250,this.loading=!1,this.remote=!1,this.autoInvalidOff=!1,this.value=[],this.rawValue=[]}createLogger(t){this.log=t}valueWatcher(){this.syncRawValue(!1)}updateRawValue(t,e=!0){u(t,this.rawValue||[])||(this.rawValue=[...t],this.syncNativeInput(),this.didInit&&!0===e&&(this.multiple?a(this.rawValue)?this.emitChangeEvent([]):this.emitChangeEvent([...this.rawValue]):a(this.rawValue)||0===x(this.rawValue)?this.emitChangeEvent(void 0):this.emitChangeEvent(this.rawValue[0])))}emitChangeEvent(t){this.balChange.emit(t)}connectedCallback(){const t=d((()=>this.updateOptions()),0);this.initialValue=this.value,t(),this.mutationO=(e=>{if("undefined"==typeof MutationObserver)return;const i=new MutationObserver((e=>{(e=e.filter((t=>t.target.nodeName==="bal-select-option".toUpperCase()||t.target.nodeName==="bal-select".toUpperCase()))).length>0&&t()}));return i.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),i})(this.el)}componentWillLoad(){if(this.waitForOptionsAndThenUpdateRawValues(),this.isInsideOfFooter(),!a(this.rawValue)&&this.options.size>0&&1===x(this.rawValue)){const t=this.options.get(this.rawValue[0]);a(t)||(this.inputValue=t.label)}}componentDidLoad(){this.syncRawValue(!1),this.multiple||(this.inputElement.value=this.inputValue),this.didInit=!0}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}listenOnClick(t){this.disabled&&t.target&&t.target===this.el&&k(t)}resetHandler(t){const e=t.target;(null==e?void 0:e.contains(this.el))&&(this.resetHandlerTimer&&clearTimeout(this.resetHandlerTimer),this.resetHandlerTimer=setTimeout((()=>{this.value=this.initialValue,this.syncRawValue(!1),this.syncNativeInput(),this.nativeSelectEl&&Array.from(this.nativeSelectEl.options).forEach((t=>t.selected=!0))}),0))}async handleKeyDown(t){if(this.isPopoverOpen){if((m(t)||v(t))&&(k(t),this.navigateWithArrowKey(t),this.updateFocus()),f(t)&&(k(t),this.selectedFocusedOption()),g(t)&&this.cancel(),_(t)&&this.typeahead&&this.multiple&&""===this.inputElement.value&&x(this.rawValue)>0){const t=w(this.rawValue);this.removeValue(t[x(this.rawValue)-1])}this.typeahead||1!==t.key.length||this.focusOptionByLabel(t.key),p(t)&&!this.typeahead&&k(t)}else this.hasFocus&&((m(t)||v(t))&&(k(t),await this.open()),this.typeahead||1!==t.key.length||this.selectOptionByLabel(t.key))}async setFocus(){this.inputElement&&!this.disabled&&(await c(),this.inputElement.focus())}async getValue(){return this.rawValue}async clear(){this.focusIndex=-1,this.inputElement&&(this.updateInputValue(""),this.updateRawValue([],I),this.value=this.multiple?[]:"")}async open(){this.disabled||this.readonly||a(this.popoverElement)||await this.popoverElement.present()}async close(){this.disabled||this.readonly||a(this.popoverElement)||this.blurSelect()}async cancel(){this.labelToScrollTo="",this.close(),this.scrollTo(0),this.balCancel.emit()}async select(t){const e=this.options.get(t);a(e)||this.optionSelected(e)}async setAriaForm(t){this.ariaForm=Object.assign({},t)}async waitForOptionsAndThenUpdateRawValues(){clearTimeout(this.waitForOptionsAndThenUpdateRawValuesTimer),await h(this.el),this.options.size>0?this.remote||this.syncRawValue(false):this.waitForOptionsAndThenUpdateRawValuesTimer=setTimeout((()=>this.waitForOptionsAndThenUpdateRawValues()),10)}async updateOptions(){const t=this.getChildOpts(),e=new Map;for(let i=0;i<t.length;i++){const o=t[i];e.set(o.value,{value:o.value,label:o.label,disabled:o.disabled,id:o.for,textContent:o.textContent,innerHTML:o.innerHTML})}if(!this.selectionOptional&&Array.isArray(this.rawValue))for(let t=0;t<this.rawValue.length;t++){const i=this.rawValue[t];if(!e.has(i)){const t=y(this.rawValue,i);this.updateRawValue(t,false)}}this.options=new Map(e),this.typeahead||await this.syncNativeInput(),this.didInit&&!this.remote&&this.validateAfterBlur()}get optionArray(){const t=Array.from(this.options,(([t,e])=>e));return!this.typeahead||this.remote?t:t.filter((t=>"includes"===this.filter?j(t.textContent,this.inputValue):O(t.textContent,this.inputValue)))}hasOptions(){return this.optionArray.length>0}get inputPlaceholder(){return this.multiple?x(this.rawValue)<1?this.placeholder:void 0:!a(this.rawValue)&&x(this.rawValue)>0?void 0:this.placeholder}getChildOpts(){return Array.from(this.el.querySelectorAll("bal-select-option"))}getPopoverContent(){return this.popoverElement.querySelector(".bal-popover__content__inner")}updateFocus(){this.focusIndex<-1&&(this.focusIndex=-1);const t=this.optionArray;if(t.length>0){t.length<=this.focusIndex&&(this.focusIndex=t.length-1);const e=t[this.focusIndex];if(e&&e.id){const t=this.el.querySelector(`button#${e.id}`);t&&(clearTimeout(this.updateFocusTimer),this.updateFocusTimer=setTimeout((()=>{this.scrollToFocusedOption(t)}),0))}}else this.focusIndex=-1}scrollToFocusedOption(t){if(t&&this.popoverElement){const e=this.getPopoverContent();if(e){const i=t.offsetTop;i<e.scrollTop&&(e.scrollTop=i),t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=e.scrollTop+t.clientHeight)}}}scrollTo(t){const e=this.getPopoverContent();e&&(e.scrollTop=t)}selectedFocusedOption(){const t=this.optionArray;if(t.length>this.focusIndex){const e=t[this.focusIndex];e&&this.optionSelected(e)}}navigateWithArrowKey(t){m(t)?this.focusIndex=this.focusIndex+1:v(t)&&(this.focusIndex=this.focusIndex-1)}focusOptionByLabel(t){this.labelToScrollTo=this.labelToScrollTo+t,clearTimeout(this.clearScrollToValue),this.clearScrollToValue=setTimeout((()=>{this.scrollToLabel(this.labelToScrollTo)}),600)}selectOptionByLabel(t){this.labelToSelectTo=this.labelToSelectTo+t,clearTimeout(this.clearSelectValue),this.clearSelectValue=setTimeout((()=>{this.selectLabel(this.labelToSelectTo),this.labelToSelectTo=""}),600)}async selectLabel(t){if(" "!==t){const e=this.optionArray.find((e=>O(e.label||"",t)));if(!a(e)&&e.id){const t=this.el.querySelector(`button#${e.id}`);if(!a(t)){const t=this.optionArray.indexOf(e);this.focusIndex=t,this.select(e.value)}}this.labelToScrollTo=""}}async scrollToLabel(t){if(" "!==t){const e=this.optionArray.find((e=>O(e.label||"",t)));if(!a(e)&&e.id){const t=this.el.querySelector(`button#${e.id}`);if(!a(t)){const i=this.optionArray.indexOf(e);this.focusIndex=i,this.scrollTo(t.offsetTop)}}this.labelToScrollTo=""}}syncRawValue(t=!0){let e=[];a(this.value)||""===this.value||(e=Array.isArray(this.value)?[...this.value.filter((t=>!a(t)))]:this.value.split("").includes(",")?[...this.value.split(",").filter((t=>t)).map((t=>t.trim()))]:[this.value]),this.updateRawValue(e,t)}blurSelect(){this.popoverElement.dismiss()}optionSelected(t){const e=w(this.rawValue).some((e=>e===t.value));this.updateValue(t.value,!e),this.multiple?this.typeahead&&this.setFocus():this.blurSelect()}updateValue(t,e=!0){this.multiple?this.updateRawValue(e?C(this.rawValue,t,this.multiple):y(this.rawValue,t),I):(this.updateRawValue(C(this.rawValue,t,this.multiple),I),this.rawValue&&this.rawValue.length>0&&this.updateInputValue(T(this.options,this.rawValue[0])))}validateAfterBlur(t=!1){let e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){const t=L(this.options,this.inputElement.value);e=t?[t.value]:[this.inputElement.value]}else e=z(this.rawValue,this.options,this.inputElement.value);this.updateRawValue(e,t)}}syncNativeInput(){if(!this.multiple&&x(this.rawValue)>0){const t=w(this.rawValue);let e=T(this.options,t[0]);return!this.multiple&&this.typeahead&&this.selectionOptional&&""===e&&(e=t.join(", ")),this.updateInputValue(e)}return Promise.resolve()}updateInputValue(t){return new Promise((e=>{this.updateInputValueTimer&&clearTimeout(this.updateInputValueTimer),this.updateInputValueTimer=setTimeout((()=>{a(this.inputElement)||(this.inputElement.value=t,this.inputValue=t,e())}),0)}))}isChipClicked(t){let e=!1;if(this.multiple){const i=this.selectionEl.querySelectorAll("bal-tag"),o=t.target;i.forEach((t=>{const i=b(t,o)||t===o;i&&(e=i)}))}return e}isInsideOfFooter(){this.inverted=null!==this.el.closest("bal-footer")}render(){var t;const e=t=>i("bal-tag",{size:"",closable:!this.disabled,disabled:this.disabled,invalid:this.invalid,tabindex:-1,onBalCloseClick:()=>this.removeValue(t.value),"data-testid":"bal-select-chip"},T(this.options,t.value)||t.value),s=w(this.rawValue),l=A.block("select"),r=l.element("native"),a=l.element("control"),n=a.element("icon"),c=a.element("selections"),h=a.element("input"),b=l.element("popover"),d=b.element("empty"),p=l.element("option"),u=p.element("content"),m=u.element("checkbox"),v=u.element("label");return i(o,{role:"listbox",onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,"data-value":null===(t=this.rawValue)||void 0===t?void 0:t.map((t=>T(this.options,t))).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("disabled").class(this.disabled||this.readonly)),l.modifier("inverted").class(this.inverted)),l.modifier("inverted-footer").class(this.inverted))},i("select",{class:Object.assign({},r.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:t=>this.nativeSelectEl=t},s.map((t=>i("option",{key:t,value:t,selected:!0},t)))),i("bal-popover",{onBalChange:this.handlePopoverChange,ref:t=>this.popoverElement=t},i("div",{"bal-popover-trigger":!0,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("invalid").class(this.invalid)),a.modifier("disabled").class(this.disabled||this.readonly)),a.modifier("focused").class(this.isPopoverOpen)),a.modifier("inverted-footer").class(this.inverted))},i("div",{class:Object.assign(Object.assign({},c.class()),c.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:t=>this.selectionEl=t},s.filter((()=>this.multiple)).map((t=>i(e,{value:t}))),i("input",{type:"text",class:Object.assign(Object.assign({},h.class()),{input:!0,"is-inverted":this.inverted,"is-danger":this.invalid,"is-disabled":this.disabled||this.readonly,"is-clickable":!this.isPopoverOpen&&!this.disabled&&!this.readonly,"data-test-select-input":!0}),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-select-input",autocomplete:this.autocomplete,"aria-autocomplete":"off"===this.autocomplete?"none":null,placeholder:this.inputPlaceholder,readonly:!this.typeahead||this.disabled||this.readonly,contentEditable:this.typeahead,disabled:this.disabled,maxLength:this.maxLength,tabindex:this.balTabindex,onInput:this.handleInput,onClick:this.handleInputClick,onChange:this.handleInputChange,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyPress:this.handleKeyPress,ref:t=>this.inputElement=t})),this.freeSolo||this.loading?"":i("bal-icon",{class:Object.assign(Object.assign(Object.assign({},n.class()),n.modifier("loading").class(this.loading)),n.modifier("clickable").class(!this.disabled&&!this.readonly)),name:this.inverted?"caret-up":"caret-down",color:this.disabled||this.readonly?"grey-light":this.inverted?"white":this.invalid?"danger":"primary",turn:this.isPopoverOpen,onClick:t=>this.handleInputClick(t,!0),size:this.inverted?"x-small":""})),i("bal-popover-content",{class:Object.assign({},b.class()),scrollable:this.scrollable,spaceless:!0,expanded:!0},this.optionArray.map(((t,e)=>i("button",{key:t.value,type:"button",role:"option",id:t.id,"data-value":t.value,"data-label":t.label,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p.class()),p.modifier("selected").class(s.includes(t.value)&&!(this.typeahead&&!this.multiple))),p.modifier("focused").class(this.focusIndex===e)),p.modifier("checkbox").class(this.multiple)),p.modifier("disabled").class(!0===t.disabled)),"data-testid":"bal-select-option",disabled:t.disabled,tabIndex:-1,onMouseEnter:()=>this.handleOptionMouseEnter(e),onClick:()=>this.optionSelected(t)},i("div",{class:Object.assign({},u.class())},i("span",{class:Object.assign({},m.class()),style:{display:this.multiple?"flex":"none"}},i("bal-checkbox",{checked:s.includes(t.value),tabindex:-1,nonSubmit:!0,flat:!0,onBalChange:k})),i("span",{class:Object.assign({},v.class()),innerHTML:t.innerHTML}))))),i("div",{class:Object.assign(Object.assign({},d.class()),d.modifier("hidden").class(void 0===this.noDataLabel||this.hasOptions()||!this.typeahead||this.selectionOptional))},this.noDataLabel))))}get el(){return s(this)}static get watchers(){return{value:["valueWatcher"]}}};l([B("bal-select"),r("design:type",Function),r("design:paramtypes",[Function]),r("design:returntype",void 0)],P.prototype,"createLogger",null);let V=0;P.style=":root{--bal-select-control-background:var(--bal-color-white);--bal-select-control-background-hover:var(--bal-form-field-control-background-hover);--bal-select-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-select-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-select-control-input-background:var(--bal-color-grey-1);--bal-select-control-native-input-background:transparent;--bal-select-control-native-input-background-hover:transparent;--bal-select-control-input-inverted-footer-background:transparent;--bal-select-control-input-inverted-footer-background-hover:transparent;--bal-select-control-input-multiple-background:transparent;--bal-select-control-input-multiple-background-read-only-selection:transparent;--bal-select-control-input-option-background:transparent;--bal-select-control-input-option-background-selected:var(--bal-color-primary-1);--bal-select-control-input-option-background-focused:var(--bal-color-grey-2);--bal-select-control-input-option-background-hover:var(--bal-color-grey-2);--bal-select-control-border-radius:var(--bal-form-field-control-radius);--bal-select-popover-border-color:var(--bal-color-grey-2);--bal-select-control-border-color:var(--bal-form-field-control-border-color);--bal-select-control-border-color-focused:var(--bal-color-primary);--bal-select-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-select-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-select-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-select-control-border-color-focus-within:var(--bal-color-primary);--bal-select-option-border-top-color:var(--bal-color-grey-2);--bal-select-popover-empty-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color-focused:var(--bal-color-primary);--bal-select-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-select-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-select-option-content-label-text-color:var(--bal-form-field-control-color)}bal-select-option{display:none !important}.bal-select{display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text)}.bal-select__popover{border:.125rem solid var(--bal-select-popover-border-color)}.bal-select__popover__empty{padding:.5rem 1rem;font-family:var(--bal-font-family-text);color:var(--bal-select-popover-empty-text-color)}.bal-select__popover__empty--hidden{display:none}.bal-select__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-select__control{display:-ms-flexbox;display:flex;border-width:.125rem;border-style:solid;border-color:var(--bal-select-control-border-color);border-radius:var(--bal-select-control-border-radius);background:var(--bal-select-control-background);font-size:var(--bal-font-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-select-control-text-color);outline:none;-webkit-box-shadow:none;box-shadow:none;padding-right:1rem;min-height:3rem}.bal-select__control--focused{border-color:var(--bal-select-control-border-color-focused)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover{border-color:var(--bal-select-control-border-color-hover);background-color:var(--bal-select-control-background-hover)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover .bal-select__control__input{background-color:var(--bal-select-control-input-background)}.bal-select__control--invalid:not(.bal-select__control--disabled){border-color:var(--bal-select-control-border-color-invalid) !important;background:var(--bal-select-control-background-invalid) !important}.bal-select__control:focus-within{border-color:var(--bal-select-control-border-color-focus-within) !important}.bal-select__control--disabled{background-color:var(--bal-select-control-background-disabled) !important;border-color:var(--bal-select-control-border-color-disabled) !important}.bal-select__control--disabled,.bal-select__control--disabled input{cursor:default !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;pointer-events:none !important;color:var(--bal-select-input-text-color-disabled)}.bal-select__control--inverted-footer{border:none;background-color:var(--bal-select-control-input-inverted-footer-background) !important;padding-right:0}.bal-select__control--inverted-footer:hover{background-color:var(--bal-select-control-input-inverted-footer-background-hover) !important}.bal-select__control--inverted-footer .input{color:var(--bal-select-control-inverted-footer-native-input-text-color);background-color:var(--bal-select-control-native-input-background) !important}.bal-select__control--inverted-footer .input:hover{background-color:var(--bal-select-control-native-input-background-hover) !important}.bal-select__control__icon{min-height:100% !important;max-height:100% !important}.bal-select__control__icon--loading{display:none}.bal-select__control__icon--clickable{cursor:pointer}.bal-select__control__selections{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.125rem;max-width:100%;min-width:0;gap:0;padding-left:.375rem}.bal-select__control__selections .bal-tag{margin-left:.25rem;margin-top:.375rem;margin-bottom:.375rem}.bal-select__control__selections .bal-tag+.input{padding-left:.625rem}.bal-select__control__input{border:none !important;outline:none !important;outline-width:0 !important;height:2.75rem !important;-webkit-box-shadow:none !important;box-shadow:none !important;background:var(--bal-select-control-input-multiple-background);-ms-flex:1;flex:1;min-height:2.75rem !important;padding-left:.25rem !important;padding-right:.625rem !important;text-overflow:ellipsis}.bal-select__control__input:-moz-read-only{-moz-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__option{visibility:visible;font-family:var(--bal-font-family-text);background:var(--bal-select-control-input-option-background);border:none;cursor:pointer;outline:none;min-height:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0;margin:0;border-top:.125rem solid var(--bal-select-option-border-top-color);text-align:inherit;white-space:nowrap;width:100%}.bal-select__option:first-child{border-top:none}.bal-select__option::-moz-focus-inner{border:none}.bal-select__option--selected{background:var(--bal-select-control-input-option-background-selected)}.bal-select__option--selected .bal-select__option__content__label{font-weight:var(--bal-font-weight-bold)}.bal-select__option--focused{background:var(--bal-select-control-input-option-background-focused)}.bal-select__option:hover{background:var(--bal-select-control-input-option-background-hover)}.bal-select__option__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;min-height:3rem;padding:.75rem 1rem;gap:.75rem}.bal-select__option__content__checkbox{margin:0;padding:0}.bal-select__option__content__label{margin:0;padding:0;font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-select-option-content-label-text-color);line-height:1.125rem;word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}";const D=class{constructor(e){t(this,e),this.label=void 0,this.disabled=!1,this.value=void 0,this.for="bal-selopt-"+E++}createLogger(t){this.log=t}render(){return i(o,{style:{display:"none"}},i("slot",null))}};l([B("bal-select-option"),r("design:type",Function),r("design:paramtypes",[Function]),r("design:returntype",void 0)],D.prototype,"createLogger",null);let E=0;export{P as bal_select,D as bal_select_option}
|
package/dist/baloise-design-system/{p-f62d0ccdd1.system.entry.js → p-8613444e15.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function s(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function o(t){try{a(i.next(t))}catch(t){r(t)}}function u(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?n(t.value):s(t.value).then(o,u)}a((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(e){return a([t,e])}}function a(u){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(i=1,s&&(r=u[0]&2?s["return"]:u[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,u[1])).done)return r;if(s=0,r)u=[u[0]&2,r.value];switch(u[0]){case 0:case 1:r=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;s=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){n.label=u[1];break}if(u[0]===6&&n.label<r[1]){n.label=r[1];r=u;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(u);break}if(r[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];s=0}finally{i=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-8954495d.system.js","./p-88eb14fd.system.js","./p-3befc6f9.system.js","./p-0177e3a0.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js","./p-ec9a7cf5.system.js","./p-eecefb0a.system.js","./p-36074466.system.js"],(function(t,e){"use strict";var n,i,s,r,o,u,a,C,c,f,l,h;return{setters:[function(t){n=t.r;i=t.h;s=t.H;r=t.g},function(t){o=t._;u=t.a},function(t){a=t.B},function(t){C=t.L},function(t){c=t.k},function(t){f=t.L},function(t){l=t.b},function(t){h=t.L},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var g=".bal-logo{position:static;display:block;height:22px}.bal-logo svg{-webkit-transform:unset !important;transform:unset !important}.bal-logo svg svg,.bal-logo svg g,.bal-logo svg path,.bal-logo svg circle{fill:#000d6e}.bal-logo>div{height:22px}@media screen and (min-width: 1024px){.bal-logo--animated{margin-left:-7px}}.bal-logo--white svg svg,.bal-logo--white svg g,.bal-logo--white svg path,.bal-logo--white svg circle{fill:#fff}@media screen and (min-width: 1024px){.bal-logo{height:32px}.bal-logo>div{height:32px}}.bal-logo--size-small{height:22px}.bal-logo--size-small>div{height:22px}";var d=g;var b=t("bal_logo",function(){function t(t){n(this,t);this.isTouch=l.isTouch;this.doesConfigAllowAnimation=true;this.color="blue";this.size="";this.animated=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.animatedWatcher=function(){if(!this.isAnimated){this.destroyAnimation()}};t.prototype.connectedCallback=function(){this.animatedWatcher()};t.prototype.componentDidUpdate=function(){this.resetAnimation()};t.prototype.componentDidLoad=function(){this.resetAnimation()};t.prototype.disconnectedCallback=function(){if(this.el&&!this.el.isConnected){this.destroyAnimation()}};t.prototype.breakpointListener=function(t){this.isTouch=t.touch};t.prototype.configChanged=function(t){this.doesConfigAllowAnimation=t.animated};Object.defineProperty(t.prototype,"isAnimated",{get:function(){return this.doesConfigAllowAnimation&&this.animated},enumerable:false,configurable:true});t.prototype.resetAnimation=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.destroyAnimation();if(!this.animated)return[3,2];return[4,this.loadAnimation()];case 1:t.sent();if(this.animationFunction){this.destroyAnimation();this.animationItem=this.animationFunction(this.animatedLogoElement,this.color)}t.label=2;case 2:return[2]}}))}))};t.prototype.loadAnimation=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){return[2,new Promise((function(n,i){if(t.animationFunction){return n()}else{c((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(s){e.import("./p-39cbb5b4.system.js").then((function(e){t.animationFunction=e.animate;n()})).catch(i);return[2]}))}))}))}}))]}))}))};t.prototype.destroyAnimation=function(){if(this.animated&&this.animationItem&&this.animationItem.destroy){this.animationItem.destroy()}};t.prototype.render=function(){var t=this;var e=a.block("logo");var n=function(){return i("div",{style:{width:t.isTouch?"100px":"158px",height:t.isTouch?"22px":"32px"},ref:function(e){return t.animatedLogoElement=e}})};var r=function(){return i("svg",{focusable:"false","aria-hidden":"true",width:"158",height:"32",viewBox:"0 0 158 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M112.351 3.52166C112.351 1.47065 114.09 0 116.118 0C118.146 0 119.727 1.47065 119.727 3.52166C119.727 5.57268 118.146 7.00945 116.118 7.00945C114.09 7.00945 112.351 5.57324 112.351 3.52166ZM113.231 9.43647H118.97V27.4547H113.231V9.43647ZM82.5903 2.46199H88.33V27.4541H82.5903V2.46199ZM48.3558 27.8995C53.6142 27.8995 57.3602 23.8647 57.3602 18.4631C57.3602 13.0609 53.7175 9.0266 48.4915 9.02715C46.5342 9.02715 44.8845 9.60807 43.5786 10.7022V2.46255H37.839V27.4547H43.132V25.9163C44.4378 27.1814 46.1908 27.8995 48.3558 27.8995ZM47.5312 14.02C49.9368 14.02 51.6893 15.8989 51.6893 18.4631C51.6893 21.0272 49.9368 22.8733 47.5312 22.8733C45.0224 22.8733 43.3034 21.0611 43.3034 18.4631C43.3034 15.8317 44.9877 14.02 47.5312 14.02ZM78.8057 27.4547V9.43647H73.5127V11.317C72.2409 10.0524 70.522 9.36815 68.2889 9.36815C63.0305 9.36815 59.2498 13.0614 59.2498 18.4631C59.2498 23.8647 63.0305 27.8995 68.2889 27.8995C70.5226 27.8995 72.2409 27.1464 73.5127 25.8135V27.4547H78.8057ZM69.114 14.02C71.6229 14.02 73.3072 15.83 73.3072 18.4631C73.3072 21.0617 71.6224 22.8733 69.114 22.8733C66.6744 22.8733 64.9554 21.0256 64.9554 18.4631C64.9554 15.9005 66.7084 14.02 69.114 14.02ZM100.74 9.02659C94.9667 9.02659 90.8422 13.0609 90.8422 18.463C90.8422 23.8308 94.9684 27.8995 100.74 27.8995C106.549 27.8995 110.673 23.8308 110.673 18.463C110.673 13.0609 106.546 9.02659 100.74 9.02659ZM100.774 14.0867C103.283 14.0867 104.899 15.8644 104.899 18.4286C104.899 21.0272 103.249 22.8389 100.774 22.8394C98.2656 22.8394 96.6159 20.9928 96.6159 18.463C96.6159 15.8639 98.2656 14.0867 100.774 14.0867ZM126.05 21.2666L121.307 23.0788C122.373 26.2267 125.294 27.8995 129.382 27.8962C134.159 27.8962 137.183 25.6397 137.183 21.9125C137.183 17.823 133.59 16.8788 130.834 16.1549C129.121 15.7047 127.732 15.3397 127.732 14.3566C127.732 13.6046 128.316 13.1603 129.484 13.1603C130.687 13.1603 131.547 13.7412 131.959 14.8697L136.705 13.0231C135.983 10.4945 133.302 9.02437 129.59 9.02437C125.019 9.02437 122.132 11.1465 122.132 14.6337C122.132 18.3232 125.492 19.3268 128.205 20.1373C130.043 20.6862 131.584 21.1465 131.584 22.2924C131.584 23.1127 130.896 23.6253 129.59 23.6253C127.734 23.6253 126.531 22.7711 126.05 21.2666ZM157.6 18.0871C157.6 13.644 154.094 8.99216 148.183 8.99216C142.959 8.99216 138.766 13.2686 138.766 18.463C138.766 23.8308 142.546 27.8995 148.527 27.8995C152.473 27.8995 154.804 26.3867 156.201 24.6616L152.901 21.3716C151.87 22.6401 150.726 23.2493 148.698 23.2493C146.533 23.2493 144.918 22.1552 144.334 20.1392H157.462C157.557 19.4593 157.603 18.7735 157.6 18.0871ZM144.264 16.5825C144.746 14.3943 146.223 13.2658 148.32 13.2658C150.416 13.2658 151.791 14.531 152.272 16.5825H144.264ZM16.7228 1.02356L31.1352 15.3613C31.2611 15.4866 31.3609 15.6354 31.4289 15.7991C31.497 15.9628 31.5319 16.1383 31.5318 16.3155C31.5316 16.4926 31.4964 16.668 31.428 16.8316C31.3597 16.9953 31.2596 17.1439 31.1335 17.269L27.2256 21.1566L15.7648 9.75525L9.17152 16.3143L15.7648 22.8733L19.8525 18.8063L24.7206 23.6486L16.7256 31.605C16.5997 31.7302 16.4503 31.8296 16.2859 31.8973C16.1215 31.9651 15.9453 32 15.7673 32C15.5893 32 15.4131 31.9651 15.2486 31.8973C15.0842 31.8296 14.9348 31.7302 14.809 31.605L0.396538 17.2673C0.142626 17.0145 0 16.6717 0 16.3143C0 15.9569 0.142626 15.6141 0.396538 15.3613L14.8062 1.02356C14.932 0.898338 15.0814 0.799001 15.2458 0.731227C15.4103 0.663454 15.5865 0.628572 15.7645 0.628572C15.9425 0.628572 16.1187 0.663454 16.2831 0.731227C16.4475 0.799001 16.5969 0.898338 16.7228 1.02356Z",fill:"#000D6E"}))};var o=function(){return i("svg",{focusable:"false","aria-hidden":"true",width:"100",height:"22",viewBox:"0 0 100 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M71.2886 3.08227C71.2886 1.78086 72.3924 0.84771 73.679 0.84771C74.9656 0.84771 75.9688 1.78086 75.9688 3.08227C75.9688 4.38368 74.9656 5.29533 73.679 5.29533C72.3924 5.29533 71.2886 4.38403 71.2886 3.08227ZM71.8472 6.83532H75.4888V18.2682H71.8472V6.83532ZM52.405 2.40989H56.0469V18.2678H52.405V2.40989ZM30.6826 18.5505C34.0192 18.5505 36.3961 15.9903 36.3961 12.5629C36.3961 9.13507 34.0847 6.57525 30.7687 6.5756C29.5268 6.5756 28.48 6.94421 27.6514 7.63843V2.41025H24.0095V18.2682H27.368V17.292C28.1966 18.0948 29.3089 18.5505 30.6826 18.5505ZM30.1594 9.74366C31.6858 9.74366 32.7978 10.9358 32.7978 12.5629C32.7978 14.1899 31.6858 15.3613 30.1594 15.3613C28.5675 15.3613 27.4768 14.2114 27.4768 12.5629C27.4768 10.8932 28.5455 9.74366 30.1594 9.74366ZM50.0036 18.2682V6.83532H46.6451V8.02854C45.8382 7.22613 44.7475 6.79197 43.3305 6.79197C39.994 6.79197 37.5951 9.13543 37.5951 12.5629C37.5951 15.9903 39.994 18.5505 43.3305 18.5505C44.7478 18.5505 45.8382 18.0726 46.6451 17.2269V18.2682H50.0036ZM43.8541 9.74367C45.446 9.74367 46.5147 10.8921 46.5147 12.5629C46.5147 14.2117 45.4457 15.3613 43.8541 15.3613C42.3061 15.3613 41.2154 14.1888 41.2154 12.5629C41.2154 10.9369 42.3277 9.74367 43.8541 9.74367ZM63.9216 6.57524C60.2581 6.57524 57.641 9.13507 57.641 12.5628C57.641 15.9688 60.2591 18.5505 63.9216 18.5505C67.6071 18.5505 70.2238 15.9688 70.2238 12.5628C70.2238 9.13507 67.6057 6.57524 63.9216 6.57524ZM63.9432 9.78595C65.5351 9.78595 66.5603 10.914 66.5603 12.541C66.5603 14.1899 65.5135 15.3394 63.9432 15.3398C62.3513 15.3398 61.3045 14.168 61.3045 12.5628C61.3045 10.9136 62.3513 9.78595 63.9432 9.78595ZM79.9809 14.3418L76.9717 15.4916C77.6475 17.489 79.5013 18.5505 82.095 18.5484C85.1262 18.5484 87.045 17.1166 87.045 14.7516C87.045 12.1567 84.765 11.5576 83.0168 11.0983C81.9297 10.8126 81.0482 10.581 81.0482 9.95722C81.0482 9.48007 81.4187 9.19815 82.1601 9.19815C82.9235 9.19815 83.4687 9.56676 83.7305 10.2828L86.7415 9.11111C86.2834 7.50664 84.5824 6.57384 82.2271 6.57384C79.327 6.57384 77.4949 7.92035 77.4949 10.1331C77.4949 12.4741 79.6268 13.1109 81.3484 13.6252C82.5143 13.9735 83.4921 14.2655 83.4921 14.9926C83.4921 15.5131 83.056 15.8384 82.2271 15.8384C81.0496 15.8384 80.2862 15.2964 79.9809 14.3418ZM99.9999 12.3243C99.9999 9.50508 97.7756 6.5534 94.0246 6.5534C90.7101 6.5534 88.0494 9.26686 88.0494 12.5628C88.0494 15.9688 90.4483 18.5505 94.2429 18.5505C96.7469 18.5505 98.2259 17.5905 99.1125 16.496L97.0183 14.4084C96.3644 15.2132 95.6385 15.5998 94.3516 15.5998C92.9779 15.5998 91.9531 14.9056 91.5822 13.6264H99.9128C99.9728 13.195 100.002 12.7598 99.9999 12.3243ZM91.5383 11.3696C91.8436 9.98118 92.7813 9.2651 94.1114 9.2651C95.4416 9.2651 96.3141 10.0679 96.6194 11.3696H91.5383ZM10.6109 1.49718L19.7559 10.5947C19.8357 10.6742 19.899 10.7686 19.9422 10.8725C19.9854 10.9764 20.0076 11.0878 20.0075 11.2002C20.0074 11.3126 19.985 11.4239 19.9416 11.5277C19.8983 11.6315 19.8348 11.7258 19.7548 11.8052L17.2751 14.272L10.003 7.03759L5.81949 11.1994L10.003 15.3613L12.5967 12.7806L15.6857 15.8532L10.6127 20.9017C10.5328 20.9811 10.438 21.0442 10.3337 21.0872C10.2294 21.1302 10.1175 21.1523 10.0046 21.1523C9.89169 21.1523 9.77986 21.1302 9.67553 21.0872C9.5712 21.0442 9.47641 20.9811 9.39657 20.9017L0.251611 11.8041C0.0904986 11.6437 0 11.4262 0 11.1994C0 10.9726 0.0904986 10.7551 0.251611 10.5947L9.3948 1.49718C9.47464 1.41772 9.56943 1.35469 9.67376 1.31169C9.77809 1.26868 9.88992 1.24655 10.0028 1.24655C10.1158 1.24655 10.2276 1.26868 10.3319 1.31169C10.4363 1.35469 10.5311 1.41772 10.6109 1.49718Z",fill:"#000D6E"}))};var u=this.isAnimated?n:this.isTouch&&this.size===""||this.size==="small"?o:r;return i(s,{class:Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier(this.color).class()),e.modifier("size-".concat(this.size)).class(this.size!=="")),e.modifier("animated").class(this.animated))},i(u,null))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{animated:["animatedWatcher"]}},enumerable:false,configurable:true});return t}());o([C("bal-logo"),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",void 0)],b.prototype,"createLogger",null);o([f(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],b.prototype,"breakpointListener",null);o([h(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],b.prototype,"configChanged",null);b.style=d}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function s(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function o(t){try{a(i.next(t))}catch(t){r(t)}}function u(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?n(t.value):s(t.value).then(o,u)}a((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(e){return a([t,e])}}function a(u){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(i=1,s&&(r=u[0]&2?s["return"]:u[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,u[1])).done)return r;if(s=0,r)u=[u[0]&2,r.value];switch(u[0]){case 0:case 1:r=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;s=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){n.label=u[1];break}if(u[0]===6&&n.label<r[1]){n.label=r[1];r=u;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(u);break}if(r[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];s=0}finally{i=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-8954495d.system.js","./p-910b2f3d.system.js","./p-5de0bd8a.system.js","./p-0177e3a0.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js","./p-ec9a7cf5.system.js","./p-eecefb0a.system.js","./p-9ffefe27.system.js"],(function(t,e){"use strict";var n,i,s,r,o,u,a,C,c,f,l,h;return{setters:[function(t){n=t.r;i=t.h;s=t.H;r=t.g},function(t){o=t._;u=t.a},function(t){a=t.B},function(t){C=t.L},function(t){c=t.k},function(t){f=t.L},function(t){l=t.b},function(t){h=t.L},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var g=".bal-logo{position:static;display:block;height:22px}.bal-logo svg{-webkit-transform:unset !important;transform:unset !important}.bal-logo svg svg,.bal-logo svg g,.bal-logo svg path,.bal-logo svg circle{fill:#000d6e}.bal-logo>div{height:22px}@media screen and (min-width: 1024px){.bal-logo--animated{margin-left:-7px}}.bal-logo--white svg svg,.bal-logo--white svg g,.bal-logo--white svg path,.bal-logo--white svg circle{fill:#fff}@media screen and (min-width: 1024px){.bal-logo{height:32px}.bal-logo>div{height:32px}}.bal-logo--size-small{height:22px}.bal-logo--size-small>div{height:22px}";var d=g;var b=t("bal_logo",function(){function t(t){n(this,t);this.isTouch=l.isTouch;this.doesConfigAllowAnimation=true;this.color="blue";this.size="";this.animated=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.animatedWatcher=function(){if(!this.isAnimated){this.destroyAnimation()}};t.prototype.connectedCallback=function(){this.animatedWatcher()};t.prototype.componentDidUpdate=function(){this.resetAnimation()};t.prototype.componentDidLoad=function(){this.resetAnimation()};t.prototype.disconnectedCallback=function(){if(this.el&&!this.el.isConnected){this.destroyAnimation()}};t.prototype.breakpointListener=function(t){this.isTouch=t.touch};t.prototype.configChanged=function(t){this.doesConfigAllowAnimation=t.animated};Object.defineProperty(t.prototype,"isAnimated",{get:function(){return this.doesConfigAllowAnimation&&this.animated},enumerable:false,configurable:true});t.prototype.resetAnimation=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.destroyAnimation();if(!this.animated)return[3,2];return[4,this.loadAnimation()];case 1:t.sent();if(this.animationFunction){this.destroyAnimation();this.animationItem=this.animationFunction(this.animatedLogoElement,this.color)}t.label=2;case 2:return[2]}}))}))};t.prototype.loadAnimation=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){return[2,new Promise((function(n,i){if(t.animationFunction){return n()}else{c((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(s){e.import("./p-39cbb5b4.system.js").then((function(e){t.animationFunction=e.animate;n()})).catch(i);return[2]}))}))}))}}))]}))}))};t.prototype.destroyAnimation=function(){if(this.animated&&this.animationItem&&this.animationItem.destroy){this.animationItem.destroy()}};t.prototype.render=function(){var t=this;var e=a.block("logo");var n=function(){return i("div",{style:{width:t.isTouch?"100px":"158px",height:t.isTouch?"22px":"32px"},ref:function(e){return t.animatedLogoElement=e}})};var r=function(){return i("svg",{focusable:"false","aria-hidden":"true",width:"158",height:"32",viewBox:"0 0 158 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M112.351 3.52166C112.351 1.47065 114.09 0 116.118 0C118.146 0 119.727 1.47065 119.727 3.52166C119.727 5.57268 118.146 7.00945 116.118 7.00945C114.09 7.00945 112.351 5.57324 112.351 3.52166ZM113.231 9.43647H118.97V27.4547H113.231V9.43647ZM82.5903 2.46199H88.33V27.4541H82.5903V2.46199ZM48.3558 27.8995C53.6142 27.8995 57.3602 23.8647 57.3602 18.4631C57.3602 13.0609 53.7175 9.0266 48.4915 9.02715C46.5342 9.02715 44.8845 9.60807 43.5786 10.7022V2.46255H37.839V27.4547H43.132V25.9163C44.4378 27.1814 46.1908 27.8995 48.3558 27.8995ZM47.5312 14.02C49.9368 14.02 51.6893 15.8989 51.6893 18.4631C51.6893 21.0272 49.9368 22.8733 47.5312 22.8733C45.0224 22.8733 43.3034 21.0611 43.3034 18.4631C43.3034 15.8317 44.9877 14.02 47.5312 14.02ZM78.8057 27.4547V9.43647H73.5127V11.317C72.2409 10.0524 70.522 9.36815 68.2889 9.36815C63.0305 9.36815 59.2498 13.0614 59.2498 18.4631C59.2498 23.8647 63.0305 27.8995 68.2889 27.8995C70.5226 27.8995 72.2409 27.1464 73.5127 25.8135V27.4547H78.8057ZM69.114 14.02C71.6229 14.02 73.3072 15.83 73.3072 18.4631C73.3072 21.0617 71.6224 22.8733 69.114 22.8733C66.6744 22.8733 64.9554 21.0256 64.9554 18.4631C64.9554 15.9005 66.7084 14.02 69.114 14.02ZM100.74 9.02659C94.9667 9.02659 90.8422 13.0609 90.8422 18.463C90.8422 23.8308 94.9684 27.8995 100.74 27.8995C106.549 27.8995 110.673 23.8308 110.673 18.463C110.673 13.0609 106.546 9.02659 100.74 9.02659ZM100.774 14.0867C103.283 14.0867 104.899 15.8644 104.899 18.4286C104.899 21.0272 103.249 22.8389 100.774 22.8394C98.2656 22.8394 96.6159 20.9928 96.6159 18.463C96.6159 15.8639 98.2656 14.0867 100.774 14.0867ZM126.05 21.2666L121.307 23.0788C122.373 26.2267 125.294 27.8995 129.382 27.8962C134.159 27.8962 137.183 25.6397 137.183 21.9125C137.183 17.823 133.59 16.8788 130.834 16.1549C129.121 15.7047 127.732 15.3397 127.732 14.3566C127.732 13.6046 128.316 13.1603 129.484 13.1603C130.687 13.1603 131.547 13.7412 131.959 14.8697L136.705 13.0231C135.983 10.4945 133.302 9.02437 129.59 9.02437C125.019 9.02437 122.132 11.1465 122.132 14.6337C122.132 18.3232 125.492 19.3268 128.205 20.1373C130.043 20.6862 131.584 21.1465 131.584 22.2924C131.584 23.1127 130.896 23.6253 129.59 23.6253C127.734 23.6253 126.531 22.7711 126.05 21.2666ZM157.6 18.0871C157.6 13.644 154.094 8.99216 148.183 8.99216C142.959 8.99216 138.766 13.2686 138.766 18.463C138.766 23.8308 142.546 27.8995 148.527 27.8995C152.473 27.8995 154.804 26.3867 156.201 24.6616L152.901 21.3716C151.87 22.6401 150.726 23.2493 148.698 23.2493C146.533 23.2493 144.918 22.1552 144.334 20.1392H157.462C157.557 19.4593 157.603 18.7735 157.6 18.0871ZM144.264 16.5825C144.746 14.3943 146.223 13.2658 148.32 13.2658C150.416 13.2658 151.791 14.531 152.272 16.5825H144.264ZM16.7228 1.02356L31.1352 15.3613C31.2611 15.4866 31.3609 15.6354 31.4289 15.7991C31.497 15.9628 31.5319 16.1383 31.5318 16.3155C31.5316 16.4926 31.4964 16.668 31.428 16.8316C31.3597 16.9953 31.2596 17.1439 31.1335 17.269L27.2256 21.1566L15.7648 9.75525L9.17152 16.3143L15.7648 22.8733L19.8525 18.8063L24.7206 23.6486L16.7256 31.605C16.5997 31.7302 16.4503 31.8296 16.2859 31.8973C16.1215 31.9651 15.9453 32 15.7673 32C15.5893 32 15.4131 31.9651 15.2486 31.8973C15.0842 31.8296 14.9348 31.7302 14.809 31.605L0.396538 17.2673C0.142626 17.0145 0 16.6717 0 16.3143C0 15.9569 0.142626 15.6141 0.396538 15.3613L14.8062 1.02356C14.932 0.898338 15.0814 0.799001 15.2458 0.731227C15.4103 0.663454 15.5865 0.628572 15.7645 0.628572C15.9425 0.628572 16.1187 0.663454 16.2831 0.731227C16.4475 0.799001 16.5969 0.898338 16.7228 1.02356Z",fill:"#000D6E"}))};var o=function(){return i("svg",{focusable:"false","aria-hidden":"true",width:"100",height:"22",viewBox:"0 0 100 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M71.2886 3.08227C71.2886 1.78086 72.3924 0.84771 73.679 0.84771C74.9656 0.84771 75.9688 1.78086 75.9688 3.08227C75.9688 4.38368 74.9656 5.29533 73.679 5.29533C72.3924 5.29533 71.2886 4.38403 71.2886 3.08227ZM71.8472 6.83532H75.4888V18.2682H71.8472V6.83532ZM52.405 2.40989H56.0469V18.2678H52.405V2.40989ZM30.6826 18.5505C34.0192 18.5505 36.3961 15.9903 36.3961 12.5629C36.3961 9.13507 34.0847 6.57525 30.7687 6.5756C29.5268 6.5756 28.48 6.94421 27.6514 7.63843V2.41025H24.0095V18.2682H27.368V17.292C28.1966 18.0948 29.3089 18.5505 30.6826 18.5505ZM30.1594 9.74366C31.6858 9.74366 32.7978 10.9358 32.7978 12.5629C32.7978 14.1899 31.6858 15.3613 30.1594 15.3613C28.5675 15.3613 27.4768 14.2114 27.4768 12.5629C27.4768 10.8932 28.5455 9.74366 30.1594 9.74366ZM50.0036 18.2682V6.83532H46.6451V8.02854C45.8382 7.22613 44.7475 6.79197 43.3305 6.79197C39.994 6.79197 37.5951 9.13543 37.5951 12.5629C37.5951 15.9903 39.994 18.5505 43.3305 18.5505C44.7478 18.5505 45.8382 18.0726 46.6451 17.2269V18.2682H50.0036ZM43.8541 9.74367C45.446 9.74367 46.5147 10.8921 46.5147 12.5629C46.5147 14.2117 45.4457 15.3613 43.8541 15.3613C42.3061 15.3613 41.2154 14.1888 41.2154 12.5629C41.2154 10.9369 42.3277 9.74367 43.8541 9.74367ZM63.9216 6.57524C60.2581 6.57524 57.641 9.13507 57.641 12.5628C57.641 15.9688 60.2591 18.5505 63.9216 18.5505C67.6071 18.5505 70.2238 15.9688 70.2238 12.5628C70.2238 9.13507 67.6057 6.57524 63.9216 6.57524ZM63.9432 9.78595C65.5351 9.78595 66.5603 10.914 66.5603 12.541C66.5603 14.1899 65.5135 15.3394 63.9432 15.3398C62.3513 15.3398 61.3045 14.168 61.3045 12.5628C61.3045 10.9136 62.3513 9.78595 63.9432 9.78595ZM79.9809 14.3418L76.9717 15.4916C77.6475 17.489 79.5013 18.5505 82.095 18.5484C85.1262 18.5484 87.045 17.1166 87.045 14.7516C87.045 12.1567 84.765 11.5576 83.0168 11.0983C81.9297 10.8126 81.0482 10.581 81.0482 9.95722C81.0482 9.48007 81.4187 9.19815 82.1601 9.19815C82.9235 9.19815 83.4687 9.56676 83.7305 10.2828L86.7415 9.11111C86.2834 7.50664 84.5824 6.57384 82.2271 6.57384C79.327 6.57384 77.4949 7.92035 77.4949 10.1331C77.4949 12.4741 79.6268 13.1109 81.3484 13.6252C82.5143 13.9735 83.4921 14.2655 83.4921 14.9926C83.4921 15.5131 83.056 15.8384 82.2271 15.8384C81.0496 15.8384 80.2862 15.2964 79.9809 14.3418ZM99.9999 12.3243C99.9999 9.50508 97.7756 6.5534 94.0246 6.5534C90.7101 6.5534 88.0494 9.26686 88.0494 12.5628C88.0494 15.9688 90.4483 18.5505 94.2429 18.5505C96.7469 18.5505 98.2259 17.5905 99.1125 16.496L97.0183 14.4084C96.3644 15.2132 95.6385 15.5998 94.3516 15.5998C92.9779 15.5998 91.9531 14.9056 91.5822 13.6264H99.9128C99.9728 13.195 100.002 12.7598 99.9999 12.3243ZM91.5383 11.3696C91.8436 9.98118 92.7813 9.2651 94.1114 9.2651C95.4416 9.2651 96.3141 10.0679 96.6194 11.3696H91.5383ZM10.6109 1.49718L19.7559 10.5947C19.8357 10.6742 19.899 10.7686 19.9422 10.8725C19.9854 10.9764 20.0076 11.0878 20.0075 11.2002C20.0074 11.3126 19.985 11.4239 19.9416 11.5277C19.8983 11.6315 19.8348 11.7258 19.7548 11.8052L17.2751 14.272L10.003 7.03759L5.81949 11.1994L10.003 15.3613L12.5967 12.7806L15.6857 15.8532L10.6127 20.9017C10.5328 20.9811 10.438 21.0442 10.3337 21.0872C10.2294 21.1302 10.1175 21.1523 10.0046 21.1523C9.89169 21.1523 9.77986 21.1302 9.67553 21.0872C9.5712 21.0442 9.47641 20.9811 9.39657 20.9017L0.251611 11.8041C0.0904986 11.6437 0 11.4262 0 11.1994C0 10.9726 0.0904986 10.7551 0.251611 10.5947L9.3948 1.49718C9.47464 1.41772 9.56943 1.35469 9.67376 1.31169C9.77809 1.26868 9.88992 1.24655 10.0028 1.24655C10.1158 1.24655 10.2276 1.26868 10.3319 1.31169C10.4363 1.35469 10.5311 1.41772 10.6109 1.49718Z",fill:"#000D6E"}))};var u=this.isAnimated?n:this.isTouch&&this.size===""||this.size==="small"?o:r;return i(s,{class:Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier(this.color).class()),e.modifier("size-".concat(this.size)).class(this.size!=="")),e.modifier("animated").class(this.animated))},i(u,null))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{animated:["animatedWatcher"]}},enumerable:false,configurable:true});return t}());o([C("bal-logo"),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",void 0)],b.prototype,"createLogger",null);o([f(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],b.prototype,"breakpointListener",null);o([h(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],b.prototype,"configChanged",null);b.style=d}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as a,g as l}from"./p-d7c752c6.js";import{_ as s,a as o}from"./p-43c9f5e9.js";import{l as r}from"./p-9a3d9e17.js";import{g as n,i as d,e as b,f as h,s as c,b as u,j as p,c as m,d as v}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as a,g as l}from"./p-d7c752c6.js";import{_ as s,a as o}from"./p-43c9f5e9.js";import{l as r}from"./p-9a3d9e17.js";import{g as n,i as d,e as b,f as h,s as c,b as u,j as p,c as m,d as v}from"./p-de08fd27.js";import{m as f}from"./p-88f18fbc.js";import{i as g}from"./p-dd5e13d1.js";import{i as _,N as k,A as y}from"./p-ec1efe3d.js";import{B as w}from"./p-ae86d0a0.js";import{i as x}from"./p-8dc7ee30.js";import{d as j}from"./p-f385e205.js";import{L as C}from"./p-b77e3348.js";import{d as F}from"./p-a19d1e1d.js";import{L}from"./p-69e7c8d6.js";import"./p-a65354df.js";import"./p-2229e98e.js";import"./p-aafb6696.js";const O=class{constructor(i){e(this,i),this.balInput=t(this,"balInput",7),this.balChange=t(this,"balChange",7),this.balBlur=t(this,"balBlur",7),this.balFocus=t(this,"balFocus",7),this.balKeyPress=t(this,"balKeyPress",7),this.balClick=t(this,"balClick",7),this.inputId="bal-time-input-"+B++,this.inheritedAttributes={},this.inputValue=this.value,this.initialValue="",this.onInput=e=>{const t=n(e);t&&(this.inputValue=t.value),this.balInput.emit(this.inputValue)},this.onFocus=e=>{d(this,e)},this.onBlur=e=>{b(this,e);const t=e.target;t&&(t.value=this.getFormattedValue(),h(this))},this.onKeydown=e=>{if(!r(e)&&!_(e)&&!this.getAllowedKeys().includes(e.key))return c(e)},this.focused=!1,this.language=F.language,this.region=F.region,this.ariaForm=j,this.name=this.inputId,this.invalid=!1,this.required=!1,this.disabled=!1,this.readonly=!1,this.debounce=0,this.value=void 0,this.autoInvalidOff=!1}createLogger(e){this.log=e}debounceChanged(){this.balChange=f(this.balChange,this.debounce)}listenOnClick(e){u(this,e)}resetHandler(e){const t=e.target;(null==t?void 0:t.contains(this.el))&&p(this,this.initialValue,this.resetHandlerTimer)}connectedCallback(){this.debounceChanged(),this.initialValue=this.value||""}componentDidLoad(){this.inputValue=this.value}componentWillLoad(){this.inheritedAttributes=g(this.el,["aria-label","tabindex","title"])}async configChanged(e){this.language=e.language,this.region=e.region,!this.focused&&this.nativeInput&&(this.nativeInput.value=this.getFormattedValue())}async setFocus(){m(this)}async setBlur(){v(this)}async getInputElement(){return this.nativeInput}async setAriaForm(e){this.ariaForm=Object.assign({},e)}getAllowedKeys(){return[...k,...y,":"]}getRawValue(){return(this.value||"").toString()}getFormattedValue(){return this.getRawValue()}render(){const e=this.focused?this.getRawValue():this.getFormattedValue(),t=w.block("time-input"),l=t.element("native");return i(a,{"aria-disabled":this.disabled?"true":null,class:Object.assign({},t.class())},i("bal-input-group",{disabled:this.disabled||this.readonly,invalid:this.invalid},i("input",Object.assign({type:"time",class:Object.assign({input:!0,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid,"has-focus":this.focused,"show-placeholder":!this.focused&&(""===this.value||void 0===this.value),"has-value":""!==this.value&&void 0!==this.value},l.class()),ref:e=>this.nativeInput=e,id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":this.disabled?"true":null,name:this.name,disabled:this.disabled,readonly:this.readonly,required:this.required,placeholder:`${x[this.language].hours}:${x[this.language].minutes}`,value:e,onInput:e=>this.onInput(e),onFocus:e=>this.onFocus(e),onBlur:e=>this.onBlur(e),onKeyDown:e=>this.onKeydown(e),onKeyPress:e=>this.balKeyPress.emit(e)},this.inheritedAttributes)),i("bal-icon",{"is-right":!0,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",name:"clock"})))}get el(){return l(this)}static get watchers(){return{debounce:["debounceChanged"]}}};s([C("bal-time-input"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],O.prototype,"createLogger",null),s([L(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],O.prototype,"configChanged",null);let B=0;O.style=":root{--bal-time-input-native-placeholder-background-before:var(--bal-color-white);--bal-time-input-native-placeholder-background-disabled-before:var(--bal-color-grey-2);--bal-time-input-native-placeholder-background-danger-before:var(--bal-color-danger-1);--bal-time-input-native-placeholder-background-disabled-danger-before:var(--bal-color-grey-2);--bal-time-input-native-placeholder-background-hover-before:var(--bal-color-grey-1);--bal-time-input-native-text-color:var(--bal-color-primary-3);--bal-time-input-native-text-color-focus-value:var(--bal-color-primary);--bal-time-input-native-text-color-disabled:var(--bal-color-grey-5);--bal-time-input-native-text-color-disabled-value:var(--bal-color-grey-4);--bal-time-input-native-placeholder-text-color-disabled-before:var(--bal-color-grey-5);--bal-time-input-native-placeholder-text-color-before:var(--bal-color-primary-3)}.bal-time-input{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:relative;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;padding:0;font-family:var(--bal-font-family-text)}.bal-time-input__native::-webkit-datetime-edit-fields-wrapper{display:flex}.bal-time-input__native::-webkit-datetime-edit-text{color:var(--bal-time-input-native-text-color)}.bal-time-input__native::-webkit-datetime-edit-hour-field{color:var(--bal-time-input-native-text-color)}.bal-time-input__native::-webkit-datetime-edit-minute-field{color:var(--bal-time-input-native-text-color)}.bal-time-input__native::-webkit-clear-button{display:none}.bal-time-input__native::-webkit-inner-spin-button{display:none}.bal-time-input__native::-webkit-calendar-picker-indicator{display:none;background:none}.bal-time-input__native::-webkit-datetime-edit-ampm-field{display:none}.bal-time-input__native.has-focus::-webkit-datetime-edit-text,.bal-time-input__native.has-value::-webkit-datetime-edit-text{color:var(--bal-time-input-native-text-color-focus-value)}.bal-time-input__native.has-focus::-webkit-datetime-edit-hour-field,.bal-time-input__native.has-value::-webkit-datetime-edit-hour-field{color:var(--bal-time-input-native-text-color-focus-value)}.bal-time-input__native.has-focus::-webkit-datetime-edit-minute-field,.bal-time-input__native.has-value::-webkit-datetime-edit-minute-field{color:var(--bal-time-input-native-text-color-focus-value)}.bal-time-input__native.is-disabled::-webkit-datetime-edit-text{color:var(--bal-time-input-native-text-color-disabled)}.bal-time-input__native.is-disabled::-webkit-datetime-edit-hour-field{color:var(--bal-time-input-native-text-color-disabled)}.bal-time-input__native.is-disabled::-webkit-datetime-edit-minute-field{color:var(--bal-time-input-native-text-color-disabled)}.bal-time-input__native.is-disabled.has-value::-webkit-datetime-edit-text{color:var(--bal-time-input-native-text-color-disabled-value)}.bal-time-input__native.is-disabled.has-value::-webkit-datetime-edit-hour-field{color:var(--bal-time-input-native-text-color-disabled-value)}.bal-time-input__native.is-disabled.has-value::-webkit-datetime-edit-minute-field{color:var(--bal-time-input-native-text-color-disabled-value)}.bal-time-input__native.show-placeholder.is-disabled::before{color:var(--bal-time-input-native-placeholder-text-color-disabled-before);background:var(--bal-time-input-native-placeholder-background-disabled-before)}.bal-time-input__native.show-placeholder.is-danger::before{background:var(--bal-time-input-native-placeholder-background-danger-before)}.bal-time-input__native.show-placeholder.is-disabled.is-danger::before{background:var(--bal-time-input-native-placeholder-background-disabled-danger-before)}.bal-time-input__native.show-placeholder:hover::before{background:var(--bal-time-input-native-placeholder-background-hover-before)}.bal-time-input__native.show-placeholder::before{color:var(--bal-time-input-native-placeholder-text-color-before);content:attr(placeholder);pointer-events:none;position:absolute;background:var(--bal-time-input-native-placeholder-background-before)}";export{O as bal_time_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-a1f6e944.system.js"],(function(t){"use strict";var e,n,a,l,i,s,c;return{setters:[function(t){e=t.r;n=t.h;a=t.H},function(t){l=t._;i=t.a},function(t){s=t.B},function(t){c=t.L},function(){}],execute:function(){var r=".bal-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;text-align:left;gap:.25rem}.bal-content--align-center{-ms-flex-align:center;align-items:center;text-align:center}.bal-content--align-end{-ms-flex-align:end;align-items:flex-end;text-align:right}.bal-content--layout-horizontal{-ms-flex-direction:row;flex-direction:row}.bal-content--layout-vertical{-ms-flex-direction:column;flex-direction:column}.bal-content--space-none{gap:0rem}.bal-content--space-xxx-small{gap:.125rem}.bal-content--space-xx-small{gap:.25rem}.bal-content--space-x-small{gap:.5rem}.bal-content--space-small{gap:.75rem}.bal-content--space-normal{gap:1rem}.bal-content>.bal-text{margin:0}";var o=r;var m=t("bal_content",function(){function t(t){e(this,t);this.layout="vertical";this.align="start";this.space="xx-small";this.direction="";this.alignment=""}t.prototype.createLogger=function(t){this.log=t};t.prototype.render=function(){var t=s.block("content");var e=!!this.direction;var l=!!this.layout;var i=!!this.alignment;var c=!!this.align;var r=!!this.space;var o=this.layout;if(e){o=this.direction==="row"?"horizontal":"vertical"}var m=this.align.split(" ").join("-");if(i){m=this.alignment.split(" ").join("-")}return n(a,{class:Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("layout-".concat(o)).class(l||e)),t.modifier("align-".concat(m)).class(c||i)),t.modifier("space-".concat(this.space)).class(r))},n("slot",null))};return t}());l([c("bal-content"),i("design:type",Function),i("design:paramtypes",[Function]),i("design:returntype",void 0)],m.prototype,"createLogger",null);m.style=o}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-5de0bd8a.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.a}],execute:function(){t("L",e);function e(){return function(t,e,u){var i=t.connectedCallback,r=t.disconnectedCallback;t.connectedCallback=function(){n.attach(this);return i&&i.call(this)};t.disconnectedCallback=function(){n.detach(this);return r&&r.call(this)}}}}}}));
|
package/dist/baloise-design-system/{p-3818fa189f.system.entry.js → p-959fc8c170.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{a(r.next(t))}catch(t){o(t)}}function l(t){try{a(r["throw"](t))}catch(t){o(t)}}function a(t){t.done?i(t.value):n(t.value).then(s,l)}a((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return a([t,e])}}function a(l){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(r=1,n&&(o=l[0]&2?n["return"]:l[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;if(n=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;n=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(l[0]===6&&i.label<o[1]){i.label=o[1];o=l;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(l);break}if(o[2])i.ops.pop();i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t];n=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var r=0,n=e.length,o;r<n;r++){if(o||!(r in e)){if(!o)o=Array.prototype.slice.call(e,0,r);o[r]=e[r]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-6913b916.system.js","./p-8954495d.system.js","./p-71588db3.system.js","./p-b79d8942.system.js","./p-d2ee9b0a.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-6e5745c8.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js","./p-2880433e.system.js"],(function(t){"use strict";var e,i,r,n,o,s,l,a,c,u,h,f,d,b,v,p,_,m,g,y,k,w,x,j,O,T,A,C,z,M,L,B,P,F;return{setters:[function(t){e=t.r;i=t.c;r=t.h;n=t.H;o=t.g},function(t){s=t._;l=t.a},function(t){a=t.l},function(t){c=t.k;u=t.d;h=t.e;f=t.i;d=t.h},function(t){b=t.e;v=t.o;p=t.q;_=t.s;m=t.h;g=t.u;y=t.y},function(t){k=t.r;w=t.p;x=t.l;j=t.g;O=t.i;T=t.s;A=t.a;C=t.f;z=t.b;M=t.v},function(t){L=t.s},function(t){B=t.B},function(t){P=t.L},function(t){F=t.d},function(){},function(){},function(){},function(){}],execute:function(){var I=function(t,e,i){if(typeof MutationObserver==="undefined"){return}var r=new MutationObserver((function(t){t=t.filter((function(t){return t.target.nodeName===e.toUpperCase()||t.target.nodeName==="bal-select".toUpperCase()}));if(t.length>0){i(undefined)}}));r.observe(t,{childList:true,subtree:true,attributes:true,characterData:true});return r};var E=":root{--bal-select-control-background:var(--bal-color-white);--bal-select-control-background-hover:var(--bal-form-field-control-background-hover);--bal-select-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-select-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-select-control-input-background:var(--bal-color-grey-1);--bal-select-control-native-input-background:transparent;--bal-select-control-native-input-background-hover:transparent;--bal-select-control-input-inverted-footer-background:transparent;--bal-select-control-input-inverted-footer-background-hover:transparent;--bal-select-control-input-multiple-background:transparent;--bal-select-control-input-multiple-background-read-only-selection:transparent;--bal-select-control-input-option-background:transparent;--bal-select-control-input-option-background-selected:var(--bal-color-primary-1);--bal-select-control-input-option-background-focused:var(--bal-color-grey-2);--bal-select-control-input-option-background-hover:var(--bal-color-grey-2);--bal-select-control-border-radius:var(--bal-form-field-control-radius);--bal-select-popover-border-color:var(--bal-color-grey-2);--bal-select-control-border-color:var(--bal-form-field-control-border-color);--bal-select-control-border-color-focused:var(--bal-color-primary);--bal-select-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-select-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-select-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-select-control-border-color-focus-within:var(--bal-color-primary);--bal-select-option-border-top-color:var(--bal-color-grey-2);--bal-select-popover-empty-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color-focused:var(--bal-color-primary);--bal-select-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-select-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-select-option-content-label-text-color:var(--bal-form-field-control-color)}bal-select-option{display:none !important}.bal-select{display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text)}.bal-select__popover{border:.125rem solid var(--bal-select-popover-border-color)}.bal-select__popover__empty{padding:.5rem 1rem;font-family:var(--bal-font-family-text);color:var(--bal-select-popover-empty-text-color)}.bal-select__popover__empty--hidden{display:none}.bal-select__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-select__control{display:-ms-flexbox;display:flex;border-width:.125rem;border-style:solid;border-color:var(--bal-select-control-border-color);border-radius:var(--bal-select-control-border-radius);background:var(--bal-select-control-background);font-size:var(--bal-font-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-select-control-text-color);outline:none;-webkit-box-shadow:none;box-shadow:none;padding-right:1rem;min-height:3rem}.bal-select__control--focused{border-color:var(--bal-select-control-border-color-focused)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover{border-color:var(--bal-select-control-border-color-hover);background-color:var(--bal-select-control-background-hover)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover .bal-select__control__input{background-color:var(--bal-select-control-input-background)}.bal-select__control--invalid:not(.bal-select__control--disabled){border-color:var(--bal-select-control-border-color-invalid) !important;background:var(--bal-select-control-background-invalid) !important}.bal-select__control:focus-within{border-color:var(--bal-select-control-border-color-focus-within) !important}.bal-select__control--disabled{background-color:var(--bal-select-control-background-disabled) !important;border-color:var(--bal-select-control-border-color-disabled) !important}.bal-select__control--disabled,.bal-select__control--disabled input{cursor:default !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;pointer-events:none !important;color:var(--bal-select-input-text-color-disabled)}.bal-select__control--inverted-footer{border:none;background-color:var(--bal-select-control-input-inverted-footer-background) !important;padding-right:0}.bal-select__control--inverted-footer:hover{background-color:var(--bal-select-control-input-inverted-footer-background-hover) !important}.bal-select__control--inverted-footer .input{color:var(--bal-select-control-inverted-footer-native-input-text-color);background-color:var(--bal-select-control-native-input-background) !important}.bal-select__control--inverted-footer .input:hover{background-color:var(--bal-select-control-native-input-background-hover) !important}.bal-select__control__icon{min-height:100% !important;max-height:100% !important}.bal-select__control__icon--loading{display:none}.bal-select__control__icon--clickable{cursor:pointer}.bal-select__control__selections{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.125rem;max-width:100%;min-width:0;gap:0;padding-left:.375rem}.bal-select__control__selections .bal-tag{margin-left:.25rem;margin-top:.375rem;margin-bottom:.375rem}.bal-select__control__selections .bal-tag+.input{padding-left:.625rem}.bal-select__control__input{border:none !important;outline:none !important;outline-width:0 !important;height:2.75rem !important;-webkit-box-shadow:none !important;box-shadow:none !important;background:var(--bal-select-control-input-multiple-background);-ms-flex:1;flex:1;min-height:2.75rem !important;padding-left:.25rem !important;padding-right:.625rem !important;text-overflow:ellipsis}.bal-select__control__input:-moz-read-only{-moz-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__option{visibility:visible;font-family:var(--bal-font-family-text);background:var(--bal-select-control-input-option-background);border:none;cursor:pointer;outline:none;min-height:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0;margin:0;border-top:.125rem solid var(--bal-select-option-border-top-color);text-align:inherit;white-space:nowrap;width:100%}.bal-select__option:first-child{border-top:none}.bal-select__option::-moz-focus-inner{border:none}.bal-select__option--selected{background:var(--bal-select-control-input-option-background-selected)}.bal-select__option--selected .bal-select__option__content__label{font-weight:var(--bal-font-weight-bold)}.bal-select__option--focused{background:var(--bal-select-control-input-option-background-focused)}.bal-select__option:hover{background:var(--bal-select-control-input-option-background-hover)}.bal-select__option__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;min-height:3rem;padding:.75rem 1rem;gap:.75rem}.bal-select__option__content__checkbox{margin:0;padding:0}.bal-select__option__content__label{margin:0;padding:0;font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-select-option-content-label-text-color);line-height:1.125rem;word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}";var S=E;var D=true;var H=false;var K=t("bal_select",function(){function t(t){var r=this;e(this,t);this.balChange=i(this,"balChange",7);this.balInputClick=i(this,"balInputClick",7);this.balInput=i(this,"balInput",7);this.balBlur=i(this,"balBlur",7);this.balFocus=i(this,"balFocus",7);this.balCancel=i(this,"balCancel",7);this.balKeyPress=i(this,"balKeyPress",7);this.didInit=false;this.inputId="bal-select-".concat(N++);this.initialValue=[];this.removeValue=function(t){if(!r.disabled){r.updateRawValue(k(r.rawValue,t),D);if(r.multiple&&r.typeahead){r.setFocus()}r.fireBlur()}};this.fireBlur=function(t){if(t===void 0){t=new CustomEvent("blur")}if(!r.isPopoverOpen&&!r.hasFocus){c((function(){return r.balBlur.emit(t)}))}};this.handleClick=function(t){if(r.disabled||r.readonly){w(t)}};this.handlePopoverChange=function(t){t.stopPropagation();if(r.isPopoverOpen!==t.detail){r.isPopoverOpen=t.detail;if(r.isPopoverOpen){r.updateFocus()}else{r.focusIndex=-1;if(r.multiple&&r.typeahead){r.updateInputValue("")}r.fireBlur(t)}}};this.handleInputBlur=function(t){w(t);var e=t.relatedTarget;if(e===null||e&&e.nodeName&&(e.nodeName==="BAL-MODAL"||e.nodeName==="INPUT"||e.nodeName==="BUTTON")){r.validateAfterBlur(D)}r.hasFocus=false;r.fireBlur(t)};this.handleInputFocus=function(t){r.balFocus.emit(t);r.hasFocus=true};this.handleInputClick=function(t,e){if(e===void 0){e=false}return __awaiter(r,void 0,void 0,(function(){var i,r,n,o;return __generator(this,(function(s){switch(s.label){case 0:L(t);if(this.isChipClicked(t)){return[2]}if(!(this.disabled||this.readonly))return[3,1];w(t);return[3,10];case 1:this.focusIndex=-1;this.balInputClick.emit(t);if(!this.typeahead)return[3,6];if(!(this.isPopoverOpen&&e))return[3,3];return[4,(i=this.popoverElement)===null||i===void 0?void 0:i.dismiss()];case 2:s.sent();return[3,5];case 3:return[4,(r=this.popoverElement)===null||r===void 0?void 0:r.present()];case 4:s.sent();s.label=5;case 5:return[3,10];case 6:if(!this.isPopoverOpen)return[3,8];return[4,(n=this.popoverElement)===null||n===void 0?void 0:n.dismiss()];case 7:s.sent();return[3,10];case 8:return[4,(o=this.popoverElement)===null||o===void 0?void 0:o.present()];case 9:s.sent();s.label=10;case 10:return[2]}}))}))};this.handleKeyPress=function(t){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.isPopoverOpen&&b(t)))return[3,2];w(t);return[4,this.open()];case 1:e.sent();e.label=2;case 2:this.balKeyPress.emit(t);return[2]}}))}))};this.handleInputChange=function(t){if(!r.disabled&&!r.readonly){r.inputValue=t.target.value}};this.handleInput=function(t){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.disabled&&!this.readonly){this.inputValue=t.target.value;if(!this.isPopoverOpen){this.popoverElement.present()}this.focusIndex=-1;this.updateFocus();w(t);this.balInput.emit(this.inputValue)}return[2]}))}))};this.handleOptionMouseEnter=function(t){r.focusIndex=t};this.hasFocus=false;this.inputValue="";this.focusIndex=-1;this.isPopoverOpen=false;this.options=new Map;this.labelToScrollTo="";this.labelToSelectTo="";this.ariaForm=F;this.name=this.inputId;this.invalid=false;this.filter="includes";this.balTabindex=0;this.freeSolo=false;this.multiple=false;this.maxLength=undefined;this.noDataLabel=undefined;this.autocomplete="off";this.typeahead=false;this.selectionOptional=false;this.disabled=false;this.readonly=false;this.required=false;this.inverted=false;this.placeholder=undefined;this.scrollable=250;this.loading=false;this.remote=false;this.autoInvalidOff=false;this.value=[];this.rawValue=[]}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueWatcher=function(){this.syncRawValue(false)};t.prototype.updateRawValue=function(t,e){if(e===void 0){e=true}if(!v(t,this.rawValue||[])){this.rawValue=__spreadArray([],t,true);this.syncNativeInput();if(this.didInit&&e===true){if(this.multiple){if(a(this.rawValue)){this.emitChangeEvent([])}else{this.emitChangeEvent(__spreadArray([],this.rawValue,true))}}else{if(a(this.rawValue)||x(this.rawValue)===0){this.emitChangeEvent(undefined)}else{this.emitChangeEvent(this.rawValue[0])}}}}};t.prototype.emitChangeEvent=function(t){this.balChange.emit(t)};t.prototype.connectedCallback=function(){var t=this;var e=d((function(){return t.updateOptions()}),0);this.initialValue=this.value;e();this.mutationO=I(this.el,"bal-select-option",(function(){e()}))};t.prototype.componentWillLoad=function(){this.waitForOptionsAndThenUpdateRawValues();this.isInsideOfFooter();if(!a(this.rawValue)&&this.options.size>0&&x(this.rawValue)===1){var t=this.options.get(this.rawValue[0]);if(!a(t)){this.inputValue=t.label}}};t.prototype.componentDidLoad=function(){this.syncRawValue(false);if(!this.multiple){this.inputElement.value=this.inputValue}this.didInit=true};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}};t.prototype.listenOnClick=function(t){if(this.disabled&&t.target&&t.target===this.el){w(t)}};t.prototype.resetHandler=function(t){var e=this;var i=t.target;if(i===null||i===void 0?void 0:i.contains(this.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){e.value=e.initialValue;e.syncRawValue(false);e.syncNativeInput();if(e.nativeSelectEl){var t=Array.from(e.nativeSelectEl.options);t.forEach((function(t){return t.selected=true}))}}),0)}};t.prototype.handleKeyDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:if(!this.isPopoverOpen)return[3,1];if(p(t)||_(t)){w(t);this.navigateWithArrowKey(t);this.updateFocus()}if(m(t)){w(t);this.selectedFocusedOption()}if(g(t)){this.cancel()}if(y(t)&&this.typeahead&&this.multiple){if(this.inputElement.value===""&&x(this.rawValue)>0){e=j(this.rawValue);this.removeValue(e[x(this.rawValue)-1])}}if(!this.typeahead&&t.key.length===1){this.focusOptionByLabel(t.key)}if(b(t)&&!this.typeahead){w(t)}return[3,4];case 1:if(!this.hasFocus)return[3,4];if(!(p(t)||_(t)))return[3,3];w(t);return[4,this.open()];case 2:i.sent();i.label=3;case 3:if(!this.typeahead&&t.key.length===1){this.selectOptionByLabel(t.key)}i.label=4;case 4:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.inputElement&&!this.disabled))return[3,2];return[4,u()];case 1:t.sent();this.inputElement.focus();t.label=2;case 2:return[2]}}))}))};t.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.rawValue]}))}))};t.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.focusIndex=-1;if(this.inputElement){this.updateInputValue("");this.updateRawValue([],D);this.value=this.multiple?[]:""}return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(!this.disabled&&!this.readonly&&!a(this.popoverElement)))return[3,2];return[4,this.popoverElement.present()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&!this.readonly&&!a(this.popoverElement)){this.blurSelect()}return[2]}))}))};t.prototype.cancel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.labelToScrollTo="";this.close();this.scrollTo(0);this.balCancel.emit();return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=this.options.get(t);if(!a(e)){this.optionSelected(e)}return[2]}))}))};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.waitForOptionsAndThenUpdateRawValues=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){switch(i.label){case 0:clearTimeout(this.waitForOptionsAndThenUpdateRawValuesTimer);return[4,h(this.el)];case 1:i.sent();t=this.options.size>0;if(t){if(!this.remote){this.syncRawValue(H)}}else{this.waitForOptionsAndThenUpdateRawValuesTimer=setTimeout((function(){return e.waitForOptionsAndThenUpdateRawValues()}),10)}return[2]}}))}))};t.prototype.updateOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:t=this.getChildOpts();e=new Map;for(i=0;i<t.length;i++){r=t[i];e.set(r.value,{value:r.value,label:r.label,disabled:r.disabled,id:r.for,textContent:r.textContent,innerHTML:r.innerHTML})}if(!this.selectionOptional&&Array.isArray(this.rawValue)){for(i=0;i<this.rawValue.length;i++){n=this.rawValue[i];if(!e.has(n)){o=k(this.rawValue,n);this.updateRawValue(o,H)}}}this.options=new Map(e);if(!!this.typeahead)return[3,2];return[4,this.syncNativeInput()];case 1:s.sent();s.label=2;case 2:if(this.didInit&&!this.remote){this.validateAfterBlur()}return[2]}}))}))};Object.defineProperty(t.prototype,"optionArray",{get:function(){var t=this;var e=Array.from(this.options,(function(t){var e=t[0],i=t[1];return i}));if(!this.typeahead||this.remote){return e}return e.filter((function(e){return t.filter==="includes"?O(e.textContent,t.inputValue):T(e.textContent,t.inputValue)}))},enumerable:false,configurable:true});t.prototype.hasOptions=function(){return this.optionArray.length>0};Object.defineProperty(t.prototype,"inputPlaceholder",{get:function(){if(this.multiple){if(x(this.rawValue)<1){return this.placeholder}return undefined}else{if(!a(this.rawValue)&&x(this.rawValue)>0){return undefined}}return this.placeholder},enumerable:false,configurable:true});t.prototype.getChildOpts=function(){return Array.from(this.el.querySelectorAll("bal-select-option"))};t.prototype.getPopoverContent=function(){return this.popoverElement.querySelector(".bal-popover__content__inner")};t.prototype.updateFocus=function(){var t=this;if(this.focusIndex<-1){this.focusIndex=-1}var e=this.optionArray;if(e.length>0){if(e.length<=this.focusIndex){this.focusIndex=e.length-1}var i=e[this.focusIndex];if(i&&i.id){var r=this.el.querySelector("button#".concat(i.id));if(r){clearTimeout(this.updateFocusTimer);this.updateFocusTimer=setTimeout((function(){t.scrollToFocusedOption(r)}),0)}}}else{this.focusIndex=-1}};t.prototype.scrollToFocusedOption=function(t){if(t&&this.popoverElement){var e=this.getPopoverContent();if(e){var i=t.offsetTop;var r=e.scrollTop;if(i<r){e.scrollTop=i}var n=t.offsetTop+t.clientHeight;var o=e.scrollTop+e.clientHeight;if(n>o){e.scrollTop=e.scrollTop+t.clientHeight}}}};t.prototype.scrollTo=function(t){var e=this.getPopoverContent();if(e){e.scrollTop=t}};t.prototype.selectedFocusedOption=function(){var t=this.optionArray;if(t.length>this.focusIndex){var e=t[this.focusIndex];if(e){this.optionSelected(e)}}};t.prototype.navigateWithArrowKey=function(t){if(p(t)){this.focusIndex=this.focusIndex+1}else{if(_(t)){this.focusIndex=this.focusIndex-1}}};t.prototype.focusOptionByLabel=function(t){var e=this;this.labelToScrollTo=this.labelToScrollTo+t;clearTimeout(this.clearScrollToValue);this.clearScrollToValue=setTimeout((function(){e.scrollToLabel(e.labelToScrollTo)}),600)};t.prototype.selectOptionByLabel=function(t){var e=this;this.labelToSelectTo=this.labelToSelectTo+t;clearTimeout(this.clearSelectValue);this.clearSelectValue=setTimeout((function(){e.selectLabel(e.labelToSelectTo);e.labelToSelectTo=""}),600)};t.prototype.selectLabel=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){if(t!==" "){e=this.optionArray.find((function(e){return T(e.label||"",t)}));if(!a(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!a(i)){r=this.optionArray.indexOf(e);this.focusIndex=r;this.select(e.value)}}this.labelToScrollTo=""}return[2]}))}))};t.prototype.scrollToLabel=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){if(t!==" "){e=this.optionArray.find((function(e){return T(e.label||"",t)}));if(!a(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!a(i)){r=this.optionArray.indexOf(e);this.focusIndex=r;this.scrollTo(i.offsetTop)}}this.labelToScrollTo=""}return[2]}))}))};t.prototype.syncRawValue=function(t){if(t===void 0){t=true}var e=[];if(!a(this.value)&&this.value!==""){if(Array.isArray(this.value)){e=__spreadArray([],this.value.filter((function(t){return!a(t)})),true)}else{if(this.value.split("").includes(",")){e=__spreadArray([],this.value.split(",").filter((function(t){return t})).map((function(t){return t.trim()})),true)}else{e=[this.value]}}}this.updateRawValue(e,t)};t.prototype.blurSelect=function(){this.popoverElement.dismiss()};t.prototype.optionSelected=function(t){var e=j(this.rawValue);var i=e.some((function(e){return e===t.value}));this.updateValue(t.value,!i);if(!this.multiple){this.blurSelect()}else{if(this.typeahead){this.setFocus()}}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(this.multiple){if(e){this.updateRawValue(A(this.rawValue,t,this.multiple),D)}else{this.updateRawValue(k(this.rawValue,t),D)}}else{this.updateRawValue(A(this.rawValue,t,this.multiple),D);if(this.rawValue&&this.rawValue.length>0){this.updateInputValue(C(this.options,this.rawValue[0]))}}};t.prototype.validateAfterBlur=function(t){if(t===void 0){t=H}var e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){var i=z(this.options,this.inputElement.value);if(i){e=[i.value]}else{e=[this.inputElement.value]}}else{e=M(this.rawValue,this.options,this.inputElement.value)}this.updateRawValue(e,t)}};t.prototype.syncNativeInput=function(){if(!this.multiple){if(x(this.rawValue)>0){var t=j(this.rawValue);var e=C(this.options,t[0]);if(!this.multiple&&this.typeahead&&this.selectionOptional&&e===""){e=t.join(", ")}return this.updateInputValue(e)}}return Promise.resolve()};t.prototype.updateInputValue=function(t){var e=this;return new Promise((function(i){if(e.updateInputValueTimer){clearTimeout(e.updateInputValueTimer)}e.updateInputValueTimer=setTimeout((function(){if(!a(e.inputElement)){e.inputElement.value=t;e.inputValue=t;i()}}),0)}))};t.prototype.isChipClicked=function(t){var e=false;if(this.multiple){var i=this.selectionEl.querySelectorAll("bal-tag");var r=t.target;i.forEach((function(t){var i=f(t,r)||t===r;if(i){e=i}}))}return e};t.prototype.isInsideOfFooter=function(){this.inverted=this.el.closest("bal-footer")!==null};t.prototype.render=function(){var t=this;var e;var i=function(e){return r("bal-tag",{size:"",closable:!t.disabled,disabled:t.disabled,invalid:t.invalid,tabindex:-1,onBalCloseClick:function(i){return t.removeValue(e.value)},"data-testid":"bal-select-chip"},C(t.options,e.value)||e.value)};var o=j(this.rawValue);var s=B.block("select");var l=s.element("native");var a=s.element("control");var c=a.element("icon");var u=a.element("selections");var h=a.element("input");var f=s.element("popover");var d=f.element("empty");var b=s.element("option");var v=b.element("content");var p=v.element("checkbox");var _=v.element("label");return r(n,{role:"listbox",onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,"data-value":(e=this.rawValue)===null||e===void 0?void 0:e.map((function(e){return C(t.options,e)})).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("disabled").class(this.disabled||this.readonly)),s.modifier("inverted").class(this.inverted)),s.modifier("inverted-footer").class(this.inverted))},r("select",{class:Object.assign({},l.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:function(e){return t.nativeSelectEl=e}},o.map((function(t){return r("option",{key:t,value:t,selected:true},t)}))),r("bal-popover",{onBalChange:this.handlePopoverChange,ref:function(e){return t.popoverElement=e}},r("div",{"bal-popover-trigger":true,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("invalid").class(this.invalid)),a.modifier("disabled").class(this.disabled||this.readonly)),a.modifier("focused").class(this.isPopoverOpen)),a.modifier("inverted-footer").class(this.inverted))},r("div",{class:Object.assign(Object.assign({},u.class()),u.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:function(e){return t.selectionEl=e}},o.filter((function(e){return t.multiple})).map((function(t){return r(i,{value:t})})),r("input",{type:"text",class:Object.assign(Object.assign({},h.class()),{input:true,"is-inverted":this.inverted,"is-danger":this.invalid,"is-disabled":this.disabled||this.readonly,"is-clickable":!this.isPopoverOpen&&!this.disabled&&!this.readonly,"data-test-select-input":true}),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-select-input",autocomplete:this.autocomplete,"aria-autocomplete":this.autocomplete==="off"?"none":null,placeholder:this.inputPlaceholder,readonly:!this.typeahead||this.disabled||this.readonly,contentEditable:this.typeahead,disabled:this.disabled,maxLength:this.maxLength,tabindex:this.balTabindex,onInput:this.handleInput,onClick:this.handleInputClick,onChange:this.handleInputChange,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyPress:this.handleKeyPress,ref:function(e){return t.inputElement=e}})),!this.freeSolo&&!this.loading?r("bal-icon",{class:Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("loading").class(this.loading)),c.modifier("clickable").class(!this.disabled&&!this.readonly)),name:!this.inverted?"caret-down":"caret-up",color:this.disabled||this.readonly?"grey-light":this.inverted?"white":this.invalid?"danger":"primary",turn:this.isPopoverOpen,onClick:function(e){return t.handleInputClick(e,true)},size:!this.inverted?"":"x-small"}):""),r("bal-popover-content",{class:Object.assign({},f.class()),scrollable:this.scrollable,spaceless:true,expanded:true},this.optionArray.map((function(e,i){return r("button",{key:e.value,type:"button",role:"option",id:e.id,"data-value":e.value,"data-label":e.label,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("selected").class(o.includes(e.value)&&!(t.typeahead&&!t.multiple))),b.modifier("focused").class(t.focusIndex===i)),b.modifier("checkbox").class(t.multiple)),b.modifier("disabled").class(e.disabled===true)),"data-testid":"bal-select-option",disabled:e.disabled,tabIndex:-1,onMouseEnter:function(){return t.handleOptionMouseEnter(i)},onClick:function(){return t.optionSelected(e)}},r("div",{class:Object.assign({},v.class())},r("span",{class:Object.assign({},p.class()),style:{display:t.multiple?"flex":"none"}},r("bal-checkbox",{checked:o.includes(e.value),tabindex:-1,nonSubmit:true,flat:true,onBalChange:w})),r("span",{class:Object.assign({},_.class()),innerHTML:e.innerHTML})))})),r("div",{class:Object.assign(Object.assign({},d.class()),d.modifier("hidden").class(this.noDataLabel===undefined||this.hasOptions()||!this.typeahead||this.selectionOptional))},this.noDataLabel))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueWatcher"]}},enumerable:false,configurable:true});return t}());s([P("bal-select"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],K.prototype,"createLogger",null);var N=0;K.style=S;var U=t("bal_select_option",function(){function t(t){e(this,t);this.label=undefined;this.disabled=false;this.value=undefined;this.for="bal-selopt-".concat(q++)}t.prototype.createLogger=function(t){this.log=t};t.prototype.render=function(){return r(n,{style:{display:"none"}},r("slot",null))};return t}());s([P("bal-select-option"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],U.prototype,"createLogger",null);var q=0}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{a(r.next(t))}catch(t){o(t)}}function l(t){try{a(r["throw"](t))}catch(t){o(t)}}function a(t){t.done?i(t.value):n(t.value).then(s,l)}a((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return a([t,e])}}function a(l){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(r=1,n&&(o=l[0]&2?n["return"]:l[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;if(n=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;n=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(l[0]===6&&i.label<o[1]){i.label=o[1];o=l;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(l);break}if(o[2])i.ops.pop();i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t];n=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var r=0,n=e.length,o;r<n;r++){if(o||!(r in e)){if(!o)o=Array.prototype.slice.call(e,0,r);o[r]=e[r]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-6913b916.system.js","./p-8954495d.system.js","./p-5c0b0099.system.js","./p-b79d8942.system.js","./p-7957c3c0.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-6e5745c8.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js","./p-2880433e.system.js"],(function(t){"use strict";var e,i,r,n,o,s,l,a,c,u,h,f,d,b,v,p,_,m,g,y,k,w,x,j,O,T,A,C,z,M,L,B,P,F;return{setters:[function(t){e=t.r;i=t.c;r=t.h;n=t.H;o=t.g},function(t){s=t._;l=t.a},function(t){a=t.l},function(t){c=t.k;u=t.d;h=t.e;f=t.i;d=t.h},function(t){b=t.e;v=t.o;p=t.q;_=t.s;m=t.h;g=t.u;y=t.C},function(t){k=t.r;w=t.p;x=t.l;j=t.g;O=t.i;T=t.s;A=t.a;C=t.f;z=t.b;M=t.v},function(t){L=t.s},function(t){B=t.B},function(t){P=t.L},function(t){F=t.d},function(){},function(){},function(){},function(){}],execute:function(){var I=function(t,e,i){if(typeof MutationObserver==="undefined"){return}var r=new MutationObserver((function(t){t=t.filter((function(t){return t.target.nodeName===e.toUpperCase()||t.target.nodeName==="bal-select".toUpperCase()}));if(t.length>0){i(undefined)}}));r.observe(t,{childList:true,subtree:true,attributes:true,characterData:true});return r};var E=":root{--bal-select-control-background:var(--bal-color-white);--bal-select-control-background-hover:var(--bal-form-field-control-background-hover);--bal-select-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-select-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-select-control-input-background:var(--bal-color-grey-1);--bal-select-control-native-input-background:transparent;--bal-select-control-native-input-background-hover:transparent;--bal-select-control-input-inverted-footer-background:transparent;--bal-select-control-input-inverted-footer-background-hover:transparent;--bal-select-control-input-multiple-background:transparent;--bal-select-control-input-multiple-background-read-only-selection:transparent;--bal-select-control-input-option-background:transparent;--bal-select-control-input-option-background-selected:var(--bal-color-primary-1);--bal-select-control-input-option-background-focused:var(--bal-color-grey-2);--bal-select-control-input-option-background-hover:var(--bal-color-grey-2);--bal-select-control-border-radius:var(--bal-form-field-control-radius);--bal-select-popover-border-color:var(--bal-color-grey-2);--bal-select-control-border-color:var(--bal-form-field-control-border-color);--bal-select-control-border-color-focused:var(--bal-color-primary);--bal-select-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-select-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-select-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-select-control-border-color-focus-within:var(--bal-color-primary);--bal-select-option-border-top-color:var(--bal-color-grey-2);--bal-select-popover-empty-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color-focused:var(--bal-color-primary);--bal-select-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-select-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-select-option-content-label-text-color:var(--bal-form-field-control-color)}bal-select-option{display:none !important}.bal-select{display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text)}.bal-select__popover{border:.125rem solid var(--bal-select-popover-border-color)}.bal-select__popover__empty{padding:.5rem 1rem;font-family:var(--bal-font-family-text);color:var(--bal-select-popover-empty-text-color)}.bal-select__popover__empty--hidden{display:none}.bal-select__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-select__control{display:-ms-flexbox;display:flex;border-width:.125rem;border-style:solid;border-color:var(--bal-select-control-border-color);border-radius:var(--bal-select-control-border-radius);background:var(--bal-select-control-background);font-size:var(--bal-font-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-select-control-text-color);outline:none;-webkit-box-shadow:none;box-shadow:none;padding-right:1rem;min-height:3rem}.bal-select__control--focused{border-color:var(--bal-select-control-border-color-focused)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover{border-color:var(--bal-select-control-border-color-hover);background-color:var(--bal-select-control-background-hover)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover .bal-select__control__input{background-color:var(--bal-select-control-input-background)}.bal-select__control--invalid:not(.bal-select__control--disabled){border-color:var(--bal-select-control-border-color-invalid) !important;background:var(--bal-select-control-background-invalid) !important}.bal-select__control:focus-within{border-color:var(--bal-select-control-border-color-focus-within) !important}.bal-select__control--disabled{background-color:var(--bal-select-control-background-disabled) !important;border-color:var(--bal-select-control-border-color-disabled) !important}.bal-select__control--disabled,.bal-select__control--disabled input{cursor:default !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;pointer-events:none !important;color:var(--bal-select-input-text-color-disabled)}.bal-select__control--inverted-footer{border:none;background-color:var(--bal-select-control-input-inverted-footer-background) !important;padding-right:0}.bal-select__control--inverted-footer:hover{background-color:var(--bal-select-control-input-inverted-footer-background-hover) !important}.bal-select__control--inverted-footer .input{color:var(--bal-select-control-inverted-footer-native-input-text-color);background-color:var(--bal-select-control-native-input-background) !important}.bal-select__control--inverted-footer .input:hover{background-color:var(--bal-select-control-native-input-background-hover) !important}.bal-select__control__icon{min-height:100% !important;max-height:100% !important}.bal-select__control__icon--loading{display:none}.bal-select__control__icon--clickable{cursor:pointer}.bal-select__control__selections{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.125rem;max-width:100%;min-width:0;gap:0;padding-left:.375rem}.bal-select__control__selections .bal-tag{margin-left:.25rem;margin-top:.375rem;margin-bottom:.375rem}.bal-select__control__selections .bal-tag+.input{padding-left:.625rem}.bal-select__control__input{border:none !important;outline:none !important;outline-width:0 !important;height:2.75rem !important;-webkit-box-shadow:none !important;box-shadow:none !important;background:var(--bal-select-control-input-multiple-background);-ms-flex:1;flex:1;min-height:2.75rem !important;padding-left:.25rem !important;padding-right:.625rem !important;text-overflow:ellipsis}.bal-select__control__input:-moz-read-only{-moz-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__option{visibility:visible;font-family:var(--bal-font-family-text);background:var(--bal-select-control-input-option-background);border:none;cursor:pointer;outline:none;min-height:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0;margin:0;border-top:.125rem solid var(--bal-select-option-border-top-color);text-align:inherit;white-space:nowrap;width:100%}.bal-select__option:first-child{border-top:none}.bal-select__option::-moz-focus-inner{border:none}.bal-select__option--selected{background:var(--bal-select-control-input-option-background-selected)}.bal-select__option--selected .bal-select__option__content__label{font-weight:var(--bal-font-weight-bold)}.bal-select__option--focused{background:var(--bal-select-control-input-option-background-focused)}.bal-select__option:hover{background:var(--bal-select-control-input-option-background-hover)}.bal-select__option__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;min-height:3rem;padding:.75rem 1rem;gap:.75rem}.bal-select__option__content__checkbox{margin:0;padding:0}.bal-select__option__content__label{margin:0;padding:0;font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-select-option-content-label-text-color);line-height:1.125rem;word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}";var S=E;var D=true;var H=false;var K=t("bal_select",function(){function t(t){var r=this;e(this,t);this.balChange=i(this,"balChange",7);this.balInputClick=i(this,"balInputClick",7);this.balInput=i(this,"balInput",7);this.balBlur=i(this,"balBlur",7);this.balFocus=i(this,"balFocus",7);this.balCancel=i(this,"balCancel",7);this.balKeyPress=i(this,"balKeyPress",7);this.didInit=false;this.inputId="bal-select-".concat(N++);this.initialValue=[];this.removeValue=function(t){if(!r.disabled){r.updateRawValue(k(r.rawValue,t),D);if(r.multiple&&r.typeahead){r.setFocus()}r.fireBlur()}};this.fireBlur=function(t){if(t===void 0){t=new CustomEvent("blur")}if(!r.isPopoverOpen&&!r.hasFocus){c((function(){return r.balBlur.emit(t)}))}};this.handleClick=function(t){if(r.disabled||r.readonly){w(t)}};this.handlePopoverChange=function(t){t.stopPropagation();if(r.isPopoverOpen!==t.detail){r.isPopoverOpen=t.detail;if(r.isPopoverOpen){r.updateFocus()}else{r.focusIndex=-1;if(r.multiple&&r.typeahead){r.updateInputValue("")}r.fireBlur(t)}}};this.handleInputBlur=function(t){w(t);var e=t.relatedTarget;if(e===null||e&&e.nodeName&&(e.nodeName==="BAL-MODAL"||e.nodeName==="INPUT"||e.nodeName==="BUTTON")){r.validateAfterBlur(D)}r.hasFocus=false;r.fireBlur(t)};this.handleInputFocus=function(t){r.balFocus.emit(t);r.hasFocus=true};this.handleInputClick=function(t,e){if(e===void 0){e=false}return __awaiter(r,void 0,void 0,(function(){var i,r,n,o;return __generator(this,(function(s){switch(s.label){case 0:L(t);if(this.isChipClicked(t)){return[2]}if(!(this.disabled||this.readonly))return[3,1];w(t);return[3,10];case 1:this.focusIndex=-1;this.balInputClick.emit(t);if(!this.typeahead)return[3,6];if(!(this.isPopoverOpen&&e))return[3,3];return[4,(i=this.popoverElement)===null||i===void 0?void 0:i.dismiss()];case 2:s.sent();return[3,5];case 3:return[4,(r=this.popoverElement)===null||r===void 0?void 0:r.present()];case 4:s.sent();s.label=5;case 5:return[3,10];case 6:if(!this.isPopoverOpen)return[3,8];return[4,(n=this.popoverElement)===null||n===void 0?void 0:n.dismiss()];case 7:s.sent();return[3,10];case 8:return[4,(o=this.popoverElement)===null||o===void 0?void 0:o.present()];case 9:s.sent();s.label=10;case 10:return[2]}}))}))};this.handleKeyPress=function(t){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.isPopoverOpen&&b(t)))return[3,2];w(t);return[4,this.open()];case 1:e.sent();e.label=2;case 2:this.balKeyPress.emit(t);return[2]}}))}))};this.handleInputChange=function(t){if(!r.disabled&&!r.readonly){r.inputValue=t.target.value}};this.handleInput=function(t){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.disabled&&!this.readonly){this.inputValue=t.target.value;if(!this.isPopoverOpen){this.popoverElement.present()}this.focusIndex=-1;this.updateFocus();w(t);this.balInput.emit(this.inputValue)}return[2]}))}))};this.handleOptionMouseEnter=function(t){r.focusIndex=t};this.hasFocus=false;this.inputValue="";this.focusIndex=-1;this.isPopoverOpen=false;this.options=new Map;this.labelToScrollTo="";this.labelToSelectTo="";this.ariaForm=F;this.name=this.inputId;this.invalid=false;this.filter="includes";this.balTabindex=0;this.freeSolo=false;this.multiple=false;this.maxLength=undefined;this.noDataLabel=undefined;this.autocomplete="off";this.typeahead=false;this.selectionOptional=false;this.disabled=false;this.readonly=false;this.required=false;this.inverted=false;this.placeholder=undefined;this.scrollable=250;this.loading=false;this.remote=false;this.autoInvalidOff=false;this.value=[];this.rawValue=[]}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueWatcher=function(){this.syncRawValue(false)};t.prototype.updateRawValue=function(t,e){if(e===void 0){e=true}if(!v(t,this.rawValue||[])){this.rawValue=__spreadArray([],t,true);this.syncNativeInput();if(this.didInit&&e===true){if(this.multiple){if(a(this.rawValue)){this.emitChangeEvent([])}else{this.emitChangeEvent(__spreadArray([],this.rawValue,true))}}else{if(a(this.rawValue)||x(this.rawValue)===0){this.emitChangeEvent(undefined)}else{this.emitChangeEvent(this.rawValue[0])}}}}};t.prototype.emitChangeEvent=function(t){this.balChange.emit(t)};t.prototype.connectedCallback=function(){var t=this;var e=d((function(){return t.updateOptions()}),0);this.initialValue=this.value;e();this.mutationO=I(this.el,"bal-select-option",(function(){e()}))};t.prototype.componentWillLoad=function(){this.waitForOptionsAndThenUpdateRawValues();this.isInsideOfFooter();if(!a(this.rawValue)&&this.options.size>0&&x(this.rawValue)===1){var t=this.options.get(this.rawValue[0]);if(!a(t)){this.inputValue=t.label}}};t.prototype.componentDidLoad=function(){this.syncRawValue(false);if(!this.multiple){this.inputElement.value=this.inputValue}this.didInit=true};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}};t.prototype.listenOnClick=function(t){if(this.disabled&&t.target&&t.target===this.el){w(t)}};t.prototype.resetHandler=function(t){var e=this;var i=t.target;if(i===null||i===void 0?void 0:i.contains(this.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){e.value=e.initialValue;e.syncRawValue(false);e.syncNativeInput();if(e.nativeSelectEl){var t=Array.from(e.nativeSelectEl.options);t.forEach((function(t){return t.selected=true}))}}),0)}};t.prototype.handleKeyDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:if(!this.isPopoverOpen)return[3,1];if(p(t)||_(t)){w(t);this.navigateWithArrowKey(t);this.updateFocus()}if(m(t)){w(t);this.selectedFocusedOption()}if(g(t)){this.cancel()}if(y(t)&&this.typeahead&&this.multiple){if(this.inputElement.value===""&&x(this.rawValue)>0){e=j(this.rawValue);this.removeValue(e[x(this.rawValue)-1])}}if(!this.typeahead&&t.key.length===1){this.focusOptionByLabel(t.key)}if(b(t)&&!this.typeahead){w(t)}return[3,4];case 1:if(!this.hasFocus)return[3,4];if(!(p(t)||_(t)))return[3,3];w(t);return[4,this.open()];case 2:i.sent();i.label=3;case 3:if(!this.typeahead&&t.key.length===1){this.selectOptionByLabel(t.key)}i.label=4;case 4:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.inputElement&&!this.disabled))return[3,2];return[4,u()];case 1:t.sent();this.inputElement.focus();t.label=2;case 2:return[2]}}))}))};t.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.rawValue]}))}))};t.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.focusIndex=-1;if(this.inputElement){this.updateInputValue("");this.updateRawValue([],D);this.value=this.multiple?[]:""}return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(!this.disabled&&!this.readonly&&!a(this.popoverElement)))return[3,2];return[4,this.popoverElement.present()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&!this.readonly&&!a(this.popoverElement)){this.blurSelect()}return[2]}))}))};t.prototype.cancel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.labelToScrollTo="";this.close();this.scrollTo(0);this.balCancel.emit();return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=this.options.get(t);if(!a(e)){this.optionSelected(e)}return[2]}))}))};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.waitForOptionsAndThenUpdateRawValues=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){switch(i.label){case 0:clearTimeout(this.waitForOptionsAndThenUpdateRawValuesTimer);return[4,h(this.el)];case 1:i.sent();t=this.options.size>0;if(t){if(!this.remote){this.syncRawValue(H)}}else{this.waitForOptionsAndThenUpdateRawValuesTimer=setTimeout((function(){return e.waitForOptionsAndThenUpdateRawValues()}),10)}return[2]}}))}))};t.prototype.updateOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:t=this.getChildOpts();e=new Map;for(i=0;i<t.length;i++){r=t[i];e.set(r.value,{value:r.value,label:r.label,disabled:r.disabled,id:r.for,textContent:r.textContent,innerHTML:r.innerHTML})}if(!this.selectionOptional&&Array.isArray(this.rawValue)){for(i=0;i<this.rawValue.length;i++){n=this.rawValue[i];if(!e.has(n)){o=k(this.rawValue,n);this.updateRawValue(o,H)}}}this.options=new Map(e);if(!!this.typeahead)return[3,2];return[4,this.syncNativeInput()];case 1:s.sent();s.label=2;case 2:if(this.didInit&&!this.remote){this.validateAfterBlur()}return[2]}}))}))};Object.defineProperty(t.prototype,"optionArray",{get:function(){var t=this;var e=Array.from(this.options,(function(t){var e=t[0],i=t[1];return i}));if(!this.typeahead||this.remote){return e}return e.filter((function(e){return t.filter==="includes"?O(e.textContent,t.inputValue):T(e.textContent,t.inputValue)}))},enumerable:false,configurable:true});t.prototype.hasOptions=function(){return this.optionArray.length>0};Object.defineProperty(t.prototype,"inputPlaceholder",{get:function(){if(this.multiple){if(x(this.rawValue)<1){return this.placeholder}return undefined}else{if(!a(this.rawValue)&&x(this.rawValue)>0){return undefined}}return this.placeholder},enumerable:false,configurable:true});t.prototype.getChildOpts=function(){return Array.from(this.el.querySelectorAll("bal-select-option"))};t.prototype.getPopoverContent=function(){return this.popoverElement.querySelector(".bal-popover__content__inner")};t.prototype.updateFocus=function(){var t=this;if(this.focusIndex<-1){this.focusIndex=-1}var e=this.optionArray;if(e.length>0){if(e.length<=this.focusIndex){this.focusIndex=e.length-1}var i=e[this.focusIndex];if(i&&i.id){var r=this.el.querySelector("button#".concat(i.id));if(r){clearTimeout(this.updateFocusTimer);this.updateFocusTimer=setTimeout((function(){t.scrollToFocusedOption(r)}),0)}}}else{this.focusIndex=-1}};t.prototype.scrollToFocusedOption=function(t){if(t&&this.popoverElement){var e=this.getPopoverContent();if(e){var i=t.offsetTop;var r=e.scrollTop;if(i<r){e.scrollTop=i}var n=t.offsetTop+t.clientHeight;var o=e.scrollTop+e.clientHeight;if(n>o){e.scrollTop=e.scrollTop+t.clientHeight}}}};t.prototype.scrollTo=function(t){var e=this.getPopoverContent();if(e){e.scrollTop=t}};t.prototype.selectedFocusedOption=function(){var t=this.optionArray;if(t.length>this.focusIndex){var e=t[this.focusIndex];if(e){this.optionSelected(e)}}};t.prototype.navigateWithArrowKey=function(t){if(p(t)){this.focusIndex=this.focusIndex+1}else{if(_(t)){this.focusIndex=this.focusIndex-1}}};t.prototype.focusOptionByLabel=function(t){var e=this;this.labelToScrollTo=this.labelToScrollTo+t;clearTimeout(this.clearScrollToValue);this.clearScrollToValue=setTimeout((function(){e.scrollToLabel(e.labelToScrollTo)}),600)};t.prototype.selectOptionByLabel=function(t){var e=this;this.labelToSelectTo=this.labelToSelectTo+t;clearTimeout(this.clearSelectValue);this.clearSelectValue=setTimeout((function(){e.selectLabel(e.labelToSelectTo);e.labelToSelectTo=""}),600)};t.prototype.selectLabel=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){if(t!==" "){e=this.optionArray.find((function(e){return T(e.label||"",t)}));if(!a(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!a(i)){r=this.optionArray.indexOf(e);this.focusIndex=r;this.select(e.value)}}this.labelToScrollTo=""}return[2]}))}))};t.prototype.scrollToLabel=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){if(t!==" "){e=this.optionArray.find((function(e){return T(e.label||"",t)}));if(!a(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!a(i)){r=this.optionArray.indexOf(e);this.focusIndex=r;this.scrollTo(i.offsetTop)}}this.labelToScrollTo=""}return[2]}))}))};t.prototype.syncRawValue=function(t){if(t===void 0){t=true}var e=[];if(!a(this.value)&&this.value!==""){if(Array.isArray(this.value)){e=__spreadArray([],this.value.filter((function(t){return!a(t)})),true)}else{if(this.value.split("").includes(",")){e=__spreadArray([],this.value.split(",").filter((function(t){return t})).map((function(t){return t.trim()})),true)}else{e=[this.value]}}}this.updateRawValue(e,t)};t.prototype.blurSelect=function(){this.popoverElement.dismiss()};t.prototype.optionSelected=function(t){var e=j(this.rawValue);var i=e.some((function(e){return e===t.value}));this.updateValue(t.value,!i);if(!this.multiple){this.blurSelect()}else{if(this.typeahead){this.setFocus()}}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(this.multiple){if(e){this.updateRawValue(A(this.rawValue,t,this.multiple),D)}else{this.updateRawValue(k(this.rawValue,t),D)}}else{this.updateRawValue(A(this.rawValue,t,this.multiple),D);if(this.rawValue&&this.rawValue.length>0){this.updateInputValue(C(this.options,this.rawValue[0]))}}};t.prototype.validateAfterBlur=function(t){if(t===void 0){t=H}var e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){var i=z(this.options,this.inputElement.value);if(i){e=[i.value]}else{e=[this.inputElement.value]}}else{e=M(this.rawValue,this.options,this.inputElement.value)}this.updateRawValue(e,t)}};t.prototype.syncNativeInput=function(){if(!this.multiple){if(x(this.rawValue)>0){var t=j(this.rawValue);var e=C(this.options,t[0]);if(!this.multiple&&this.typeahead&&this.selectionOptional&&e===""){e=t.join(", ")}return this.updateInputValue(e)}}return Promise.resolve()};t.prototype.updateInputValue=function(t){var e=this;return new Promise((function(i){if(e.updateInputValueTimer){clearTimeout(e.updateInputValueTimer)}e.updateInputValueTimer=setTimeout((function(){if(!a(e.inputElement)){e.inputElement.value=t;e.inputValue=t;i()}}),0)}))};t.prototype.isChipClicked=function(t){var e=false;if(this.multiple){var i=this.selectionEl.querySelectorAll("bal-tag");var r=t.target;i.forEach((function(t){var i=f(t,r)||t===r;if(i){e=i}}))}return e};t.prototype.isInsideOfFooter=function(){this.inverted=this.el.closest("bal-footer")!==null};t.prototype.render=function(){var t=this;var e;var i=function(e){return r("bal-tag",{size:"",closable:!t.disabled,disabled:t.disabled,invalid:t.invalid,tabindex:-1,onBalCloseClick:function(i){return t.removeValue(e.value)},"data-testid":"bal-select-chip"},C(t.options,e.value)||e.value)};var o=j(this.rawValue);var s=B.block("select");var l=s.element("native");var a=s.element("control");var c=a.element("icon");var u=a.element("selections");var h=a.element("input");var f=s.element("popover");var d=f.element("empty");var b=s.element("option");var v=b.element("content");var p=v.element("checkbox");var _=v.element("label");return r(n,{role:"listbox",onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,"data-value":(e=this.rawValue)===null||e===void 0?void 0:e.map((function(e){return C(t.options,e)})).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("disabled").class(this.disabled||this.readonly)),s.modifier("inverted").class(this.inverted)),s.modifier("inverted-footer").class(this.inverted))},r("select",{class:Object.assign({},l.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:function(e){return t.nativeSelectEl=e}},o.map((function(t){return r("option",{key:t,value:t,selected:true},t)}))),r("bal-popover",{onBalChange:this.handlePopoverChange,ref:function(e){return t.popoverElement=e}},r("div",{"bal-popover-trigger":true,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("invalid").class(this.invalid)),a.modifier("disabled").class(this.disabled||this.readonly)),a.modifier("focused").class(this.isPopoverOpen)),a.modifier("inverted-footer").class(this.inverted))},r("div",{class:Object.assign(Object.assign({},u.class()),u.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:function(e){return t.selectionEl=e}},o.filter((function(e){return t.multiple})).map((function(t){return r(i,{value:t})})),r("input",{type:"text",class:Object.assign(Object.assign({},h.class()),{input:true,"is-inverted":this.inverted,"is-danger":this.invalid,"is-disabled":this.disabled||this.readonly,"is-clickable":!this.isPopoverOpen&&!this.disabled&&!this.readonly,"data-test-select-input":true}),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-select-input",autocomplete:this.autocomplete,"aria-autocomplete":this.autocomplete==="off"?"none":null,placeholder:this.inputPlaceholder,readonly:!this.typeahead||this.disabled||this.readonly,contentEditable:this.typeahead,disabled:this.disabled,maxLength:this.maxLength,tabindex:this.balTabindex,onInput:this.handleInput,onClick:this.handleInputClick,onChange:this.handleInputChange,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyPress:this.handleKeyPress,ref:function(e){return t.inputElement=e}})),!this.freeSolo&&!this.loading?r("bal-icon",{class:Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("loading").class(this.loading)),c.modifier("clickable").class(!this.disabled&&!this.readonly)),name:!this.inverted?"caret-down":"caret-up",color:this.disabled||this.readonly?"grey-light":this.inverted?"white":this.invalid?"danger":"primary",turn:this.isPopoverOpen,onClick:function(e){return t.handleInputClick(e,true)},size:!this.inverted?"":"x-small"}):""),r("bal-popover-content",{class:Object.assign({},f.class()),scrollable:this.scrollable,spaceless:true,expanded:true},this.optionArray.map((function(e,i){return r("button",{key:e.value,type:"button",role:"option",id:e.id,"data-value":e.value,"data-label":e.label,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("selected").class(o.includes(e.value)&&!(t.typeahead&&!t.multiple))),b.modifier("focused").class(t.focusIndex===i)),b.modifier("checkbox").class(t.multiple)),b.modifier("disabled").class(e.disabled===true)),"data-testid":"bal-select-option",disabled:e.disabled,tabIndex:-1,onMouseEnter:function(){return t.handleOptionMouseEnter(i)},onClick:function(){return t.optionSelected(e)}},r("div",{class:Object.assign({},v.class())},r("span",{class:Object.assign({},p.class()),style:{display:t.multiple?"flex":"none"}},r("bal-checkbox",{checked:o.includes(e.value),tabindex:-1,nonSubmit:true,flat:true,onBalChange:w})),r("span",{class:Object.assign({},_.class()),innerHTML:e.innerHTML})))})),r("div",{class:Object.assign(Object.assign({},d.class()),d.modifier("hidden").class(this.noDataLabel===undefined||this.hasOptions()||!this.typeahead||this.selectionOptional))},this.noDataLabel))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueWatcher"]}},enumerable:false,configurable:true});return t}());s([P("bal-select"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],K.prototype,"createLogger",null);var N=0;K.style=S;var U=t("bal_select_option",function(){function t(t){e(this,t);this.label=undefined;this.disabled=false;this.value=undefined;this.for="bal-selopt-".concat(q++)}t.prototype.createLogger=function(t){this.log=t};t.prototype.render=function(){return r(n,{style:{display:"none"}},r("slot",null))};return t}());s([P("bal-select-option"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],U.prototype,"createLogger",null);var q=0}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as r,H as e,g as s}from"./p-d7c752c6.js";import{_ as n,a as o}from"./p-43c9f5e9.js";import{c as h}from"./p-4573c419.js";import{v as a}from"./p-f5940253.js";import{k as f,m as u}from"./p-88f18fbc.js";import{i as l}from"./p-dd5e13d1.js";import{s as c,b as p}from"./p-ad9a7657.js";import{B as d}from"./p-ae86d0a0.js";import{d as b}from"./p-f385e205.js";import{i as m}from"./p-ad81b8ea.js";import{L as w}from"./p-b77e3348.js";import{d as g}from"./p-a19d1e1d.js";import{L as v}from"./p-69e7c8d6.js";import"./p-9a3d9e17.js";import"./p-a65354df.js";import"./p-2229e98e.js";import"./p-aafb6696.js";var j,y={exports:{}};j=y,function(t){var i,r=1e6,e="[big.js] ",s=e+"Invalid ",n=s+"decimal places",o=s+"rounding mode",h=e+"Division by zero",a={},f=void 0,u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function l(t,i,r,e){var s=t.c;if(r===f&&(r=t.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(o);if(i<1)e=3===r&&(e||!!s[0])||0===i&&(1===r&&s[0]>=5||2===r&&(s[0]>5||5===s[0]&&(e||s[1]!==f))),s.length=1,e?(t.e=t.e-i+1,s[0]=1):s[0]=t.e=0;else if(i<s.length){if(e=1===r&&s[i]>=5||2===r&&(s[i]>5||5===s[i]&&(e||s[i+1]!==f||1&s[i-1]))||3===r&&(e||!!s[0]),s.length=i,e)for(;++s[--i]>9;)if(s[i]=0,0===i){++t.e,s.unshift(1);break}for(i=s.length;!s[--i];)s.pop()}return t}function c(t,i,r){var e=t.e,s=t.c.join(""),n=s.length;if(i)s=s.charAt(0)+(n>1?"."+s.slice(1):"")+(e<0?"e":"e+")+e;else if(e<0){for(;++e;)s="0"+s;s="0."+s}else if(e>0)if(++e>n)for(e-=n;e--;)s+="0";else e<n&&(s=s.slice(0,e)+"."+s.slice(e));else n>1&&(s=s.charAt(0)+"."+s.slice(1));return t.s<0&&r?"-"+s:s}a.abs=function(){var t=new this.constructor(this);return t.s=1,t},a.cmp=function(t){var i,r=this,e=r.c,s=(t=new r.constructor(t)).c,n=r.s,o=t.s,h=r.e,a=t.e;if(!e[0]||!s[0])return e[0]?n:s[0]?-o:0;if(n!=o)return n;if(i=n<0,h!=a)return h>a^i?1:-1;for(o=(h=e.length)<(a=s.length)?h:a,n=-1;++n<o;)if(e[n]!=s[n])return e[n]>s[n]^i?1:-1;return h==a?0:h>a^i?1:-1},a.div=function(t){var i=this,e=i.constructor,s=i.c,o=(t=new e(t)).c,a=i.s==t.s?1:-1,u=e.DP;if(u!==~~u||u<0||u>r)throw Error(n);if(!o[0])throw Error(h);if(!s[0])return t.s=a,t.c=[t.e=0],t;var c,p,d,b,m,w=o.slice(),g=c=o.length,v=s.length,j=s.slice(0,c),y=j.length,x=t,E=x.c=[],k=0,_=u+(x.e=i.e-t.e)+1;for(x.s=a,a=_<0?0:_,w.unshift(0);y++<c;)j.push(0);do{for(d=0;d<10;d++){if(c!=(y=j.length))b=c>y?1:-1;else for(m=-1,b=0;++m<c;)if(o[m]!=j[m]){b=o[m]>j[m]?1:-1;break}if(!(b<0))break;for(p=y==c?o:w;y;){if(j[--y]<p[y]){for(m=y;m&&!j[--m];)j[m]=9;--j[m],j[y]+=10}j[y]-=p[y]}for(;!j[0];)j.shift()}E[k++]=b?d:++d,j[0]&&b?j[y]=s[g]||0:j=[s[g]]}while((g++<v||j[0]!==f)&&a--);return E[0]||1==k||(E.shift(),x.e--,_--),k>_&&l(x,_,e.RM,j[0]!==f),x},a.eq=function(t){return 0===this.cmp(t)},a.gt=function(t){return this.cmp(t)>0},a.gte=function(t){return this.cmp(t)>-1},a.lt=function(t){return this.cmp(t)<0},a.lte=function(t){return this.cmp(t)<1},a.minus=a.sub=function(t){var i,r,e,s,n=this,o=n.constructor,h=n.s,a=(t=new o(t)).s;if(h!=a)return t.s=-a,n.plus(t);var f=n.c.slice(),u=n.e,l=t.c,c=t.e;if(!f[0]||!l[0])return l[0]?t.s=-a:f[0]?t=new o(n):t.s=1,t;if(h=u-c){for((s=h<0)?(h=-h,e=f):(c=u,e=l),e.reverse(),a=h;a--;)e.push(0);e.reverse()}else for(r=((s=f.length<l.length)?f:l).length,h=a=0;a<r;a++)if(f[a]!=l[a]){s=f[a]<l[a];break}if(s&&(e=f,f=l,l=e,t.s=-t.s),(a=(r=l.length)-(i=f.length))>0)for(;a--;)f[i++]=0;for(a=i;r>h;){if(f[--r]<l[r]){for(i=r;i&&!f[--i];)f[i]=9;--f[i],f[r]+=10}f[r]-=l[r]}for(;0===f[--a];)f.pop();for(;0===f[0];)f.shift(),--c;return f[0]||(t.s=1,f=[c=0]),t.c=f,t.e=c,t},a.mod=function(t){var i,r=this,e=r.constructor,s=r.s,n=(t=new e(t)).s;if(!t.c[0])throw Error(h);return r.s=t.s=1,i=1==t.cmp(r),r.s=s,t.s=n,i?new e(r):(s=e.DP,n=e.RM,e.DP=e.RM=0,r=r.div(t),e.DP=s,e.RM=n,this.minus(r.times(t)))},a.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t},a.plus=a.add=function(t){var i,r,e,s=this,n=s.constructor;if(t=new n(t),s.s!=t.s)return t.s=-t.s,s.minus(t);var o=s.e,h=s.c,a=t.e,f=t.c;if(!h[0]||!f[0])return f[0]||(h[0]?t=new n(s):t.s=s.s),t;if(h=h.slice(),i=o-a){for(i>0?(a=o,e=f):(i=-i,e=h),e.reverse();i--;)e.push(0);e.reverse()}for(h.length-f.length<0&&(e=f,f=h,h=e),i=f.length,r=0;i;h[i]%=10)r=(h[--i]=h[i]+f[i]+r)/10|0;for(r&&(h.unshift(r),++a),i=h.length;0===h[--i];)h.pop();return t.c=h,t.e=a,t},a.pow=function(t){var i=this,r=new i.constructor("1"),e=r,n=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(s+"exponent");for(n&&(t=-t);1&t&&(e=e.times(i)),t>>=1;)i=i.times(i);return n?r.div(e):e},a.prec=function(t,i){if(t!==~~t||t<1||t>r)throw Error(s+"precision");return l(new this.constructor(this),t,i)},a.round=function(t,i){if(t===f)t=0;else if(t!==~~t||t<-r||t>r)throw Error(n);return l(new this.constructor(this),t+this.e+1,i)},a.sqrt=function(){var t,i,r,s=this,n=s.constructor,o=s.s,h=s.e,a=new n("0.5");if(!s.c[0])return new n(s);if(o<0)throw Error(e+"No square root");0===(o=Math.sqrt(s+""))||o===1/0?((i=s.c.join("")).length+h&1||(i+="0"),h=((h+1)/2|0)-(h<0||1&h),t=new n(((o=Math.sqrt(i))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+h)):t=new n(o+""),h=t.e+(n.DP+=4);do{t=a.times((r=t).plus(s.div(r)))}while(r.c.slice(0,h).join("")!==t.c.slice(0,h).join(""));return l(t,(n.DP-=4)+t.e+1,n.RM)},a.times=a.mul=function(t){var i,r=this,e=r.c,s=(t=new(0,r.constructor)(t)).c,n=e.length,o=s.length,h=r.e,a=t.e;if(t.s=r.s==t.s?1:-1,!e[0]||!s[0])return t.c=[t.e=0],t;for(t.e=h+a,n<o&&(i=e,e=s,s=i,a=n,n=o,o=a),i=new Array(a=n+o);a--;)i[a]=0;for(h=o;h--;){for(o=0,a=n+h;a>h;)o=i[a]+s[h]*e[a-h-1]+o,i[a--]=o%10,o=o/10|0;i[a]=o}for(o?++t.e:i.shift(),h=i.length;!i[--h];)i.pop();return t.c=i,t},a.toExponential=function(t,i){var e=this,s=e.c[0];if(t!==f){if(t!==~~t||t<0||t>r)throw Error(n);for(e=l(new e.constructor(e),++t,i);e.c.length<t;)e.c.push(0)}return c(e,!0,!!s)},a.toFixed=function(t,i){var e=this,s=e.c[0];if(t!==f){if(t!==~~t||t<0||t>r)throw Error(n);for(t=t+(e=l(new e.constructor(e),t+e.e+1,i)).e+1;e.c.length<t;)e.c.push(0)}return c(e,!1,!!s)},a.toJSON=a.toString=function(){var t=this,i=t.constructor;return c(t,t.e<=i.NE||t.e>=i.PE,!!t.c[0])},a.toNumber=function(){var t=Number(c(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(e+"Imprecise conversion");return t},a.toPrecision=function(t,i){var e=this,n=e.constructor,o=e.c[0];if(t!==f){if(t!==~~t||t<1||t>r)throw Error(s+"precision");for(e=l(new n(e),t,i);e.c.length<t;)e.c.push(0)}return c(e,t<=e.e||e.e<=n.NE||e.e>=n.PE,!!o)},a.valueOf=function(){var t=this,i=t.constructor;if(!0===i.strict)throw Error(e+"valueOf disallowed");return c(t,t.e<=i.NE||t.e>=i.PE,!0)},(i=function t(){function i(r){var e=this;if(!(e instanceof i))return r===f?t():new i(r);if(r instanceof i)e.s=r.s,e.e=r.e,e.c=r.c.slice();else{if("string"!=typeof r){if(!0===i.strict&&"bigint"!=typeof r)throw TypeError(s+"value");r=0===r&&1/r<0?"-0":String(r)}!function(t,i){var r,e,n;if(!u.test(i))throw Error(s+"number");for(t.s="-"==i.charAt(0)?(i=i.slice(1),-1):1,(r=i.indexOf("."))>-1&&(i=i.replace(".","")),(e=i.search(/e/i))>0?(r<0&&(r=e),r+=+i.slice(e+1),i=i.substring(0,e)):r<0&&(r=i.length),n=i.length,e=0;e<n&&"0"==i.charAt(e);)++e;if(e==n)t.c=[t.e=0];else{for(;n>0&&"0"==i.charAt(--n););for(t.e=r-e-1,t.c=[],r=0;e<=n;)t.c[r++]=+i.charAt(e++)}}(e,r)}e.constructor=i}return i.prototype=a,i.DP=20,i.RM=1,i.NE=-7,i.PE=21,i.strict=!1,i.roundDown=0,i.roundHalfUp=1,i.roundHalfEven=2,i.roundUp=3,i}()).default=i.Big=i,j.exports?j.exports=i:t.Big=i}(h);const x=y.exports,E=class{constructor(r){t(this,r),this.balChange=i(this,"balChange",7),this.balInput=i(this,"balInput",7),this.balIncrease=i(this,"balIncrease",7),this.balDecrease=i(this,"balDecrease",7),this.balFocus=i(this,"balFocus",7),this.balBlur=i(this,"balBlur",7),this.inputId="bal-input-stepper-"+k++,this.inheritedAttributes={},this.decreaseHasFocus=!1,this.increaseHasFocus=!1,this.initialValue=0,this.onFocusDecrease=t=>{this.decreaseHasFocus=!0,this.onFocus(t)},this.onFocusIncrease=t=>{this.increaseHasFocus=!0,this.onFocus(t)},this.onFocus=t=>{c(t),this.balFocus.emit(t.detail)},this.onBlurDecrease=t=>{c(t),this.decreaseHasFocus=!1,f((()=>this.onBlur(t.detail)))},this.onBlurIncrease=t=>{c(t),this.increaseHasFocus=!1,f((()=>this.onBlur(t.detail)))},this.onBlur=t=>{this.decreaseHasFocus||this.increaseHasFocus||this.balBlur.emit(t)},this.focused=!1,this.language=g.language,this.region=g.region,this.ariaForm=b,this.name=this.inputId,this.min=0,this.max=10,this.steps=1,this.disabled=!1,this.readonly=!1,this.invalid=!1,this.debounce=0,this.value=0,this.autoInvalidOff=!1}createLogger(t){this.log=t}debounceChanged(){this.balChange=u(this.balChange,this.debounce)}listenOnClick(t){p(this,t)}resetHandler(t){const i=t.target;(null==i?void 0:i.contains(this.el))&&(this.value=this.initialValue)}connectedCallback(){this.debounceChanged(),this.initialValue=this.value}componentWillLoad(){this.inheritedAttributes=l(this.el,["aria-label","tabindex","title"])}async configChanged(t){this.language=t.language,this.region=t.region}getInputElement(){return Promise.resolve(this.nativeInput)}async setAriaForm(t){this.ariaForm=Object.assign({},t)}increase(){if(!this.disabled&&!this.readonly){const t=new x(this.value).plus(this.steps).toNumber();t<=this.max&&(this.value=t,this.balInput.emit(t),this.balChange.emit(t),this.balIncrease.emit(t))}}decrease(){if(!this.disabled&&!this.readonly){const t=new x(this.value).minus(this.steps).toNumber();t>=this.min&&(this.value=t,this.balInput.emit(t),this.balChange.emit(t),this.balDecrease.emit(t))}}render(){const t=d.block("input-stepper"),i=t.element("input"),s=t.element("inner"),n=s.element("text"),o=m[this.language].increase,h=m[this.language].decrease;return r(e,{"aria-disabled":this.disabled?"true":null,"aria-focused":this.focused?"true":null,class:Object.assign({},t.class())},r("div",{class:Object.assign({},s.class())},r("bal-button",{aria:{title:h,label:h,controls:this.ariaForm.controlId||this.inputId},size:"small",square:!0,"data-testid":"bal-input-stepper-decrease",outlined:!this.invalid,icon:"minus",color:this.invalid?"danger":"info",disabled:this.disabled||this.readonly||this.value<=this.min,onClick:()=>this.decrease(),onBalFocus:t=>this.onFocusDecrease(t),onBalBlur:t=>this.onBlurDecrease(t)}),r("bal-text",{space:"none",color:this.disabled||this.readonly?"grey":this.invalid?"danger":"",bold:!0,class:Object.assign({},n.class()),"data-testid":"bal-input-stepper-text"},a(`${this.language}-${this.region}`,this.value)),r("bal-button",{aria:{title:o,label:o,controls:this.ariaForm.controlId||this.inputId},size:"small","data-testid":"bal-input-stepper-increase",square:!0,outlined:!this.invalid,icon:"plus",color:this.invalid?"danger":"info",disabled:this.disabled||this.readonly||this.value>=this.max,onClick:()=>this.increase(),onBalFocus:t=>this.onFocusIncrease(t),onBalBlur:t=>this.onBlurIncrease(t)})),r("input",Object.assign({class:Object.assign({},i.class()),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-input-stepper",type:"text",value:this.value,name:this.name,tabindex:"-1",ref:t=>this.nativeInput=t,readonly:this.readonly,disabled:this.disabled},this.inheritedAttributes)))}get el(){return s(this)}static get watchers(){return{debounce:["debounceChanged"]}}};n([w("bal-input-stepper"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],E.prototype,"createLogger",null),n([v(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],E.prototype,"configChanged",null);let k=0;E.style=".bal-input-stepper{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:static;display:inline-block}.bal-input-stepper__inner{display:-ms-flexbox;display:flex;gap:.25rem;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-input-stepper__inner__text{min-width:3rem;text-align:center}.bal-input-stepper__input{position:absolute;width:0;height:0;left:0;top:0;margin:0;padding:0;opacity:0;outline:0}";export{E as bal_input_stepper}
|
|
1
|
+
import{r as t,c as i,h as r,H as e,g as s}from"./p-d7c752c6.js";import{_ as n,a as o}from"./p-43c9f5e9.js";import{c as h}from"./p-4573c419.js";import{v as a}from"./p-4ae121b6.js";import{k as f,m as u}from"./p-88f18fbc.js";import{i as l}from"./p-dd5e13d1.js";import{s as c,b as p}from"./p-de08fd27.js";import{B as d}from"./p-ae86d0a0.js";import{d as b}from"./p-f385e205.js";import{i as m}from"./p-ad81b8ea.js";import{L as w}from"./p-b77e3348.js";import{d as g}from"./p-a19d1e1d.js";import{L as v}from"./p-69e7c8d6.js";import"./p-9a3d9e17.js";import"./p-a65354df.js";import"./p-2229e98e.js";import"./p-aafb6696.js";var j,y={exports:{}};j=y,function(t){var i,r=1e6,e="[big.js] ",s=e+"Invalid ",n=s+"decimal places",o=s+"rounding mode",h=e+"Division by zero",a={},f=void 0,u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function l(t,i,r,e){var s=t.c;if(r===f&&(r=t.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(o);if(i<1)e=3===r&&(e||!!s[0])||0===i&&(1===r&&s[0]>=5||2===r&&(s[0]>5||5===s[0]&&(e||s[1]!==f))),s.length=1,e?(t.e=t.e-i+1,s[0]=1):s[0]=t.e=0;else if(i<s.length){if(e=1===r&&s[i]>=5||2===r&&(s[i]>5||5===s[i]&&(e||s[i+1]!==f||1&s[i-1]))||3===r&&(e||!!s[0]),s.length=i,e)for(;++s[--i]>9;)if(s[i]=0,0===i){++t.e,s.unshift(1);break}for(i=s.length;!s[--i];)s.pop()}return t}function c(t,i,r){var e=t.e,s=t.c.join(""),n=s.length;if(i)s=s.charAt(0)+(n>1?"."+s.slice(1):"")+(e<0?"e":"e+")+e;else if(e<0){for(;++e;)s="0"+s;s="0."+s}else if(e>0)if(++e>n)for(e-=n;e--;)s+="0";else e<n&&(s=s.slice(0,e)+"."+s.slice(e));else n>1&&(s=s.charAt(0)+"."+s.slice(1));return t.s<0&&r?"-"+s:s}a.abs=function(){var t=new this.constructor(this);return t.s=1,t},a.cmp=function(t){var i,r=this,e=r.c,s=(t=new r.constructor(t)).c,n=r.s,o=t.s,h=r.e,a=t.e;if(!e[0]||!s[0])return e[0]?n:s[0]?-o:0;if(n!=o)return n;if(i=n<0,h!=a)return h>a^i?1:-1;for(o=(h=e.length)<(a=s.length)?h:a,n=-1;++n<o;)if(e[n]!=s[n])return e[n]>s[n]^i?1:-1;return h==a?0:h>a^i?1:-1},a.div=function(t){var i=this,e=i.constructor,s=i.c,o=(t=new e(t)).c,a=i.s==t.s?1:-1,u=e.DP;if(u!==~~u||u<0||u>r)throw Error(n);if(!o[0])throw Error(h);if(!s[0])return t.s=a,t.c=[t.e=0],t;var c,p,d,b,m,w=o.slice(),g=c=o.length,v=s.length,j=s.slice(0,c),y=j.length,x=t,E=x.c=[],k=0,_=u+(x.e=i.e-t.e)+1;for(x.s=a,a=_<0?0:_,w.unshift(0);y++<c;)j.push(0);do{for(d=0;d<10;d++){if(c!=(y=j.length))b=c>y?1:-1;else for(m=-1,b=0;++m<c;)if(o[m]!=j[m]){b=o[m]>j[m]?1:-1;break}if(!(b<0))break;for(p=y==c?o:w;y;){if(j[--y]<p[y]){for(m=y;m&&!j[--m];)j[m]=9;--j[m],j[y]+=10}j[y]-=p[y]}for(;!j[0];)j.shift()}E[k++]=b?d:++d,j[0]&&b?j[y]=s[g]||0:j=[s[g]]}while((g++<v||j[0]!==f)&&a--);return E[0]||1==k||(E.shift(),x.e--,_--),k>_&&l(x,_,e.RM,j[0]!==f),x},a.eq=function(t){return 0===this.cmp(t)},a.gt=function(t){return this.cmp(t)>0},a.gte=function(t){return this.cmp(t)>-1},a.lt=function(t){return this.cmp(t)<0},a.lte=function(t){return this.cmp(t)<1},a.minus=a.sub=function(t){var i,r,e,s,n=this,o=n.constructor,h=n.s,a=(t=new o(t)).s;if(h!=a)return t.s=-a,n.plus(t);var f=n.c.slice(),u=n.e,l=t.c,c=t.e;if(!f[0]||!l[0])return l[0]?t.s=-a:f[0]?t=new o(n):t.s=1,t;if(h=u-c){for((s=h<0)?(h=-h,e=f):(c=u,e=l),e.reverse(),a=h;a--;)e.push(0);e.reverse()}else for(r=((s=f.length<l.length)?f:l).length,h=a=0;a<r;a++)if(f[a]!=l[a]){s=f[a]<l[a];break}if(s&&(e=f,f=l,l=e,t.s=-t.s),(a=(r=l.length)-(i=f.length))>0)for(;a--;)f[i++]=0;for(a=i;r>h;){if(f[--r]<l[r]){for(i=r;i&&!f[--i];)f[i]=9;--f[i],f[r]+=10}f[r]-=l[r]}for(;0===f[--a];)f.pop();for(;0===f[0];)f.shift(),--c;return f[0]||(t.s=1,f=[c=0]),t.c=f,t.e=c,t},a.mod=function(t){var i,r=this,e=r.constructor,s=r.s,n=(t=new e(t)).s;if(!t.c[0])throw Error(h);return r.s=t.s=1,i=1==t.cmp(r),r.s=s,t.s=n,i?new e(r):(s=e.DP,n=e.RM,e.DP=e.RM=0,r=r.div(t),e.DP=s,e.RM=n,this.minus(r.times(t)))},a.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t},a.plus=a.add=function(t){var i,r,e,s=this,n=s.constructor;if(t=new n(t),s.s!=t.s)return t.s=-t.s,s.minus(t);var o=s.e,h=s.c,a=t.e,f=t.c;if(!h[0]||!f[0])return f[0]||(h[0]?t=new n(s):t.s=s.s),t;if(h=h.slice(),i=o-a){for(i>0?(a=o,e=f):(i=-i,e=h),e.reverse();i--;)e.push(0);e.reverse()}for(h.length-f.length<0&&(e=f,f=h,h=e),i=f.length,r=0;i;h[i]%=10)r=(h[--i]=h[i]+f[i]+r)/10|0;for(r&&(h.unshift(r),++a),i=h.length;0===h[--i];)h.pop();return t.c=h,t.e=a,t},a.pow=function(t){var i=this,r=new i.constructor("1"),e=r,n=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(s+"exponent");for(n&&(t=-t);1&t&&(e=e.times(i)),t>>=1;)i=i.times(i);return n?r.div(e):e},a.prec=function(t,i){if(t!==~~t||t<1||t>r)throw Error(s+"precision");return l(new this.constructor(this),t,i)},a.round=function(t,i){if(t===f)t=0;else if(t!==~~t||t<-r||t>r)throw Error(n);return l(new this.constructor(this),t+this.e+1,i)},a.sqrt=function(){var t,i,r,s=this,n=s.constructor,o=s.s,h=s.e,a=new n("0.5");if(!s.c[0])return new n(s);if(o<0)throw Error(e+"No square root");0===(o=Math.sqrt(s+""))||o===1/0?((i=s.c.join("")).length+h&1||(i+="0"),h=((h+1)/2|0)-(h<0||1&h),t=new n(((o=Math.sqrt(i))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+h)):t=new n(o+""),h=t.e+(n.DP+=4);do{t=a.times((r=t).plus(s.div(r)))}while(r.c.slice(0,h).join("")!==t.c.slice(0,h).join(""));return l(t,(n.DP-=4)+t.e+1,n.RM)},a.times=a.mul=function(t){var i,r=this,e=r.c,s=(t=new(0,r.constructor)(t)).c,n=e.length,o=s.length,h=r.e,a=t.e;if(t.s=r.s==t.s?1:-1,!e[0]||!s[0])return t.c=[t.e=0],t;for(t.e=h+a,n<o&&(i=e,e=s,s=i,a=n,n=o,o=a),i=new Array(a=n+o);a--;)i[a]=0;for(h=o;h--;){for(o=0,a=n+h;a>h;)o=i[a]+s[h]*e[a-h-1]+o,i[a--]=o%10,o=o/10|0;i[a]=o}for(o?++t.e:i.shift(),h=i.length;!i[--h];)i.pop();return t.c=i,t},a.toExponential=function(t,i){var e=this,s=e.c[0];if(t!==f){if(t!==~~t||t<0||t>r)throw Error(n);for(e=l(new e.constructor(e),++t,i);e.c.length<t;)e.c.push(0)}return c(e,!0,!!s)},a.toFixed=function(t,i){var e=this,s=e.c[0];if(t!==f){if(t!==~~t||t<0||t>r)throw Error(n);for(t=t+(e=l(new e.constructor(e),t+e.e+1,i)).e+1;e.c.length<t;)e.c.push(0)}return c(e,!1,!!s)},a.toJSON=a.toString=function(){var t=this,i=t.constructor;return c(t,t.e<=i.NE||t.e>=i.PE,!!t.c[0])},a.toNumber=function(){var t=Number(c(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(e+"Imprecise conversion");return t},a.toPrecision=function(t,i){var e=this,n=e.constructor,o=e.c[0];if(t!==f){if(t!==~~t||t<1||t>r)throw Error(s+"precision");for(e=l(new n(e),t,i);e.c.length<t;)e.c.push(0)}return c(e,t<=e.e||e.e<=n.NE||e.e>=n.PE,!!o)},a.valueOf=function(){var t=this,i=t.constructor;if(!0===i.strict)throw Error(e+"valueOf disallowed");return c(t,t.e<=i.NE||t.e>=i.PE,!0)},(i=function t(){function i(r){var e=this;if(!(e instanceof i))return r===f?t():new i(r);if(r instanceof i)e.s=r.s,e.e=r.e,e.c=r.c.slice();else{if("string"!=typeof r){if(!0===i.strict&&"bigint"!=typeof r)throw TypeError(s+"value");r=0===r&&1/r<0?"-0":String(r)}!function(t,i){var r,e,n;if(!u.test(i))throw Error(s+"number");for(t.s="-"==i.charAt(0)?(i=i.slice(1),-1):1,(r=i.indexOf("."))>-1&&(i=i.replace(".","")),(e=i.search(/e/i))>0?(r<0&&(r=e),r+=+i.slice(e+1),i=i.substring(0,e)):r<0&&(r=i.length),n=i.length,e=0;e<n&&"0"==i.charAt(e);)++e;if(e==n)t.c=[t.e=0];else{for(;n>0&&"0"==i.charAt(--n););for(t.e=r-e-1,t.c=[],r=0;e<=n;)t.c[r++]=+i.charAt(e++)}}(e,r)}e.constructor=i}return i.prototype=a,i.DP=20,i.RM=1,i.NE=-7,i.PE=21,i.strict=!1,i.roundDown=0,i.roundHalfUp=1,i.roundHalfEven=2,i.roundUp=3,i}()).default=i.Big=i,j.exports?j.exports=i:t.Big=i}(h);const x=y.exports,E=class{constructor(r){t(this,r),this.balChange=i(this,"balChange",7),this.balInput=i(this,"balInput",7),this.balIncrease=i(this,"balIncrease",7),this.balDecrease=i(this,"balDecrease",7),this.balFocus=i(this,"balFocus",7),this.balBlur=i(this,"balBlur",7),this.inputId="bal-input-stepper-"+k++,this.inheritedAttributes={},this.decreaseHasFocus=!1,this.increaseHasFocus=!1,this.initialValue=0,this.onFocusDecrease=t=>{this.decreaseHasFocus=!0,this.onFocus(t)},this.onFocusIncrease=t=>{this.increaseHasFocus=!0,this.onFocus(t)},this.onFocus=t=>{c(t),this.balFocus.emit(t.detail)},this.onBlurDecrease=t=>{c(t),this.decreaseHasFocus=!1,f((()=>this.onBlur(t.detail)))},this.onBlurIncrease=t=>{c(t),this.increaseHasFocus=!1,f((()=>this.onBlur(t.detail)))},this.onBlur=t=>{this.decreaseHasFocus||this.increaseHasFocus||this.balBlur.emit(t)},this.focused=!1,this.language=g.language,this.region=g.region,this.ariaForm=b,this.name=this.inputId,this.min=0,this.max=10,this.steps=1,this.disabled=!1,this.readonly=!1,this.invalid=!1,this.debounce=0,this.value=0,this.autoInvalidOff=!1}createLogger(t){this.log=t}debounceChanged(){this.balChange=u(this.balChange,this.debounce)}listenOnClick(t){p(this,t)}resetHandler(t){const i=t.target;(null==i?void 0:i.contains(this.el))&&(this.value=this.initialValue)}connectedCallback(){this.debounceChanged(),this.initialValue=this.value}componentWillLoad(){this.inheritedAttributes=l(this.el,["aria-label","tabindex","title"])}async configChanged(t){this.language=t.language,this.region=t.region}getInputElement(){return Promise.resolve(this.nativeInput)}async setAriaForm(t){this.ariaForm=Object.assign({},t)}increase(){if(!this.disabled&&!this.readonly){const t=new x(this.value).plus(this.steps).toNumber();t<=this.max&&(this.value=t,this.balInput.emit(t),this.balChange.emit(t),this.balIncrease.emit(t))}}decrease(){if(!this.disabled&&!this.readonly){const t=new x(this.value).minus(this.steps).toNumber();t>=this.min&&(this.value=t,this.balInput.emit(t),this.balChange.emit(t),this.balDecrease.emit(t))}}render(){const t=d.block("input-stepper"),i=t.element("input"),s=t.element("inner"),n=s.element("text"),o=m[this.language].increase,h=m[this.language].decrease;return r(e,{"aria-disabled":this.disabled?"true":null,"aria-focused":this.focused?"true":null,class:Object.assign({},t.class())},r("div",{class:Object.assign({},s.class())},r("bal-button",{aria:{title:h,label:h,controls:this.ariaForm.controlId||this.inputId},size:"small",square:!0,"data-testid":"bal-input-stepper-decrease",outlined:!this.invalid,icon:"minus",color:this.invalid?"danger":"info",disabled:this.disabled||this.readonly||this.value<=this.min,onClick:()=>this.decrease(),onBalFocus:t=>this.onFocusDecrease(t),onBalBlur:t=>this.onBlurDecrease(t)}),r("bal-text",{space:"none",color:this.disabled||this.readonly?"grey":this.invalid?"danger":"",bold:!0,class:Object.assign({},n.class()),"data-testid":"bal-input-stepper-text"},a(`${this.language}-${this.region}`,this.value)),r("bal-button",{aria:{title:o,label:o,controls:this.ariaForm.controlId||this.inputId},size:"small","data-testid":"bal-input-stepper-increase",square:!0,outlined:!this.invalid,icon:"plus",color:this.invalid?"danger":"info",disabled:this.disabled||this.readonly||this.value>=this.max,onClick:()=>this.increase(),onBalFocus:t=>this.onFocusIncrease(t),onBalBlur:t=>this.onBlurIncrease(t)})),r("input",Object.assign({class:Object.assign({},i.class()),id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":!0===this.invalid?"true":"false","aria-disabled":this.disabled?"true":null,"data-testid":"bal-input-stepper",type:"text",value:this.value,name:this.name,tabindex:"-1",ref:t=>this.nativeInput=t,readonly:this.readonly,disabled:this.disabled},this.inheritedAttributes)))}get el(){return s(this)}static get watchers(){return{debounce:["debounceChanged"]}}};n([w("bal-input-stepper"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],E.prototype,"createLogger",null),n([v(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],E.prototype,"configChanged",null);let k=0;E.style=".bal-input-stepper{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:static;display:inline-block}.bal-input-stepper__inner{display:-ms-flexbox;display:flex;gap:.25rem;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-input-stepper__inner__text{min-width:3rem;text-align:center}.bal-input-stepper__input{position:absolute;width:0;height:0;left:0;top:0;margin:0;padding:0;opacity:0;outline:0}";export{E as bal_input_stepper}
|