@baloise/ds-core 16.4.0 → 16.5.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 +4 -0
- package/components/all.js +6 -0
- package/components/bal-checkbox-group.js +8 -2
- package/components/bal-checkbox2.js +10 -3
- package/components/bal-content.js +1 -69
- package/{dist/esm/bal-content.entry.js → components/bal-content2.js} +31 -12
- package/components/bal-icon2.js +1 -1
- package/components/bal-label2.js +3 -2
- package/components/bal-progress-bar.js +23 -10
- package/components/bal-radio2.js +1 -1
- package/components/bal-segment-item.d.ts +11 -0
- package/components/bal-segment-item.js +203 -0
- package/components/bal-segment.d.ts +11 -0
- package/components/bal-segment.js +337 -0
- package/components/bal-stack2.js +1 -1
- package/components/breakpoints.subject.js +3 -3
- package/components/index.esm.js +25 -1
- package/components/index.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/components/window-resize.decorator.js +46 -0
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-e60c936359.system.entry.js → p-0530e008e9.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-09ea5913.js +1 -0
- package/dist/baloise-design-system/p-0fb6cbda.system.js +1 -0
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-b487614e8b.entry.js → p-190b5cd469.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e18ec1401d.system.entry.js → p-23b7426d09.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-265f9d51c9.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-51c0348938.entry.js → p-2905abdfb8.entry.js} +1 -1
- package/dist/baloise-design-system/p-29ba4f9afe.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-b069b55a8d.entry.js → p-2cd1f1dedb.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f6599f64b7.entry.js → p-2db4ff4c5b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0295f5df96.entry.js → p-305cffd8aa.entry.js} +1 -1
- package/dist/baloise-design-system/{p-39bc49bc3d.entry.js → p-33028eda8b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c0f4b35c8c.system.entry.js → p-370575b8cb.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-95c6192efb.system.entry.js → p-372474e989.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6d9afce4c2.entry.js → p-3801afd625.entry.js} +1 -1
- package/dist/baloise-design-system/p-380aabd5bc.entry.js +1 -0
- package/dist/baloise-design-system/{p-330b875d9d.system.entry.js → p-3818fa189f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-68eead378f.entry.js → p-39bf8adcde.entry.js} +1 -1
- package/dist/baloise-design-system/p-3befc6f9.system.js +1 -0
- package/dist/baloise-design-system/{p-167594de04.entry.js → p-3c25811c44.entry.js} +1 -1
- package/dist/baloise-design-system/p-3eb68d7e.js +1 -0
- package/dist/baloise-design-system/{p-8754258843.entry.js → p-407ffd9c55.entry.js} +1 -1
- package/dist/baloise-design-system/p-445d2e1c70.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-4afba8511a.system.entry.js → p-47a8ad4d7a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-83ff83d0.system.js → p-4809d5c4.system.js} +1 -1
- package/dist/baloise-design-system/{p-19542d9bfc.system.entry.js → p-487816db33.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-976ed5bcf1.entry.js → p-488c4a8ce1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-aee4ebe860.system.entry.js → p-4fe64c3ec6.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-53e98a0f71.entry.js +1 -0
- package/dist/baloise-design-system/{p-cef24f8c62.entry.js → p-547aae9610.entry.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-6f4a362824.system.entry.js → p-5db0544e97.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-67e6932c19.entry.js → p-5fae3f5478.entry.js} +1 -1
- package/dist/baloise-design-system/{p-22b041a511.entry.js → p-6c2bf02eb3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7c3119418.system.entry.js → p-6e3a79cce0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-71588db3.system.js +1 -0
- package/dist/baloise-design-system/{p-b779742f50.entry.js → p-77350b27fc.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b33c021c08.entry.js → p-7c586fb89f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ba14aa7026.system.entry.js → p-8080a1192c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-685405e0.system.js → p-88eb14fd.system.js} +1 -1
- package/dist/baloise-design-system/p-8de1a12660.entry.js +1 -0
- package/dist/baloise-design-system/{p-8870e1f3e0.system.entry.js → p-8e17b76e7c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b97d9336a7.system.entry.js → p-9bb8778cdc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8b6aca042a.system.entry.js → p-9f54cac588.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-a507ff25cb.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ad00d94e7f.entry.js → p-a5ee486a2b.entry.js} +1 -1
- package/dist/baloise-design-system/p-a78d1ca569.system.entry.js +1 -0
- package/dist/baloise-design-system/p-b0c22ff9d1.entry.js +1 -0
- package/dist/baloise-design-system/{p-982fa892e8.system.entry.js → p-b8251b8f68.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-b87c29c80b.entry.js +1 -0
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -1
- package/dist/baloise-design-system/{p-098f268743.entry.js → p-bee13e834e.entry.js} +1 -1
- package/dist/baloise-design-system/p-c1c17f8edc.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3f1c49d0.js → p-caec1f9e.js} +1 -1
- package/dist/baloise-design-system/{p-45e0c0783b.entry.js → p-cafe624e35.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2f4c6257f4.entry.js → p-cda868a6a5.entry.js} +1 -1
- package/dist/baloise-design-system/p-ced37553e2.entry.js +1 -0
- package/dist/baloise-design-system/{p-a52564d27f.system.entry.js → p-d059465399.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-44d845a857.system.entry.js → p-d3fabdb142.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b397abec9a.system.entry.js → p-d7d6937d59.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c92eb37957.system.entry.js → p-df40272425.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e9c3c1c4cc.entry.js → p-e0384bfc0c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b0f4388e4c.system.entry.js → p-e137e273b7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-55faac1d.system.js → p-e187b9de.system.js} +1 -1
- package/dist/baloise-design-system/{p-86b8ffa1ab.system.entry.js → p-e1ccb7023c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e75ccb92.js +1 -0
- package/dist/baloise-design-system/{p-9e167705ca.entry.js → p-ecab0d67d5.entry.js} +1 -1
- package/dist/baloise-design-system/p-ef916aafa5.entry.js +1 -0
- package/dist/baloise-design-system/{p-544a0af68d.system.entry.js → p-f03e63bd1e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-94efe2aa.js → p-f5940253.js} +1 -1
- package/dist/baloise-design-system/{p-3e8b5dec38.system.entry.js → p-f62d0ccdd1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e066dc532d.entry.js → p-f819d47031.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d66c8f0da9.system.entry.js → p-fb0af77320.system.entry.js} +1 -1
- package/dist/cjs/bal-accordion_4.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +4 -3
- package/dist/cjs/{bal-label.cjs.entry.js → bal-content_2.cjs.entry.js} +48 -2
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-date.cjs.entry.js +2 -2
- package/dist/cjs/bal-datepicker.cjs.entry.js +4 -4
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bal-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
- package/dist/cjs/bal-icon.cjs.entry.js +1 -1
- package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bal-list_8.cjs.entry.js +4 -4
- 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-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +27 -15
- package/dist/cjs/bal-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/bal-segment-item.cjs.entry.js +156 -0
- package/dist/cjs/bal-segment.cjs.entry.js +319 -0
- package/dist/cjs/bal-select_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stack.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
- package/dist/cjs/baloise-design-system.cjs.js +1 -1
- package/dist/cjs/{breakpoints.decorator-e278a735.js → breakpoints.decorator-a4a5bd7a.js} +1 -1
- package/dist/cjs/{breakpoints.subject-0802767f.js → breakpoints.subject-fbf85930.js} +4 -4
- package/dist/cjs/{date-3e33b208.js → date-20be7524.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{index.esm-4587dbf0.js → index.esm-54a3d84e.js} +28 -0
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tokens.esm-be397f27.js → tokens.esm-aa4bb7f7.js} +1 -1
- package/dist/cjs/window-resize.decorator-c7a521b0.js +48 -0
- package/dist/collection/collection-manifest.json +2 -0
- 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-content/bal-content.css +1 -1
- package/dist/collection/components/bal-content/bal-content.js +1 -1
- package/dist/collection/components/bal-icon/bal-icon.css +1 -1
- package/dist/collection/components/bal-label/bal-label.js +20 -2
- package/dist/collection/components/bal-progress-bar/bal-progress-bar.js +23 -10
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.css +1 -0
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +332 -0
- package/dist/collection/components/bal-segment/bal-segment.css +1 -0
- package/dist/collection/components/bal-segment/bal-segment.interfaces.js +4 -0
- package/dist/collection/components/bal-segment/bal-segment.js +537 -0
- package/dist/collection/components/bal-segment/bal-segment.types.js +1 -0
- package/dist/collection/components/bal-stack/bal-stack.css +1 -1
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/resize/index.js +4 -1
- package/dist/collection/utils/resize/window-resize.decorator.js +20 -0
- package/dist/collection/utils/resize/window-resize.interfaces.js +1 -0
- package/dist/collection/utils/resize/window-resize.listener.js +3 -3
- package/dist/collection/utils/resize/window-resize.subject.js +23 -0
- package/dist/esm/bal-accordion_4.entry.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-checkbox_2.entry.js +4 -3
- package/dist/esm/{bal-label.entry.js → bal-content_2.entry.js} +48 -3
- package/dist/esm/bal-date-calendar_2.entry.js +2 -2
- package/dist/esm/bal-date.entry.js +2 -2
- package/dist/esm/bal-datepicker.entry.js +4 -4
- package/dist/esm/bal-dropdown.entry.js +1 -1
- package/dist/esm/bal-file-upload.entry.js +1 -1
- package/dist/esm/bal-footer.entry.js +1 -1
- package/dist/esm/bal-hint_3.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-input-stepper.entry.js +1 -1
- package/dist/esm/bal-list_8.entry.js +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 +1 -1
- package/dist/esm/bal-pagination.entry.js +3 -3
- 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 +27 -15
- package/dist/esm/bal-radio_2.entry.js +2 -2
- package/dist/esm/bal-segment-item.entry.js +152 -0
- package/dist/esm/bal-segment.entry.js +315 -0
- package/dist/esm/bal-select_2.entry.js +1 -1
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stack.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +4 -4
- package/dist/esm/baloise-design-system.js +1 -1
- package/dist/esm/{breakpoints.decorator-d0f1affe.js → breakpoints.decorator-f2ac9963.js} +1 -1
- package/dist/esm/{breakpoints.subject-f57eda2c.js → breakpoints.subject-3605e395.js} +4 -4
- package/dist/esm/{date-38a0b208.js → date-aba2d404.js} +1 -1
- package/dist/esm/{index.esm-83b1f9c4.js → index.esm-76abd8e3.js} +25 -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-70c16b84.js → tokens.esm-337782ae.js} +1 -1
- package/dist/esm/window-resize.decorator-d5198831.js +46 -0
- package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-content_2.entry.js +1 -0
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-file-upload.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_3.entry.js +1 -1
- package/dist/esm-es5/bal-icon.entry.js +1 -1
- package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-number-input.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popover_2.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment-item.entry.js +1 -0
- package/dist/esm-es5/bal-segment.entry.js +1 -0
- package/dist/esm-es5/bal-select_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-stack.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-d0f1affe.js → breakpoints.decorator-f2ac9963.js} +1 -1
- package/dist/esm-es5/breakpoints.subject-3605e395.js +1 -0
- package/dist/esm-es5/{date-38a0b208.js → date-aba2d404.js} +1 -1
- package/dist/esm-es5/{index.esm-83b1f9c4.js → index.esm-76abd8e3.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-e216cfe4.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/window-resize.decorator-d5198831.js +1 -0
- package/dist/html.html-data.json +80 -0
- package/dist/types/components/bal-content/bal-content.interfaces.d.ts +1 -1
- package/dist/types/components/bal-icon/bal-icon.interfaces.d.ts +1 -1
- package/dist/types/components/bal-label/bal-label.d.ts +4 -1
- package/dist/types/components/bal-progress-bar/bal-progress-bar.d.ts +3 -1
- package/dist/types/components/bal-segment/bal-segment-item/bal-segment-item.d.ts +62 -0
- package/dist/types/components/bal-segment/bal-segment.d.ts +111 -0
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +20 -0
- package/dist/types/components/bal-segment/bal-segment.types.d.ts +1 -0
- package/dist/types/components.d.ts +164 -0
- package/dist/types/interfaces.d.ts +1 -0
- package/dist/types/utils/resize/index.d.ts +4 -1
- package/dist/types/utils/resize/window-resize.decorator.d.ts +3 -0
- package/dist/types/utils/resize/window-resize.interfaces.d.ts +5 -0
- package/dist/types/utils/resize/window-resize.listener.d.ts +1 -1
- package/dist/types/utils/resize/window-resize.subject.d.ts +9 -0
- package/package.json +8 -8
- package/dist/baloise-design-system/p-0d69371467.entry.js +0 -1
- package/dist/baloise-design-system/p-126c79c9e9.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2d8bd11634.entry.js +0 -1
- package/dist/baloise-design-system/p-77ccb1f4.system.js +0 -1
- package/dist/baloise-design-system/p-88493e9537.system.entry.js +0 -1
- package/dist/baloise-design-system/p-886bedebf9.entry.js +0 -1
- package/dist/baloise-design-system/p-8a87b9a8.system.js +0 -1
- package/dist/baloise-design-system/p-c69783ee18.entry.js +0 -1
- package/dist/baloise-design-system/p-d585a3ad56.system.entry.js +0 -1
- package/dist/baloise-design-system/p-e71a27141c.entry.js +0 -1
- package/dist/baloise-design-system/p-e851f284.js +0 -1
- package/dist/baloise-design-system/p-e93d9571f5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-ecd39e3bec.entry.js +0 -1
- package/dist/baloise-design-system/p-f076d1ed4f.system.entry.js +0 -1
- package/dist/baloise-design-system/p-f7091a61.js +0 -1
- package/dist/cjs/bal-content.cjs.entry.js +0 -56
- package/dist/esm-es5/bal-content.entry.js +0 -1
- package/dist/esm-es5/bal-label.entry.js +0 -1
- package/dist/esm-es5/breakpoints.subject-f57eda2c.js +0 -1
- /package/dist/baloise-design-system/{p-83486137.system.js → p-36074466.system.js} +0 -0
- /package/dist/baloise-design-system/{p-ec4875a2.js → p-e1994e2c.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-70c16b84.js → tokens.esm-337782ae.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{L as Logger}from"./log-dfd1c19f.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{e as isSpaceKey}from"./index.esm-83b1f9c4.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-checkbox__input{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-radio-checkbox--invisible{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-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}';var BalRadioStyle0=radioCheckboxCss;var Radio=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-rb-".concat(radioIds++);this.inheritedAttributes={};this.keyboardMode=true;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){return e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.checked=false;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.value=undefined;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.interface="radio";this.disabled=false;this.readonly=false;this.required=false;this.nonSubmit=false;this.invalid=false;this.hovered=false;this.pressed=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){if(this.value===undefined){this.value=this.inputId}var a=this.radioButton;var e=this.radioGroup;if(a||e){this.updateState()}if(e){e.addEventListener("balInput",this.updateState)}this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this.radioGroup;if(a){a.removeEventListener("balInput",this.updateState)}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.setFocus=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){a.stopPropagation();a.preventDefault();this.nativeInput.focus();this.focused=true;return[2]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.radioButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,Promise.resolve(this.nativeInput)]}))}))};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.radioGroup){a=this.radioGroup.value===this.value;if(a!==this.checked){this.checked=a}}if(this.radioButton){this.buttonTabindex=-1;if(this.radioButton.setChecked){this.radioButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.prototype,"radioButton",{get:function(){return this.el.closest("bal-radio-button")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"radioGroup",{get:function(){return this.el.closest("bal-radio-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"option",{get:function(){return{name:this.name,value:this.value,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked);this.updateState()};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=typeof this.value==="boolean"?JSON.stringify(this.value):this.value;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var d=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){t="".concat(t||""," ").concat(d,"-lbl").trim();n.id="".concat(d,"-lbl");n.htmlFor=d}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":this.disabled?"true":null,"aria-hidden":this.disabled?"true":null,"aria-focused":l?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":l},e.class()),e.modifier("radio").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("invisible").class(this.invisible)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-radio-input",type:"radio",id:d,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"aria-checked":"".concat(this.checked),name:this.name,value:r,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},i)),!this.invisible?h(k,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("radio").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat))},n,{"data-testid":"bal-radio-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-radio-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Radio.prototype,"createLogger",null);var radioIds=0;Radio.style=BalRadioStyle0;var RadioGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-rg-".concat(radioGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.setRadioTabindex(this.value);this.setRadioChecked();return[2]}))}))};this.setRadioTabindex=function(a){var o=e.getRadios();var c=o.find((function(a){return!a.disabled}));var b=o.find((function(e){return e.value===a&&!e.disabled}));if(!c&&!b){return}var l=b||c;for(var r=0,i=o;r<i.length;r++){var d=i[r];var t=d===l?0:-1;d.setButtonTabindex(t)}};this.onClick=function(a){var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-radio");if(c&&!c.disabled&&!c.readonly){var b=e.value;var l=c.value;if(l!==b){e.value=l}else if(e.allowEmptySelection){e.value=undefined}e.balChange.emit(e.value)}};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.allowEmptySelection=false;this.name=this.inputId;this.value=undefined;this.interface=undefined;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.grid=1;this.columnsTablet=1;this.columnsMobile=1;this.autoInvalidOff=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.onOptionChange();this.mutationObserverActive=this.options===undefined;return[2]}))}))};a.prototype.valueChanged=function(){this.onOptionChange()};a.prototype.invalidChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.invalid=a}));this.getRadioButtons().forEach((function(e){e.invalid=a}))}};a.prototype.disabledChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.disabled=a}));this.getRadioButtons().forEach((function(e){e.disabled=a}))}};a.prototype.readonlyChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.readonly=a}));this.getRadioButtons().forEach((function(e){e.readonly=a}))}};a.prototype.columnsChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){this.initialValue=this.value;this.mutationObserverActive=this.options===undefined};a.prototype.componentWillLoad=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange();this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}};a.prototype.radioFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.radioBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.resetListener=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.value=this.initialValue}};a.prototype.onKeydown=function(a){if(a.target&&!this.el.contains(a.target)){return}var e=this.getRadios().filter((function(a){return!a.disabled}));var o=a.target.closest("bal-radio");if(o&&e.includes(o)){var c=e.findIndex((function(a){return a===o}));var b=e[c];var l=void 0;if(["ArrowDown","ArrowRight"].includes(a.code)){l=c===e.length-1?e[0]:e[c+1]}if(["ArrowUp","ArrowLeft"].includes(a.code)){l=c===0?e[e.length-1]:e[c-1]}if(l&&e.includes(l)){l.setFocus(a);this.value=l.value;this.balChange.emit(this.value)}if(["Space"].includes(a.code)){this.value=this.allowEmptySelection&&this.value!==undefined?undefined:b.value;a.preventDefault()}}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=a;return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.setRadioInterface=function(){var a=this;this.getRadios().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.setRadioChecked=function(){this.getRadios().forEach((function(a){if(a.updateState){a.updateState()}}))};a.prototype.getRadios=function(){return Array.from(this.el.querySelectorAll("bal-radio"))};a.prototype.getRadioButtons=function(){return Array.from(this.el.querySelectorAll("bal-radio-button"))};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox-group");var o=e.element("inner");var c=this.options||[];var b=c.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},e.class()),role:"radiogroup","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":this.disabled?"true":null,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("vertical-mobile").class(this.verticalOnMobile)),o.modifier("vertical").class(this.vertical)),o.modifier("expanded").class(this.expanded)),o.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),b.map((function(e){return h("bal-radio",{key:e.value,name:e.name||a.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],grid:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-radio-group","bal-radio"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"mutationListener",null);var radioGroupIds=0;export{Radio as bal_radio,RadioGroup as bal_radio_group};
|
|
1
|
+
import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{L as Logger}from"./log-dfd1c19f.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{e as isSpaceKey}from"./index.esm-76abd8e3.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-checkbox__input{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-radio-checkbox--invisible{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-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;z-index:2;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::after{margin-top:0}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-radio-checkbox__icon{position:absolute !important;left:5.5px;z-index:1}.bal-radio-checkbox__icon--hidden{display:none !important}';var BalRadioStyle0=radioCheckboxCss;var Radio=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-rb-".concat(radioIds++);this.inheritedAttributes={};this.keyboardMode=true;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){return e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.checked=false;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.value=undefined;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.interface="radio";this.disabled=false;this.readonly=false;this.required=false;this.nonSubmit=false;this.invalid=false;this.hovered=false;this.pressed=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){if(this.value===undefined){this.value=this.inputId}var a=this.radioButton;var e=this.radioGroup;if(a||e){this.updateState()}if(e){e.addEventListener("balInput",this.updateState)}this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this.radioGroup;if(a){a.removeEventListener("balInput",this.updateState)}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.setFocus=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){a.stopPropagation();a.preventDefault();this.nativeInput.focus();this.focused=true;return[2]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.radioButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,Promise.resolve(this.nativeInput)]}))}))};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.radioGroup){a=this.radioGroup.value===this.value;if(a!==this.checked){this.checked=a}}if(this.radioButton){this.buttonTabindex=-1;if(this.radioButton.setChecked){this.radioButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.prototype,"radioButton",{get:function(){return this.el.closest("bal-radio-button")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"radioGroup",{get:function(){return this.el.closest("bal-radio-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"option",{get:function(){return{name:this.name,value:this.value,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked);this.updateState()};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=typeof this.value==="boolean"?JSON.stringify(this.value):this.value;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var d=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){t="".concat(t||""," ").concat(d,"-lbl").trim();n.id="".concat(d,"-lbl");n.htmlFor=d}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":this.disabled?"true":null,"aria-hidden":this.disabled?"true":null,"aria-focused":l?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":l},e.class()),e.modifier("radio").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("invisible").class(this.invisible)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-radio-input",type:"radio",id:d,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"aria-checked":"".concat(this.checked),name:this.name,value:r,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},i)),!this.invisible?h(k,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("radio").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat))},n,{"data-testid":"bal-radio-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-radio-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Radio.prototype,"createLogger",null);var radioIds=0;Radio.style=BalRadioStyle0;var RadioGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-rg-".concat(radioGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.setRadioTabindex(this.value);this.setRadioChecked();return[2]}))}))};this.setRadioTabindex=function(a){var o=e.getRadios();var c=o.find((function(a){return!a.disabled}));var b=o.find((function(e){return e.value===a&&!e.disabled}));if(!c&&!b){return}var l=b||c;for(var r=0,i=o;r<i.length;r++){var d=i[r];var t=d===l?0:-1;d.setButtonTabindex(t)}};this.onClick=function(a){var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-radio");if(c&&!c.disabled&&!c.readonly){var b=e.value;var l=c.value;if(l!==b){e.value=l}else if(e.allowEmptySelection){e.value=undefined}e.balChange.emit(e.value)}};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.allowEmptySelection=false;this.name=this.inputId;this.value=undefined;this.interface=undefined;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.grid=1;this.columnsTablet=1;this.columnsMobile=1;this.autoInvalidOff=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.onOptionChange();this.mutationObserverActive=this.options===undefined;return[2]}))}))};a.prototype.valueChanged=function(){this.onOptionChange()};a.prototype.invalidChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.invalid=a}));this.getRadioButtons().forEach((function(e){e.invalid=a}))}};a.prototype.disabledChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.disabled=a}));this.getRadioButtons().forEach((function(e){e.disabled=a}))}};a.prototype.readonlyChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.readonly=a}));this.getRadioButtons().forEach((function(e){e.readonly=a}))}};a.prototype.columnsChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){this.initialValue=this.value;this.mutationObserverActive=this.options===undefined};a.prototype.componentWillLoad=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange();this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}};a.prototype.radioFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.radioBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.resetListener=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.value=this.initialValue}};a.prototype.onKeydown=function(a){if(a.target&&!this.el.contains(a.target)){return}var e=this.getRadios().filter((function(a){return!a.disabled}));var o=a.target.closest("bal-radio");if(o&&e.includes(o)){var c=e.findIndex((function(a){return a===o}));var b=e[c];var l=void 0;if(["ArrowDown","ArrowRight"].includes(a.code)){l=c===e.length-1?e[0]:e[c+1]}if(["ArrowUp","ArrowLeft"].includes(a.code)){l=c===0?e[e.length-1]:e[c-1]}if(l&&e.includes(l)){l.setFocus(a);this.value=l.value;this.balChange.emit(this.value)}if(["Space"].includes(a.code)){this.value=this.allowEmptySelection&&this.value!==undefined?undefined:b.value;a.preventDefault()}}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=a;return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.setRadioInterface=function(){var a=this;this.getRadios().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.setRadioChecked=function(){this.getRadios().forEach((function(a){if(a.updateState){a.updateState()}}))};a.prototype.getRadios=function(){return Array.from(this.el.querySelectorAll("bal-radio"))};a.prototype.getRadioButtons=function(){return Array.from(this.el.querySelectorAll("bal-radio-button"))};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox-group");var o=e.element("inner");var c=this.options||[];var b=c.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},e.class()),role:"radiogroup","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":this.disabled?"true":null,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("vertical-mobile").class(this.verticalOnMobile)),o.modifier("vertical").class(this.vertical)),o.modifier("expanded").class(this.expanded)),o.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),b.map((function(e){return h("bal-radio",{key:e.value,name:e.name||a.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],grid:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-radio-group","bal-radio"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"mutationListener",null);var radioGroupIds=0;export{Radio as bal_radio,RadioGroup as bal_radio_group};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{j as addEventListener,r as removeEventListener,l as raf}from"./helpers-c201154e.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";var balSegmentItemCss=':root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment-item{display:block;position:relative;height:auto;text-decoration:none;text-overflow:ellipsis;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;grid-row:1;-webkit-font-kerning:none;font-kerning:none}.bal-segment-item--disabled{cursor:default !important;pointer-events:none !important}.bal-segment-item__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:2.5rem;min-width:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1;padding-top:.375rem;padding-bottom:.375rem;padding-left:20px;padding-right:20px;outline:none;border-color:rgba(0,0,0,0);border-width:var(--bal-border-width-normal);border-style:solid;border-radius:var(--bal-radius-normal);background:rgba(0,0,0,0);font-size:var(--bal-text-size-normal);font-weight:var(--bal-font-weight-bold);color:var(--bal-segment-item-text-color);overflow:hidden;position:relative;contain:content;pointer-events:none;cursor:pointer;z-index:2}.bal-segment-item__button--vertical{padding-left:.75rem;padding-right:.75rem}.bal-segment-item__button span{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-regular)}.bal-segment-item__button{will-change:color,padding;-webkit-transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{content:"";position:absolute;background:var(--bal-segment-item-divider-background);border-radius:var(--bal-radius-normal)}.bal-segment-item:not(.bal-segment-item--vertical):not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{top:2px;bottom:2px;right:-1px;width:2px}.bal-segment-item.bal-segment-item--vertical:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{left:2px;right:2px;bottom:-1px;height:2px}.bal-segment-item--invalid:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{background:var(--bal-segment-item-divider-background-invalid)}.bal-segment-item__indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none;border-radius:var(--bal-radius-normal);background:var(--bal-segment-item-indicator-background);top:0;left:0}.bal-segment-item__indicator--vertical{-webkit-transform-origin:top;transform-origin:top}.bal-segment-item__indicator--invalid{background:var(--bal-segment-item-indicator-background-invalid)}.bal-segment-item__indicator--background{min-width:100%;min-height:100%;-webkit-transform:none;transform:none;pointer-events:none}.bal-segment-item__indicator--animated{will-change:transform,opacity,top,bottom,left,right,min-width,min-heigth;-webkit-transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease;transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__indicator--checked{opacity:1}.bal-segment-item:active .bal-segment-item__indicator{min-width:calc(100% - 4px);min-height:calc(100% - 4px);top:2px !important;bottom:2px !important;left:2px !important;right:2px !important}.bal-segment-item__button__icon{position:absolute !important;opacity:0;width:0 !important;-webkit-transform:translateX(0.1rem);transform:translateX(0.1rem);pointer-events:none !important;cursor:inherit;will-change:transform,opacity}.bal-segment-item__button__icon:not(.bal-segment-item__button__icon--vertical){left:10px}.bal-segment-item__button__icon--vertical{right:10px}.bal-segment-item__button__icon--animated{opacity:1;width:.875rem !important;-webkit-transform:translateX(-4px);transform:translateX(-4px);-webkit-transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__button--checked{color:var(--bal-segment-item-text-color-checked);padding-right:40px}.bal-segment-item__button--checked:not(.bal-segment-item__button--vertical){padding-left:26px;padding-right:12px}@media (hover: hover)and (pointer: fine){.bal-segment-item:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-hovered)}}.bal-segment-item:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-pressed)}.bal-segment--keyboard .bal-segment-item__button:not(.bal-segment-item__button--disabled):focus-visible,.bal-segment--keyboard .bal-segment-item__button--focused:not(.bal-segment-item__button--disabled){border-color:var(--bal-segment-item-focus-border);border-width:var(--bal-border-width-normal);border-style:solid;-webkit-transition:border 300ms ease-in-out;transition:border 300ms ease-in-out}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled) .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid)}@media (hover: hover)and (pointer: fine){.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-hovered)}}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-pressed)}.bal-segment-item__button--invalid.bal-segment-item__button--checked{color:var(--bal-color-text-white)}.bal-segment-item__button--disabled{background:rgba(0,0,0,0);color:var(--bal-segment-item-text-color-disabled)}.bal-segment-item__button--disabled.bal-segment-item__button--checked{background:var(--bal-segment-item-indicator-background-disabled);color:var(--bal-segment-item-text-color-disabled-checked)}.bal-segment-item__button__slot--hidden{display:none !important}';var BalSegmentItemStyle0=balSegmentItemCss;var ids=0;var SegmentItem=function(){function e(e){var t=this;registerInstance(this,e);this.balBlur=createEvent(this,"balBlur",7);this.segmentEl=null;this.inheritedAttributes={};this.id=ids++;this.updateVertical=function(e){t.isVertical=e.detail};this.updateState=function(){var e=t.segmentEl;if(e){if(e.value===""||e.value===undefined||e.value===null){var i=t.items;if(i.length>0){var a=i[0];t.isFocusable=a===t.el}}else{t.checked=e.value===t.value;t.isFocusable=e.value===t.value}if(e.disabled){t.disabled=true}}};this.onSlottedItemsChange=function(){t.checkSlotContent()};this.hasSlotContent=false;this.isFocusable=false;this.isVertical=false;this.disabled=false;this.invalid=false;this.focused=false;this.checked=false;this.label="";this.value="bal-si-"+this.id}e.prototype.valueChanged=function(){this.updateState()};e.prototype.connectedCallback=function(){var e=this.segmentEl=this.el.closest("bal-segment");if(e){this.updateState();addEventListener(e,"balSelect",this.updateState);addEventListener(e,"balVertical",this.updateVertical)}};e.prototype.disconnectedCallback=function(){var e=this.segmentEl;if(e){removeEventListener(e,"balSelect",this.updateState);removeEventListener(e,"balVertical",this.updateVertical);this.segmentEl=null}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},inheritAttributes(this.el,["aria-label"]))};e.prototype.componentDidLoad=function(){var e=this;raf((function(){return e.checkSlotContent()}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=this.nativeEl;if(e!==undefined){e.focus()}return[2]}))}))};Object.defineProperty(e.prototype,"items",{get:function(){return this.allItems.filter((function(e){return!e.disabled}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allItems",{get:function(){var e=this.segmentEl;if(e){return Array.from(e.querySelectorAll("bal-segment-item"))}return[]},enumerable:false,configurable:true});e.prototype.isFirst=function(){var e=this.segmentEl;var t=this.items;if(e&&e.disabled){t=this.allItems}if(t.length>0){var i=t[0];return i===this.el}return false};e.prototype.isLast=function(){var e=this.segmentEl;var t=this.items;if(e&&e.disabled){t=this.allItems}if(t.length>0){var i=t[t.length-1];return i===this.el}return false};e.prototype.checkSlotContent=function(){var e=this.el.querySelector('[part="slot"]');var t=e?e.innerHTML.trim():"";this.hasSlotContent=t.length>0};e.prototype.render=function(){var e=this;var t=this,i=t.checked,a=t.focused,n=t.segmentEl,r=t.label,o=t.isFocusable;var s=BEM.block("segment-item");var l=s.element("button");var m=s.element("indicator");var b=this.invalid||n&&n.invalid;var c=this.disabled||n&&n.disabled;var d=this.isVertical;return h(Host,{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("vertical").class(d)),s.modifier("disabled").class(c)),s.modifier("checked").class(i)),s.modifier("invalid").class(b)),s.modifier("line").class(!this.isFirst()&&!i)),s.modifier("last").class(this.isLast()&&!i))},h("button",Object.assign({role:"radio","aria-checked":i?"true":"false",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("checked").class(i)),l.modifier("invalid").class(b)),l.modifier("disabled").class(c)),l.modifier("focused").class(a)),l.modifier("vertical").class(d)),"aria-labelledby":"bal-si-".concat(this.id,"-label"),type:"button",tabIndex:o?0:-1,part:"native",onBlur:function(t){return e.balBlur.emit(t)},disabled:c,ref:function(t){return e.nativeEl=t}},this.inheritedAttributes),h("bal-icon",{name:"check",size:"small",class:Object.assign(Object.assign(Object.assign({},l.element("icon").class()),l.element("icon").modifier("animated").class(i)),l.element("icon").modifier("vertical").class(d)),color:c?"grey-dark":b?"white":"primary"}),h("bal-stack",{space:"x-small",layout:"horizontal"},h("bal-content",{space:"none"},h("bal-label",{htmlId:"bal-si-".concat(this.id,"-label")},r),h("span",{part:"slot",class:Object.assign({},l.element("slot").modifier("hidden").class(!this.hasSlotContent))}," ",h("slot",{onSlotchange:this.onSlottedItemsChange}))))),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m.class()),m.modifier("animated").class()),m.modifier("background").class()),m.modifier("disabled").class(c)),m.modifier("invalid").class(b)),m.modifier("checked").class(i)),m.modifier("vertical").class(d))}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();SegmentItem.style=BalSegmentItemStyle0;export{SegmentItem as bal_segment_item};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,w as writeTask,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{e as isSpaceKey,s as isArrowUpKey,z as isArrowLeftKey,q as isArrowDownKey,A as isArrowRightKey,B as isHomeKey,C as isEndKey}from"./index.esm-76abd8e3.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{l as raf}from"./helpers-c201154e.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-f2ac9963.js";import{L as ListenToWindowResize}from"./window-resize.decorator-d5198831.js";import"./browser-a8073d92.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./breakpoints.subject-3605e395.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-337782ae.js";var balSegmentCss=":root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment{display:-ms-flexbox;display:flex;background:var(--bal-segment-background);border-radius:var(--bal-radius-normal);gap:.125rem;gap:.125rem;padding:.25rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-segment--invalid{background:var(--bal-segment-background-invalid)}.bal-segment--vertical{-ms-flex-direction:column;flex-direction:column;width:100%}.bal-segment--vertical .bal-segment-item__button{width:100%;-ms-flex:1;flex:1}.bal-segment--vertical.bal-segment--scrollable{overflow:auto;max-height:240px}.bal-segment--expanded{width:100%;min-width:100%;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.bal-segment--expanded .bal-segment-item,.bal-segment--expanded .bal-segment-item>button{-ms-flex:1;flex:1;width:100%}.bal-segment--expanded .bal-segment-item .bal-content,.bal-segment--expanded .bal-segment-item>button .bal-content{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";var BalSegmentStyle0=balSegmentCss;var Segment=function(){function e(e){var t=this;registerInstance(this,e);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.balSelect=createEvent(this,"balSelect",7);this.balVertical=createEvent(this,"balVertical",7);this.getSegmentItem=function(e){var a,i;var r=t.items.filter((function(e){return!e.disabled}));var n=r.findIndex((function(e){return e===document.activeElement.closest("bal-segment-item")}));switch(e){case"current":return r[n];case"first":return r[0];case"last":return r[r.length-1];case"next":return(a=r[n+1])!==null&&a!==void 0?a:r[0];case"previous":return(i=r[n-1])!==null&&i!==void 0?i:r[r.length-1];default:return null}};this.onPointerDown=function(){t.keyboardMode=false};this.onSlottedItemsChange=function(){t.valueChanged(t.value);t.defineWidth()};this.onClick=function(e){if(t.disabled){return}var a=e.target;var i=t.checked;if(a.tagName==="BAL-SEGMENT"){return}if(a&&a.setFocus){a.setFocus()}if(i){t.checkButton(i,a)}else{t.setCheckedClasses();t.checkButton(a,a)}if(a!==i){t.emitValueChange()}};this.focusedValue=undefined;this.keyboardMode=true;this.isVertical=false;this.isMobile=false;this.maxWidth=0;this.invalid=false;this.disabled=false;this.vertical=false;this.scrollable=false;this.expanded=false;this.value=undefined}e.prototype.createLogger=function(e){this.log=e};e.prototype.valueChanged=function(e){this.balSelect.emit(e)};e.prototype.connectedCallback=function(){this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};e.prototype.disconnectedCallback=function(){this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setCheckedClasses();this.defineWidth();return[2]}))}))};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile};e.prototype.windowResizeListener=function(){if(this.vertical===false&&this.maxWidth>0){var e=this.el.parentElement.getBoundingClientRect();if(e.width<this.maxWidth){this.emitVerticalChange(true)}else{this.emitVerticalChange(false)}}else{this.emitVerticalChange(true)}};e.prototype.listenOnBalBlur=function(e){stopEventBubbling(e);this.balBlur.emit(e.detail)};e.prototype.listenOnKeyDown=function(e){this.keyboardMode=FOCUS_KEYS.includes(e.key);var t;if(isSpaceKey(e)){stopEventBubbling(e);t=this.getSegmentItem("current")}else if(isArrowUpKey(e)||isArrowLeftKey(e)){stopEventBubbling(e);t=this.getSegmentItem("previous")}else if(isArrowDownKey(e)||isArrowRightKey(e)){stopEventBubbling(e);t=this.getSegmentItem("next")}else if(isHomeKey(e)){stopEventBubbling(e);t=this.getSegmentItem("first")}else if(isEndKey(e)){stopEventBubbling(e);t=this.getSegmentItem("last")}if(!t){return}var a=this.checked;if(t!==a){this.checkButton(a,t);this.emitValueChange()}if(t){t.setFocus()}};Object.defineProperty(e.prototype,"items",{get:function(){return Array.from(this.el.querySelectorAll("bal-segment-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"checked",{get:function(){var e=this;return this.items.find((function(t){return t.value===e.value}))},enumerable:false,configurable:true});e.prototype.emitValueChange=function(){this.balChange.emit(this.value)};e.prototype.emitVerticalChange=function(e){if(this.isVertical!==e){this.isVertical=e;this.balVertical.emit(this.isVertical)}};e.prototype.defineWidth=function(){var e=this;raf((function(){if(e.isVertical===false){var t=e.el.getBoundingClientRect();e.maxWidth=t.width}e.windowResizeListener()}))};e.prototype.getIndicator=function(e){var t=e.shadowRoot||e;return t.querySelector(".bal-segment-item__indicator")};e.prototype.checkButton=function(e,t){var a=this.getIndicator(e);var i=this.getIndicator(t);if(a===null||i===null){return}var r=a.getBoundingClientRect();var n=i.getBoundingClientRect();var s=r.width/n.width;var o=r.left-n.left;var l="translate3d(".concat(o,"px, 0, 0) scaleX(").concat(s,")");if(this.isVertical){var c=r.height/n.height;var m=r.top-n.top;l="translate3d(0, ".concat(m,"px, 0) scaleY(").concat(c,")")}writeTask((function(){i.classList.remove("bal-segment-item__indicator--animated");i.style.setProperty("transform",l);i.getBoundingClientRect();i.classList.add("bal-segment-item__indicator--animated");i.style.setProperty("transform","")}));this.value=t.value;this.setCheckedClasses()};e.prototype.setCheckedClasses=function(){var e=this;var t=this.items;var a=t.findIndex((function(t){return t.value===e.value}));var i=a+1;var r=a-1;for(var n=0,s=t;n<s.length;n++){var o=s[n];o.classList.remove("bal-segment-item--after-checked");o.classList.remove("bal-segment-item--before-checked")}if(i<t.length){t[i].classList.add("bal-segment-item--after-checked")}if(r<t.length&&r>=0){t[r].classList.add("bal-segment-item--before-checked")}};e.prototype.render=function(){var e=this,t=e.invalid,a=e.isVertical,i=e.scrollable,r=e.keyboardMode,n=e.expanded,s=e.isMobile;var o=BEM.block("segment");return h(Host,{role:"radiogroup",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("invalid").class(t)),o.modifier("vertical").class(a)),o.modifier("scrollable").class(i)),o.modifier("keyboard").class(r)),o.modifier("expanded").class((n||s)&&!a)),onClick:this.onClick},h("slot",{onSlotchange:this.onSlottedItemsChange}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-segment"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Segment.prototype,"createLogger",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Segment.prototype,"breakpointListener",null);__decorate([ListenToWindowResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Segment.prototype,"windowResizeListener",null);Segment.style=BalSegmentStyle0;export{Segment as bal_segment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{l as lodash_isnil}from"./index-82aff103.js";import{k as rIC,d as waitAfterIdleCallback,e as deepReady,i as isDescendant,h as debounce}from"./helpers-c201154e.js";import{e as isSpaceKey,o as areArraysEqual,q as isArrowDownKey,s as isArrowUpKey,h as isEnterKey,u as isEscapeKey,y as isBackspaceKey}from"./index.esm-83b1f9c4.js";import{r as removeValue,p as preventDefault,l as length,g as getValues,i as includes,s as startsWith,a as addValue,f as findLabelByValue,b as findOptionByLabel,v as validateAfterBlur}from"./utils-9fbab1d3.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./_commonjsHelpers-1c8beb5f.js";var watchForOptions=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 balSelectCss=":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 BalSelectStyle0=balSelectCss;var isHuman=true;var isNotHuman=false;var Select=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balCancel=createEvent(this,"balCancel",7);this.balKeyPress=createEvent(this,"balKeyPress",7);this.didInit=false;this.inputId="bal-select-".concat(selectIds++);this.initialValue=[];this.removeValue=function(t){if(!e.disabled){e.updateRawValue(removeValue(e.rawValue,t),isHuman);if(e.multiple&&e.typeahead){e.setFocus()}e.fireBlur()}};this.fireBlur=function(t){if(t===void 0){t=new CustomEvent("blur")}if(!e.isPopoverOpen&&!e.hasFocus){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){if(e.disabled||e.readonly){preventDefault(t)}};this.handlePopoverChange=function(t){t.stopPropagation();if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;if(e.isPopoverOpen){e.updateFocus()}else{e.focusIndex=-1;if(e.multiple&&e.typeahead){e.updateInputValue("")}e.fireBlur(t)}}};this.handleInputBlur=function(t){preventDefault(t);var i=t.relatedTarget;if(i===null||i&&i.nodeName&&(i.nodeName==="BAL-MODAL"||i.nodeName==="INPUT"||i.nodeName==="BUTTON")){e.validateAfterBlur(isHuman)}e.hasFocus=false;e.fireBlur(t)};this.handleInputFocus=function(t){e.balFocus.emit(t);e.hasFocus=true};this.handleInputClick=function(t,i){if(i===void 0){i=false}return __awaiter(e,void 0,void 0,(function(){var e,r,o,n;return __generator(this,(function(s){switch(s.label){case 0:stopEventBubbling(t);if(this.isChipClicked(t)){return[2]}if(!(this.disabled||this.readonly))return[3,1];preventDefault(t);return[3,10];case 1:this.focusIndex=-1;this.balInputClick.emit(t);if(!this.typeahead)return[3,6];if(!(this.isPopoverOpen&&i))return[3,3];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.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,(o=this.popoverElement)===null||o===void 0?void 0:o.dismiss()];case 7:s.sent();return[3,10];case 8:return[4,(n=this.popoverElement)===null||n===void 0?void 0:n.present()];case 9:s.sent();s.label=10;case 10:return[2]}}))}))};this.handleKeyPress=function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.isPopoverOpen&&isSpaceKey(t)))return[3,2];preventDefault(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(!e.disabled&&!e.readonly){e.inputValue=t.target.value}};this.handleInput=function(t){return __awaiter(e,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();preventDefault(t);this.balInput.emit(this.inputValue)}return[2]}))}))};this.handleOptionMouseEnter=function(t){e.focusIndex=t};this.hasFocus=false;this.inputValue="";this.focusIndex=-1;this.isPopoverOpen=false;this.options=new Map;this.labelToScrollTo="";this.labelToSelectTo="";this.ariaForm=defaultBalAriaForm;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(!areArraysEqual(t,this.rawValue||[])){this.rawValue=__spreadArray([],t,true);this.syncNativeInput();if(this.didInit&&e===true){if(this.multiple){if(lodash_isnil(this.rawValue)){this.emitChangeEvent([])}else{this.emitChangeEvent(__spreadArray([],this.rawValue,true))}}else{if(lodash_isnil(this.rawValue)||length(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=debounce((function(){return t.updateOptions()}),0);this.initialValue=this.value;e();this.mutationO=watchForOptions(this.el,"bal-select-option",(function(){e()}))};t.prototype.componentWillLoad=function(){this.waitForOptionsAndThenUpdateRawValues();this.isInsideOfFooter();if(!lodash_isnil(this.rawValue)&&this.options.size>0&&length(this.rawValue)===1){var t=this.options.get(this.rawValue[0]);if(!lodash_isnil(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){preventDefault(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(isArrowDownKey(t)||isArrowUpKey(t)){preventDefault(t);this.navigateWithArrowKey(t);this.updateFocus()}if(isEnterKey(t)){preventDefault(t);this.selectedFocusedOption()}if(isEscapeKey(t)){this.cancel()}if(isBackspaceKey(t)&&this.typeahead&&this.multiple){if(this.inputElement.value===""&&length(this.rawValue)>0){e=getValues(this.rawValue);this.removeValue(e[length(this.rawValue)-1])}}if(!this.typeahead&&t.key.length===1){this.focusOptionByLabel(t.key)}if(isSpaceKey(t)&&!this.typeahead){preventDefault(t)}return[3,4];case 1:if(!this.hasFocus)return[3,4];if(!(isArrowDownKey(t)||isArrowUpKey(t)))return[3,3];preventDefault(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,waitAfterIdleCallback()];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([],isHuman);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&&!lodash_isnil(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&&!lodash_isnil(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(!lodash_isnil(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,deepReady(this.el)];case 1:i.sent();t=this.options.size>0;if(t){if(!this.remote){this.syncRawValue(isNotHuman)}}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,o,n;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++){o=this.rawValue[i];if(!e.has(o)){n=removeValue(this.rawValue,o);this.updateRawValue(n,isNotHuman)}}}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"?includes(e.textContent,t.inputValue):startsWith(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(length(this.rawValue)<1){return this.placeholder}return undefined}else{if(!lodash_isnil(this.rawValue)&&length(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 o=t.offsetTop+t.clientHeight;var n=e.scrollTop+e.clientHeight;if(o>n){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(isArrowDownKey(t)){this.focusIndex=this.focusIndex+1}else{if(isArrowUpKey(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(o){if(t!==" "){e=this.optionArray.find((function(e){return startsWith(e.label||"",t)}));if(!lodash_isnil(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!lodash_isnil(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(o){if(t!==" "){e=this.optionArray.find((function(e){return startsWith(e.label||"",t)}));if(!lodash_isnil(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!lodash_isnil(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(!lodash_isnil(this.value)&&this.value!==""){if(Array.isArray(this.value)){e=__spreadArray([],this.value.filter((function(t){return!lodash_isnil(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=getValues(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(addValue(this.rawValue,t,this.multiple),isHuman)}else{this.updateRawValue(removeValue(this.rawValue,t),isHuman)}}else{this.updateRawValue(addValue(this.rawValue,t,this.multiple),isHuman);if(this.rawValue&&this.rawValue.length>0){this.updateInputValue(findLabelByValue(this.options,this.rawValue[0]))}}};t.prototype.validateAfterBlur=function(t){if(t===void 0){t=isNotHuman}var e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){var i=findOptionByLabel(this.options,this.inputElement.value);if(i){e=[i.value]}else{e=[this.inputElement.value]}}else{e=validateAfterBlur(this.rawValue,this.options,this.inputElement.value)}this.updateRawValue(e,t)}};t.prototype.syncNativeInput=function(){if(!this.multiple){if(length(this.rawValue)>0){var t=getValues(this.rawValue);var e=findLabelByValue(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(!lodash_isnil(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=isDescendant(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 h("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"},findLabelByValue(t.options,e.value)||e.value)};var r=getValues(this.rawValue);var o=BEM.block("select");var n=o.element("native");var s=o.element("control");var a=s.element("icon");var l=s.element("selections");var c=s.element("input");var u=o.element("popover");var d=u.element("empty");var f=o.element("option");var b=f.element("content");var p=b.element("checkbox");var v=b.element("label");return h(Host,{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 findLabelByValue(t.options,e)})).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("disabled").class(this.disabled||this.readonly)),o.modifier("inverted").class(this.inverted)),o.modifier("inverted-footer").class(this.inverted))},h("select",{class:Object.assign({},n.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:function(e){return t.nativeSelectEl=e}},r.map((function(t){return h("option",{key:t,value:t,selected:true},t)}))),h("bal-popover",{onBalChange:this.handlePopoverChange,ref:function(e){return t.popoverElement=e}},h("div",{"bal-popover-trigger":true,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("invalid").class(this.invalid)),s.modifier("disabled").class(this.disabled||this.readonly)),s.modifier("focused").class(this.isPopoverOpen)),s.modifier("inverted-footer").class(this.inverted))},h("div",{class:Object.assign(Object.assign({},l.class()),l.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:function(e){return t.selectionEl=e}},r.filter((function(e){return t.multiple})).map((function(t){return h(i,{value:t})})),h("input",{type:"text",class:Object.assign(Object.assign({},c.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?h("bal-icon",{class:Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("loading").class(this.loading)),a.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"}):""),h("bal-popover-content",{class:Object.assign({},u.class()),scrollable:this.scrollable,spaceless:true,expanded:true},this.optionArray.map((function(e,i){return h("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({},f.class()),f.modifier("selected").class(r.includes(e.value)&&!(t.typeahead&&!t.multiple))),f.modifier("focused").class(t.focusIndex===i)),f.modifier("checkbox").class(t.multiple)),f.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)}},h("div",{class:Object.assign({},b.class())},h("span",{class:Object.assign({},p.class()),style:{display:t.multiple?"flex":"none"}},h("bal-checkbox",{checked:r.includes(e.value),tabindex:-1,nonSubmit:true,flat:true,onBalChange:preventDefault})),h("span",{class:Object.assign({},v.class()),innerHTML:e.innerHTML})))})),h("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 getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueWatcher"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-select"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Select.prototype,"createLogger",null);var selectIds=0;Select.style=BalSelectStyle0;var SelectOption=function(){function t(t){registerInstance(this,t);this.label=undefined;this.disabled=false;this.value=undefined;this.for="bal-selopt-".concat(selectOptionIds++)}t.prototype.createLogger=function(t){this.log=t};t.prototype.render=function(){return h(Host,{style:{display:"none"}},h("slot",null))};return t}();__decorate([Logger("bal-select-option"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],SelectOption.prototype,"createLogger",null);var selectOptionIds=0;export{Select as bal_select,SelectOption as bal_select_option};
|
|
1
|
+
import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{l as lodash_isnil}from"./index-82aff103.js";import{k as rIC,d as waitAfterIdleCallback,e as deepReady,i as isDescendant,h as debounce}from"./helpers-c201154e.js";import{e as isSpaceKey,o as areArraysEqual,q as isArrowDownKey,s as isArrowUpKey,h as isEnterKey,u as isEscapeKey,y as isBackspaceKey}from"./index.esm-76abd8e3.js";import{r as removeValue,p as preventDefault,l as length,g as getValues,i as includes,s as startsWith,a as addValue,f as findLabelByValue,b as findOptionByLabel,v as validateAfterBlur}from"./utils-9fbab1d3.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./_commonjsHelpers-1c8beb5f.js";var watchForOptions=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 balSelectCss=":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 BalSelectStyle0=balSelectCss;var isHuman=true;var isNotHuman=false;var Select=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balCancel=createEvent(this,"balCancel",7);this.balKeyPress=createEvent(this,"balKeyPress",7);this.didInit=false;this.inputId="bal-select-".concat(selectIds++);this.initialValue=[];this.removeValue=function(t){if(!e.disabled){e.updateRawValue(removeValue(e.rawValue,t),isHuman);if(e.multiple&&e.typeahead){e.setFocus()}e.fireBlur()}};this.fireBlur=function(t){if(t===void 0){t=new CustomEvent("blur")}if(!e.isPopoverOpen&&!e.hasFocus){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){if(e.disabled||e.readonly){preventDefault(t)}};this.handlePopoverChange=function(t){t.stopPropagation();if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;if(e.isPopoverOpen){e.updateFocus()}else{e.focusIndex=-1;if(e.multiple&&e.typeahead){e.updateInputValue("")}e.fireBlur(t)}}};this.handleInputBlur=function(t){preventDefault(t);var i=t.relatedTarget;if(i===null||i&&i.nodeName&&(i.nodeName==="BAL-MODAL"||i.nodeName==="INPUT"||i.nodeName==="BUTTON")){e.validateAfterBlur(isHuman)}e.hasFocus=false;e.fireBlur(t)};this.handleInputFocus=function(t){e.balFocus.emit(t);e.hasFocus=true};this.handleInputClick=function(t,i){if(i===void 0){i=false}return __awaiter(e,void 0,void 0,(function(){var e,r,o,n;return __generator(this,(function(s){switch(s.label){case 0:stopEventBubbling(t);if(this.isChipClicked(t)){return[2]}if(!(this.disabled||this.readonly))return[3,1];preventDefault(t);return[3,10];case 1:this.focusIndex=-1;this.balInputClick.emit(t);if(!this.typeahead)return[3,6];if(!(this.isPopoverOpen&&i))return[3,3];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.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,(o=this.popoverElement)===null||o===void 0?void 0:o.dismiss()];case 7:s.sent();return[3,10];case 8:return[4,(n=this.popoverElement)===null||n===void 0?void 0:n.present()];case 9:s.sent();s.label=10;case 10:return[2]}}))}))};this.handleKeyPress=function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.isPopoverOpen&&isSpaceKey(t)))return[3,2];preventDefault(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(!e.disabled&&!e.readonly){e.inputValue=t.target.value}};this.handleInput=function(t){return __awaiter(e,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();preventDefault(t);this.balInput.emit(this.inputValue)}return[2]}))}))};this.handleOptionMouseEnter=function(t){e.focusIndex=t};this.hasFocus=false;this.inputValue="";this.focusIndex=-1;this.isPopoverOpen=false;this.options=new Map;this.labelToScrollTo="";this.labelToSelectTo="";this.ariaForm=defaultBalAriaForm;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(!areArraysEqual(t,this.rawValue||[])){this.rawValue=__spreadArray([],t,true);this.syncNativeInput();if(this.didInit&&e===true){if(this.multiple){if(lodash_isnil(this.rawValue)){this.emitChangeEvent([])}else{this.emitChangeEvent(__spreadArray([],this.rawValue,true))}}else{if(lodash_isnil(this.rawValue)||length(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=debounce((function(){return t.updateOptions()}),0);this.initialValue=this.value;e();this.mutationO=watchForOptions(this.el,"bal-select-option",(function(){e()}))};t.prototype.componentWillLoad=function(){this.waitForOptionsAndThenUpdateRawValues();this.isInsideOfFooter();if(!lodash_isnil(this.rawValue)&&this.options.size>0&&length(this.rawValue)===1){var t=this.options.get(this.rawValue[0]);if(!lodash_isnil(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){preventDefault(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(isArrowDownKey(t)||isArrowUpKey(t)){preventDefault(t);this.navigateWithArrowKey(t);this.updateFocus()}if(isEnterKey(t)){preventDefault(t);this.selectedFocusedOption()}if(isEscapeKey(t)){this.cancel()}if(isBackspaceKey(t)&&this.typeahead&&this.multiple){if(this.inputElement.value===""&&length(this.rawValue)>0){e=getValues(this.rawValue);this.removeValue(e[length(this.rawValue)-1])}}if(!this.typeahead&&t.key.length===1){this.focusOptionByLabel(t.key)}if(isSpaceKey(t)&&!this.typeahead){preventDefault(t)}return[3,4];case 1:if(!this.hasFocus)return[3,4];if(!(isArrowDownKey(t)||isArrowUpKey(t)))return[3,3];preventDefault(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,waitAfterIdleCallback()];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([],isHuman);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&&!lodash_isnil(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&&!lodash_isnil(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(!lodash_isnil(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,deepReady(this.el)];case 1:i.sent();t=this.options.size>0;if(t){if(!this.remote){this.syncRawValue(isNotHuman)}}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,o,n;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++){o=this.rawValue[i];if(!e.has(o)){n=removeValue(this.rawValue,o);this.updateRawValue(n,isNotHuman)}}}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"?includes(e.textContent,t.inputValue):startsWith(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(length(this.rawValue)<1){return this.placeholder}return undefined}else{if(!lodash_isnil(this.rawValue)&&length(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 o=t.offsetTop+t.clientHeight;var n=e.scrollTop+e.clientHeight;if(o>n){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(isArrowDownKey(t)){this.focusIndex=this.focusIndex+1}else{if(isArrowUpKey(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(o){if(t!==" "){e=this.optionArray.find((function(e){return startsWith(e.label||"",t)}));if(!lodash_isnil(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!lodash_isnil(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(o){if(t!==" "){e=this.optionArray.find((function(e){return startsWith(e.label||"",t)}));if(!lodash_isnil(e)&&e.id){i=this.el.querySelector("button#".concat(e.id));if(!lodash_isnil(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(!lodash_isnil(this.value)&&this.value!==""){if(Array.isArray(this.value)){e=__spreadArray([],this.value.filter((function(t){return!lodash_isnil(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=getValues(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(addValue(this.rawValue,t,this.multiple),isHuman)}else{this.updateRawValue(removeValue(this.rawValue,t),isHuman)}}else{this.updateRawValue(addValue(this.rawValue,t,this.multiple),isHuman);if(this.rawValue&&this.rawValue.length>0){this.updateInputValue(findLabelByValue(this.options,this.rawValue[0]))}}};t.prototype.validateAfterBlur=function(t){if(t===void 0){t=isNotHuman}var e=this.rawValue;if(this.didInit&&!this.multiple){if(this.typeahead&&(this.selectionOptional||this.remote)){var i=findOptionByLabel(this.options,this.inputElement.value);if(i){e=[i.value]}else{e=[this.inputElement.value]}}else{e=validateAfterBlur(this.rawValue,this.options,this.inputElement.value)}this.updateRawValue(e,t)}};t.prototype.syncNativeInput=function(){if(!this.multiple){if(length(this.rawValue)>0){var t=getValues(this.rawValue);var e=findLabelByValue(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(!lodash_isnil(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=isDescendant(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 h("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"},findLabelByValue(t.options,e.value)||e.value)};var r=getValues(this.rawValue);var o=BEM.block("select");var n=o.element("native");var s=o.element("control");var a=s.element("icon");var l=s.element("selections");var c=s.element("input");var u=o.element("popover");var d=u.element("empty");var f=o.element("option");var b=f.element("content");var p=b.element("checkbox");var v=b.element("label");return h(Host,{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 findLabelByValue(t.options,e)})).join(","),class:Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("disabled").class(this.disabled||this.readonly)),o.modifier("inverted").class(this.inverted)),o.modifier("inverted-footer").class(this.inverted))},h("select",{class:Object.assign({},n.class()),name:this.name,multiple:this.multiple,required:this.required,tabindex:-1,ref:function(e){return t.nativeSelectEl=e}},r.map((function(t){return h("option",{key:t,value:t,selected:true},t)}))),h("bal-popover",{onBalChange:this.handlePopoverChange,ref:function(e){return t.popoverElement=e}},h("div",{"bal-popover-trigger":true,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("invalid").class(this.invalid)),s.modifier("disabled").class(this.disabled||this.readonly)),s.modifier("focused").class(this.isPopoverOpen)),s.modifier("inverted-footer").class(this.inverted))},h("div",{class:Object.assign(Object.assign({},l.class()),l.modifier("clickable").class(!this.isPopoverOpen&&!this.disabled&&!this.readonly)),onClick:this.handleInputClick,ref:function(e){return t.selectionEl=e}},r.filter((function(e){return t.multiple})).map((function(t){return h(i,{value:t})})),h("input",{type:"text",class:Object.assign(Object.assign({},c.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?h("bal-icon",{class:Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("loading").class(this.loading)),a.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"}):""),h("bal-popover-content",{class:Object.assign({},u.class()),scrollable:this.scrollable,spaceless:true,expanded:true},this.optionArray.map((function(e,i){return h("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({},f.class()),f.modifier("selected").class(r.includes(e.value)&&!(t.typeahead&&!t.multiple))),f.modifier("focused").class(t.focusIndex===i)),f.modifier("checkbox").class(t.multiple)),f.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)}},h("div",{class:Object.assign({},b.class())},h("span",{class:Object.assign({},p.class()),style:{display:t.multiple?"flex":"none"}},h("bal-checkbox",{checked:r.includes(e.value),tabindex:-1,nonSubmit:true,flat:true,onBalChange:preventDefault})),h("span",{class:Object.assign({},v.class()),innerHTML:e.innerHTML})))})),h("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 getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueWatcher"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-select"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Select.prototype,"createLogger",null);var selectIds=0;Select.style=BalSelectStyle0;var SelectOption=function(){function t(t){registerInstance(this,t);this.label=undefined;this.disabled=false;this.value=undefined;this.for="bal-selopt-".concat(selectOptionIds++)}t.prototype.createLogger=function(t){this.log=t};t.prototype.render=function(){return h(Host,{style:{display:"none"}},h("slot",null))};return t}();__decorate([Logger("bal-select-option"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],SelectOption.prototype,"createLogger",null);var selectOptionIds=0;export{Select as bal_select,SelectOption as bal_select_option};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{f as balColorGrey4,g as balColorYellow3,h as balColorYellow5,i as balColorPurple3,j as balColorPurple6,k as balColorRed3,l as balColorRed5,m as balColorGreen3,n as balColorGreen6}from"./tokens.esm-
|
|
1
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{f as balColorGrey4,g as balColorYellow3,h as balColorYellow5,i as balColorPurple3,j as balColorPurple6,k as balColorRed3,l as balColorRed5,m as balColorGreen3,n as balColorGreen6}from"./tokens.esm-337782ae.js";var balShapeCss=".bal-shape{display:block;overflow:hidden;border-radius:var(--bal-radius-normal);width:66px;height:66px}@media screen and (min-width: 769px),print{.bal-shape{width:120px;height:120px}}@media screen and (min-width: 1024px){.bal-shape{width:198px;height:198px;border-radius:unset}}.bal-shape--is-rotation-0{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.bal-shape--is-rotation-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.bal-shape--is-rotation-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-shape--is-rotation-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}";var BalShapeStyle0=balShapeCss;var Shape=function(){function e(e){var a=this;registerInstance(this,e);this.getHex=function(){var e;switch(a.color){case"green":e=balColorGreen6;break;case"green-light":e=balColorGreen3;break;case"red":e=balColorRed5;break;case"red-light":e=balColorRed3;break;case"purple":e=balColorPurple6;break;case"purple-light":e=balColorPurple3;break;case"yellow":e=balColorYellow5;break;case"yellow-light":e=balColorYellow3;break;default:e=balColorGrey4}return e};this.variation="1";this.color="green";this.rotation="0"}e.prototype.render=function(){var e=BEM.block("shape");var a=[h("g",{id:"e8353d3b-35a2-4e20-9245-0eceed641ae5"},h("g",{id:"af87362a-72b2-42cf-8efe-c9917dc1f7f6"},h("path",{class:"st0",d:"M132,66v66H66V66H132z M132,0v66H66V0H132z M66,0v66H0V6.4C0,4.2,0,3,0.4,2.2c0.4-0.7,1-1.4,1.7-1.7\n C3,0,4.2,0,6.4,0H66z M191.6,0c2.2,0,3.4,0,4.2,0.4c0.7,0.4,1.4,1,1.7,1.7c0.4,0.9,0.4,2,0.4,4.2V66h-66V0H191.6z M0,125.6V66h66\n v66H6.4H0 M198,132v59.6c0,2.2,0,3.4-0.4,4.2c-0.4,0.7-1,1.4-1.7,1.7c-0.9,0.4-2,0.4-4.2,0.4H132v-66H198z"}))),h("g",{id:"b949d602-8478-437e-a171-ad3f26649cb4"},h("g",{id:"ae3574e0-2065-4681-8937-4318b8656147"},h("path",{class:"b9f37b2d-094d-4f18-b17c-7c5acf36f9a6",d:"M132,66v66H66V66ZM191.6,0c2.24,0,3.36,0,4.22.44a4,4,0,0,1,1.74,1.74c.44.86.44,2,.44,4.22V66H132V0ZM66,0V66H0V6.4C0,4.16,0,3,.44,2.18A4,4,0,0,1,2.18.44C3,0,4.16,0,6.4,0Zm0,132v66H6.4c-2.24,0-3.36,0-4.22-.44a4,4,0,0,1-1.74-1.74C0,195,0,193.84,0,191.6V132Zm66,0v66H66V132Zm66,0v59.6c0,2.24,0,3.36-.44,4.22a4,4,0,0,1-1.74,1.74c-.86.44-2,.44-4.22.44H132V132Zm0-66v66H132V66Z"}))),h("g",{id:"e827a936-cbcd-43b3-971a-aa8f8714fdff"},h("g",{id:"e540dca8-23ca-45dc-b462-df9071c1317d"},h("path",{class:"st0",d:"M132,66v66H66V66H132z M132,0v66H66V0H132z M66,0v66H0V6.4C0,4.2,0,3,0.4,2.2c0.4-0.7,1-1.4,1.7-1.7\n C3,0,4.2,0,6.4,0H66z M66,132v66H6.4c-2.2,0-3.4,0-4.2-0.4c-0.7-0.4-1.4-1-1.7-1.7C0,195,0,193.8,0,191.6V132H66z M132,132v66H66\n v-66H132z M198,132v59.6c0,2.2,0,3.4-0.4,4.2c-0.4,0.7-1,1.4-1.7,1.7c-0.9,0.4-2,0.4-4.2,0.4H132v-66H198z M198,66v66h-66V66"})))];return h(Host,{class:Object.assign(Object.assign({},e.class()),e.modifier("is-rotation-".concat(this.rotation)).class())},h("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 198 198",focusable:"false","aria-hidden":"true",fill:this.getHex()},a[parseInt(this.variation)-1]))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Shape.style=BalShapeStyle0;export{Shape as bal_shape};
|