@baloise/ds-core 16.4.0-nightly.20240917 → 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.
Files changed (159) hide show
  1. package/components/all.d.ts +0 -2
  2. package/components/all.js +0 -3
  3. package/components/bal-app.js +85 -1
  4. package/components/bal-checkbox2.js +1 -1
  5. package/components/bal-radio2.js +1 -1
  6. package/components/index.js +289 -5
  7. package/components/tokens.esm.js +1 -1
  8. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  9. package/dist/baloise-design-system/baloise-design-system.js +1 -1
  10. package/dist/baloise-design-system/index.esm.js +1 -1
  11. package/dist/baloise-design-system/{p-f959646a.system.js → p-013b4c72.system.js} +1 -1
  12. package/dist/baloise-design-system/{p-d1c43680a0.system.entry.js → p-0530e008e9.system.entry.js} +1 -1
  13. package/dist/baloise-design-system/{p-d539c1cf.js → p-09ea5913.js} +1 -1
  14. package/dist/baloise-design-system/{p-6e88e337.system.js → p-0fb6cbda.system.js} +1 -1
  15. package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
  16. package/dist/baloise-design-system/{p-c240ee50bb.entry.js → p-190b5cd469.entry.js} +1 -1
  17. package/dist/baloise-design-system/{p-be0a0f5f7e.system.entry.js → p-23b7426d09.system.entry.js} +1 -1
  18. package/dist/baloise-design-system/{p-396898cf27.entry.js → p-2cd1f1dedb.entry.js} +1 -1
  19. package/dist/baloise-design-system/{p-8b998a54aa.entry.js → p-305cffd8aa.entry.js} +1 -1
  20. package/dist/baloise-design-system/{p-8a2f9c316c.system.entry.js → p-370575b8cb.system.entry.js} +1 -1
  21. package/dist/baloise-design-system/{p-1e31a7e4d2.system.entry.js → p-372474e989.system.entry.js} +1 -1
  22. package/dist/baloise-design-system/{p-9d051b6527.entry.js → p-3801afd625.entry.js} +1 -1
  23. package/dist/baloise-design-system/{p-cd66014bd1.entry.js → p-380aabd5bc.entry.js} +1 -1
  24. package/dist/baloise-design-system/{p-6c038bb4ff.entry.js → p-39bf8adcde.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-dae1f687.system.js → p-3befc6f9.system.js} +1 -1
  26. package/dist/baloise-design-system/{p-8c2be8bc00.entry.js → p-3c25811c44.entry.js} +1 -1
  27. package/dist/baloise-design-system/p-3eb68d7e.js +1 -0
  28. package/dist/baloise-design-system/{p-17660ffea0.entry.js → p-407ffd9c55.entry.js} +1 -1
  29. package/dist/baloise-design-system/{p-4cdec4da61.system.entry.js → p-445d2e1c70.system.entry.js} +1 -1
  30. package/dist/baloise-design-system/{p-261968b2.system.js → p-4809d5c4.system.js} +1 -1
  31. package/dist/baloise-design-system/{p-3558e7a64b.system.entry.js → p-487816db33.system.entry.js} +1 -1
  32. package/dist/baloise-design-system/{p-4f1afa9be1.system.entry.js → p-4fe64c3ec6.system.entry.js} +1 -1
  33. package/dist/baloise-design-system/p-54f81c32.js +1 -1
  34. package/dist/baloise-design-system/{p-4e8fff8409.entry.js → p-5fae3f5478.entry.js} +1 -1
  35. package/dist/baloise-design-system/{p-53c92c2d21.entry.js → p-77350b27fc.entry.js} +1 -1
  36. package/dist/baloise-design-system/{p-80c011874c.entry.js → p-7c586fb89f.entry.js} +1 -1
  37. package/dist/baloise-design-system/{p-509b566d.system.js → p-88eb14fd.system.js} +1 -1
  38. package/dist/baloise-design-system/{p-3bc2f95cf3.system.entry.js → p-9f54cac588.system.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-a53f45fab6.entry.js → p-b0c22ff9d1.entry.js} +1 -1
  40. package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
  41. package/dist/baloise-design-system/{p-d908780376.system.entry.js → p-c1c17f8edc.system.entry.js} +1 -1
  42. package/dist/baloise-design-system/{p-ac800c3208.entry.js → p-ced37553e2.entry.js} +1 -1
  43. package/dist/baloise-design-system/{p-06e93c033b.system.entry.js → p-d3fabdb142.system.entry.js} +1 -1
  44. package/dist/baloise-design-system/{p-18af339b1e.system.entry.js → p-d7d6937d59.system.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-b0bb64b2b8.system.entry.js → p-df40272425.system.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-17f2b2e25a.entry.js → p-e0384bfc0c.entry.js} +1 -1
  47. package/dist/baloise-design-system/{p-2a700c21ae.system.entry.js → p-e1ccb7023c.system.entry.js} +1 -1
  48. package/dist/baloise-design-system/p-e75ccb92.js +1 -0
  49. package/dist/baloise-design-system/p-e78a6409.js +1 -0
  50. package/dist/baloise-design-system/{p-19d582fb4a.entry.js → p-ef916aafa5.entry.js} +1 -1
  51. package/dist/baloise-design-system/{p-f66ea0e663.system.entry.js → p-f03e63bd1e.system.entry.js} +1 -1
  52. package/dist/baloise-design-system/{p-40628589e1.system.entry.js → p-f62d0ccdd1.system.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-e542aaeb27.entry.js → p-f819d47031.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-b570b77884.system.entry.js → p-fb0af77320.system.entry.js} +1 -1
  55. package/dist/cjs/{global-2562a984.js → app-globals-ae3a8623.js} +4 -2
  56. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  57. package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
  58. package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
  59. package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
  60. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  61. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  62. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  63. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  64. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  65. package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
  66. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  67. package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
  68. package/dist/cjs/bal-segment.cjs.entry.js +4 -4
  69. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  70. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  71. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  72. package/dist/cjs/baloise-design-system.cjs.js +2 -3
  73. package/dist/cjs/{breakpoints.decorator-77a3b464.js → breakpoints.decorator-a4a5bd7a.js} +1 -1
  74. package/dist/cjs/{breakpoints.subject-ae73ae55.js → breakpoints.subject-fbf85930.js} +1 -1
  75. package/dist/cjs/index.cjs.js +2 -2
  76. package/dist/cjs/initialize-2a19d091.js +1 -1
  77. package/dist/cjs/loader.cjs.js +2 -3
  78. package/dist/cjs/{tokens.esm-15025c39.js → tokens.esm-aa4bb7f7.js} +1 -1
  79. package/dist/cjs/{window-resize.decorator-5b9c08d1.js → window-resize.decorator-c7a521b0.js} +1 -1
  80. package/dist/collection/collection-manifest.json +1 -2
  81. package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
  82. package/dist/collection/utils/constants/version.constant.js +1 -1
  83. package/dist/esm/{global-63f4bcec.js → app-globals-b0dd0fc4.js} +4 -2
  84. package/dist/esm/bal-carousel_2.entry.js +3 -3
  85. package/dist/esm/bal-checkbox_2.entry.js +1 -1
  86. package/dist/esm/bal-datepicker.entry.js +3 -3
  87. package/dist/esm/bal-hint_3.entry.js +3 -3
  88. package/dist/esm/bal-list_8.entry.js +3 -3
  89. package/dist/esm/bal-logo.entry.js +3 -3
  90. package/dist/esm/bal-nav_8.entry.js +3 -3
  91. package/dist/esm/bal-navbar_5.entry.js +3 -3
  92. package/dist/esm/bal-pagination.entry.js +3 -3
  93. package/dist/esm/bal-popover_2.entry.js +3 -3
  94. package/dist/esm/bal-progress-bar.entry.js +4 -4
  95. package/dist/esm/bal-radio_2.entry.js +1 -1
  96. package/dist/esm/bal-segment.entry.js +4 -4
  97. package/dist/esm/bal-shape.entry.js +1 -1
  98. package/dist/esm/bal-steps.entry.js +3 -3
  99. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  100. package/dist/esm/baloise-design-system.js +2 -3
  101. package/dist/esm/{breakpoints.decorator-d55790da.js → breakpoints.decorator-f2ac9963.js} +1 -1
  102. package/dist/esm/{breakpoints.subject-ee89b4ec.js → breakpoints.subject-3605e395.js} +1 -1
  103. package/dist/esm/index.js +3 -3
  104. package/dist/esm/initialize-e216cfe4.js +1 -1
  105. package/dist/esm/loader.js +2 -3
  106. package/dist/esm/{tokens.esm-769d0c71.js → tokens.esm-337782ae.js} +1 -1
  107. package/dist/esm/{window-resize.decorator-dec8dd72.js → window-resize.decorator-d5198831.js} +1 -1
  108. package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
  109. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  110. package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
  111. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  112. package/dist/esm-es5/bal-hint_3.entry.js +1 -1
  113. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  114. package/dist/esm-es5/bal-logo.entry.js +1 -1
  115. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  116. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  117. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  118. package/dist/esm-es5/bal-popover_2.entry.js +1 -1
  119. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  120. package/dist/esm-es5/bal-radio_2.entry.js +1 -1
  121. package/dist/esm-es5/bal-segment.entry.js +1 -1
  122. package/dist/esm-es5/bal-shape.entry.js +1 -1
  123. package/dist/esm-es5/bal-steps.entry.js +1 -1
  124. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  125. package/dist/esm-es5/baloise-design-system.js +1 -1
  126. package/dist/esm-es5/{breakpoints.decorator-d55790da.js → breakpoints.decorator-f2ac9963.js} +1 -1
  127. package/dist/esm-es5/{breakpoints.subject-ee89b4ec.js → breakpoints.subject-3605e395.js} +1 -1
  128. package/dist/esm-es5/index.js +1 -1
  129. package/dist/esm-es5/initialize-e216cfe4.js +1 -1
  130. package/dist/esm-es5/loader.js +1 -1
  131. package/dist/esm-es5/{window-resize.decorator-dec8dd72.js → window-resize.decorator-d5198831.js} +1 -1
  132. package/dist/types/components.d.ts +0 -37
  133. package/package.json +7 -7
  134. package/components/bal-app2.js +0 -87
  135. package/components/bal-doc-app.d.ts +0 -11
  136. package/components/bal-doc-app.js +0 -260
  137. package/components/initialize.js +0 -288
  138. package/dist/baloise-design-system/p-03c0e702.js +0 -1
  139. package/dist/baloise-design-system/p-120f1513.js +0 -1
  140. package/dist/baloise-design-system/p-360068a4.system.js +0 -1
  141. package/dist/baloise-design-system/p-381fe5557d.entry.js +0 -1
  142. package/dist/baloise-design-system/p-40b5ad07c5.system.entry.js +0 -1
  143. package/dist/baloise-design-system/p-6d1b6215.js +0 -1
  144. package/dist/baloise-design-system/p-7291766c.system.js +0 -1
  145. package/dist/baloise-design-system/p-e8ffddeb.js +0 -1
  146. package/dist/cjs/app-globals-5fd73c0c.js +0 -7
  147. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
  148. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  149. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
  150. package/dist/esm/app-globals-970bab17.js +0 -5
  151. package/dist/esm/bal-doc-app.entry.js +0 -227
  152. package/dist/esm-es5/app-globals-970bab17.js +0 -1
  153. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  154. package/dist/esm-es5/global-63f4bcec.js +0 -1
  155. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  156. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
  157. /package/dist/baloise-design-system/{p-1a742a5b.system.js → p-36074466.system.js} +0 -0
  158. /package/dist/baloise-design-system/{p-3f4bb3a8.js → p-e1994e2c.js} +0 -0
  159. /package/dist/esm-es5/{tokens.esm-769d0c71.js → tokens.esm-337782ae.js} +0 -0
@@ -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{s as stopEventBubbling,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{e as isSpaceKey,o as areArraysEqual}from"./index.esm-76abd8e3.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{a as ariaBooleanToString}from"./aria-d5877698.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--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 BalCheckboxStyle0=radioCheckboxCss;var Checkbox=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-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.keyboardMode=true;this.initialValue=false;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(e.wasFocused){e.focused=true}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;e.wasFocused=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){if(!isSpaceKey(a)){e.wasFocused=false}e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.hasLabel=true;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.wasFocused=false;this.name=this.inputId;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.inline=false;this.interface="checkbox";this.value="on";this.checked=false;this.disabled=false;this.readonly=false;this.required=false;this.autoInvalidOff=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(){var a=this;var e=this.group;var o=this.checkboxButton;if(o||e){this.updateState()}if(e){e.addEventListener("balChange",(function(){return a.updateState()}))}this.initialValue=this.checked;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;if(this.group){this.group.removeEventListener("balChange",(function(){return a.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.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.checked=this.initialValue}};a.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetFocus(this);return[2]}))}))};a.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetBlur(this);return[2]}))}))};a.prototype.getInputElement=function(){return 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.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.checkboxButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.group&&this.group.control&&Array.isArray(this.group.value)){a=this.group.value.includes(this.value);if(a!==this.checked){this.checked=a}}if(this.checkboxButton){this.buttonTabindex=-1;if(this.checkboxButton.setChecked){this.checkboxButton.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,"option",{get:function(){return{name:this.name,value:this.value,checked:this.checked,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});Object.defineProperty(a.prototype,"group",{get:function(){return this.el.closest("bal-checkbox-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"checkboxButton",{get:function(){return this.el.closest("bal-checkbox-button")},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked)};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=e.element("icon");var l=c.element("text");var r=this.focused&&this.buttonTabindex!==-1;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var t=this.ariaForm.controlId||this.inputId;var d=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){d="".concat(d||""," ").concat(t,"-lbl").trim();n.id="".concat(t,"-lbl");n.htmlFor=t}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":ariaBooleanToString(this.disabled),"aria-hidden":ariaBooleanToString(this.disabled||this.nonSubmit),"aria-focused":r?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":r},e.class()),e.modifier("checkbox").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("switch").class(this.interface==="switch")),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("invisible").class(this.invisible)),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("inline").class(this.inline)),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-checkbox-input",type:"checkbox",id:t,"aria-labelledby":d,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":ariaBooleanToString(this.disabled),"aria-checked":"".concat(this.checked),"aria-hidden":ariaBooleanToString(this.nonSubmit),name:this.name,value:this.value,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(Object.assign({},c.class()),c.modifier("checkbox").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat)),c.modifier("switch").class(this.interface==="switch"))},n,{"data-testid":"bal-checkbox-label"}),this.interface==="switch"?h("bal-icon",{class:Object.assign({},b.class()),name:"check",color:"white",size:"x-small","aria-hidden":"true"}):"",h("span",{class:Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("hidden").class(this.labelHidden)),l.modifier("flat").class(this.flat)),"data-testid":"bal-checkbox-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-checkbox"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Checkbox.prototype,"createLogger",null);var checkboxIds=0;Checkbox.style=BalCheckboxStyle0;var CheckboxGroup=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-cg-".concat(checkboxGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onClick=function(a){if(!e.control){return}var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-checkbox");if(c){if(c.disabled||c.readonly){return a.stopPropagation()}}var b=[];e.getCheckboxes().forEach((function(a){if(a.checked){b.push(a.value)}}));if(!areArraysEqual(e.value,b)){e.value=__spreadArray([],b,true);e.balChange.emit(e.value)}};this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.sync();return[2]}))}))};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.interface=undefined;this.control=false;this.name=this.inputId;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.value=[];this.columns=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){if(this.control){this.onOptionChange();this.mutationObserverActive=this.options===undefined}return[2]}))}))};a.prototype.invalidChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.invalid=a}));this.getCheckboxButtons().forEach((function(e){e.invalid=a}))}}};a.prototype.disabledChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.disabled=a}));this.getCheckboxButtons().forEach((function(e){e.disabled=a}))}}};a.prototype.readonlyChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.readonly=a}));this.getCheckboxButtons().forEach((function(e){e.readonly=a}))}}};a.prototype.valueChanged=function(a,e){if(this.control){if(!areArraysEqual(this.value,e)){this.onOptionChange()}}else{this.onOptionChange()}};a.prototype.columnsChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){if(this.control){this.mutationObserverActive=this.options===undefined}};a.prototype.componentWillLoad=function(){if(this.control){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){if(this.control){this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(this.control){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){if(this.control){this.value=[]}this.onOptionChange()}};a.prototype.checkboxFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.checkboxBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.control){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.sync=function(){var a=this;if(this.control){var e=function(e){for(var o=0;o<a.value.length;o++){var c=a.value[o];if(c!==undefined&&c.toString()===e.value.toString()){return true}}return false};this.getCheckboxes().forEach((function(a){a.checked=e(a)}))}this.getCheckboxes().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.getCheckboxes=function(){return Array.from(this.el.querySelectorAll("bal-checkbox"))};a.prototype.getCheckboxButtons=function(){return Array.from(this.el.querySelectorAll("bal-checkbox-button"))};a.prototype.render=function(){var a=BEM.block("radio-checkbox-group");var e=a.element("inner");var o=this.options||[];var c=o.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({},a.class()),role:"group","aria-disabled":this.disabled?"true":null,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("vertical-mobile").class(this.verticalOnMobile)),e.modifier("vertical").class(this.vertical)),e.modifier("expanded").class(this.expanded)),e.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),c.map((function(a){return h("bal-checkbox",{key:a.value,name:a.name,value:a.value,labelHidden:a.labelHidden,flat:a.flat,interface:a.interface,disabled:a.disabled,readonly:a.readonly,required:a.required,nonSubmit:!!a.nonSubmit,invalid:a.invalid,innerHTML:a.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],value:["valueChanged"],columns:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-checkbox-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-checkbox-group","bal-checkbox"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"mutationListener",null);var checkboxGroupIds=0;export{Checkbox as bal_checkbox,CheckboxGroup as bal_checkbox_group};
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{s as stopEventBubbling,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{e as isSpaceKey,o as areArraysEqual}from"./index.esm-76abd8e3.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{a as ariaBooleanToString}from"./aria-d5877698.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 BalCheckboxStyle0=radioCheckboxCss;var Checkbox=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-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.keyboardMode=true;this.initialValue=false;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(e.wasFocused){e.focused=true}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;e.wasFocused=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){if(!isSpaceKey(a)){e.wasFocused=false}e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.hasLabel=true;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.wasFocused=false;this.name=this.inputId;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.inline=false;this.interface="checkbox";this.value="on";this.checked=false;this.disabled=false;this.readonly=false;this.required=false;this.autoInvalidOff=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(){var a=this;var e=this.group;var o=this.checkboxButton;if(o||e){this.updateState()}if(e){e.addEventListener("balChange",(function(){return a.updateState()}))}this.initialValue=this.checked;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;if(this.group){this.group.removeEventListener("balChange",(function(){return a.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.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.checked=this.initialValue}};a.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetFocus(this);return[2]}))}))};a.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetBlur(this);return[2]}))}))};a.prototype.getInputElement=function(){return 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.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.checkboxButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.group&&this.group.control&&Array.isArray(this.group.value)){a=this.group.value.includes(this.value);if(a!==this.checked){this.checked=a}}if(this.checkboxButton){this.buttonTabindex=-1;if(this.checkboxButton.setChecked){this.checkboxButton.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,"option",{get:function(){return{name:this.name,value:this.value,checked:this.checked,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});Object.defineProperty(a.prototype,"group",{get:function(){return this.el.closest("bal-checkbox-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"checkboxButton",{get:function(){return this.el.closest("bal-checkbox-button")},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked)};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=e.element("icon");var l=c.element("text");var r=this.focused&&this.buttonTabindex!==-1;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var t=this.ariaForm.controlId||this.inputId;var d=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){d="".concat(d||""," ").concat(t,"-lbl").trim();n.id="".concat(t,"-lbl");n.htmlFor=t}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":ariaBooleanToString(this.disabled),"aria-hidden":ariaBooleanToString(this.disabled||this.nonSubmit),"aria-focused":r?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":r},e.class()),e.modifier("checkbox").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("switch").class(this.interface==="switch")),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("invisible").class(this.invisible)),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("inline").class(this.inline)),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-checkbox-input",type:"checkbox",id:t,"aria-labelledby":d,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":ariaBooleanToString(this.disabled),"aria-checked":"".concat(this.checked),"aria-hidden":ariaBooleanToString(this.nonSubmit),name:this.name,value:this.value,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(Object.assign({},c.class()),c.modifier("checkbox").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat)),c.modifier("switch").class(this.interface==="switch"))},n,{"data-testid":"bal-checkbox-label"}),this.interface==="switch"?h("bal-icon",{class:Object.assign({},b.class()),name:"check",color:"white",size:"x-small","aria-hidden":"true"}):"",h("span",{class:Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("hidden").class(this.labelHidden)),l.modifier("flat").class(this.flat)),"data-testid":"bal-checkbox-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-checkbox"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Checkbox.prototype,"createLogger",null);var checkboxIds=0;Checkbox.style=BalCheckboxStyle0;var CheckboxGroup=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-cg-".concat(checkboxGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onClick=function(a){if(!e.control){return}var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-checkbox");if(c){if(c.disabled||c.readonly){return a.stopPropagation()}}var b=[];e.getCheckboxes().forEach((function(a){if(a.checked){b.push(a.value)}}));if(!areArraysEqual(e.value,b)){e.value=__spreadArray([],b,true);e.balChange.emit(e.value)}};this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.sync();return[2]}))}))};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.interface=undefined;this.control=false;this.name=this.inputId;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.value=[];this.columns=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){if(this.control){this.onOptionChange();this.mutationObserverActive=this.options===undefined}return[2]}))}))};a.prototype.invalidChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.invalid=a}));this.getCheckboxButtons().forEach((function(e){e.invalid=a}))}}};a.prototype.disabledChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.disabled=a}));this.getCheckboxButtons().forEach((function(e){e.disabled=a}))}}};a.prototype.readonlyChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.readonly=a}));this.getCheckboxButtons().forEach((function(e){e.readonly=a}))}}};a.prototype.valueChanged=function(a,e){if(this.control){if(!areArraysEqual(this.value,e)){this.onOptionChange()}}else{this.onOptionChange()}};a.prototype.columnsChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){if(this.control){this.mutationObserverActive=this.options===undefined}};a.prototype.componentWillLoad=function(){if(this.control){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){if(this.control){this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(this.control){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){if(this.control){this.value=[]}this.onOptionChange()}};a.prototype.checkboxFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.checkboxBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.control){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.sync=function(){var a=this;if(this.control){var e=function(e){for(var o=0;o<a.value.length;o++){var c=a.value[o];if(c!==undefined&&c.toString()===e.value.toString()){return true}}return false};this.getCheckboxes().forEach((function(a){a.checked=e(a)}))}this.getCheckboxes().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.getCheckboxes=function(){return Array.from(this.el.querySelectorAll("bal-checkbox"))};a.prototype.getCheckboxButtons=function(){return Array.from(this.el.querySelectorAll("bal-checkbox-button"))};a.prototype.render=function(){var a=BEM.block("radio-checkbox-group");var e=a.element("inner");var o=this.options||[];var c=o.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({},a.class()),role:"group","aria-disabled":this.disabled?"true":null,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("vertical-mobile").class(this.verticalOnMobile)),e.modifier("vertical").class(this.vertical)),e.modifier("expanded").class(this.expanded)),e.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),c.map((function(a){return h("bal-checkbox",{key:a.value,name:a.name,value:a.value,labelHidden:a.labelHidden,flat:a.flat,interface:a.interface,disabled:a.disabled,readonly:a.readonly,required:a.required,nonSubmit:!!a.nonSubmit,invalid:a.invalid,innerHTML:a.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],value:["valueChanged"],columns:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-checkbox-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-checkbox-group","bal-checkbox"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"mutationListener",null);var checkboxGroupIds=0;export{Checkbox as bal_checkbox,CheckboxGroup as bal_checkbox_group};
@@ -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{k as rIC,m as debounceEvent}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{r as requiredArgs,t as toDate,b as toInteger,g as getDefaultOptions,p as parse,f as formatDateString,i as isValidIsoString,c as format,e as isSpaceKey,h as isEnterKey,d as dateSeparator,j as getYear,n as now,k as getMonth,m as getDate}from"./index.esm-76abd8e3.js";import{l as lodash_isnil}from"./index-82aff103.js";import{N as NUMBER_KEYS,A as ACTION_KEYS,i as isCtrlOrCommandKey}from"./keys.constant-0eb059e0.js";import{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";import{s as stopEventBubbling,g as getInputTarget,i as inputHandleFocus,a as inputHandleHostClick,b as inputListenOnClick,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{p as preventDefault}from"./utils-9fbab1d3.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{d as defaultConfig,a as defaultLocale}from"./config.default-7efdc82d.js";import{b as balBreakpoints}from"./breakpoints.subject-ee89b4ec.js";import{g as useBalConfig}from"./config.utils-6ac6c9bd.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-d55790da.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./_commonjsHelpers-1c8beb5f.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-769d0c71.js";function addDays(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}i.setDate(i.getDate()+a);return i}function addMonths(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}var r=i.getDate();var n=new Date(i.getTime());n.setMonth(i.getMonth()+a+1,0);var s=n.getDate();if(r>=s){return n}else{i.setFullYear(n.getFullYear(),n.getMonth(),r);return i}}function startOfWeek(t,e){var i,a,r,n,s,o,l,d;requiredArgs(1,arguments);var c=getDefaultOptions();var u=toInteger((i=(a=(r=(n=e===null||e===void 0?void 0:e.weekStartsOn)!==null&&n!==void 0?n:e===null||e===void 0?void 0:(s=e.locale)===null||s===void 0?void 0:(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&a!==void 0?a:(l=c.locale)===null||l===void 0?void 0:(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:0);if(!(u>=0&&u<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var h=toDate(t);var f=h.getDay();var p=(f<u?7:0)+f-u;h.setDate(h.getDate()-p);h.setHours(0,0,0,0);return h}function startOfDay(t){requiredArgs(1,arguments);var e=toDate(t);e.setHours(0,0,0,0);return e}function addYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addMonths(t,i*12)}function isSameDay(t,e){requiredArgs(2,arguments);var i=startOfDay(t);var a=startOfDay(e);return i.getTime()===a.getTime()}function lastDayOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);var i=e.getMonth();e.setFullYear(e.getFullYear(),i+1,0);e.setHours(0,0,0,0);return e}function isAfter(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()>a.getTime()}function isBefore(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()<a.getTime()}function isSameWeek(t,e,i){requiredArgs(2,arguments);var a=startOfWeek(t,i);var r=startOfWeek(e,i);return a.getTime()===r.getTime()}function isSameMonth(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()}function isWithinInterval(t,e){requiredArgs(2,arguments);var i=toDate(t).getTime();var a=toDate(e.start).getTime();var r=toDate(e.end).getTime();if(!(a<=r)){throw new RangeError("Invalid interval")}return i>=a&&i<=r}function subDays(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addDays(t,-i)}function subYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addYears(t,-i)}var balDatepickerCss=':root{--bal-datepicker-popover-background:var(--bal-color-grey-2);--bal-datepicker-cell-background:var(--bal-color-white);--bal-datepicker-cell-selected-background:var(--bal-color-primary);--bal-datepicker-cell-selected-today-background:var(--bal-color-white);--bal-datepicker-cell-today-background:var(--bal-color-primary);--bal-datepicker-cell-today-radius:var(--bal-radius-rounded)}.bal-datepicker{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-datepicker__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-datepicker__popup{padding:1rem;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--bal-datepicker-popover-background)}@media screen and (min-width: 769px),print{.bal-datepicker__popup{max-width:24.5rem}}.bal-datepicker__popup__body{max-width:22.5rem;margin:0 auto 0 auto;margin-top:.75rem}.bal-datepicker-pagination{max-width:22.5rem;margin:0 auto 0 auto}.bal-datepicker-pagination__inner{display:-ms-flexbox;display:flex;gap:.5rem}.bal-datepicker-pagination__month-and-year{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;gap:.5rem}.bal-datepicker-pagination__month-and-year__select{-ms-flex:1;flex:1}.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{padding-top:0 !important;padding-bottom:0 !important;text-align:center !important;min-height:2rem !important;height:2rem !important}@media screen and (min-width: 769px),print{.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{min-height:3rem !important;height:3rem !important}}.bal-datepicker-grid{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.bal-datepicker-grid__body{display:table-row-group}.bal-datepicker-grid__row{display:table-row}.bal-datepicker-grid__row .bal-datepicker-grid__cell{margin-bottom:.25rem;margin-right:.25rem}.bal-datepicker-grid__row:last-child .bal-datepicker-grid__cell{margin-bottom:0}.bal-datepicker-grid__header{display:-ms-flexbox;display:flex;max-width:22.5rem;margin:0 auto 0 auto;gap:.25rem}.bal-datepicker-grid__header .bal-datepicker-grid__cell{background:rgba(0,0,0,0)}.bal-datepicker-grid__header .bal-datepicker-grid__cell span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;width:100%}.bal-datepicker-grid__cell{position:relative;text-align:center;vertical-align:middle;display:table-cell;width:13%;padding:0 !important;height:3rem;min-height:3rem;min-width:2.25rem;-webkit-appearance:auto !important;-moz-appearance:auto !important;appearance:auto !important;background:var(--bal-datepicker-cell-background)}.bal-datepicker-grid__cell--selected{background:var(--bal-datepicker-cell-selected-background) !important}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)>span{font-weight:var(--bal-font-weight-bold)}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)::after{content:"";position:absolute;display:block;width:.25rem;height:.25rem;background:var(--bal-datepicker-cell-today-background);border-radius:var(--bal-datepicker-cell-today-radius);margin-left:-2px;left:50%;bottom:.375rem}.bal-datepicker-grid__cell--today.bal-datepicker-grid__cell--selected:not(.bal-datepicker-grid__cell--outdated)::after{background:var(--bal-datepicker-cell-selected-today-background)}.bal-datepicker-grid__cell:last-child{margin-right:0}.bal-datepicker-grid__cell>span{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular)}@media screen and (min-width: 769px),print{.bal-datepicker-grid__cell{min-width:3rem !important}}.bal-datepicker-grid__cell--disabled{border-color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important}.bal-datepicker-grid__cell--header>span{border:none;background:rgba(0,0,0,0);color:var(--bal-color-text-primary);font-weight:var(--bal-font-weight-bold);cursor:default}';var BalDatepickerStyle0=balDatepickerCss;var Datepicker=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balIconClick=createEvent(this,"balIconClick",7);this.inputId="bal-dp-".concat(datepickerIds++);this.inheritedAttributes={};this.inputValue=this.value;this.onIconClick=function(t){if(!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);e.balIconClick.emit(t)};this.onInputClick=function(t){if(!e.triggerIcon&&!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);if(!e.triggerIcon){e.balInputClick.emit(t)}};this.onPopoverChange=function(t){stopEventBubbling(t);if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;e.fireBlur(t)}};this.onInput=function(t){var i=getInputTarget(t);if(i){e.inputValue=i.value;if(i.value){e.nativeInput.value=e.formatDate(e.inputValue)}if(e.inputValue&&e.inputValue.length>=6){var a=parse(e.inputValue,e.getLocale());var r=formatDateString(a);if(isValidIsoString(r)){e.selectedDate=r;e.updatePointerDates()}}}e.balInput.emit(e.inputValue)};this.onInputChange=function(t){var i=t.target.value;var a=parse(i,e.getLocale());var r=formatDateString(a);var n=format(e.getLocale(),a);e.nativeInput.value=n;e.updateValue(r);e.updatePointerDates()};this.onClickDateCell=function(t){if(!t.isDisabled){e.select(t.dateString)}};this.onInputKeyUp=function(t){if(isSpaceKey(t)&&!e.triggerIcon){if(e.isPopoverOpen){e.close()}else{e.open()}}if(isEnterKey(t)&&!e.triggerIcon){var i=parse(e.nativeInput.value,e.getLocale());var a=formatDateString(i);if(e.isPopoverOpen){if(e.value===a){e.close()}}}};this.onInputKeyDown=function(t){var i=dateSeparator(e.getLocale());var a=__spreadArray(__spreadArray(__spreadArray([],NUMBER_KEYS,true),[i],false),ACTION_KEYS,true);if(!isCtrlOrCommandKey(t)&&a.indexOf(t.key)<0){t.preventDefault();t.stopPropagation()}if(t.key==="Tab"){e.close()}};this.onMonthSelect=function(t){var i=t.target.value;e.pointerDate=Object.assign(Object.assign({},e.pointerDate),{day:1,month:parseInt(i,10)})};this.onYearSelect=function(t){var i=t.target.value;var a=parseInt(i,10);var r=undefined;if(e.defaultDate){var n=parse(e.defaultDate);if(e.max){var s=parse(e.max);if(n.getMonth()>s.getMonth()){r=s.getMonth()}}if(e.min){var o=parse(e.min);if(n.getMonth()<o.getMonth()){r=o.getMonth()}}}e.pointerDate={day:1,year:a,month:r!==undefined?r:e.pointerDate.month}};this.onInputFocus=function(t){return inputHandleFocus(e,t)};this.onInputBlur=function(t){preventDefault(t);e.focused=false;e.fireBlur(t)};this.fireBlur=function(t){if(!e.isPopoverOpen&&!e.focused){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){return inputHandleHostClick(e,t)};this.language=defaultConfig.language;this.region=defaultConfig.region;this.isMobile=balBreakpoints.isMobile;this.focused=false;this.isPopoverOpen=false;this.selectedDate="";this.pointerDate={year:getYear(now()),month:getMonth(now()),day:getDate(now())};this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.loading=false;this.placeholder=undefined;this.min=undefined;this.max=undefined;this.closeOnSelect=true;this.triggerIcon=false;this.minYearProp=undefined;this.maxYearProp=undefined;this.debounce=0;this.defaultDate=undefined;this.value=undefined;this.allowedDates=undefined;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.debounceChanged=function(){this.balChange=debounceEvent(this.balChange,this.debounce)};t.prototype.valueChanged=function(){this.selectedDate=this.value;this.updatePointerDates()};t.prototype.listenOnClick=function(t){inputListenOnClick(this,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(){if(e.initialValue){e.nativeInput.value=format(e.getLocale(),parse(e.initialValue))}else{e.nativeInput.value=""}e.selectedDate=e.initialValue;e.updateValue(e.initialValue,false);e.updatePointerDates()}),0)}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile};t.prototype.connectedCallback=function(){this.debounceChanged();this.initialValue=this.value};t.prototype.componentDidLoad=function(){this.inputValue=this.value};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value,false)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.region=t.region;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.present()}return[2]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.dismiss()}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:this.nativeInput.value=format(this.getLocale(),parse(t));this.updateValue(t);this.updatePointerDates();if(!this.closeOnSelect)return[3,2];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.toggle()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetFocus(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetBlur(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};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.updatePointerDates=function(){var t=now();t.setDate(1);if(this.selectedDate){t=parse(this.selectedDate)}else{if(this.defaultDate){t=parse(this.defaultDate)}}if(this.min){var e=parse(this.min);if(e&&t<e){t=e}}if(this.max){var i=parse(this.max);if(i&&t>i){t=i}}this.pointerDate={year:getYear(t),month:getMonth(t),day:getDate(t)}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(!isValidIsoString(t)){this.selectedDate=undefined;this.value=undefined;if(this.nativeInput){this.nativeInput.value=""}}if(this.value!==t){this.value=t;if(e&&(this.isDateInRange(parse(this.value))||this.value==="")){this.balChange.emit(this.value)}}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.min){return parseInt(this.min.substring(0,4),10)}return this.minYearProp?this.minYearProp:getYear(subYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.max){return parseInt(this.max.substring(0,4),10)}return this.maxYearProp?this.maxYearProp:getYear(addYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"years",{get:function(){var t=this;var e=Array.from({length:this.maxYear-this.minYear+1},(function(e,i){return t.minYear+i}));if(this.min&&this.pointerDate.month===getMonth(parse(this.min))){var i=getYear(parse(this.min));e=e.filter((function(t){return t>=i}))}if(this.max&&this.pointerDate.month===getMonth(parse(this.max))){var a=getYear(parse(this.max));e=e.filter((function(t){return t<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"months",{get:function(){var t=i18nBalDatepicker[this.language].monthsShort;var e=t.map((function(t,e){return{name:t,index:e}}));if(this.min&&this.pointerDate.year===getYear(parse(this.min))){var i=parseInt(this.min.substring(5,7),10)-1;e=e.filter((function(t){return t.index>=i}))}if(this.max&&this.pointerDate.year===getYear(parse(this.max))){var a=parseInt(this.max.substring(5,7),10)-1;e=e.filter((function(t){return t.index<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"weekDays",{get:function(){var t=__spreadArray([],i18nBalDatepicker[this.language].weekdaysMin,true);t.push(t.shift()||"");return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstDateOfBox",{get:function(){var t=new Date(this.pointerDate.year,this.pointerDate.month,1);return startOfWeek(t,{weekStartsOn:1})},enumerable:false,configurable:true});t.prototype.getLocale=function(){var t=useBalConfig();return t&&t.locale||defaultLocale};Object.defineProperty(t.prototype,"calendarGrid",{get:function(){var t=this.firstDateOfBox;var e=this.firstDateOfBox;var i=[];do{var a=[];do{a=__spreadArray(__spreadArray([],a,true),[{date:new Date(e),display:format(this.getLocale(),e),dateString:formatDateString(e),label:getDate(e).toString(),isToday:isSameDay(e,now()),isSelected:parse(this.selectedDate)!==undefined&&isSameDay(e,parse(this.selectedDate)),isDisabled:!this.getAllowedDates(e)||!this.isDateInRange(e),isOutdated:this.pointerDate.month!==e.getMonth()||!this.isDateInRange(e)}],false);e.setDate(e.getDate()+1)}while(isSameWeek(e,t,{weekStartsOn:1}));i=__spreadArray(__spreadArray([],i,true),[a],false);t.setDate(t.getDate()+7)}while(isSameMonth(new Date(this.pointerDate.year,this.pointerDate.month,this.pointerDate.day),e));return i},enumerable:false,configurable:true});t.prototype.getAllowedDates=function(t){if(lodash_isnil(this.allowedDates)){return true}return this.allowedDates(formatDateString(t))};t.prototype.formatDate=function(t){var e=dateSeparator(this.getLocale());var i=t.length;var a=t.charAt(i-1);var r=t.charAt(i-2);if(a===e){if(i===1||r===e||t.split(e).filter((function(t){return t.length>0})).length>=3){return t.substring(0,i-1)}}if(i===5){if(t.split(e)[0].split("").length===1&&r!==e&&a!==e){return t.substring(0,i-1)+e+t.substring(i-1,i)}}if(i===3||i===6){if(a!==e&&r!==e&&t.split(e).length<=2){return t.substring(0,i-1)+e+t.substring(i-1,i)}}return t};t.prototype.render=function(){var t=this;var e=BEM.block("datepicker");var i=e.element("native");var a=e.element("popup");var r=a.element("body");var n=a.element("footer");return h(Host,{onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,class:Object.assign(Object.assign({},e.class()),e.modifier("disabled").class(this.disabled||this.readonly))},h("input",{type:"date",class:Object.assign({},i.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}),h("bal-popover",{onBalChange:this.onPopoverChange,ref:function(e){return t.popoverElement=e}},this.renderInput(),h("bal-popover-content",{spaceless:true,contentMinWidth:392},h("div",{class:Object.assign({},a.class())},this.renderHeader(),h("div",{class:Object.assign({},r.class())},this.renderGrid()),h("div",{class:Object.assign({},n.class())},h("slot",null))))))};t.prototype.renderInput=function(){var t=this;return h("div",{"bal-popover-trigger":true,class:"control"},h("bal-input-group",{disabled:this.disabled||this.readonly,invalid:this.invalid},h("input",Object.assign({class:{input:true,"data-test-input":true,"is-clickable":!this.disabled&&!this.triggerIcon&&!this.readonly,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid},"data-testid":"bal-datepicker-input",ref:function(e){return t.nativeInput=e},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,type:"text",maxlength:"10",autoComplete:"off",value:format(this.getLocale(),parse(this.value||"")),required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,onKeyDown:function(e){return t.onInputKeyDown(e)},onKeyUp:function(e){return t.onInputKeyUp(e)},onInput:this.onInput,onClick:this.onInputClick,onChange:this.onInputChange,onBlur:this.onInputBlur,onFocus:this.onInputFocus},this.inheritedAttributes)),!this.loading?h("bal-icon",{class:{"datepicker-trigger-icon":true,"is-clickable":!this.disabled&&!this.readonly},"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",name:"date",onClick:this.onIconClick}):""))};t.prototype.renderGrid=function(){var t=this;var e=BEM.block("datepicker-grid");var i=e.element("row");var a=e.element("cell");return h("div",null,this.renderWeekDayHeader(),h("div",{class:Object.assign({},e.class())},this.calendarGrid.map((function(e,r){return h("div",{key:r,class:Object.assign({},i.class())},e.map((function(e){return h("button",{key:e.dateString,type:"button","data-date":e.dateString,onClick:function(){return t.onClickDateCell(e)},disabled:e.isDisabled,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),{button:true,"is-text":!e.isDisabled&&!e.isSelected,"is-primary":e.isSelected&&e.isSelected,"is-disabled":e.isDisabled||e.isOutdated}),a.modifier("today").class(e.isToday)),a.modifier("selectable").class(!e.isDisabled&&!e.isOutdated)),a.modifier("disabled").class(e.isDisabled||e.isOutdated)),a.modifier("outdated").class(e.isOutdated)),a.modifier("selected").class(e.isSelected))},h("span",null,e.label))})))}))))};t.prototype.renderWeekDayHeader=function(){var t=BEM.block("datepicker-grid");var e=t.element("header");var i=t.element("cell");return h("header",{class:Object.assign({},e.class())},this.weekDays.map((function(t){return h("div",{key:t,class:Object.assign(Object.assign({},i.class()),i.modifier("header").class())},h("span",null,t))})))};t.prototype.renderHeader=function(){var t=this;var e=BEM.block("datepicker-pagination");var i=e.element("inner");var a=e.element("month-and-year");var r=a.element("select");return h("header",{class:Object.assign({},e.class())},h("div",{class:Object.assign({},i.class())},h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-left",disabled:this.isPreviousMonthDisabled,onClick:function(){return t.previousMonth()}}),h("div",{class:Object.assign({},a.class())},h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("month").class())},h("div",{class:"select"},h("select",{onInput:this.onMonthSelect},this.months.map((function(e){return h("option",{key:e.index,value:e.index,selected:t.pointerDate.month===e.index},e.name)}))))),h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("year").class())},h("div",{class:"select"},h("select",{onInput:this.onYearSelect},this.years.map((function(e){return h("option",{key:e,value:e,selected:t.pointerDate.year===e},e)})))))),h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-right",disabled:this.isNextMonthDisabled,onClick:function(){return t.nextMonth()}})))};t.prototype.previousMonth=function(){if(!this.isPreviousMonthDisabled){if(this.pointerDate.year===this.minYear&&this.pointerDate.month===0){return}this.pointerDate=this.calcPreviousMonth()}};t.prototype.nextMonth=function(){if(!this.isNextMonthDisabled){if(this.pointerDate.year===this.maxYear&&this.pointerDate.month===11){return}this.pointerDate=this.calcNextMonth()}};t.prototype.calcPreviousMonth=function(){if(this.pointerDate.month===0){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1,month:11,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month-1,day:1})}};t.prototype.calcNextMonth=function(){if(this.pointerDate.month===11){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1,month:0,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month+1,day:1})}};t.prototype.lastDayOfMonth=function(t,e){var i=new Date(t,e+1,0);return getDate(i)};Object.defineProperty(t.prototype,"isPreviousMonthDisabled",{get:function(){if(this.min){var t=parse(this.min);var e=this.lastDayOfMonth(this.calcPreviousMonth().year,this.calcPreviousMonth().month);var i=new Date(this.calcPreviousMonth().year,this.calcPreviousMonth().month,e);return isBefore(i,subDays(t,1))}return false},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNextMonthDisabled",{get:function(){if(this.max){var t=parse(this.max);var e=new Date(this.calcNextMonth().year,this.calcNextMonth().month,1);return isAfter(e,lastDayOfMonth(t)?t:addDays(t,1))}return false},enumerable:false,configurable:true});t.prototype.isDateInRange=function(t){var e=parse(formatDateString(t));if(this.min&&this.max&&this.max>this.min){return isWithinInterval(e,{start:parse(this.min),end:parse(this.max)})}if(this.min){return isAfter(e,parse(this.min))||isSameDay(e,parse(this.min))}if(this.max){return isBefore(e,addDays(parse(this.max),1))||isSameDay(e,parse(this.max))}return true};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-datepicker"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Datepicker.prototype,"createLogger",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Datepicker.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Datepicker.prototype,"configChanged",null);var datepickerIds=0;Datepicker.style=BalDatepickerStyle0;export{Datepicker as bal_datepicker};
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{k as rIC,m as debounceEvent}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{r as requiredArgs,t as toDate,b as toInteger,g as getDefaultOptions,p as parse,f as formatDateString,i as isValidIsoString,c as format,e as isSpaceKey,h as isEnterKey,d as dateSeparator,j as getYear,n as now,k as getMonth,m as getDate}from"./index.esm-76abd8e3.js";import{l as lodash_isnil}from"./index-82aff103.js";import{N as NUMBER_KEYS,A as ACTION_KEYS,i as isCtrlOrCommandKey}from"./keys.constant-0eb059e0.js";import{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";import{s as stopEventBubbling,g as getInputTarget,i as inputHandleFocus,a as inputHandleHostClick,b as inputListenOnClick,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{p as preventDefault}from"./utils-9fbab1d3.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{d as defaultConfig,a as defaultLocale}from"./config.default-7efdc82d.js";import{b as balBreakpoints}from"./breakpoints.subject-3605e395.js";import{g as useBalConfig}from"./config.utils-6ac6c9bd.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-f2ac9963.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./_commonjsHelpers-1c8beb5f.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-337782ae.js";function addDays(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}i.setDate(i.getDate()+a);return i}function addMonths(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}var r=i.getDate();var n=new Date(i.getTime());n.setMonth(i.getMonth()+a+1,0);var s=n.getDate();if(r>=s){return n}else{i.setFullYear(n.getFullYear(),n.getMonth(),r);return i}}function startOfWeek(t,e){var i,a,r,n,s,o,l,d;requiredArgs(1,arguments);var c=getDefaultOptions();var u=toInteger((i=(a=(r=(n=e===null||e===void 0?void 0:e.weekStartsOn)!==null&&n!==void 0?n:e===null||e===void 0?void 0:(s=e.locale)===null||s===void 0?void 0:(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&a!==void 0?a:(l=c.locale)===null||l===void 0?void 0:(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:0);if(!(u>=0&&u<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var h=toDate(t);var f=h.getDay();var p=(f<u?7:0)+f-u;h.setDate(h.getDate()-p);h.setHours(0,0,0,0);return h}function startOfDay(t){requiredArgs(1,arguments);var e=toDate(t);e.setHours(0,0,0,0);return e}function addYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addMonths(t,i*12)}function isSameDay(t,e){requiredArgs(2,arguments);var i=startOfDay(t);var a=startOfDay(e);return i.getTime()===a.getTime()}function lastDayOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);var i=e.getMonth();e.setFullYear(e.getFullYear(),i+1,0);e.setHours(0,0,0,0);return e}function isAfter(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()>a.getTime()}function isBefore(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()<a.getTime()}function isSameWeek(t,e,i){requiredArgs(2,arguments);var a=startOfWeek(t,i);var r=startOfWeek(e,i);return a.getTime()===r.getTime()}function isSameMonth(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()}function isWithinInterval(t,e){requiredArgs(2,arguments);var i=toDate(t).getTime();var a=toDate(e.start).getTime();var r=toDate(e.end).getTime();if(!(a<=r)){throw new RangeError("Invalid interval")}return i>=a&&i<=r}function subDays(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addDays(t,-i)}function subYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addYears(t,-i)}var balDatepickerCss=':root{--bal-datepicker-popover-background:var(--bal-color-grey-2);--bal-datepicker-cell-background:var(--bal-color-white);--bal-datepicker-cell-selected-background:var(--bal-color-primary);--bal-datepicker-cell-selected-today-background:var(--bal-color-white);--bal-datepicker-cell-today-background:var(--bal-color-primary);--bal-datepicker-cell-today-radius:var(--bal-radius-rounded)}.bal-datepicker{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-datepicker__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-datepicker__popup{padding:1rem;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--bal-datepicker-popover-background)}@media screen and (min-width: 769px),print{.bal-datepicker__popup{max-width:24.5rem}}.bal-datepicker__popup__body{max-width:22.5rem;margin:0 auto 0 auto;margin-top:.75rem}.bal-datepicker-pagination{max-width:22.5rem;margin:0 auto 0 auto}.bal-datepicker-pagination__inner{display:-ms-flexbox;display:flex;gap:.5rem}.bal-datepicker-pagination__month-and-year{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;gap:.5rem}.bal-datepicker-pagination__month-and-year__select{-ms-flex:1;flex:1}.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{padding-top:0 !important;padding-bottom:0 !important;text-align:center !important;min-height:2rem !important;height:2rem !important}@media screen and (min-width: 769px),print{.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{min-height:3rem !important;height:3rem !important}}.bal-datepicker-grid{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.bal-datepicker-grid__body{display:table-row-group}.bal-datepicker-grid__row{display:table-row}.bal-datepicker-grid__row .bal-datepicker-grid__cell{margin-bottom:.25rem;margin-right:.25rem}.bal-datepicker-grid__row:last-child .bal-datepicker-grid__cell{margin-bottom:0}.bal-datepicker-grid__header{display:-ms-flexbox;display:flex;max-width:22.5rem;margin:0 auto 0 auto;gap:.25rem}.bal-datepicker-grid__header .bal-datepicker-grid__cell{background:rgba(0,0,0,0)}.bal-datepicker-grid__header .bal-datepicker-grid__cell span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;width:100%}.bal-datepicker-grid__cell{position:relative;text-align:center;vertical-align:middle;display:table-cell;width:13%;padding:0 !important;height:3rem;min-height:3rem;min-width:2.25rem;-webkit-appearance:auto !important;-moz-appearance:auto !important;appearance:auto !important;background:var(--bal-datepicker-cell-background)}.bal-datepicker-grid__cell--selected{background:var(--bal-datepicker-cell-selected-background) !important}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)>span{font-weight:var(--bal-font-weight-bold)}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)::after{content:"";position:absolute;display:block;width:.25rem;height:.25rem;background:var(--bal-datepicker-cell-today-background);border-radius:var(--bal-datepicker-cell-today-radius);margin-left:-2px;left:50%;bottom:.375rem}.bal-datepicker-grid__cell--today.bal-datepicker-grid__cell--selected:not(.bal-datepicker-grid__cell--outdated)::after{background:var(--bal-datepicker-cell-selected-today-background)}.bal-datepicker-grid__cell:last-child{margin-right:0}.bal-datepicker-grid__cell>span{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular)}@media screen and (min-width: 769px),print{.bal-datepicker-grid__cell{min-width:3rem !important}}.bal-datepicker-grid__cell--disabled{border-color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important}.bal-datepicker-grid__cell--header>span{border:none;background:rgba(0,0,0,0);color:var(--bal-color-text-primary);font-weight:var(--bal-font-weight-bold);cursor:default}';var BalDatepickerStyle0=balDatepickerCss;var Datepicker=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balIconClick=createEvent(this,"balIconClick",7);this.inputId="bal-dp-".concat(datepickerIds++);this.inheritedAttributes={};this.inputValue=this.value;this.onIconClick=function(t){if(!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);e.balIconClick.emit(t)};this.onInputClick=function(t){if(!e.triggerIcon&&!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);if(!e.triggerIcon){e.balInputClick.emit(t)}};this.onPopoverChange=function(t){stopEventBubbling(t);if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;e.fireBlur(t)}};this.onInput=function(t){var i=getInputTarget(t);if(i){e.inputValue=i.value;if(i.value){e.nativeInput.value=e.formatDate(e.inputValue)}if(e.inputValue&&e.inputValue.length>=6){var a=parse(e.inputValue,e.getLocale());var r=formatDateString(a);if(isValidIsoString(r)){e.selectedDate=r;e.updatePointerDates()}}}e.balInput.emit(e.inputValue)};this.onInputChange=function(t){var i=t.target.value;var a=parse(i,e.getLocale());var r=formatDateString(a);var n=format(e.getLocale(),a);e.nativeInput.value=n;e.updateValue(r);e.updatePointerDates()};this.onClickDateCell=function(t){if(!t.isDisabled){e.select(t.dateString)}};this.onInputKeyUp=function(t){if(isSpaceKey(t)&&!e.triggerIcon){if(e.isPopoverOpen){e.close()}else{e.open()}}if(isEnterKey(t)&&!e.triggerIcon){var i=parse(e.nativeInput.value,e.getLocale());var a=formatDateString(i);if(e.isPopoverOpen){if(e.value===a){e.close()}}}};this.onInputKeyDown=function(t){var i=dateSeparator(e.getLocale());var a=__spreadArray(__spreadArray(__spreadArray([],NUMBER_KEYS,true),[i],false),ACTION_KEYS,true);if(!isCtrlOrCommandKey(t)&&a.indexOf(t.key)<0){t.preventDefault();t.stopPropagation()}if(t.key==="Tab"){e.close()}};this.onMonthSelect=function(t){var i=t.target.value;e.pointerDate=Object.assign(Object.assign({},e.pointerDate),{day:1,month:parseInt(i,10)})};this.onYearSelect=function(t){var i=t.target.value;var a=parseInt(i,10);var r=undefined;if(e.defaultDate){var n=parse(e.defaultDate);if(e.max){var s=parse(e.max);if(n.getMonth()>s.getMonth()){r=s.getMonth()}}if(e.min){var o=parse(e.min);if(n.getMonth()<o.getMonth()){r=o.getMonth()}}}e.pointerDate={day:1,year:a,month:r!==undefined?r:e.pointerDate.month}};this.onInputFocus=function(t){return inputHandleFocus(e,t)};this.onInputBlur=function(t){preventDefault(t);e.focused=false;e.fireBlur(t)};this.fireBlur=function(t){if(!e.isPopoverOpen&&!e.focused){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){return inputHandleHostClick(e,t)};this.language=defaultConfig.language;this.region=defaultConfig.region;this.isMobile=balBreakpoints.isMobile;this.focused=false;this.isPopoverOpen=false;this.selectedDate="";this.pointerDate={year:getYear(now()),month:getMonth(now()),day:getDate(now())};this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.loading=false;this.placeholder=undefined;this.min=undefined;this.max=undefined;this.closeOnSelect=true;this.triggerIcon=false;this.minYearProp=undefined;this.maxYearProp=undefined;this.debounce=0;this.defaultDate=undefined;this.value=undefined;this.allowedDates=undefined;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.debounceChanged=function(){this.balChange=debounceEvent(this.balChange,this.debounce)};t.prototype.valueChanged=function(){this.selectedDate=this.value;this.updatePointerDates()};t.prototype.listenOnClick=function(t){inputListenOnClick(this,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(){if(e.initialValue){e.nativeInput.value=format(e.getLocale(),parse(e.initialValue))}else{e.nativeInput.value=""}e.selectedDate=e.initialValue;e.updateValue(e.initialValue,false);e.updatePointerDates()}),0)}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile};t.prototype.connectedCallback=function(){this.debounceChanged();this.initialValue=this.value};t.prototype.componentDidLoad=function(){this.inputValue=this.value};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value,false)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.region=t.region;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.present()}return[2]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.dismiss()}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:this.nativeInput.value=format(this.getLocale(),parse(t));this.updateValue(t);this.updatePointerDates();if(!this.closeOnSelect)return[3,2];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.toggle()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetFocus(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetBlur(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};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.updatePointerDates=function(){var t=now();t.setDate(1);if(this.selectedDate){t=parse(this.selectedDate)}else{if(this.defaultDate){t=parse(this.defaultDate)}}if(this.min){var e=parse(this.min);if(e&&t<e){t=e}}if(this.max){var i=parse(this.max);if(i&&t>i){t=i}}this.pointerDate={year:getYear(t),month:getMonth(t),day:getDate(t)}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(!isValidIsoString(t)){this.selectedDate=undefined;this.value=undefined;if(this.nativeInput){this.nativeInput.value=""}}if(this.value!==t){this.value=t;if(e&&(this.isDateInRange(parse(this.value))||this.value==="")){this.balChange.emit(this.value)}}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.min){return parseInt(this.min.substring(0,4),10)}return this.minYearProp?this.minYearProp:getYear(subYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.max){return parseInt(this.max.substring(0,4),10)}return this.maxYearProp?this.maxYearProp:getYear(addYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"years",{get:function(){var t=this;var e=Array.from({length:this.maxYear-this.minYear+1},(function(e,i){return t.minYear+i}));if(this.min&&this.pointerDate.month===getMonth(parse(this.min))){var i=getYear(parse(this.min));e=e.filter((function(t){return t>=i}))}if(this.max&&this.pointerDate.month===getMonth(parse(this.max))){var a=getYear(parse(this.max));e=e.filter((function(t){return t<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"months",{get:function(){var t=i18nBalDatepicker[this.language].monthsShort;var e=t.map((function(t,e){return{name:t,index:e}}));if(this.min&&this.pointerDate.year===getYear(parse(this.min))){var i=parseInt(this.min.substring(5,7),10)-1;e=e.filter((function(t){return t.index>=i}))}if(this.max&&this.pointerDate.year===getYear(parse(this.max))){var a=parseInt(this.max.substring(5,7),10)-1;e=e.filter((function(t){return t.index<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"weekDays",{get:function(){var t=__spreadArray([],i18nBalDatepicker[this.language].weekdaysMin,true);t.push(t.shift()||"");return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstDateOfBox",{get:function(){var t=new Date(this.pointerDate.year,this.pointerDate.month,1);return startOfWeek(t,{weekStartsOn:1})},enumerable:false,configurable:true});t.prototype.getLocale=function(){var t=useBalConfig();return t&&t.locale||defaultLocale};Object.defineProperty(t.prototype,"calendarGrid",{get:function(){var t=this.firstDateOfBox;var e=this.firstDateOfBox;var i=[];do{var a=[];do{a=__spreadArray(__spreadArray([],a,true),[{date:new Date(e),display:format(this.getLocale(),e),dateString:formatDateString(e),label:getDate(e).toString(),isToday:isSameDay(e,now()),isSelected:parse(this.selectedDate)!==undefined&&isSameDay(e,parse(this.selectedDate)),isDisabled:!this.getAllowedDates(e)||!this.isDateInRange(e),isOutdated:this.pointerDate.month!==e.getMonth()||!this.isDateInRange(e)}],false);e.setDate(e.getDate()+1)}while(isSameWeek(e,t,{weekStartsOn:1}));i=__spreadArray(__spreadArray([],i,true),[a],false);t.setDate(t.getDate()+7)}while(isSameMonth(new Date(this.pointerDate.year,this.pointerDate.month,this.pointerDate.day),e));return i},enumerable:false,configurable:true});t.prototype.getAllowedDates=function(t){if(lodash_isnil(this.allowedDates)){return true}return this.allowedDates(formatDateString(t))};t.prototype.formatDate=function(t){var e=dateSeparator(this.getLocale());var i=t.length;var a=t.charAt(i-1);var r=t.charAt(i-2);if(a===e){if(i===1||r===e||t.split(e).filter((function(t){return t.length>0})).length>=3){return t.substring(0,i-1)}}if(i===5){if(t.split(e)[0].split("").length===1&&r!==e&&a!==e){return t.substring(0,i-1)+e+t.substring(i-1,i)}}if(i===3||i===6){if(a!==e&&r!==e&&t.split(e).length<=2){return t.substring(0,i-1)+e+t.substring(i-1,i)}}return t};t.prototype.render=function(){var t=this;var e=BEM.block("datepicker");var i=e.element("native");var a=e.element("popup");var r=a.element("body");var n=a.element("footer");return h(Host,{onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,class:Object.assign(Object.assign({},e.class()),e.modifier("disabled").class(this.disabled||this.readonly))},h("input",{type:"date",class:Object.assign({},i.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}),h("bal-popover",{onBalChange:this.onPopoverChange,ref:function(e){return t.popoverElement=e}},this.renderInput(),h("bal-popover-content",{spaceless:true,contentMinWidth:392},h("div",{class:Object.assign({},a.class())},this.renderHeader(),h("div",{class:Object.assign({},r.class())},this.renderGrid()),h("div",{class:Object.assign({},n.class())},h("slot",null))))))};t.prototype.renderInput=function(){var t=this;return h("div",{"bal-popover-trigger":true,class:"control"},h("bal-input-group",{disabled:this.disabled||this.readonly,invalid:this.invalid},h("input",Object.assign({class:{input:true,"data-test-input":true,"is-clickable":!this.disabled&&!this.triggerIcon&&!this.readonly,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid},"data-testid":"bal-datepicker-input",ref:function(e){return t.nativeInput=e},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,type:"text",maxlength:"10",autoComplete:"off",value:format(this.getLocale(),parse(this.value||"")),required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,onKeyDown:function(e){return t.onInputKeyDown(e)},onKeyUp:function(e){return t.onInputKeyUp(e)},onInput:this.onInput,onClick:this.onInputClick,onChange:this.onInputChange,onBlur:this.onInputBlur,onFocus:this.onInputFocus},this.inheritedAttributes)),!this.loading?h("bal-icon",{class:{"datepicker-trigger-icon":true,"is-clickable":!this.disabled&&!this.readonly},"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",name:"date",onClick:this.onIconClick}):""))};t.prototype.renderGrid=function(){var t=this;var e=BEM.block("datepicker-grid");var i=e.element("row");var a=e.element("cell");return h("div",null,this.renderWeekDayHeader(),h("div",{class:Object.assign({},e.class())},this.calendarGrid.map((function(e,r){return h("div",{key:r,class:Object.assign({},i.class())},e.map((function(e){return h("button",{key:e.dateString,type:"button","data-date":e.dateString,onClick:function(){return t.onClickDateCell(e)},disabled:e.isDisabled,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),{button:true,"is-text":!e.isDisabled&&!e.isSelected,"is-primary":e.isSelected&&e.isSelected,"is-disabled":e.isDisabled||e.isOutdated}),a.modifier("today").class(e.isToday)),a.modifier("selectable").class(!e.isDisabled&&!e.isOutdated)),a.modifier("disabled").class(e.isDisabled||e.isOutdated)),a.modifier("outdated").class(e.isOutdated)),a.modifier("selected").class(e.isSelected))},h("span",null,e.label))})))}))))};t.prototype.renderWeekDayHeader=function(){var t=BEM.block("datepicker-grid");var e=t.element("header");var i=t.element("cell");return h("header",{class:Object.assign({},e.class())},this.weekDays.map((function(t){return h("div",{key:t,class:Object.assign(Object.assign({},i.class()),i.modifier("header").class())},h("span",null,t))})))};t.prototype.renderHeader=function(){var t=this;var e=BEM.block("datepicker-pagination");var i=e.element("inner");var a=e.element("month-and-year");var r=a.element("select");return h("header",{class:Object.assign({},e.class())},h("div",{class:Object.assign({},i.class())},h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-left",disabled:this.isPreviousMonthDisabled,onClick:function(){return t.previousMonth()}}),h("div",{class:Object.assign({},a.class())},h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("month").class())},h("div",{class:"select"},h("select",{onInput:this.onMonthSelect},this.months.map((function(e){return h("option",{key:e.index,value:e.index,selected:t.pointerDate.month===e.index},e.name)}))))),h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("year").class())},h("div",{class:"select"},h("select",{onInput:this.onYearSelect},this.years.map((function(e){return h("option",{key:e,value:e,selected:t.pointerDate.year===e},e)})))))),h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-right",disabled:this.isNextMonthDisabled,onClick:function(){return t.nextMonth()}})))};t.prototype.previousMonth=function(){if(!this.isPreviousMonthDisabled){if(this.pointerDate.year===this.minYear&&this.pointerDate.month===0){return}this.pointerDate=this.calcPreviousMonth()}};t.prototype.nextMonth=function(){if(!this.isNextMonthDisabled){if(this.pointerDate.year===this.maxYear&&this.pointerDate.month===11){return}this.pointerDate=this.calcNextMonth()}};t.prototype.calcPreviousMonth=function(){if(this.pointerDate.month===0){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1,month:11,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month-1,day:1})}};t.prototype.calcNextMonth=function(){if(this.pointerDate.month===11){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1,month:0,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month+1,day:1})}};t.prototype.lastDayOfMonth=function(t,e){var i=new Date(t,e+1,0);return getDate(i)};Object.defineProperty(t.prototype,"isPreviousMonthDisabled",{get:function(){if(this.min){var t=parse(this.min);var e=this.lastDayOfMonth(this.calcPreviousMonth().year,this.calcPreviousMonth().month);var i=new Date(this.calcPreviousMonth().year,this.calcPreviousMonth().month,e);return isBefore(i,subDays(t,1))}return false},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNextMonthDisabled",{get:function(){if(this.max){var t=parse(this.max);var e=new Date(this.calcNextMonth().year,this.calcNextMonth().month,1);return isAfter(e,lastDayOfMonth(t)?t:addDays(t,1))}return false},enumerable:false,configurable:true});t.prototype.isDateInRange=function(t){var e=parse(formatDateString(t));if(this.min&&this.max&&this.max>this.min){return isWithinInterval(e,{start:parse(this.min),end:parse(this.max)})}if(this.min){return isAfter(e,parse(this.min))||isSameDay(e,parse(this.min))}if(this.max){return isBefore(e,addDays(parse(this.max),1))||isSameDay(e,parse(this.max))}return true};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-datepicker"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Datepicker.prototype,"createLogger",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Datepicker.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Datepicker.prototype,"configChanged",null);var datepickerIds=0;Datepicker.style=BalDatepickerStyle0;export{Datepicker as bal_datepicker};
@@ -1 +1 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,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{p as preventDefault}from"./utils-9fbab1d3.js";import{B as BalScrollHandler}from"./scroll-f4b20848.js";import{b as balBreakpoints}from"./breakpoints.subject-ee89b4ec.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-d55790da.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./index-82aff103.js";import"./browser-a8073d92.js";import"./helpers-c201154e.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-769d0c71.js";var balHintCss=":root{--bal-hint-content-background:var(--bal-color-grey-2)}.bal-hint{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block}.bal-hint__icon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}@media (hover: hover)and (pointer: fine){.bal-hint__icon:hover svg,.bal-hint__icon:hover g,.bal-hint__icon:hover path,.bal-hint__icon:hover circle,.bal-hint__icon:focus svg,.bal-hint__icon:focus g,.bal-hint__icon:focus path,.bal-hint__icon:focus circle{fill:var(--bal-color-light-blue-5)}}.bal-hint__content{background:var(--bal-hint-content-background);display:-ms-flexbox;display:flex;gap:1.5rem;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 768px){.bal-hint__content{padding:1.25rem;min-height:100%}.bal-hint__content>div{-ms-flex:1;flex:1}}.bal-hint__content__title{display:block;margin-bottom:1rem}.bal-hint__content__title__heading{font-family:var(--bal-title-font-family);font-weight:var(--bal-title-font-weight);font-size:var(--bal-text-size-x-large);line-height:var(--bal-line-height-x-large)}@media screen and (min-width: 769px),print{.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-tablet);line-height:var(--bal-line-height-tablet-x-large)}}@media screen and (min-width: 1024px){.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-desktop);line-height:var(--bal-line-height-desktop-x-large)}}@media screen and (min-width: 769px),print{.bal-hint__content__buttons--is-hidden-desktop{display:none !important}}.bal-hint__overlay__content{position:fixed;display:none;overflow:auto;top:0;left:0;right:0;bottom:0;z-index:var(--bal-z-index-popup)}.bal-hint__overlay__content--active{display:block}";var BalHintStyle0=balHintCss;var Hint=function(){function t(t){var e=this;registerInstance(this,t);this.bodyScrollHandler=new BalScrollHandler;this.onPopoverChange=function(t){e.isActive=t.detail;preventDefault(t)};this.isActive=false;this.innerCloseLabel="Close";this.isMobile=balBreakpoints.isMobile;this.closeLabel=undefined;this.small=false}t.prototype.connectedCallback=function(){this.bodyScrollHandler.connect()};t.prototype.componentDidRender=function(){this.updateContent()};t.prototype.disconnectedCallback=function(){this.bodyScrollHandler.disconnect()};t.prototype.breakpointListener=function(t){var e=t.mobile;if(e!==this.isMobile){this.isActive=false}this.isMobile=e};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.closeLabel){switch(t.language){case"de":this.innerCloseLabel="Schliessen";break;case"fr":this.innerCloseLabel="Fermer";break;case"it":this.innerCloseLabel="Chiudere";break;case"nl":this.innerCloseLabel="Sluiten";break;default:this.innerCloseLabel="Close";break}}return[2]}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.isActive){this.dismiss()}else{this.present()}return[2]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.popoverElement){this.popoverElement.present()}if(this.isMobile){this.bodyScrollHandler.disable()}this.isActive=true;return[2]}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.popoverElement){this.popoverElement.dismiss()}if(this.isMobile){this.bodyScrollHandler.enable()}this.isActive=false;return[2]}))}))};t.prototype.updateContent=function(){if(this.hintContentEl&&this.slotWrapperEl){this.hintContentEl.innerHTML=this.slotWrapperEl.innerHTML}};t.prototype.render=function(){var t=this;var e=BEM.block("hint");var n=e.element("icon");var i=e.element("content");var a=i.element("buttons");var r=this.isMobile?0:8;var o=this.isMobile?0:16;var s=function(){return h("bal-icon",{class:Object.assign({},n.class()),"data-testid":"bal-hint-trigger","bal-popover-trigger":true,"aria-haspopup":"true",role:"button",name:"info-circle",onClick:function(){return t.toggle()}})};var l=function(){return h("div",{class:Object.assign({},i.class()),"data-testid":"bal-hint-content"},h("div",{ref:function(e){return t.hintContentEl=e}}),h("bal-button-group",{class:Object.assign(Object.assign({},a.class()),a.modifier("is-hidden-desktop").class(t.small))},h("bal-button",{"data-testid":"bal-hint-close",color:"info",onClick:function(){return t.dismiss()}},t.closeLabel?t.closeLabel:t.innerCloseLabel)))};var c=function(){var n=e.element("overlay");return h("div",{class:Object.assign({},n.class())},h(s,null),h("div",{class:Object.assign(Object.assign({},n.element("content").class()),n.element("content").modifier("active").class(t.isActive))},h(l,null)))};var u=function(){return h("div",{class:Object.assign({},e.element("popover").class())},h("bal-popover",{hint:true,position:"right",offsetX:0,offsetY:o,padding:r,ref:function(e){return t.popoverElement=e},onBalChange:t.onPopoverChange},h(s,null),h("bal-popover-content",{color:"grey"},h(l,null))))};var b=this.isMobile?c:u;return h(Host,{class:Object.assign({},e.class())},h(b,null),h("div",{ref:function(e){return t.slotWrapperEl=e},style:{display:"none"}},h("slot",null)))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Hint.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Hint.prototype,"configChanged",null);Hint.style=BalHintStyle0;var HintText=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=BEM.block("hint");var e=t.element("content");var n=e.element("text");var i=n.element("field");return h(Host,{class:Object.assign({},n.class())},h("p",{class:Object.assign({},i.class())},h("slot",null)))};return t}();var HintTitle=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=BEM.block("hint");var e=t.element("content");var n=e.element("title");var i=n.element("heading");return h(Host,{class:Object.assign({},n.class())},h("h3",{class:Object.assign({},i.class())},h("span",null,h("slot",null))))};return t}();export{Hint as bal_hint,HintText as bal_hint_text,HintTitle as bal_hint_title};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,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{p as preventDefault}from"./utils-9fbab1d3.js";import{B as BalScrollHandler}from"./scroll-f4b20848.js";import{b as balBreakpoints}from"./breakpoints.subject-3605e395.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-f2ac9963.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./index-82aff103.js";import"./browser-a8073d92.js";import"./helpers-c201154e.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-337782ae.js";var balHintCss=":root{--bal-hint-content-background:var(--bal-color-grey-2)}.bal-hint{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block}.bal-hint__icon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}@media (hover: hover)and (pointer: fine){.bal-hint__icon:hover svg,.bal-hint__icon:hover g,.bal-hint__icon:hover path,.bal-hint__icon:hover circle,.bal-hint__icon:focus svg,.bal-hint__icon:focus g,.bal-hint__icon:focus path,.bal-hint__icon:focus circle{fill:var(--bal-color-light-blue-5)}}.bal-hint__content{background:var(--bal-hint-content-background);display:-ms-flexbox;display:flex;gap:1.5rem;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 768px){.bal-hint__content{padding:1.25rem;min-height:100%}.bal-hint__content>div{-ms-flex:1;flex:1}}.bal-hint__content__title{display:block;margin-bottom:1rem}.bal-hint__content__title__heading{font-family:var(--bal-title-font-family);font-weight:var(--bal-title-font-weight);font-size:var(--bal-text-size-x-large);line-height:var(--bal-line-height-x-large)}@media screen and (min-width: 769px),print{.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-tablet);line-height:var(--bal-line-height-tablet-x-large)}}@media screen and (min-width: 1024px){.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-desktop);line-height:var(--bal-line-height-desktop-x-large)}}@media screen and (min-width: 769px),print{.bal-hint__content__buttons--is-hidden-desktop{display:none !important}}.bal-hint__overlay__content{position:fixed;display:none;overflow:auto;top:0;left:0;right:0;bottom:0;z-index:var(--bal-z-index-popup)}.bal-hint__overlay__content--active{display:block}";var BalHintStyle0=balHintCss;var Hint=function(){function t(t){var e=this;registerInstance(this,t);this.bodyScrollHandler=new BalScrollHandler;this.onPopoverChange=function(t){e.isActive=t.detail;preventDefault(t)};this.isActive=false;this.innerCloseLabel="Close";this.isMobile=balBreakpoints.isMobile;this.closeLabel=undefined;this.small=false}t.prototype.connectedCallback=function(){this.bodyScrollHandler.connect()};t.prototype.componentDidRender=function(){this.updateContent()};t.prototype.disconnectedCallback=function(){this.bodyScrollHandler.disconnect()};t.prototype.breakpointListener=function(t){var e=t.mobile;if(e!==this.isMobile){this.isActive=false}this.isMobile=e};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.closeLabel){switch(t.language){case"de":this.innerCloseLabel="Schliessen";break;case"fr":this.innerCloseLabel="Fermer";break;case"it":this.innerCloseLabel="Chiudere";break;case"nl":this.innerCloseLabel="Sluiten";break;default:this.innerCloseLabel="Close";break}}return[2]}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.isActive){this.dismiss()}else{this.present()}return[2]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.popoverElement){this.popoverElement.present()}if(this.isMobile){this.bodyScrollHandler.disable()}this.isActive=true;return[2]}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.popoverElement){this.popoverElement.dismiss()}if(this.isMobile){this.bodyScrollHandler.enable()}this.isActive=false;return[2]}))}))};t.prototype.updateContent=function(){if(this.hintContentEl&&this.slotWrapperEl){this.hintContentEl.innerHTML=this.slotWrapperEl.innerHTML}};t.prototype.render=function(){var t=this;var e=BEM.block("hint");var n=e.element("icon");var i=e.element("content");var a=i.element("buttons");var r=this.isMobile?0:8;var o=this.isMobile?0:16;var s=function(){return h("bal-icon",{class:Object.assign({},n.class()),"data-testid":"bal-hint-trigger","bal-popover-trigger":true,"aria-haspopup":"true",role:"button",name:"info-circle",onClick:function(){return t.toggle()}})};var l=function(){return h("div",{class:Object.assign({},i.class()),"data-testid":"bal-hint-content"},h("div",{ref:function(e){return t.hintContentEl=e}}),h("bal-button-group",{class:Object.assign(Object.assign({},a.class()),a.modifier("is-hidden-desktop").class(t.small))},h("bal-button",{"data-testid":"bal-hint-close",color:"info",onClick:function(){return t.dismiss()}},t.closeLabel?t.closeLabel:t.innerCloseLabel)))};var c=function(){var n=e.element("overlay");return h("div",{class:Object.assign({},n.class())},h(s,null),h("div",{class:Object.assign(Object.assign({},n.element("content").class()),n.element("content").modifier("active").class(t.isActive))},h(l,null)))};var u=function(){return h("div",{class:Object.assign({},e.element("popover").class())},h("bal-popover",{hint:true,position:"right",offsetX:0,offsetY:o,padding:r,ref:function(e){return t.popoverElement=e},onBalChange:t.onPopoverChange},h(s,null),h("bal-popover-content",{color:"grey"},h(l,null))))};var f=this.isMobile?c:u;return h(Host,{class:Object.assign({},e.class())},h(f,null),h("div",{ref:function(e){return t.slotWrapperEl=e},style:{display:"none"}},h("slot",null)))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Hint.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Hint.prototype,"configChanged",null);Hint.style=BalHintStyle0;var HintText=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=BEM.block("hint");var e=t.element("content");var n=e.element("text");var i=n.element("field");return h(Host,{class:Object.assign({},n.class())},h("p",{class:Object.assign({},i.class())},h("slot",null)))};return t}();var HintTitle=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=BEM.block("hint");var e=t.element("content");var n=e.element("title");var i=n.element("heading");return h(Host,{class:Object.assign({},n.class())},h("h3",{class:Object.assign({},i.class())},h("span",null,h("slot",null))))};return t}();export{Hint as bal_hint,HintText as bal_hint_text,HintTitle as bal_hint_title};