@baloise/ds-core 16.0.3 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/all.d.ts +234 -0
- package/components/all.js +350 -0
- package/components/aria.js +3 -0
- package/components/bal-accordion-details.js +4 -4
- package/components/bal-card.js +2 -2
- package/components/bal-card2.js +3 -3
- package/components/bal-carousel2.js +1 -1
- package/components/bal-checkbox-button.js +6 -6
- package/components/bal-checkbox-group.js +1 -1
- package/components/bal-checkbox2.js +3 -2
- package/components/bal-close2.js +1 -1
- package/components/bal-content.js +4 -4
- package/components/bal-date-calendar-cell.js +2 -2
- package/components/bal-date-calendar-cell2.js +3 -3
- package/components/bal-date-calendar2.js +3 -3
- package/components/bal-datepicker.js +3 -3
- package/components/bal-divider.js +4 -4
- package/components/bal-dropdown.d.ts +11 -0
- package/components/bal-dropdown.js +710 -0
- package/components/bal-field.js +12 -2
- package/components/bal-file-upload.js +1 -1
- package/components/bal-footer.js +4 -4
- package/components/bal-input-slider.js +1 -1
- package/components/bal-label.js +2 -2
- package/components/bal-label2.js +5 -5
- package/components/bal-nav-link-grid-col.js +2 -2
- package/components/bal-nav-link-grid-col2.js +4 -4
- package/components/bal-nav-link-grid.js +2 -2
- package/components/bal-nav-link-grid2.js +4 -4
- package/components/bal-nav-link-group.js +4 -4
- package/components/bal-nav-link.js +2 -2
- package/components/bal-nav-link2.js +4 -4
- package/components/bal-nav.js +8 -8
- package/components/bal-notices.js +3 -3
- package/components/bal-number-input.js +31 -13
- package/components/bal-option-list.d.ts +11 -0
- package/components/bal-option-list.js +459 -0
- package/components/bal-option.d.ts +11 -0
- package/components/bal-option.js +171 -0
- package/components/bal-popup.js +1 -1
- package/components/bal-radio-button.js +5 -5
- package/components/bal-radio-group.js +1 -1
- package/components/bal-radio2.js +1 -1
- package/components/bal-select2.js +4 -4
- package/components/bal-spinner2.js +54 -6
- package/components/bal-stack.js +2 -2
- package/components/bal-stack2.js +4 -4
- package/components/bal-steps.js +1 -1
- package/components/bal-tabs2.js +2 -2
- package/components/bal-tag2.js +1 -1
- package/components/config.default.js +1 -0
- package/components/date.js +5 -1
- package/components/index.esm.js +1 -1
- package/components/index.js +9 -1
- package/components/option.js +46 -0
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/p-013b4c72.system.js +1 -0
- package/dist/baloise-design-system/p-0639833837.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-88852ce68d.system.entry.js → p-06e9a468fc.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-0793c0159f.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-720c90ea90.system.entry.js → p-0fed7a5f26.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-10b8686d91.entry.js +1 -0
- package/dist/baloise-design-system/{p-e113196061.system.entry.js → p-126c79c9e9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb2ec275bb.system.entry.js → p-12bb6ea3e7.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-12bcc7da.js +1 -0
- package/dist/baloise-design-system/{p-762f45ff6f.entry.js → p-135c5759c5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-62770d5d.system.js → p-14ae0709.system.js} +1 -1
- package/dist/baloise-design-system/{p-3bbf43bb.system.js → p-1509eaa7.system.js} +1 -1
- package/dist/baloise-design-system/{p-946e9e784d.system.entry.js → p-1659bb968c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-187f98a1.system.js +1 -0
- package/dist/baloise-design-system/p-18e2e391e0.system.entry.js +1 -0
- package/dist/baloise-design-system/p-1de6b20b1c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-1c2dee82c4.system.entry.js → p-222bc9b30e.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-22b041a511.entry.js +1 -0
- package/dist/baloise-design-system/{p-f62222a85d.entry.js → p-25da216e4f.entry.js} +1 -1
- package/dist/baloise-design-system/p-25e0d82e89.system.entry.js +1 -0
- package/dist/baloise-design-system/p-2d82b78410.entry.js +1 -0
- package/dist/baloise-design-system/{p-a0db085f89.entry.js → p-2d8bd11634.entry.js} +1 -1
- package/dist/baloise-design-system/p-2db9030ad9.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-8444cfcbed.system.entry.js → p-3128128969.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9a5cb17cb9.entry.js → p-39bc49bc3d.entry.js} +1 -1
- package/dist/baloise-design-system/p-3bad0907.system.js +1 -0
- package/dist/baloise-design-system/{p-12786937.js → p-3f1c49d0.js} +1 -1
- package/dist/baloise-design-system/{p-33fca72859.entry.js → p-4aba4c66ee.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9e4fcb76.js → p-54f81c32.js} +1 -1
- package/dist/baloise-design-system/{p-922fd809.system.js → p-55faac1d.system.js} +1 -1
- package/dist/baloise-design-system/p-5b571a9fb1.entry.js +1 -0
- package/dist/baloise-design-system/{p-671a986aff.entry.js → p-60e94f8144.entry.js} +1 -1
- package/dist/baloise-design-system/{p-06e959a11a.entry.js → p-6164f99bb8.entry.js} +1 -1
- package/dist/baloise-design-system/p-62ab1f0ae2.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-6b80dee13f.system.entry.js → p-62b792a34b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8998eeb2a7.system.entry.js → p-74f4b9818b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-77f5e777e6.entry.js +1 -0
- package/dist/baloise-design-system/p-7c42a363f3.entry.js +1 -0
- package/dist/baloise-design-system/p-7cd815d3e8.entry.js +1 -0
- package/dist/baloise-design-system/p-80b45dd4d6.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-af5b58ab1c.system.entry.js → p-8870e1f3e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3cb83cf9.system.js → p-8a87b9a8.system.js} +1 -1
- package/dist/baloise-design-system/{p-a5568e05fb.system.entry.js → p-8c209ac52b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-8f77c423ad.entry.js +1 -0
- package/dist/baloise-design-system/{p-32bc2b926a.entry.js → p-8fe94b9e21.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1b76afbf.js → p-94efe2aa.js} +1 -1
- package/dist/baloise-design-system/{p-0ce86357bd.entry.js → p-9658f4a66f.entry.js} +1 -1
- package/dist/baloise-design-system/p-9a0640d065.entry.js +1 -0
- package/dist/baloise-design-system/{p-c3bd665a8b.entry.js → p-9e167705ca.entry.js} +1 -1
- package/dist/baloise-design-system/p-9ecce014c2.system.entry.js +1 -0
- package/dist/baloise-design-system/p-a19d1e1d.js +1 -0
- package/dist/baloise-design-system/p-a7e5ee75e2.entry.js +1 -0
- package/dist/baloise-design-system/{p-9cc5ae9e5c.entry.js → p-a8022ee701.entry.js} +1 -1
- package/dist/baloise-design-system/p-a97cbb7dda.entry.js +1 -0
- package/dist/baloise-design-system/p-acb5cea0.system.js +1 -0
- package/dist/baloise-design-system/p-ae28b86fe5.entry.js +1 -0
- package/dist/baloise-design-system/p-b779742f50.entry.js +1 -0
- package/dist/baloise-design-system/{p-cee3cd08.js → p-b8d99064.js} +1 -1
- package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +1 -0
- package/dist/baloise-design-system/p-b97d9336a7.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-b3a2290c0d.entry.js → p-b9f197815f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9e7610a20f.system.entry.js → p-bb3914c87a.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bb6304d0.system.js +1 -0
- package/dist/baloise-design-system/p-bcbb5b59f3.system.entry.js +1 -0
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
- package/dist/baloise-design-system/{p-1cdfb98b54.entry.js → p-bcebf41b74.entry.js} +1 -1
- package/dist/baloise-design-system/p-bd5de78b2c.entry.js +1 -0
- package/dist/baloise-design-system/p-c304d5fa9c.entry.js +1 -0
- package/dist/baloise-design-system/{p-8177dec3.system.js → p-cc61fac8.system.js} +1 -1
- package/dist/baloise-design-system/{p-ac825842e4.system.entry.js → p-cd8e72d87f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a9300668b4.system.entry.js → p-d16557d133.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d7a758b3.js +1 -0
- package/dist/baloise-design-system/{p-33cd610840.system.entry.js → p-d919753ed0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-d9b38501.js +1 -0
- package/dist/baloise-design-system/p-d9d229a026.entry.js +1 -0
- package/dist/baloise-design-system/{p-13227d037a.system.entry.js → p-dbc2d22240.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-aacb0cee66.system.entry.js → p-dce3764ee5.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-ddf9b2a289.entry.js +1 -0
- package/dist/baloise-design-system/{p-49a8bfb790.system.entry.js → p-e4de708de1.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e60c936359.system.entry.js +1 -0
- package/dist/baloise-design-system/p-e78a6409.js +1 -0
- package/dist/baloise-design-system/{p-f55c50abfa.system.entry.js → p-f076d1ed4f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b34e0daa6e.system.entry.js → p-f0b43f1452.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f12abda2db.entry.js +1 -0
- package/dist/baloise-design-system/{p-31d9c875c0.system.entry.js → p-f1b95d78af.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f56fb1a197.entry.js +1 -0
- package/dist/baloise-design-system/{p-681d41fc97.entry.js → p-f8974d743d.entry.js} +1 -1
- package/dist/baloise-design-system/p-f8a98657a1.entry.js +1 -0
- package/dist/cjs/{app-globals-d6bc7866.js → app-globals-ae3a8623.js} +1 -1
- package/dist/cjs/aria-c8955a5c.js +5 -0
- package/dist/cjs/bal-accordion_4.cjs.entry.js +4 -4
- package/dist/cjs/bal-card_6.cjs.entry.js +3 -3
- package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-checkbox-button.cjs.entry.js +6 -6
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +4 -3
- package/dist/cjs/bal-close.cjs.entry.js +2 -2
- package/dist/cjs/bal-content.cjs.entry.js +4 -4
- package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +2 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-date.cjs.entry.js +2 -2
- package/dist/cjs/bal-datepicker.cjs.entry.js +7 -7
- package/dist/cjs/bal-divider.cjs.entry.js +4 -4
- package/dist/cjs/bal-dropdown.cjs.entry.js +660 -0
- package/dist/cjs/bal-field_5.cjs.entry.js +12 -2
- package/dist/cjs/bal-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +4 -4
- package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
- package/dist/cjs/bal-icon.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-slider.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-label.cjs.entry.js +6 -6
- 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 +28 -28
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-notices.cjs.entry.js +3 -3
- package/dist/cjs/bal-number-input.cjs.entry.js +32 -14
- package/dist/cjs/bal-option_2.cjs.entry.js +541 -0
- package/dist/cjs/bal-pagination.cjs.entry.js +4 -4
- package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/bal-radio-button.cjs.entry.js +5 -5
- package/dist/cjs/bal-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-select_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-spinner.cjs.entry.js +49 -4
- package/dist/cjs/bal-stack.cjs.entry.js +4 -4
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-tag_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
- package/dist/cjs/baloise-design-system.cjs.js +4 -4
- package/dist/cjs/{breakpoints.decorator-7f888011.js → breakpoints.decorator-47fd6060.js} +1 -1
- package/dist/cjs/{breakpoints.subject-28c980cd.js → breakpoints.subject-66093c8f.js} +1 -1
- package/dist/cjs/{config.default-32725178.js → config.default-5bdd6e3d.js} +1 -0
- package/dist/cjs/{date-df1d61a8.js → date-3e33b208.js} +5 -1
- package/dist/cjs/index.cjs.js +7 -5
- package/dist/cjs/{initialize-e38e7028.js → initialize-2a19d091.js} +9 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/option-c33cf2b8.js +49 -0
- package/dist/cjs/{tokens.esm-89d0f18d.js → tokens.esm-bb0ef2db.js} +1 -1
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/bal-accordion/bal-accordion-details/bal-accordion-details.js +2 -2
- package/dist/collection/components/bal-card/bal-card.js +1 -1
- package/dist/collection/components/bal-carousel/controls/tab-control.js +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.css +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.js +3 -3
- package/dist/collection/components/bal-checkbox/bal-checkbox-group/bal-checkbox-group.js +1 -1
- package/dist/collection/components/bal-checkbox/bal-checkbox.js +2 -1
- package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
- package/dist/collection/components/bal-close/bal-close.js +1 -1
- package/dist/collection/components/bal-content/bal-content.js +2 -2
- package/dist/collection/components/bal-date/bal-date-calendar/components/bal-date-calendar__gird.js +1 -1
- package/dist/collection/components/bal-date/bal-date-calendar/components/bal-date-calendar__list.js +1 -1
- package/dist/collection/components/bal-date/bal-date-calendar-cell/bal-date-calendar-cell.js +1 -1
- package/dist/collection/components/bal-datepicker/bal-datepicker.js +3 -3
- package/dist/collection/components/bal-divider/bal-divider.js +2 -2
- package/dist/collection/components/bal-dropdown/bal-dropdown.css +1 -0
- package/dist/collection/components/bal-dropdown/bal-dropdown.interfaces.js +4 -0
- package/dist/collection/components/bal-dropdown/bal-dropdown.js +882 -0
- package/dist/collection/components/bal-field/bal-field.js +12 -2
- package/dist/collection/components/bal-file-upload/components/file-list.js +1 -1
- package/dist/collection/components/bal-footer/bal-footer.js +3 -3
- package/dist/collection/components/bal-input-slider/bal-input-slider.js +1 -1
- package/dist/collection/components/bal-label/bal-label.js +3 -3
- package/dist/collection/components/bal-nav/bal-nav-link/bal-nav-link.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-grid/bal-nav-link-grid.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-grid-col/bal-nav-link-grid-col.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav-link-group/bal-nav-link-group.js +2 -2
- package/dist/collection/components/bal-nav/bal-nav.js +6 -6
- package/dist/collection/components/bal-nav/components/section-list.js +2 -2
- package/dist/collection/components/bal-nav/components/service-list.js +2 -2
- package/dist/collection/components/bal-notices/bal-notices.js +1 -1
- package/dist/collection/components/bal-number-input/bal-number-input.js +5 -0
- package/dist/collection/components/bal-number-input/bal-number-input.utils.js +27 -14
- package/dist/collection/components/bal-number-input/bal-number-input.utils.spec.js +82 -0
- package/dist/collection/components/bal-option/bal-option.css +1 -0
- package/dist/collection/components/bal-option/bal-option.interfaces.js +4 -0
- package/dist/collection/components/bal-option/bal-option.js +360 -0
- package/dist/collection/components/bal-option-list/bal-option-list.css +1 -0
- package/dist/collection/components/bal-option-list/bal-option-list.interfaces.js +4 -0
- package/dist/collection/components/bal-option-list/bal-option-list.js +939 -0
- package/dist/collection/components/bal-radio/bal-radio-button/bal-radio-button.js +3 -3
- package/dist/collection/components/bal-radio/bal-radio-group/bal-radio-group.js +1 -1
- package/dist/collection/components/bal-select/bal-select.js +4 -4
- package/dist/collection/components/bal-spinner/bal-spinner.css +1 -1
- package/dist/collection/components/bal-spinner/bal-spinner.interfaces.js +4 -0
- package/dist/collection/components/bal-spinner/bal-spinner.js +83 -4
- package/dist/collection/components/bal-stack/bal-stack.js +2 -2
- package/dist/collection/components/bal-steps/bal-steps.js +1 -1
- package/dist/collection/components/bal-tabs/components/tab-nav.js +1 -1
- package/dist/collection/components/bal-tabs/components/tab-select.js +1 -1
- package/dist/collection/components/bal-tag/bal-tag.css +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/aria.js +1 -0
- package/dist/collection/utils/config/config.default.js +1 -0
- package/dist/collection/utils/config/config.js +7 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/date/date.js +5 -1
- package/dist/collection/utils/date/date.spec.js +11 -5
- package/dist/collection/utils/dropdown/auto-fill.js +38 -0
- package/dist/collection/utils/dropdown/component.js +1 -0
- package/dist/collection/utils/dropdown/dropdown.i18n.js +52 -0
- package/dist/collection/utils/dropdown/events.js +43 -0
- package/dist/collection/utils/dropdown/filters.js +10 -0
- package/dist/collection/utils/dropdown/focus.js +19 -0
- package/dist/collection/utils/dropdown/form-submit.js +35 -0
- package/dist/collection/utils/dropdown/icon.js +15 -0
- package/dist/collection/utils/dropdown/index.js +13 -0
- package/dist/collection/utils/dropdown/input.js +12 -0
- package/dist/collection/utils/dropdown/option-list.js +8 -0
- package/dist/collection/utils/dropdown/option.js +44 -0
- package/dist/collection/utils/dropdown/popup.js +45 -0
- package/dist/collection/utils/dropdown/value.js +103 -0
- package/dist/esm/{app-globals-89691d80.js → app-globals-b0dd0fc4.js} +1 -1
- package/dist/esm/aria-d5877698.js +3 -0
- package/dist/esm/bal-accordion_4.entry.js +4 -4
- package/dist/esm/bal-card_6.entry.js +3 -3
- package/dist/esm/bal-carousel_2.entry.js +5 -5
- package/dist/esm/bal-checkbox-button.entry.js +6 -6
- package/dist/esm/bal-checkbox_2.entry.js +5 -4
- package/dist/esm/bal-close.entry.js +2 -2
- package/dist/esm/bal-content.entry.js +4 -4
- package/dist/esm/bal-date-calendar-cell.entry.js +2 -2
- package/dist/esm/bal-date-calendar_2.entry.js +6 -6
- package/dist/esm/bal-date.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +8 -8
- package/dist/esm/bal-divider.entry.js +4 -4
- package/dist/esm/bal-dropdown.entry.js +656 -0
- package/dist/esm/bal-field_5.entry.js +12 -2
- package/dist/esm/bal-file-upload.entry.js +2 -2
- package/dist/esm/bal-footer.entry.js +5 -5
- package/dist/esm/bal-hint_3.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-input-slider.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +2 -2
- package/dist/esm/bal-label.entry.js +6 -6
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +24 -24
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-notices.entry.js +3 -3
- package/dist/esm/bal-number-input.entry.js +33 -15
- package/dist/esm/bal-option_2.entry.js +536 -0
- package/dist/esm/bal-pagination.entry.js +4 -4
- package/dist/esm/bal-popover_2.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +3 -3
- package/dist/esm/bal-radio-button.entry.js +5 -5
- package/dist/esm/bal-radio_2.entry.js +3 -3
- package/dist/esm/bal-select_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-spinner.entry.js +50 -5
- package/dist/esm/bal-stack.entry.js +4 -4
- package/dist/esm/bal-steps.entry.js +5 -5
- package/dist/esm/bal-tab-item_2.entry.js +6 -6
- package/dist/esm/bal-tag_2.entry.js +1 -1
- package/dist/esm/bal-time-input.entry.js +1 -1
- package/dist/esm/baloise-design-system.js +4 -4
- package/dist/esm/{breakpoints.decorator-52979d29.js → breakpoints.decorator-021fbaf0.js} +1 -1
- package/dist/esm/{breakpoints.subject-64327a3b.js → breakpoints.subject-ef464f89.js} +1 -1
- package/dist/esm/{config.default-79f94bf7.js → config.default-7efdc82d.js} +1 -0
- package/dist/esm/{date-db6afc26.js → date-38a0b208.js} +6 -2
- package/dist/esm/{index.esm-ec4cba26.js → index.esm-83b1f9c4.js} +1 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/{initialize-66615dde.js → initialize-e216cfe4.js} +9 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/option-37cb0282.js +46 -0
- package/dist/esm/{tokens.esm-12daa3af.js → tokens.esm-aab9bd61.js} +1 -1
- package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
- package/dist/esm-es5/aria-d5877698.js +1 -0
- package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
- package/dist/esm-es5/bal-card_6.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-close.entry.js +1 -1
- package/dist/esm-es5/bal-content.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar-cell.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-divider.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -0
- 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_3.entry.js +1 -1
- package/dist/esm-es5/bal-icon.entry.js +1 -1
- package/dist/esm-es5/bal-input-slider.entry.js +1 -1
- package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
- package/dist/esm-es5/bal-label.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-notices.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 -0
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popover_2.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio-button.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-select_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-spinner.entry.js +1 -1
- package/dist/esm-es5/bal-stack.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/bal-tag_2.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-021fbaf0.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-64327a3b.js → breakpoints.subject-ef464f89.js} +1 -1
- package/dist/esm-es5/{config.default-79f94bf7.js → config.default-7efdc82d.js} +1 -1
- package/dist/esm-es5/{date-db6afc26.js → date-38a0b208.js} +1 -1
- package/dist/esm-es5/{index.esm-ec4cba26.js → index.esm-83b1f9c4.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{initialize-66615dde.js → initialize-e216cfe4.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/option-37cb0282.js +1 -0
- package/dist/html.html-data.json +357 -0
- package/dist/types/components/bal-accordion/bal-accordion-details/bal-accordion-details.d.ts +1 -1
- package/dist/types/components/bal-card/bal-card.d.ts +1 -1
- package/dist/types/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.d.ts +1 -1
- package/dist/types/components/bal-content/bal-content.d.ts +1 -1
- package/dist/types/components/bal-date/bal-date-calendar-cell/bal-date-calendar-cell.d.ts +1 -1
- package/dist/types/components/bal-divider/bal-divider.d.ts +1 -1
- package/dist/types/components/bal-dropdown/bal-dropdown.d.ts +187 -0
- package/dist/types/components/bal-dropdown/bal-dropdown.interfaces.d.ts +14 -0
- package/dist/types/components/bal-field/bal-field.d.ts +1 -0
- package/dist/types/components/bal-label/bal-label.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link/bal-nav-link.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-grid/bal-nav-link-grid.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-grid-col/bal-nav-link-grid-col.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav-link-group/bal-nav-link-group.d.ts +1 -1
- package/dist/types/components/bal-nav/bal-nav.d.ts +1 -1
- package/dist/types/components/bal-notices/bal-notices.d.ts +1 -1
- package/dist/types/components/bal-number-input/bal-number-input.d.ts +1 -0
- package/dist/types/components/bal-number-input/bal-number-input.utils.d.ts +3 -1
- package/dist/types/components/bal-option/bal-option.d.ts +91 -0
- package/dist/types/components/bal-option/bal-option.interfaces.d.ts +19 -0
- package/dist/types/components/bal-option-list/bal-option-list.d.ts +168 -0
- package/dist/types/components/bal-option-list/bal-option-list.interfaces.d.ts +5 -0
- package/dist/types/components/bal-radio/bal-radio-button/bal-radio-button.d.ts +1 -1
- package/dist/types/components/bal-select/bal-select.d.ts +1 -1
- package/dist/types/components/bal-spinner/bal-spinner.d.ts +14 -2
- package/dist/types/components/bal-spinner/bal-spinner.interfaces.d.ts +6 -0
- package/dist/types/components/bal-stack/bal-stack.d.ts +1 -1
- package/dist/types/components.d.ts +451 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces.d.ts +4 -0
- package/dist/types/utils/aria.d.ts +1 -0
- package/dist/types/utils/config/config.d.ts +2 -0
- package/dist/types/utils/config/config.types.d.ts +2 -0
- package/dist/types/utils/date/date.d.ts +1 -0
- package/dist/types/utils/dropdown/auto-fill.d.ts +8 -0
- package/dist/types/utils/dropdown/component.d.ts +34 -0
- package/dist/types/utils/dropdown/dropdown.i18n.d.ts +8 -0
- package/dist/types/utils/dropdown/events.d.ts +13 -0
- package/dist/types/utils/dropdown/filters.d.ts +2 -0
- package/dist/types/utils/dropdown/focus.d.ts +13 -0
- package/dist/types/utils/dropdown/form-submit.d.ts +22 -0
- package/dist/types/utils/dropdown/icon.d.ts +13 -0
- package/dist/types/utils/dropdown/index.d.ts +13 -0
- package/dist/types/utils/dropdown/input.d.ts +27 -0
- package/dist/types/utils/dropdown/option-list.d.ts +17 -0
- package/dist/types/utils/dropdown/option.d.ts +25 -0
- package/dist/types/utils/dropdown/popup.d.ts +9 -0
- package/dist/types/utils/dropdown/value.d.ts +28 -0
- package/package.json +8 -7
- package/dist/baloise-design-system/p-05b55c958d.system.entry.js +0 -1
- package/dist/baloise-design-system/p-0d30cbfab8.entry.js +0 -1
- package/dist/baloise-design-system/p-15ca43f2.system.js +0 -1
- package/dist/baloise-design-system/p-1e0e5892a3.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2c3370fdbe.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2d10e25c6b.entry.js +0 -1
- package/dist/baloise-design-system/p-2dda46c5f8.entry.js +0 -1
- package/dist/baloise-design-system/p-34a9557f.system.js +0 -1
- package/dist/baloise-design-system/p-34d1472a.system.js +0 -1
- package/dist/baloise-design-system/p-3990d97696.entry.js +0 -1
- package/dist/baloise-design-system/p-48a2de5d.js +0 -1
- package/dist/baloise-design-system/p-4e218ac923.system.entry.js +0 -1
- package/dist/baloise-design-system/p-4f4df156.js +0 -1
- package/dist/baloise-design-system/p-5eea406ac6.system.entry.js +0 -1
- package/dist/baloise-design-system/p-6496dcd5.js +0 -1
- package/dist/baloise-design-system/p-67f25817a6.entry.js +0 -1
- package/dist/baloise-design-system/p-6dd26958d2.system.entry.js +0 -1
- package/dist/baloise-design-system/p-7e180ac10f.system.entry.js +0 -1
- package/dist/baloise-design-system/p-8ea27b553e.system.entry.js +0 -1
- package/dist/baloise-design-system/p-90c4c1a5c0.system.entry.js +0 -1
- package/dist/baloise-design-system/p-99dcda2fcd.entry.js +0 -1
- package/dist/baloise-design-system/p-a9d8b71709.entry.js +0 -1
- package/dist/baloise-design-system/p-af8604cef2.entry.js +0 -1
- package/dist/baloise-design-system/p-b1c7ddc442.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b1e3fc0bc8.entry.js +0 -1
- package/dist/baloise-design-system/p-bb291d6067.system.entry.js +0 -1
- package/dist/baloise-design-system/p-c0a3d422.system.js +0 -1
- package/dist/baloise-design-system/p-c34504aa32.entry.js +0 -1
- package/dist/baloise-design-system/p-c6900b09e7.entry.js +0 -1
- package/dist/baloise-design-system/p-cf6ccb4dd1.entry.js +0 -1
- package/dist/baloise-design-system/p-d4fd428711.entry.js +0 -1
- package/dist/baloise-design-system/p-d6fc0dd434.entry.js +0 -1
- package/dist/baloise-design-system/p-db3e6b861f.entry.js +0 -1
- package/dist/baloise-design-system/p-eba35b2adf.entry.js +0 -1
- package/dist/baloise-design-system/p-ec180f9bbf.entry.js +0 -1
- package/dist/baloise-design-system/p-f15b12d84f.entry.js +0 -1
- package/dist/esm-es5/app-globals-89691d80.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-52979d29.js +0 -1
- /package/dist/baloise-design-system/{p-61eda028.system.js → p-03c136e2.system.js} +0 -0
- /package/dist/baloise-design-system/{p-979368af.js → p-7b9c33ba.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-12daa3af.js → tokens.esm-aab9bd61.js} +0 -0
|
@@ -21,6 +21,7 @@ export class Field {
|
|
|
21
21
|
'bal-input-stepper',
|
|
22
22
|
'bal-input-slider',
|
|
23
23
|
'bal-file-upload',
|
|
24
|
+
'bal-dropdown',
|
|
24
25
|
];
|
|
25
26
|
this.formElements = [...this.formControlElement, 'bal-field-label', 'bal-field-message'];
|
|
26
27
|
this.isDirectChild = (el) => {
|
|
@@ -39,18 +40,26 @@ export class Field {
|
|
|
39
40
|
}
|
|
40
41
|
return this.isDirectChild(parent);
|
|
41
42
|
};
|
|
43
|
+
this.isVisible = (el) => {
|
|
44
|
+
if (!el) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return el.ariaHidden !== 'true';
|
|
48
|
+
};
|
|
42
49
|
this.findDirectChild = (selectors) => {
|
|
43
50
|
const element = this.el.querySelector(selectors);
|
|
44
51
|
const isDirectChild = this.isDirectChild(element);
|
|
45
52
|
if (isDirectChild) {
|
|
46
|
-
|
|
53
|
+
if (this.isVisible(element)) {
|
|
54
|
+
return element;
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
return undefined;
|
|
49
58
|
};
|
|
50
59
|
this.findDirectChildren = (selectors) => {
|
|
51
60
|
return selectors
|
|
52
61
|
.map(selector => {
|
|
53
|
-
return Array.from(this.el.querySelectorAll(selector)).filter(this.isDirectChild);
|
|
62
|
+
return Array.from(this.el.querySelectorAll(selector)).filter(this.isDirectChild).filter(this.isVisible);
|
|
54
63
|
})
|
|
55
64
|
.flat();
|
|
56
65
|
};
|
|
@@ -99,6 +108,7 @@ export class Field {
|
|
|
99
108
|
'bal-field-control bal-input',
|
|
100
109
|
'bal-field-control bal-select',
|
|
101
110
|
'bal-field-control bal-input-date',
|
|
111
|
+
'bal-field-control bal-dropdown',
|
|
102
112
|
'bal-field-control bal-checkbox',
|
|
103
113
|
'bal-field-control bal-radio',
|
|
104
114
|
'bal-field-control bal-checkbox-group',
|
|
@@ -3,7 +3,7 @@ import fileSize from "filesize.js";
|
|
|
3
3
|
import { BEM } from "../../../utils/bem";
|
|
4
4
|
const bemListEl = BEM.block('file-upload').element('list');
|
|
5
5
|
export const FileListComponent = ({ files, disabled, subTitle, onRemoveFile, }) => {
|
|
6
|
-
return (h("bal-card", { class: Object.assign({}, bemListEl.class()), flat: true }, h("bal-list", { disabled: disabled, border: true, size: "large" }, files.map((file, index) => (h("bal-list-item", { disabled: disabled }, h("bal-list-item-icon", null, h("bal-icon", { name: "document" })), h("bal-list-item-content", null, h("bal-list-item-title", null, file.name), h("bal-list-item-subtitle", null, subTitle ? subTitle(file) : fileSize(file.size))), h("bal-list-item-icon", { right: true, class: {
|
|
6
|
+
return (h("bal-card", { class: Object.assign({}, bemListEl.class()), flat: true }, h("bal-list", { disabled: disabled, border: true, size: "large" }, files.map((file, index) => (h("bal-list-item", { key: file.name, disabled: disabled }, h("bal-list-item-icon", null, h("bal-icon", { name: "document" })), h("bal-list-item-content", null, h("bal-list-item-title", null, file.name), h("bal-list-item-subtitle", null, subTitle ? subTitle(file) : fileSize(file.size))), h("bal-list-item-icon", { right: true, class: {
|
|
7
7
|
'file-remove': true,
|
|
8
8
|
'is-clickable': !disabled,
|
|
9
9
|
}, onClick: event => onRemoveFile(event, index) }, h("bal-icon", { name: "trash", color: disabled ? 'grey' : 'danger' }))))))));
|
|
@@ -87,12 +87,12 @@ export class Footer {
|
|
|
87
87
|
const elSocialMediaLinks = elLinksContainer.element('social-media-links');
|
|
88
88
|
return (h(Host, { class: Object.assign({}, block.class()) }, h("footer", { class: Object.assign({}, elInner.class()) }, h("div", { class: Object.assign({}, elInnerWrapper.class()) }, h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elHeaderContainer.class()) }, h("div", { class: Object.assign({}, elLogo.class()) }, h("bal-logo", { color: "white" })), h("div", { class: Object.assign({}, elLanguage.class()), style: {
|
|
89
89
|
display: this.hideLanguageSelection || this.allowedLanguages.length <= 1 ? 'none' : 'flex',
|
|
90
|
-
} }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class: Object.assign({}, elIcon.class()), name: "web", color: "white" }), h("bal-select", { value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-select-option", { label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("slot", null), h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { class: Object.assign({}, elSocialMediaLinks.class()), style: {
|
|
90
|
+
} }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class: Object.assign({}, elIcon.class()), name: "web", color: "white" }), h("bal-select", { value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-select-option", { key: language, label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("slot", null), h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { class: Object.assign({}, elSocialMediaLinks.class()), style: {
|
|
91
91
|
display: !this.showSocialMedia ? 'none' : 'flex',
|
|
92
|
-
} }, this.socialMediaLinks.map(link => (h("a", { href: link.link, target: "_blank", class: {
|
|
92
|
+
} }, this.socialMediaLinks.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
|
|
93
93
|
'link': true,
|
|
94
94
|
'is-inverted': true,
|
|
95
|
-
} }, h("bal-icon", { name: link.label.toLowerCase() }))))), h("div", { class: Object.assign({}, elLegalLinks.class()), style: { display: this.hideLinks ? 'none' : 'flex' } }, this.links.map(link => (h("a", { href: link.link, target: "_blank", class: {
|
|
95
|
+
} }, h("bal-icon", { name: link.label.toLowerCase() }))))), h("div", { class: Object.assign({}, elLegalLinks.class()), style: { display: this.hideLinks ? 'none' : 'flex' } }, this.links.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
|
|
96
96
|
'link': true,
|
|
97
97
|
'is-light': true,
|
|
98
98
|
} }, link.label)))))))));
|
|
@@ -149,7 +149,7 @@ export class InputSlider {
|
|
|
149
149
|
width: this.cssWidth(),
|
|
150
150
|
} }, h("div", { class: Object.assign({}, backgroundUpperInnerEl.class()) })), h("div", { class: Object.assign({}, backgroundLowerEl.class()), style: {
|
|
151
151
|
width: this.cssWidth(true),
|
|
152
|
-
} }, h("div", { class: Object.assign({}, backgroundLowerInnerEl.class()) }))), h("div", { class: Object.assign({}, inputEl.class()) }, h("div", { class: Object.assign(Object.assign({}, inputValueEl.class()), inputValueLeftEl.class()) }), h("input", { type: "range", class: Object.assign(Object.assign({}, inputNativeEl.class()), inputNativeEl.modifier('disabled').class(this.disabled || this.readonly)), ref: inputEl => (this.nativeInput = inputEl), id: this.ariaForm.controlId || this.inputId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, "aria-disabled": this.disabled ? 'true' : null, "aria-invalid": this.invalid === true ? 'true' : 'false', disabled: this.disabled, readonly: this.readonly, name: this.name, required: this.required, tabIndex: this.balTabindex, step: this.step, min: this.min, max: this.max, value: this.value !== '' && this.value !== undefined ? this.value : 0, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyPress: e => this.balKeyPress.emit(e), "data-testid": "bal-input-slider" }), h("div", { class: Object.assign(Object.assign({}, inputValueEl.class()), inputValueRightEl.class()) })), h("div", { class: Object.assign({}, stepsEl.class()), style: { display: this.hasTicks ? 'flex' : 'none' } }, this.getNumberOfSteps().map(step => (h("div", { class: Object.assign(Object.assign({}, stepsItemEl.class()), stepsItemEl.modifier('disabled').class(this.disabled || this.readonly)), "data-step-id": step }))))));
|
|
152
|
+
} }, h("div", { class: Object.assign({}, backgroundLowerInnerEl.class()) }))), h("div", { class: Object.assign({}, inputEl.class()) }, h("div", { class: Object.assign(Object.assign({}, inputValueEl.class()), inputValueLeftEl.class()) }), h("input", { type: "range", class: Object.assign(Object.assign({}, inputNativeEl.class()), inputNativeEl.modifier('disabled').class(this.disabled || this.readonly)), ref: inputEl => (this.nativeInput = inputEl), id: this.ariaForm.controlId || this.inputId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, "aria-disabled": this.disabled ? 'true' : null, "aria-invalid": this.invalid === true ? 'true' : 'false', disabled: this.disabled, readonly: this.readonly, name: this.name, required: this.required, tabIndex: this.balTabindex, step: this.step, min: this.min, max: this.max, value: this.value !== '' && this.value !== undefined ? this.value : 0, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyPress: e => this.balKeyPress.emit(e), "data-testid": "bal-input-slider" }), h("div", { class: Object.assign(Object.assign({}, inputValueEl.class()), inputValueRightEl.class()) })), h("div", { class: Object.assign({}, stepsEl.class()), style: { display: this.hasTicks ? 'flex' : 'none' } }, this.getNumberOfSteps().map(step => (h("div", { key: step, class: Object.assign(Object.assign({}, stepsItemEl.class()), stepsItemEl.modifier('disabled').class(this.disabled || this.readonly)), "data-step-id": step }))))));
|
|
153
153
|
}
|
|
154
154
|
static get is() { return "bal-input-slider"; }
|
|
155
155
|
static get originalStyleUrls() {
|
|
@@ -5,7 +5,7 @@ import { defaultConfig, ListenToConfig, } from "../../utils/config";
|
|
|
5
5
|
import { Logger } from "../../utils/log";
|
|
6
6
|
import { i18nBalLabel } from "./bal-label.i18n";
|
|
7
7
|
import { defaultBalAriaForm } from "../../utils/form";
|
|
8
|
-
export class
|
|
8
|
+
export class Label {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.inputId = `bal-lbl-${labelIds++}`;
|
|
11
11
|
this.language = defaultConfig.language;
|
|
@@ -391,11 +391,11 @@ __decorate([
|
|
|
391
391
|
__metadata("design:type", Function),
|
|
392
392
|
__metadata("design:paramtypes", [Function]),
|
|
393
393
|
__metadata("design:returntype", void 0)
|
|
394
|
-
],
|
|
394
|
+
], Label.prototype, "createLogger", null);
|
|
395
395
|
__decorate([
|
|
396
396
|
ListenToConfig(),
|
|
397
397
|
__metadata("design:type", Function),
|
|
398
398
|
__metadata("design:paramtypes", [Object]),
|
|
399
399
|
__metadata("design:returntype", Promise)
|
|
400
|
-
],
|
|
400
|
+
], Label.prototype, "configChanged", null);
|
|
401
401
|
let labelIds = 0;
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { Logger } from "../../../utils/log";
|
|
4
4
|
import { BEM } from "../../../utils/bem";
|
|
5
|
-
export class
|
|
5
|
+
export class NavLink {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.variant = '';
|
|
8
8
|
this.selected = false;
|
|
@@ -152,4 +152,4 @@ __decorate([
|
|
|
152
152
|
__metadata("design:type", Function),
|
|
153
153
|
__metadata("design:paramtypes", [Function]),
|
|
154
154
|
__metadata("design:returntype", void 0)
|
|
155
|
-
],
|
|
155
|
+
], NavLink.prototype, "createLogger", null);
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { Logger } from "../../../utils/log";
|
|
4
4
|
import { BEM } from "../../../utils/bem";
|
|
5
|
-
export class
|
|
5
|
+
export class NavLinkGrid {
|
|
6
6
|
createLogger(log) {
|
|
7
7
|
this.log = log;
|
|
8
8
|
}
|
|
@@ -31,4 +31,4 @@ __decorate([
|
|
|
31
31
|
__metadata("design:type", Function),
|
|
32
32
|
__metadata("design:paramtypes", [Function]),
|
|
33
33
|
__metadata("design:returntype", void 0)
|
|
34
|
-
],
|
|
34
|
+
], NavLinkGrid.prototype, "createLogger", null);
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { Logger } from "../../../utils/log";
|
|
4
4
|
import { BEM } from "../../../utils/bem";
|
|
5
|
-
export class
|
|
5
|
+
export class NavLinkGridCol {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.staticCol = false;
|
|
8
8
|
}
|
|
@@ -62,4 +62,4 @@ __decorate([
|
|
|
62
62
|
__metadata("design:type", Function),
|
|
63
63
|
__metadata("design:paramtypes", [Function]),
|
|
64
64
|
__metadata("design:returntype", void 0)
|
|
65
|
-
],
|
|
65
|
+
], NavLinkGridCol.prototype, "createLogger", null);
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { Logger } from "../../../utils/log";
|
|
4
4
|
import { BEM } from "../../../utils/bem";
|
|
5
|
-
export class
|
|
5
|
+
export class NavLinkGroup {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.color = '';
|
|
8
8
|
}
|
|
@@ -62,4 +62,4 @@ __decorate([
|
|
|
62
62
|
__metadata("design:type", Function),
|
|
63
63
|
__metadata("design:paramtypes", [Function]),
|
|
64
64
|
__metadata("design:returntype", void 0)
|
|
65
|
-
],
|
|
65
|
+
], NavLinkGroup.prototype, "createLogger", null);
|
|
@@ -11,7 +11,7 @@ import { ListenToConfig, defaultConfig, } from "../../utils/config";
|
|
|
11
11
|
import { i18nNavBars } from "./bal-nav.i18n";
|
|
12
12
|
import { balBrowser } from "../../utils/browser";
|
|
13
13
|
import { waitAfterIdleCallback, waitForComponent } from "../../utils/helpers";
|
|
14
|
-
export class
|
|
14
|
+
export class Nav {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.navId = `bal-nav-${NavIds++}`;
|
|
17
17
|
this.bodyScrollHandler = new BalScrollHandler();
|
|
@@ -299,7 +299,7 @@ export class NavMetaBar {
|
|
|
299
299
|
renderTouchMenuAccordions(metaItem) {
|
|
300
300
|
return (h("bal-list", { "accordion-one-level": true, class: "pt-xxx-small pb-normal" }, metaItem.mainLinkItems.map(menuItem => {
|
|
301
301
|
var _a, _b, _c;
|
|
302
|
-
return menuItem.isLink ? (h("bal-list-item", { "sub-accordion-item": true, href: menuItem.href, target: menuItem.target }, h("bal-list-item-content", null, h("bal-list-item-title", { "visual-level": "medium", level: "span" }, menuItem.label)))) : (h("bal-list-item", { accordion: true, "sub-accordion-item": true }, h("bal-list-item-accordion-head", { icon: "nav-go-down", "accordion-open": menuItem.active }, h("bal-list-item-content", null, h("bal-list-item-title", { "visual-level": "medium", level: "span" }, menuItem.label))), h("bal-list-item-accordion-body", null, h("div", { style: { width: '100%' } }, h("bal-nav-link", { role: "listitem", variant: "overview", href: (_a = menuItem.overviewLink) === null || _a === void 0 ? void 0 : _a.href, target: (_b = menuItem.overviewLink) === null || _b === void 0 ? void 0 : _b.target, onClick: () => this.linkItemClickListener(menuItem.overviewLink) }, (_c = menuItem.overviewLink) === null || _c === void 0 ? void 0 : _c.label), h("div", { class: "pt-normal" }, this.renderGridLinks(menuItem))))));
|
|
302
|
+
return menuItem.isLink ? (h("bal-list-item", { key: menuItem.label, "sub-accordion-item": true, href: menuItem.href, target: menuItem.target }, h("bal-list-item-content", null, h("bal-list-item-title", { "visual-level": "medium", level: "span" }, menuItem.label)))) : (h("bal-list-item", { key: menuItem.label, accordion: true, "sub-accordion-item": true }, h("bal-list-item-accordion-head", { icon: "nav-go-down", "accordion-open": menuItem.active }, h("bal-list-item-content", null, h("bal-list-item-title", { "visual-level": "medium", level: "span" }, menuItem.label))), h("bal-list-item-accordion-body", null, h("div", { style: { width: '100%' } }, h("bal-nav-link", { role: "listitem", variant: "overview", href: (_a = menuItem.overviewLink) === null || _a === void 0 ? void 0 : _a.href, target: (_b = menuItem.overviewLink) === null || _b === void 0 ? void 0 : _b.target, onClick: () => this.linkItemClickListener(menuItem.overviewLink) }, (_c = menuItem.overviewLink) === null || _c === void 0 ? void 0 : _c.label), h("div", { class: "pt-normal" }, this.renderGridLinks(menuItem))))));
|
|
303
303
|
})));
|
|
304
304
|
}
|
|
305
305
|
renderLogo() {
|
|
@@ -492,23 +492,23 @@ __decorate([
|
|
|
492
492
|
__metadata("design:type", Function),
|
|
493
493
|
__metadata("design:paramtypes", [Function]),
|
|
494
494
|
__metadata("design:returntype", void 0)
|
|
495
|
-
],
|
|
495
|
+
], Nav.prototype, "createLogger", null);
|
|
496
496
|
__decorate([
|
|
497
497
|
ListenToMutation({ tags: ['bal-popup'], waitAfterFramePrint: true }),
|
|
498
498
|
__metadata("design:type", Function),
|
|
499
499
|
__metadata("design:paramtypes", []),
|
|
500
500
|
__metadata("design:returntype", void 0)
|
|
501
|
-
],
|
|
501
|
+
], Nav.prototype, "mutationListener", null);
|
|
502
502
|
__decorate([
|
|
503
503
|
ListenToBreakpoints(),
|
|
504
504
|
__metadata("design:type", Function),
|
|
505
505
|
__metadata("design:paramtypes", [Object]),
|
|
506
506
|
__metadata("design:returntype", void 0)
|
|
507
|
-
],
|
|
507
|
+
], Nav.prototype, "breakpointListener", null);
|
|
508
508
|
__decorate([
|
|
509
509
|
ListenToConfig(),
|
|
510
510
|
__metadata("design:type", Function),
|
|
511
511
|
__metadata("design:paramtypes", [Object]),
|
|
512
512
|
__metadata("design:returntype", Promise)
|
|
513
|
-
],
|
|
513
|
+
], Nav.prototype, "configChanged", null);
|
|
514
514
|
let NavIds = 0;
|
|
@@ -8,8 +8,8 @@ export const SectionList = ({ items }) => {
|
|
|
8
8
|
}
|
|
9
9
|
return (h("ul", { class: Object.assign({}, block.element('mobile-section-list').class()) }, items === null || items === void 0 ? void 0 : items.map(itemGroup => {
|
|
10
10
|
var _a;
|
|
11
|
-
return (h("li",
|
|
12
|
-
return (h("li",
|
|
11
|
+
return (h("li", { key: itemGroup.id }, h("a", { class: Object.assign({}, block.element('mobile-section-item').class()), href: itemGroup.href, target: itemGroup.target }, itemGroup.label), itemGroup.linkItems && itemGroup.linkItems.length > 0 ? (h("ul", { class: Object.assign({}, block.element('mobile-links-list').class()) }, (_a = itemGroup.linkItems) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
12
|
+
return (h("li", { key: item.id }, h("a", { class: Object.assign({}, block.element('mobile-links').class()), href: item.href, target: item.target }, item.label)));
|
|
13
13
|
}))) : ('')));
|
|
14
14
|
})));
|
|
15
15
|
};
|
|
@@ -8,8 +8,8 @@ export const ServiceList = ({ items }) => {
|
|
|
8
8
|
}
|
|
9
9
|
return (h("ul", { class: Object.assign({}, block.element('mobile-section-list').class()) }, items === null || items === void 0 ? void 0 : items.map(serviceGroup => {
|
|
10
10
|
var _a;
|
|
11
|
-
return (h("li",
|
|
12
|
-
return (h("li",
|
|
11
|
+
return (h("li", { key: serviceGroup.id }, h("a", { class: Object.assign({}, block.element('mobile-section-item').class()), href: serviceGroup.href, target: serviceGroup.target }, serviceGroup.label), h("ul", { class: Object.assign({}, block.element('mobile-links-list').class()) }, (_a = serviceGroup.linkItems) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
12
|
+
return (h("li", { key: item.id }, h("a", { class: Object.assign({}, block.element('mobile-links').class()), href: item.href, target: item.target }, item.label)));
|
|
13
13
|
}))));
|
|
14
14
|
})));
|
|
15
15
|
};
|
|
@@ -46,6 +46,8 @@ export class NumberInput {
|
|
|
46
46
|
// restore the input with the last user value without the formatting
|
|
47
47
|
if (this.nativeInput) {
|
|
48
48
|
this.nativeInputValue = mapDecimalSeparator(this.lastValue || '');
|
|
49
|
+
clearTimeout(this.selectTimeout);
|
|
50
|
+
this.selectTimeout = setTimeout(() => this.nativeInput.select());
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
53
|
this.onBlur = (ev) => {
|
|
@@ -55,6 +57,7 @@ export class NumberInput {
|
|
|
55
57
|
if (this.nativeInput) {
|
|
56
58
|
this.lastValue = toFixedNumber(this.lastValueGetter, this.decimal);
|
|
57
59
|
this.nativeInputValue = toUserFormattedNumber(this.lastValueGetter, this.decimal, this.suffix);
|
|
60
|
+
this.nativeInput.value = this.nativeInputValue;
|
|
58
61
|
}
|
|
59
62
|
this.inputValue = toNumber(this.lastValueGetter, this.decimal);
|
|
60
63
|
inputHandleChange(this);
|
|
@@ -66,6 +69,8 @@ export class NumberInput {
|
|
|
66
69
|
if (input &&
|
|
67
70
|
!validateKeyDown({
|
|
68
71
|
key: ev.key,
|
|
72
|
+
ctrlKey: ev.ctrlKey,
|
|
73
|
+
metaKey: ev.metaKey,
|
|
69
74
|
decimal: this.decimal,
|
|
70
75
|
newValue,
|
|
71
76
|
oldValue,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import isNil from "lodash.isnil";
|
|
2
2
|
import { ACTION_KEYS, NUMBER_KEYS } from "../../utils/constants/keys.constant";
|
|
3
|
-
import { formatLocaleNumber, getDecimalSeparator, getNegativeSymbol } from "../../utils/number";
|
|
3
|
+
import { formatLocaleNumber, getDecimalSeparator, getNegativeSymbol, getThousandSeparator } from "../../utils/number";
|
|
4
4
|
import isNaN from "lodash.isnan";
|
|
5
5
|
export function isNumber(value) {
|
|
6
6
|
const num = parseFloat(value);
|
|
@@ -10,25 +10,33 @@ export function isNotNumber(value) {
|
|
|
10
10
|
return !isNumber(value) && value !== '' && value !== getNegativeSymbol() && value !== getDecimalSeparator();
|
|
11
11
|
}
|
|
12
12
|
export function toNumber(value, decimalPoints = 0) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
let val = value;
|
|
14
|
+
if (val === '' ||
|
|
15
|
+
val === undefined ||
|
|
16
|
+
val === null ||
|
|
17
|
+
isNaN(val) ||
|
|
18
|
+
val === getNegativeSymbol() ||
|
|
19
|
+
val === getDecimalSeparator() ||
|
|
20
|
+
!isNumber(val)) {
|
|
20
21
|
return undefined;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
if (typeof val === 'string') {
|
|
24
|
+
val = val.split(getThousandSeparator()).join('').split('`').join('').split("'").join('');
|
|
25
|
+
}
|
|
26
|
+
return decimalPoints === 0 ? parseInt(val, 10) : parseFloat(val);
|
|
23
27
|
}
|
|
24
28
|
export function toFixedNumber(value, decimalPoints = 0) {
|
|
25
|
-
|
|
29
|
+
let val = value;
|
|
30
|
+
if (isNil(val)) {
|
|
26
31
|
return '';
|
|
27
32
|
}
|
|
28
|
-
if (
|
|
29
|
-
|
|
33
|
+
if (typeof val === 'string') {
|
|
34
|
+
val = val.split(getThousandSeparator()).join('').split('`').join('').split("'").join('');
|
|
30
35
|
}
|
|
31
|
-
|
|
36
|
+
if (val.charAt(0) === getDecimalSeparator()) {
|
|
37
|
+
val = `0${val}`;
|
|
38
|
+
}
|
|
39
|
+
const num = decimalPoints === 0 ? parseInt(val, 10) : parseFloat(val.replace(getDecimalSeparator(), '.'));
|
|
32
40
|
return isNaN(num) ? '' : num.toFixed(decimalPoints);
|
|
33
41
|
}
|
|
34
42
|
export function mapDecimalSeparator(value) {
|
|
@@ -46,7 +54,12 @@ export function toUserFormattedNumber(value, decimalPoints = 0, suffix = '') {
|
|
|
46
54
|
return isNaN(num) ? '' : formatLocaleNumber(num, decimalPoints) + formattedSuffix;
|
|
47
55
|
}
|
|
48
56
|
export const countDecimalSeparators = (value) => (value.split(getDecimalSeparator()) || []).length - 1 || 0;
|
|
49
|
-
export function validateKeyDown({ key, selectionStart, selectionEnd, newValue, decimal, }) {
|
|
57
|
+
export function validateKeyDown({ key, ctrlKey, metaKey, selectionStart, selectionEnd, newValue, decimal, }) {
|
|
58
|
+
//
|
|
59
|
+
// allow select all, copy and paste
|
|
60
|
+
if (['a', 'c', 'v'].includes(key) && (ctrlKey || metaKey)) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
50
63
|
//
|
|
51
64
|
// only allow negative symbols at the start of the input
|
|
52
65
|
if (key === getNegativeSymbol() && selectionStart && selectionStart > 0 && selectionEnd && selectionEnd > 0) {
|
|
@@ -13,6 +13,8 @@ describe('bal-number-input', () => {
|
|
|
13
13
|
expect(isNumber('0.1')).toBeTruthy();
|
|
14
14
|
expect(isNumber('42')).toBeTruthy();
|
|
15
15
|
expect(isNumber('-42')).toBeTruthy();
|
|
16
|
+
expect(isNumber("40'000")).toBeTruthy();
|
|
17
|
+
expect(isNumber('40`000')).toBeTruthy();
|
|
16
18
|
});
|
|
17
19
|
});
|
|
18
20
|
describe('isNotNumber', () => {
|
|
@@ -28,6 +30,8 @@ describe('bal-number-input', () => {
|
|
|
28
30
|
expect(isNotNumber('0.1')).toBeFalsy();
|
|
29
31
|
expect(isNotNumber('42')).toBeFalsy();
|
|
30
32
|
expect(isNotNumber('-42')).toBeFalsy();
|
|
33
|
+
expect(isNumber("40'000")).toBeTruthy();
|
|
34
|
+
expect(isNumber('40`000')).toBeTruthy();
|
|
31
35
|
});
|
|
32
36
|
});
|
|
33
37
|
describe('countDecimalSeparators', () => {
|
|
@@ -74,6 +78,14 @@ describe('bal-number-input', () => {
|
|
|
74
78
|
const result = toNumber('.');
|
|
75
79
|
expect(result).toBeUndefined();
|
|
76
80
|
});
|
|
81
|
+
it('should return number and ignore separator', () => {
|
|
82
|
+
const result = toNumber("42'000");
|
|
83
|
+
expect(result).toBe(42000);
|
|
84
|
+
});
|
|
85
|
+
it('should return number and ignore autofill separator', () => {
|
|
86
|
+
const result = toNumber('42`000');
|
|
87
|
+
expect(result).toBe(42000);
|
|
88
|
+
});
|
|
77
89
|
});
|
|
78
90
|
describe('toFixedNumber', () => {
|
|
79
91
|
it('should convert positive integer correctly', () => {
|
|
@@ -151,6 +163,8 @@ describe('bal-number-input', () => {
|
|
|
151
163
|
test('should accept a basic number like 42', () => {
|
|
152
164
|
expect(validateKeyDown({
|
|
153
165
|
key: '4',
|
|
166
|
+
ctrlKey: false,
|
|
167
|
+
metaKey: false,
|
|
154
168
|
newValue: '4',
|
|
155
169
|
oldValue: '',
|
|
156
170
|
selectionStart: 0,
|
|
@@ -159,6 +173,8 @@ describe('bal-number-input', () => {
|
|
|
159
173
|
})).toBeTruthy();
|
|
160
174
|
expect(validateKeyDown({
|
|
161
175
|
key: '2',
|
|
176
|
+
ctrlKey: false,
|
|
177
|
+
metaKey: false,
|
|
162
178
|
newValue: '42',
|
|
163
179
|
oldValue: '4',
|
|
164
180
|
selectionStart: 1,
|
|
@@ -170,6 +186,8 @@ describe('bal-number-input', () => {
|
|
|
170
186
|
test('should accept a negative number like 42', () => {
|
|
171
187
|
expect(validateKeyDown({
|
|
172
188
|
key: '-',
|
|
189
|
+
ctrlKey: false,
|
|
190
|
+
metaKey: false,
|
|
173
191
|
newValue: '-',
|
|
174
192
|
oldValue: '',
|
|
175
193
|
selectionStart: 0,
|
|
@@ -178,6 +196,8 @@ describe('bal-number-input', () => {
|
|
|
178
196
|
})).toBeTruthy();
|
|
179
197
|
expect(validateKeyDown({
|
|
180
198
|
key: '2',
|
|
199
|
+
ctrlKey: false,
|
|
200
|
+
metaKey: false,
|
|
181
201
|
newValue: '-2',
|
|
182
202
|
oldValue: '-',
|
|
183
203
|
selectionStart: 1,
|
|
@@ -186,6 +206,8 @@ describe('bal-number-input', () => {
|
|
|
186
206
|
})).toBeTruthy();
|
|
187
207
|
expect(validateKeyDown({
|
|
188
208
|
key: '.',
|
|
209
|
+
ctrlKey: false,
|
|
210
|
+
metaKey: false,
|
|
189
211
|
newValue: '2.',
|
|
190
212
|
oldValue: '2',
|
|
191
213
|
selectionStart: 2,
|
|
@@ -196,6 +218,8 @@ describe('bal-number-input', () => {
|
|
|
196
218
|
test('should accept a decimal number like 4.2', () => {
|
|
197
219
|
expect(validateKeyDown({
|
|
198
220
|
key: '4',
|
|
221
|
+
ctrlKey: false,
|
|
222
|
+
metaKey: false,
|
|
199
223
|
newValue: '4',
|
|
200
224
|
oldValue: '',
|
|
201
225
|
selectionStart: 0,
|
|
@@ -204,6 +228,8 @@ describe('bal-number-input', () => {
|
|
|
204
228
|
})).toBeTruthy();
|
|
205
229
|
expect(validateKeyDown({
|
|
206
230
|
key: '.',
|
|
231
|
+
ctrlKey: false,
|
|
232
|
+
metaKey: false,
|
|
207
233
|
newValue: '4.',
|
|
208
234
|
oldValue: '4',
|
|
209
235
|
selectionStart: 1,
|
|
@@ -212,6 +238,8 @@ describe('bal-number-input', () => {
|
|
|
212
238
|
})).toBeTruthy();
|
|
213
239
|
expect(validateKeyDown({
|
|
214
240
|
key: '2',
|
|
241
|
+
ctrlKey: false,
|
|
242
|
+
metaKey: false,
|
|
215
243
|
newValue: '4.2',
|
|
216
244
|
oldValue: '4.',
|
|
217
245
|
selectionStart: 2,
|
|
@@ -222,6 +250,8 @@ describe('bal-number-input', () => {
|
|
|
222
250
|
test('should only accept a negative symbol at the start position', () => {
|
|
223
251
|
expect(validateKeyDown({
|
|
224
252
|
key: '-',
|
|
253
|
+
ctrlKey: false,
|
|
254
|
+
metaKey: false,
|
|
225
255
|
newValue: '1-',
|
|
226
256
|
oldValue: '1',
|
|
227
257
|
selectionStart: 1,
|
|
@@ -230,6 +260,8 @@ describe('bal-number-input', () => {
|
|
|
230
260
|
})).toBeFalsy();
|
|
231
261
|
expect(validateKeyDown({
|
|
232
262
|
key: '-',
|
|
263
|
+
ctrlKey: false,
|
|
264
|
+
metaKey: false,
|
|
233
265
|
newValue: '--',
|
|
234
266
|
oldValue: '-',
|
|
235
267
|
selectionStart: 1,
|
|
@@ -240,6 +272,8 @@ describe('bal-number-input', () => {
|
|
|
240
272
|
test('should only accept one decimal point', () => {
|
|
241
273
|
expect(validateKeyDown({
|
|
242
274
|
key: '.',
|
|
275
|
+
ctrlKey: false,
|
|
276
|
+
metaKey: false,
|
|
243
277
|
newValue: '.2.',
|
|
244
278
|
oldValue: '.2',
|
|
245
279
|
selectionStart: 3,
|
|
@@ -248,6 +282,8 @@ describe('bal-number-input', () => {
|
|
|
248
282
|
})).toBeFalsy();
|
|
249
283
|
expect(validateKeyDown({
|
|
250
284
|
key: '.',
|
|
285
|
+
ctrlKey: false,
|
|
286
|
+
metaKey: false,
|
|
251
287
|
newValue: '..',
|
|
252
288
|
oldValue: '.',
|
|
253
289
|
selectionStart: 2,
|
|
@@ -258,6 +294,8 @@ describe('bal-number-input', () => {
|
|
|
258
294
|
test('should not allow non number keys', () => {
|
|
259
295
|
expect(validateKeyDown({
|
|
260
296
|
key: 'a',
|
|
297
|
+
ctrlKey: false,
|
|
298
|
+
metaKey: false,
|
|
261
299
|
newValue: 'a',
|
|
262
300
|
oldValue: '',
|
|
263
301
|
selectionStart: 1,
|
|
@@ -266,6 +304,8 @@ describe('bal-number-input', () => {
|
|
|
266
304
|
})).toBeFalsy();
|
|
267
305
|
expect(validateKeyDown({
|
|
268
306
|
key: '!',
|
|
307
|
+
ctrlKey: false,
|
|
308
|
+
metaKey: false,
|
|
269
309
|
newValue: '!',
|
|
270
310
|
oldValue: '',
|
|
271
311
|
selectionStart: 1,
|
|
@@ -276,6 +316,8 @@ describe('bal-number-input', () => {
|
|
|
276
316
|
test('should not allow more digits as we can take', () => {
|
|
277
317
|
expect(validateKeyDown({
|
|
278
318
|
key: '9',
|
|
319
|
+
ctrlKey: false,
|
|
320
|
+
metaKey: false,
|
|
279
321
|
newValue: '1.429',
|
|
280
322
|
oldValue: '1.42',
|
|
281
323
|
selectionStart: 5,
|
|
@@ -284,6 +326,8 @@ describe('bal-number-input', () => {
|
|
|
284
326
|
})).toBeFalsy();
|
|
285
327
|
expect(validateKeyDown({
|
|
286
328
|
key: 'ArrowLeft',
|
|
329
|
+
ctrlKey: false,
|
|
330
|
+
metaKey: false,
|
|
287
331
|
newValue: '1.42',
|
|
288
332
|
oldValue: '1.42',
|
|
289
333
|
selectionStart: 5,
|
|
@@ -294,6 +338,8 @@ describe('bal-number-input', () => {
|
|
|
294
338
|
test('should allow navigation keys', () => {
|
|
295
339
|
expect(validateKeyDown({
|
|
296
340
|
key: 'ArrowLeft',
|
|
341
|
+
ctrlKey: false,
|
|
342
|
+
metaKey: false,
|
|
297
343
|
newValue: '1.42',
|
|
298
344
|
oldValue: '1.42',
|
|
299
345
|
selectionStart: 3,
|
|
@@ -302,6 +348,8 @@ describe('bal-number-input', () => {
|
|
|
302
348
|
})).toBeTruthy();
|
|
303
349
|
expect(validateKeyDown({
|
|
304
350
|
key: 'Escape',
|
|
351
|
+
ctrlKey: false,
|
|
352
|
+
metaKey: false,
|
|
305
353
|
newValue: '1.4',
|
|
306
354
|
oldValue: '1.42',
|
|
307
355
|
selectionStart: 4,
|
|
@@ -310,6 +358,40 @@ describe('bal-number-input', () => {
|
|
|
310
358
|
})).toBeTruthy();
|
|
311
359
|
expect(validateKeyDown({
|
|
312
360
|
key: 'Delete',
|
|
361
|
+
ctrlKey: false,
|
|
362
|
+
metaKey: false,
|
|
363
|
+
newValue: '1.2',
|
|
364
|
+
oldValue: '1.42',
|
|
365
|
+
selectionStart: 2,
|
|
366
|
+
selectionEnd: 2,
|
|
367
|
+
decimal: 2,
|
|
368
|
+
})).toBeTruthy();
|
|
369
|
+
});
|
|
370
|
+
test('should allow select all, copy and paste', () => {
|
|
371
|
+
expect(validateKeyDown({
|
|
372
|
+
key: 'a',
|
|
373
|
+
ctrlKey: false,
|
|
374
|
+
metaKey: true,
|
|
375
|
+
newValue: '1.42',
|
|
376
|
+
oldValue: '1.42',
|
|
377
|
+
selectionStart: 3,
|
|
378
|
+
selectionEnd: 3,
|
|
379
|
+
decimal: 2,
|
|
380
|
+
})).toBeTruthy();
|
|
381
|
+
expect(validateKeyDown({
|
|
382
|
+
key: 'c',
|
|
383
|
+
ctrlKey: true,
|
|
384
|
+
metaKey: false,
|
|
385
|
+
newValue: '1.4',
|
|
386
|
+
oldValue: '1.42',
|
|
387
|
+
selectionStart: 4,
|
|
388
|
+
selectionEnd: 4,
|
|
389
|
+
decimal: 2,
|
|
390
|
+
})).toBeTruthy();
|
|
391
|
+
expect(validateKeyDown({
|
|
392
|
+
key: 'v',
|
|
393
|
+
ctrlKey: false,
|
|
394
|
+
metaKey: true,
|
|
313
395
|
newValue: '1.2',
|
|
314
396
|
oldValue: '1.42',
|
|
315
397
|
selectionStart: 2,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bal-option-padding-x: var(--bal-space-small);--bal-option-min-height: 1.5rem;--bal-option-background: var(--bal-color-white);--bal-option-background-hovered: var(--bal-color-grey-2);--bal-option-background-selected: var(--bal-color-primary-1);--bal-option-background-selected-hovered: #dddfeb;--bal-option-background-invalid: var(--bal-color-danger-1);--bal-option-background-invalid-hovered: #fbe0de;--bal-option-border-width: var(--bal-border-width-normal);--bal-option-border-color: var(--bal-color-grey-2);--bal-option-font-family: var(--bal-font-family-text);--bal-option-font-weight: var(--bal-font-weight-regular);--bal-option-line-height: 1.125rem;--bal-option-text-hovered: var(--bal-color-text-primary-hovered);--bal-option-text-pressed: var(--bal-color-text-primary-pressed);--bal-option-text-disabled: var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media(hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media(hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media(hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media(hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-radio-checkbox-symbol-size: 1.125rem;--bal-radio-checkbox-symbol-width: calc(0.375rem - 1px);--bal-radio-checkbox-symbol-height: calc(0.656rem - 1px);--bal-radio-checkbox-symbol-left: calc(0.375rem + 1px);--bal-radio-checkbox-symbol-margin-top: 0.188rem;--bal-radio-checkbox-label-min-height: 1.125rem}
|