@baloise/ds-core 16.5.0 → 16.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/components/bal-field.js +3 -0
  2. package/components/bal-input-date2.js +2 -3
  3. package/components/bal-input.js +1 -1
  4. package/components/bal-number-input.js +1 -1
  5. package/components/bal-segment-item.js +64 -47
  6. package/components/bal-segment.js +61 -17
  7. package/components/bal-textarea.js +1 -1
  8. package/components/bal-time-input.js +1 -1
  9. package/components/form-input.js +14 -1
  10. package/components/index.js +1 -1
  11. package/components/tokens.esm.js +1 -1
  12. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  13. package/dist/baloise-design-system/index.esm.js +1 -1
  14. package/dist/baloise-design-system/{p-dd30661db2.system.entry.js → p-00014af866.system.entry.js} +1 -1
  15. package/dist/baloise-design-system/{p-b0c22ff9d1.entry.js → p-08b0e345a2.entry.js} +1 -1
  16. package/dist/baloise-design-system/{p-3eb68d7e.js → p-0db6b19e.js} +1 -1
  17. package/dist/baloise-design-system/{p-9bb8778cdc.system.entry.js → p-10c13a369c.system.entry.js} +1 -1
  18. package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
  19. package/dist/baloise-design-system/{p-09ea5913.js → p-15a85377.js} +1 -1
  20. package/dist/baloise-design-system/p-15c5fe4d6d.system.entry.js +1 -0
  21. package/dist/baloise-design-system/{p-cda868a6a5.entry.js → p-16b50b08e4.entry.js} +1 -1
  22. package/dist/baloise-design-system/{p-5fae3f5478.entry.js → p-27bc71c322.entry.js} +1 -1
  23. package/dist/baloise-design-system/{p-0530e008e9.system.entry.js → p-2aa4f352d9.system.entry.js} +1 -1
  24. package/dist/baloise-design-system/{p-8080a1192c.system.entry.js → p-2e498736fc.system.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-6e3a79cce0.system.entry.js → p-2e8508812d.system.entry.js} +1 -1
  26. package/dist/baloise-design-system/{p-f798011b48.system.entry.js → p-2ea7550d1b.system.entry.js} +1 -1
  27. package/dist/baloise-design-system/{p-380aabd5bc.entry.js → p-3180888825.entry.js} +1 -1
  28. package/dist/baloise-design-system/{p-305cffd8aa.entry.js → p-342b27632b.entry.js} +1 -1
  29. package/dist/baloise-design-system/{p-39bf8adcde.entry.js → p-34671b9410.entry.js} +1 -1
  30. package/dist/baloise-design-system/{p-e187b9de.system.js → p-368bd6ac.system.js} +1 -1
  31. package/dist/baloise-design-system/p-449ffc7a7e.entry.js +1 -0
  32. package/dist/baloise-design-system/{p-0ab43941ba.entry.js → p-462b20f382.entry.js} +1 -1
  33. package/dist/baloise-design-system/{p-f5940253.js → p-4ae121b6.js} +1 -1
  34. package/dist/baloise-design-system/p-4f083c5352.entry.js +1 -0
  35. package/dist/baloise-design-system/{p-df40272425.system.entry.js → p-52a4a89073.system.entry.js} +1 -1
  36. package/dist/baloise-design-system/p-54f81c32.js +1 -1
  37. package/dist/baloise-design-system/{p-4809d5c4.system.js → p-590da25b.system.js} +1 -1
  38. package/dist/baloise-design-system/{p-e137e273b7.system.entry.js → p-5b5d1c626d.system.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-71588db3.system.js → p-5c0b0099.system.js} +1 -1
  40. package/dist/baloise-design-system/{p-3befc6f9.system.js → p-5de0bd8a.system.js} +1 -1
  41. package/dist/baloise-design-system/{p-0fb6cbda.system.js → p-60a6af04.system.js} +1 -1
  42. package/dist/baloise-design-system/{p-d3fabdb142.system.entry.js → p-60e74d3515.system.entry.js} +1 -1
  43. package/dist/baloise-design-system/p-6139ff78d7.system.entry.js +1 -0
  44. package/dist/baloise-design-system/{p-47a8ad4d7a.system.entry.js → p-619afa0ba5.system.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-4192ad4350.entry.js → p-63c685b62d.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-77350b27fc.entry.js → p-648814edf8.entry.js} +1 -1
  47. package/dist/baloise-design-system/{p-2905abdfb8.entry.js → p-663cc3242c.entry.js} +1 -1
  48. package/dist/baloise-design-system/{p-2db4ff4c5b.entry.js → p-6f18ca5500.entry.js} +1 -1
  49. package/dist/baloise-design-system/{p-12bb6ea3e7.system.entry.js → p-760797ae02.system.entry.js} +1 -1
  50. package/dist/baloise-design-system/{p-190b5cd469.entry.js → p-784c10d48f.entry.js} +1 -1
  51. package/dist/baloise-design-system/p-7957c3c0.system.js +1 -0
  52. package/dist/baloise-design-system/{p-8e17b76e7c.system.entry.js → p-7d2709b193.system.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-7c586fb89f.entry.js → p-80e59744a7.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-a7e5ee75e2.entry.js → p-82333c3ce3.entry.js} +1 -1
  55. package/dist/baloise-design-system/{p-bcb892a723.system.entry.js → p-82afff07ac.system.entry.js} +1 -1
  56. package/dist/baloise-design-system/{p-488c4a8ce1.entry.js → p-83c70a6b53.entry.js} +1 -1
  57. package/dist/baloise-design-system/{p-f62d0ccdd1.system.entry.js → p-8613444e15.system.entry.js} +1 -1
  58. package/dist/baloise-design-system/{p-9658f4a66f.entry.js → p-898f7862e4.entry.js} +1 -1
  59. package/dist/baloise-design-system/p-8f89168b60.system.entry.js +1 -0
  60. package/dist/baloise-design-system/{p-88eb14fd.system.js → p-910b2f3d.system.js} +1 -1
  61. package/dist/baloise-design-system/{p-3818fa189f.system.entry.js → p-959fc8c170.system.entry.js} +1 -1
  62. package/dist/baloise-design-system/{p-ecab0d67d5.entry.js → p-9f5eda0e22.entry.js} +1 -1
  63. package/dist/baloise-design-system/{p-9f54cac588.system.entry.js → p-a7de2305e0.system.entry.js} +1 -1
  64. package/dist/baloise-design-system/{p-c0153f8edf.system.entry.js → p-ac6d5570d8.system.entry.js} +1 -1
  65. package/dist/baloise-design-system/{p-4fe64c3ec6.system.entry.js → p-aed4d3ac0f.system.entry.js} +1 -1
  66. package/dist/baloise-design-system/{p-372474e989.system.entry.js → p-b4941441f4.system.entry.js} +1 -1
  67. package/dist/baloise-design-system/{p-bee13e834e.entry.js → p-b4c5b5e53f.entry.js} +1 -1
  68. package/dist/baloise-design-system/p-b60576a064.entry.js +1 -0
  69. package/dist/baloise-design-system/{p-853fe65e14.system.entry.js → p-b7ceb9e59e.system.entry.js} +1 -1
  70. package/dist/baloise-design-system/{p-caec1f9e.js → p-b7cef472.js} +1 -1
  71. package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -1
  72. package/dist/baloise-design-system/{p-8f77c423ad.entry.js → p-be366c8428.entry.js} +1 -1
  73. package/dist/baloise-design-system/{p-cafe624e35.entry.js → p-c00e0f64c8.entry.js} +1 -1
  74. package/dist/baloise-design-system/{p-6c2bf02eb3.entry.js → p-c442bb2db2.entry.js} +1 -1
  75. package/dist/baloise-design-system/{p-a5ee486a2b.entry.js → p-c4e11d3813.entry.js} +1 -1
  76. package/dist/baloise-design-system/{p-420d88737c.entry.js → p-c539ee8edf.entry.js} +1 -1
  77. package/dist/baloise-design-system/{p-407ffd9c55.entry.js → p-c716d30de1.entry.js} +1 -1
  78. package/dist/baloise-design-system/{p-7c7e593e07.entry.js → p-c7338c255f.entry.js} +1 -1
  79. package/dist/baloise-design-system/p-cfa901cb.js +1 -0
  80. package/dist/baloise-design-system/{p-0639833837.system.entry.js → p-d800ecde35.system.entry.js} +1 -1
  81. package/dist/baloise-design-system/{p-fb0af77320.system.entry.js → p-d8a71bc5b4.system.entry.js} +1 -1
  82. package/dist/baloise-design-system/{p-d7d6937d59.system.entry.js → p-d94b2cb869.system.entry.js} +1 -1
  83. package/dist/baloise-design-system/{p-3801afd625.entry.js → p-d9f2d48be1.entry.js} +1 -1
  84. package/dist/baloise-design-system/p-dd162dc12e.system.entry.js +1 -0
  85. package/dist/baloise-design-system/{p-ad9a7657.js → p-de08fd27.js} +1 -1
  86. package/dist/baloise-design-system/{p-d1b16f9cc2.entry.js → p-dec8453a4d.entry.js} +1 -1
  87. package/dist/baloise-design-system/{p-e1ccb7023c.system.entry.js → p-e227dcfaa1.system.entry.js} +1 -1
  88. package/dist/baloise-design-system/{p-f03e63bd1e.system.entry.js → p-e2316d2aea.system.entry.js} +1 -1
  89. package/dist/baloise-design-system/p-e45eb6121d.system.entry.js +1 -0
  90. package/dist/baloise-design-system/{p-ef916aafa5.entry.js → p-e6162b978e.entry.js} +1 -1
  91. package/dist/baloise-design-system/{p-d059465399.system.entry.js → p-e7bcca66c5.system.entry.js} +1 -1
  92. package/dist/baloise-design-system/p-e829652c7a.entry.js +1 -0
  93. package/dist/baloise-design-system/p-e833841822.entry.js +1 -0
  94. package/dist/baloise-design-system/{p-2cd1f1dedb.entry.js → p-e8cab53413.entry.js} +1 -1
  95. package/dist/baloise-design-system/p-ec044ce124.system.entry.js +1 -0
  96. package/dist/baloise-design-system/{p-23b7426d09.system.entry.js → p-efe5a8806d.system.entry.js} +1 -1
  97. package/dist/baloise-design-system/{p-1659bb968c.system.entry.js → p-f00b5e9fa4.system.entry.js} +1 -1
  98. package/dist/baloise-design-system/p-f22c8e0c59.entry.js +1 -0
  99. package/dist/baloise-design-system/{p-445d2e1c70.system.entry.js → p-f3bb565972.system.entry.js} +1 -1
  100. package/dist/baloise-design-system/{p-b8251b8f68.system.entry.js → p-fad86a959d.system.entry.js} +1 -1
  101. package/dist/baloise-design-system/{p-f819d47031.entry.js → p-fcfee1c692.entry.js} +1 -1
  102. package/dist/cjs/bal-accordion_4.cjs.entry.js +1 -1
  103. package/dist/cjs/bal-carousel_2.cjs.entry.js +4 -4
  104. package/dist/cjs/bal-checkbox-button.cjs.entry.js +1 -1
  105. package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
  106. package/dist/cjs/bal-content.cjs.entry.js +56 -0
  107. package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +1 -1
  108. package/dist/cjs/bal-date-calendar_2.cjs.entry.js +2 -3
  109. package/dist/cjs/bal-date.cjs.entry.js +1 -1
  110. package/dist/cjs/bal-datepicker.cjs.entry.js +4 -4
  111. package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
  112. package/dist/cjs/bal-field_5.cjs.entry.js +3 -0
  113. package/dist/cjs/bal-file-upload.cjs.entry.js +1 -1
  114. package/dist/cjs/bal-footer.cjs.entry.js +1 -1
  115. package/dist/cjs/{bal-popover_2.cjs.entry.js → bal-hint_5.cjs.entry.js} +172 -3
  116. package/dist/cjs/bal-input-slider.cjs.entry.js +1 -1
  117. package/dist/cjs/bal-input-stepper.cjs.entry.js +1 -1
  118. package/dist/cjs/bal-input.cjs.entry.js +1 -1
  119. package/dist/cjs/{bal-content_2.cjs.entry.js → bal-label.cjs.entry.js} +0 -46
  120. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  121. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  122. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  123. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  124. package/dist/cjs/bal-number-input.cjs.entry.js +1 -1
  125. package/dist/cjs/bal-option_2.cjs.entry.js +1 -1
  126. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  127. package/dist/cjs/bal-popup.cjs.entry.js +1 -1
  128. package/dist/cjs/bal-progress-bar.cjs.entry.js +5 -5
  129. package/dist/cjs/bal-radio-button.cjs.entry.js +1 -1
  130. package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
  131. package/dist/cjs/bal-segment_2.cjs.entry.js +516 -0
  132. package/dist/cjs/bal-select_2.cjs.entry.js +1 -1
  133. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  134. package/dist/cjs/bal-steps.cjs.entry.js +4 -4
  135. package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
  136. package/dist/cjs/bal-textarea.cjs.entry.js +1 -1
  137. package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
  138. package/dist/cjs/baloise-design-system.cjs.js +1 -1
  139. package/dist/cjs/{breakpoints.decorator-a4a5bd7a.js → breakpoints.decorator-f4da1834.js} +1 -1
  140. package/dist/cjs/{breakpoints.subject-fbf85930.js → breakpoints.subject-6fc372a8.js} +1 -1
  141. package/dist/cjs/{form-input-134c5116.js → form-input-b61eb894.js} +14 -0
  142. package/dist/cjs/index.cjs.js +2 -2
  143. package/dist/cjs/initialize-2a19d091.js +1 -1
  144. package/dist/cjs/loader.cjs.js +1 -1
  145. package/dist/cjs/{tokens.esm-aa4bb7f7.js → tokens.esm-cd3fab6c.js} +1 -1
  146. package/dist/cjs/{window-resize.decorator-c7a521b0.js → window-resize.decorator-67e1f4de.js} +1 -1
  147. package/dist/collection/collection-manifest.json +15 -13
  148. package/dist/collection/components/bal-field/bal-field.js +3 -0
  149. package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +92 -69
  150. package/dist/collection/components/bal-segment/bal-segment.js +115 -19
  151. package/dist/collection/utils/constants/version.constant.js +1 -1
  152. package/dist/collection/utils/form-input.js +13 -0
  153. package/dist/collection/utils/form-input.spec.js +30 -0
  154. package/dist/collection/utils/mask/context/mask-context.js +2 -2
  155. package/dist/esm/bal-accordion_4.entry.js +2 -2
  156. package/dist/esm/bal-carousel_2.entry.js +4 -4
  157. package/dist/esm/bal-checkbox-button.entry.js +1 -1
  158. package/dist/esm/bal-checkbox_2.entry.js +2 -2
  159. package/dist/esm/bal-content.entry.js +52 -0
  160. package/dist/esm/bal-date-calendar-cell.entry.js +1 -1
  161. package/dist/esm/bal-date-calendar_2.entry.js +4 -5
  162. package/dist/esm/bal-date.entry.js +3 -3
  163. package/dist/esm/bal-datepicker.entry.js +5 -5
  164. package/dist/esm/bal-dropdown.entry.js +2 -2
  165. package/dist/esm/bal-field_5.entry.js +3 -0
  166. package/dist/esm/bal-file-upload.entry.js +2 -2
  167. package/dist/esm/bal-footer.entry.js +2 -2
  168. package/dist/esm/{bal-popover_2.entry.js → bal-hint_5.entry.js} +171 -5
  169. package/dist/esm/bal-input-slider.entry.js +1 -1
  170. package/dist/esm/bal-input-stepper.entry.js +2 -2
  171. package/dist/esm/bal-input.entry.js +1 -1
  172. package/dist/esm/{bal-content_2.entry.js → bal-label.entry.js} +1 -46
  173. package/dist/esm/bal-list_8.entry.js +4 -4
  174. package/dist/esm/bal-logo.entry.js +3 -3
  175. package/dist/esm/bal-nav_8.entry.js +3 -3
  176. package/dist/esm/bal-navbar_5.entry.js +3 -3
  177. package/dist/esm/bal-number-input.entry.js +2 -2
  178. package/dist/esm/bal-option_2.entry.js +1 -1
  179. package/dist/esm/bal-pagination.entry.js +3 -3
  180. package/dist/esm/bal-popup.entry.js +2 -2
  181. package/dist/esm/bal-progress-bar.entry.js +5 -5
  182. package/dist/esm/bal-radio-button.entry.js +1 -1
  183. package/dist/esm/bal-radio_2.entry.js +2 -2
  184. package/dist/esm/bal-segment_2.entry.js +511 -0
  185. package/dist/esm/bal-select_2.entry.js +2 -2
  186. package/dist/esm/bal-shape.entry.js +1 -1
  187. package/dist/esm/bal-steps.entry.js +5 -5
  188. package/dist/esm/bal-tab-item_2.entry.js +5 -5
  189. package/dist/esm/bal-textarea.entry.js +1 -1
  190. package/dist/esm/bal-time-input.entry.js +1 -1
  191. package/dist/esm/baloise-design-system.js +1 -1
  192. package/dist/esm/{breakpoints.decorator-f2ac9963.js → breakpoints.decorator-8a50482f.js} +1 -1
  193. package/dist/esm/{breakpoints.subject-3605e395.js → breakpoints.subject-e3538fe7.js} +1 -1
  194. package/dist/esm/{date-aba2d404.js → date-6e8f5617.js} +1 -1
  195. package/dist/esm/{form-input-28a08ec5.js → form-input-a8fdaaef.js} +14 -1
  196. package/dist/esm/{index.esm-76abd8e3.js → index.esm-cc299511.js} +1 -1
  197. package/dist/esm/index.js +5 -5
  198. package/dist/esm/initialize-e216cfe4.js +1 -1
  199. package/dist/esm/loader.js +1 -1
  200. package/dist/esm/{tokens.esm-337782ae.js → tokens.esm-7cf87670.js} +1 -1
  201. package/dist/esm/{window-resize.decorator-d5198831.js → window-resize.decorator-9c08027e.js} +1 -1
  202. package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
  203. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  204. package/dist/esm-es5/bal-checkbox-button.entry.js +1 -1
  205. package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
  206. package/dist/esm-es5/bal-content.entry.js +1 -0
  207. package/dist/esm-es5/bal-date-calendar-cell.entry.js +1 -1
  208. package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
  209. package/dist/esm-es5/bal-date.entry.js +1 -1
  210. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  211. package/dist/esm-es5/bal-dropdown.entry.js +1 -1
  212. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  213. package/dist/esm-es5/bal-file-upload.entry.js +1 -1
  214. package/dist/esm-es5/bal-footer.entry.js +1 -1
  215. package/dist/esm-es5/bal-hint_5.entry.js +1 -0
  216. package/dist/esm-es5/bal-input-slider.entry.js +1 -1
  217. package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
  218. package/dist/esm-es5/bal-input.entry.js +1 -1
  219. package/dist/esm-es5/bal-label.entry.js +1 -0
  220. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  221. package/dist/esm-es5/bal-logo.entry.js +1 -1
  222. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  223. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  224. package/dist/esm-es5/bal-number-input.entry.js +1 -1
  225. package/dist/esm-es5/bal-option_2.entry.js +1 -1
  226. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  227. package/dist/esm-es5/bal-popup.entry.js +1 -1
  228. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  229. package/dist/esm-es5/bal-radio-button.entry.js +1 -1
  230. package/dist/esm-es5/bal-radio_2.entry.js +1 -1
  231. package/dist/esm-es5/bal-segment_2.entry.js +1 -0
  232. package/dist/esm-es5/bal-select_2.entry.js +1 -1
  233. package/dist/esm-es5/bal-shape.entry.js +1 -1
  234. package/dist/esm-es5/bal-steps.entry.js +1 -1
  235. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  236. package/dist/esm-es5/bal-textarea.entry.js +1 -1
  237. package/dist/esm-es5/bal-time-input.entry.js +1 -1
  238. package/dist/esm-es5/baloise-design-system.js +1 -1
  239. package/dist/esm-es5/{breakpoints.decorator-f2ac9963.js → breakpoints.decorator-8a50482f.js} +1 -1
  240. package/dist/esm-es5/{breakpoints.subject-3605e395.js → breakpoints.subject-e3538fe7.js} +1 -1
  241. package/dist/esm-es5/{date-aba2d404.js → date-6e8f5617.js} +1 -1
  242. package/dist/esm-es5/{form-input-28a08ec5.js → form-input-a8fdaaef.js} +1 -1
  243. package/dist/esm-es5/{index.esm-76abd8e3.js → index.esm-cc299511.js} +1 -1
  244. package/dist/esm-es5/index.js +1 -1
  245. package/dist/esm-es5/initialize-e216cfe4.js +1 -1
  246. package/dist/esm-es5/loader.js +1 -1
  247. package/dist/esm-es5/{window-resize.decorator-d5198831.js → window-resize.decorator-9c08027e.js} +1 -1
  248. package/dist/types/components/bal-segment/bal-segment-item/bal-segment-item.d.ts +17 -13
  249. package/dist/types/components/bal-segment/bal-segment.d.ts +22 -3
  250. package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +2 -0
  251. package/dist/types/components.d.ts +7 -19
  252. package/dist/types/utils/form-input.d.ts +3 -0
  253. package/package.json +7 -7
  254. package/dist/baloise-design-system/p-265f9d51c9.system.entry.js +0 -1
  255. package/dist/baloise-design-system/p-370575b8cb.system.entry.js +0 -1
  256. package/dist/baloise-design-system/p-3c25811c44.entry.js +0 -1
  257. package/dist/baloise-design-system/p-487816db33.system.entry.js +0 -1
  258. package/dist/baloise-design-system/p-53e98a0f71.entry.js +0 -1
  259. package/dist/baloise-design-system/p-547aae9610.entry.js +0 -1
  260. package/dist/baloise-design-system/p-5db0544e97.system.entry.js +0 -1
  261. package/dist/baloise-design-system/p-8de1a12660.entry.js +0 -1
  262. package/dist/baloise-design-system/p-a507ff25cb.system.entry.js +0 -1
  263. package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +0 -1
  264. package/dist/baloise-design-system/p-c1c17f8edc.system.entry.js +0 -1
  265. package/dist/baloise-design-system/p-ced37553e2.entry.js +0 -1
  266. package/dist/baloise-design-system/p-d2ee9b0a.system.js +0 -1
  267. package/dist/baloise-design-system/p-d9d229a026.entry.js +0 -1
  268. package/dist/baloise-design-system/p-e0384bfc0c.entry.js +0 -1
  269. package/dist/baloise-design-system/p-e75ccb92.js +0 -1
  270. package/dist/cjs/bal-hint_3.cjs.entry.js +0 -186
  271. package/dist/cjs/bal-segment-item.cjs.entry.js +0 -156
  272. package/dist/cjs/bal-segment.cjs.entry.js +0 -319
  273. package/dist/esm/bal-hint_3.entry.js +0 -180
  274. package/dist/esm/bal-segment-item.entry.js +0 -152
  275. package/dist/esm/bal-segment.entry.js +0 -315
  276. package/dist/esm-es5/bal-content_2.entry.js +0 -1
  277. package/dist/esm-es5/bal-hint_3.entry.js +0 -1
  278. package/dist/esm-es5/bal-popover_2.entry.js +0 -1
  279. package/dist/esm-es5/bal-segment-item.entry.js +0 -1
  280. package/dist/esm-es5/bal-segment.entry.js +0 -1
  281. /package/dist/baloise-design-system/{p-e1994e2c.js → p-46bed129.js} +0 -0
  282. /package/dist/baloise-design-system/{p-36074466.system.js → p-9ffefe27.system.js} +0 -0
  283. /package/dist/esm-es5/{tokens.esm-337782ae.js → tokens.esm-7cf87670.js} +0 -0
@@ -1 +1 @@
1
- import{__awaiter,__extends,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{u as isEscapeKey}from"./index.esm-76abd8e3.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{b as balBrowser}from"./browser-a8073d92.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{h as debounce}from"./helpers-c201154e.js";import{L as Logger}from"./log-dfd1c19f.js";import{f as focusableQueryString}from"./focus-visible-f0cdd043.js";import{a as autoUpdate,c as computePosition,s as shift,f as flip,o as offset,b as arrow}from"./floating-ui.dom.esm-f1cf1077.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";var AbstractVariantRenderer=function(){function t(){}t.prototype.showContainerElement=function(t){if(t.containerEl){this.showElement(t.containerEl)}};t.prototype.hideContainerElement=function(t){if(t.containerEl){this.hideElement(t.containerEl)}};t.prototype.showArrowElement=function(t,i){if(i===void 0){i=t.arrow}if(i&&t.arrowEl){this.showElement(t.arrowEl)}};t.prototype.hideArrowElement=function(t){if(t.arrowEl){Object.assign(t.arrowEl.style,{left:"",top:"",display:"none",visibility:"hidden"})}};t.prototype.showBackdropElement=function(t,i){if(i===void 0){i=t.backdrop}if(i&&t.backdropEl){this.showElement(t.backdropEl)}};t.prototype.hideBackdropElement=function(t){if(t.backdropEl){this.hideElement(t.backdropEl)}};t.prototype.showElement=function(t){if(t){t.style.setProperty("display","block");t.style.setProperty("visibility","visible")}};t.prototype.hideElement=function(t){if(t){t.style.removeProperty("display");t.style.removeProperty("visibility")}};return t}();var DrawerVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.backdrop=false;i.offset=0;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.trigger&&t.backdropEl){this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop);this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset);t.containerEl.style.setProperty("inset","auto 0px 0px 0px");t.containerEl.style.setProperty("bottom","".concat(this.offset,"px"));t.backdropEl.style.setProperty("bottom","".concat(this.offset,"px"));this.showBackdropElement(t,this.backdrop);this.showContainerElement(t);return[2,true]}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.backdropEl){t.balWillAnimate.emit();this.hideBackdropElement(t);this.hideContainerElement(t);t.containerEl.style.removeProperty("inset");t.containerEl.style.removeProperty("bottom");t.backdropEl.style.removeProperty("bottom");return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var FullscreenVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.offset=0;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.trigger){this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset);t.containerEl.style.setProperty("inset","".concat(this.offset,"px auto auto 0px"));if(this.offset>0){t.containerEl.style.setProperty("box-shadow","inset var(--bal-nav-meta-bar-variant-white-shadow)")}this.showBackdropElement(t);this.showContainerElement(t);this.hideArrowElement(t);return[2,true]}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl){this.hideBackdropElement(t);this.hideContainerElement(t);this.hideArrowElement(t);t.containerEl.style.removeProperty("box-shadow");t.containerEl.style.removeProperty("inset");return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var PopoverVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.placement="bottom";i.offset=0;i.arrow=false;i.backdrop=false;i.reference=undefined;i.triggerEl=null;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e;var n=this;return __generator(this,(function(a){if(!t.trigger&&balBrowser.hasDocument){i=Array.from(document.querySelectorAll('[bal-popup="'.concat(t.el.id,'"]')))[0];t.trigger=i}if(t.trigger&&t.containerEl&&t.arrowEl){this.placement=t.getValue(t.trigger,"bal-popup-placement",t.placement);this.arrow=t.getBooleanValue(t.trigger,"bal-popup-arrow",t.arrow);this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop);this.reference=t.getValue(t.trigger,"bal-popup-reference",t.reference);this.offset=t.getNumberValue(t.trigger,"bal-popup-offset",t.offset);this.triggerEl=t.trigger;if(this.reference&&balBrowser.hasDocument){r=document.getElementById(this.reference);this.triggerEl=r?r:t.trigger}if(this.triggerEl){this.showContainerElement(t);this.showBackdropElement(t,this.backdrop);this.showArrowElement(t,this.arrow);this.triggerEl.classList.add("bal-popup-variant-popover-trigger");e=this.placement==="bottom-end"&&this.triggerEl!==t.trigger;if(e){t.setMinWidth(this.triggerEl.clientWidth)}this.cleanup=autoUpdate(this.triggerEl,t.containerEl,(function(){n.update(t)}),{ancestorScroll:true,ancestorResize:true,elementResize:false,layoutShift:true,animationFrame:true});return[2,true]}}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e,n,a,o;return __generator(this,(function(s){if(this.triggerEl&&t.trigger&&t.containerEl&&t.arrowEl){e=this.placement==="bottom-end"&&this.triggerEl!==t.trigger;n=(i=this.triggerEl)===null||i===void 0?void 0:i.getBoundingClientRect();a=(r=t.trigger)===null||r===void 0?void 0:r.getBoundingClientRect();o=false;if(balBrowser.hasWindow){o=!!window.frameElement}computePosition(this.triggerEl,t.containerEl,{placement:this.placement,middleware:[o?undefined:shift(),flip(),offset(this.arrow?16:this.offset),arrow({element:t.arrowEl,padding:4})]}).then((function(i){var r,o;var s=i.x,u=i.y,h=i.middlewareData,p=i.placement;if(t.containerEl){Object.assign(t.containerEl.style,{left:"".concat(s,"px"),top:"".concat(u,"px")});var c=p.split("-")[0];var f={top:"bottom",right:"left",bottom:"top",left:"right"}[c];if(h.arrow&&t.arrowEl){var l=h.arrow;if(e){var d=n.right-a.right-4;Object.assign(t.arrowEl.style,(r={right:"".concat(d+a.width/2,"px"),left:"",top:u!=null&&l.y!=null?"".concat(l.y,"px"):"",bottom:""},r[f]="".concat(-4,"px"),r))}else{Object.assign(t.arrowEl.style,(o={left:s!=null&&l.x!=null?"".concat(l.x,"px"):"",top:u!=null&&l.y!=null?"".concat(l.y,"px"):"",right:"",bottom:""},o[f]="".concat(-4,"px"),o))}}}}));return[2,true]}return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.arrowEl&&this.triggerEl){if(this.cleanup){this.cleanup()}this.triggerEl.classList.remove("bal-popup-variant-popover-trigger");this.hideBackdropElement(t);this.hideContainerElement(t);this.hideArrowElement(t);return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var VariantRenderer=function(){function t(t){this.renderer=t}t.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.present(t)];case 1:i=r.sent();if(i){t.presented=true;t.balDidAnimate.emit()}return[2,i]}}))}))};t.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.update(t)];case 1:i=r.sent();if(i){t.balDidAnimate.emit()}return[2,i]}}))}))};t.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.dismiss(t)];case 1:i=r.sent();if(i){t.presented=false;t.balDidAnimate.emit()}return[2,i]}}))}))};return t}();var balPopupCss=":root{--bal-popup-backdrop-background:rgba(0,7,57,.8);--bal-popup-container-padding-top:0;--bal-popup-container-padding-bottom:0;--bal-popup-container-background:var(--bal-color-white);--bal-popup-variant-popover-max-width:auto;--bal-popup-variant-popover-radius:var(--bal-radius-large);--bal-popup-variant-popover-shadow:var(--bal-shadow-normal);--bal-popup-variant-drawer-radius:var(--bal-radius-large);--bal-popup-arrow-background:var(--bal-color-white)}.bal-popup{position:static;display:inline;z-index:var(--bal-z-index-popup)}.bal-popup__container{background:var(--bal-popup-container-background);display:none;visibility:hidden;padding-top:var(--bal-popup-container-padding-top);padding-bottom:var(--bal-popup-container-padding-bottom);-ms-flex-positive:1;flex-grow:1;margin:0 auto;position:relative;width:auto}.bal-popup__container--variant-popover{border-radius:var(--bal-popup-variant-popover-radius);-webkit-box-shadow:var(--bal-popup-variant-popover-shadow);box-shadow:var(--bal-popup-variant-popover-shadow);width:var(--bal-popup-variant-popover-max-width);position:absolute;top:0;left:0}.bal-popup__container--variant-fullscreen{position:fixed;margin:0;width:100%;min-width:100%;max-width:100% !important;min-height:var(--bal-app-height, 100%)}.bal-popup__container--variant-fullscreen .bal-popup__inner{padding-left:var(--bal-container-space);padding-right:var(--bal-container-space)}.bal-popup__container--variant-drawer{position:fixed;border-top-left-radius:var(--bal-popup-variant-drawer-radius);border-top-right-radius:var(--bal-popup-variant-drawer-radius);padding-left:var(--bal-container-space);padding-right:var(--bal-container-space);width:100%}.bal-popup__inner{overflow-y:auto;max-height:calc(var(--bal-app-height, 100%) - 4rem)}.bal-popup__inner__head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-popup__inner__content{width:100%}.bal-popup__arrow{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:8px;height:8px;background:var(--bal-popup-arrow-background);-webkit-transform:rotate(45deg);transform:rotate(45deg);display:none;visibility:hidden}.bal-popup__backdrop{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;bottom:0;left:0;right:0;top:0;background-color:var(--bal-popup-backdrop-background);width:100vw;display:none;visibility:hidden}.bal-popup-variant-popover-trigger,.bal-popup-permanent-trigger{z-index:calc(var(--bal-z-index-popup) + 1) !important;position:relative !important}";var BalPopupStyle0=balPopupCss;var Popup=function(){function t(t){var i=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balWillAnimate=createEvent(this,"balWillAnimate",7);this.balDidAnimate=createEvent(this,"balDidAnimate",7);this.popupId="bal-pu-".concat(popupIds++);this.isClickedOutsideOnMouseDown=false;this.isClickedOutsideOnMouseUp=false;this.popoverVariantRenderer=new VariantRenderer(new PopoverVariantRenderer);this.fullscreenVariantRenderer=new VariantRenderer(new FullscreenVariantRenderer);this.drawerVariantRenderer=new VariantRenderer(new DrawerVariantRenderer);this.lastVariant="popover";this.initialActive=this.active;this.debouncedGlobalClick=debounce((function(t){return i.notifyGlobalClick(t)}),10);this.onBackdropClick=function(t){if(i.activeBackdropDismiss&&i.presented&&t&&t.target){var r=t.target;return r.classList.contains("bal-popup__backdrop")}return false};this.onCloseClick=function(){if(i.activeClosable){i.dismiss()}};this.activeClosable=false;this.activeBackdropDismiss=false;this.activeVariant="popover";this.trigger=undefined;this.lastTrigger=undefined;this.minContainerWidth=0;this.label="";this.reference=undefined;this.variant="popover";this.placement="bottom";this.arrow=false;this.backdrop=false;this.offset=0;this.closable=false;this.backdropDismiss=false;this.active=false;this.presented=false;this.contentWidth=undefined;this.demo=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.variantChanged=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:if(!(t!==i))return[3,5];return[4,this.getVariantRenderer(i).dismiss(this)];case 1:r.sent();if(!(this.activeVariant!==t))return[3,3];this.lastVariant=this.activeVariant;this.activeVariant=t;return[4,this.getVariantRenderer(this.lastVariant).dismiss(this)];case 2:r.sent();r.label=3;case 3:if(!this.presented)return[3,5];return[4,this.getVariantRenderer(t).present(this)];case 4:r.sent();r.label=5;case 5:return[2]}}))}))};t.prototype.activeChanged=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){if(t!==i&&t!==this.presented){if(t){this.present()}else{this.dismiss()}}return[2]}))}))};t.prototype.contentWidthChanged=function(t,i){if(t!==i){if(t===undefined){this.el.style.removeProperty("--bal-popup-variant-popover-max-width")}else{this.el.style.setProperty("--bal-popup-variant-popover-max-width","".concat(this.contentWidth,"px"))}}};t.prototype.componentDidLoad=function(){this.contentWidthChanged(this.contentWidth,0);if(this.initialActive===true&&this.presented!==true){this.present()}if(this.demo){this.present()}};t.prototype.listenOnGlobalClick=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e,n;return __generator(this,(function(a){r=t.target;e=r.closest("[bal-popup]");if(e&&balBrowser.hasWindow){n=((i=e.attributes.getNamedItem("bal-popup"))===null||i===void 0?void 0:i.nodeValue)||"";if(this.el.id===n){this.debouncedGlobalClick(e)}}return[2]}))}))};t.prototype.listenOnKeyDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.activeClosable&&this.presented&&isEscapeKey(t)){stopEventBubbling(t);this.dismiss()}return[2]}))}))};t.prototype.listenOnMouseDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.isClickedOutsideOnMouseDown=this.onBackdropClick(t);return[2]}))}))};t.prototype.listenOnMouseUp=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.isClickedOutsideOnMouseUp=this.onBackdropClick(t);return[2]}))}))};t.prototype.listenOnComponentClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.presented&&this.activeBackdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown))return[3,2];return[4,this.dismiss()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetAllVariants()];case 1:t.sent();return[4,this._present()];case 2:if(t.sent()){this.lastTrigger=this.trigger;this.balChange.emit(this.presented)}return[2]}}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetAllVariants()];case 1:t.sent();return[4,this._dismiss()];case 2:if(t.sent()){this.lastTrigger=this.trigger;this.balChange.emit(this.presented)}return[2]}}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.presented){return[2,this.dismiss()]}else{return[2,this.present()]}return[2]}))}))};t.prototype.setMinWidth=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.containerEl){this.containerEl.style.minWidth="".concat(t,"px");this.minContainerWidth=t}return[2]}))}))};t.prototype._emitChange=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.balChange.emit(this.presented);return[2]}))}))};t.prototype._present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:if(balBrowser.hasDocument){this.lastFocus=document.activeElement||undefined}if(!this.lastVariantRenderer)return[3,2];return[4,this.lastVariantRenderer.dismiss(this)];case 1:i.sent();this.presented=true;i.label=2;case 2:this.lastVariantRenderer=this.getVariantRenderer();return[4,this.lastVariantRenderer.present(this)];case 3:t=i.sent();this.focusFirstDescendant();return[2,t]}}))}))};t.prototype._dismiss=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.getVariantRenderer().dismiss(this)];case 1:i=r.sent();this.lastVariantRenderer=undefined;if(this.lastFocus&&this.lastFocus.focus){(t=this.lastFocus)===null||t===void 0?void 0:t.focus()}return[2,i]}}))}))};t.prototype.getVariantRenderer=function(t){if(t===void 0){t=this.activeVariant}switch(t){case"fullscreen":return this.fullscreenVariantRenderer;case"drawer":return this.drawerVariantRenderer;default:return this.popoverVariantRenderer}};t.prototype.getValue=function(t,i,r){var e=t.attributes.getNamedItem(i);return e?e.value:r};t.prototype.getNumberValue=function(t,i,r){var e=t.attributes.getNamedItem(i);if(e){return parseInt(e.value,10)||r}return r};t.prototype.getBooleanValue=function(t,i,r){var e=t.attributes.getNamedItem(i);if(e){var n=e.value===""||e.value==="true"?true:false;return e?n:r}return r};t.prototype.notifyGlobalClick=function(t){this.trigger=t;this.lastTrigger=this.lastTrigger===undefined?this.trigger:this.lastTrigger;this.activeVariant=this.getValue(t,"bal-popup-variant",this.variant);this.activeClosable=this.getBooleanValue(t,"bal-popup-closable",this.closable);this.activeBackdropDismiss=this.getBooleanValue(t,"bal-popup-backdrop-dismiss",this.backdropDismiss);if(this.presented&&this.lastTrigger!==this.trigger){this._present();this.lastTrigger=this.trigger}else{this.toggle()}};t.prototype.resetAllVariants=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.dismissAllOtherPopups()];case 1:i.sent();if(!(this.lastVariant!==this.activeVariant))return[3,3];t=this.getVariantRenderer(this.lastVariant);return[4,t.dismiss(this)];case 2:i.sent();i.label=3;case 3:this.lastVariant=this.activeVariant;return[2]}}))}))};t.prototype.dismissAllOtherPopups=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,r;var e=this;return __generator(this,(function(n){switch(n.label){case 0:if(!balBrowser.hasDocument)return[3,5];t=Array.from(document.getElementsByTagName("bal-popup")).filter((function(t){return t.id!==e.el.id&&t.ariaHidden!=="true"}));i=0;n.label=1;case 1:if(!(i<t.length))return[3,5];r=t[i];return[4,r._dismiss()];case 2:n.sent();return[4,r._emitChange()];case 3:n.sent();n.label=4;case 4:i++;return[3,1];case 5:return[2]}}))}))};t.prototype.focusFirstDescendant=function(){var t=this.el;var i=t.querySelector(focusableQueryString);if(i){i.focus()}else{t.focus()}};t.prototype.render=function(){var t=this;var i=BEM.block("popup");var r=i.element("container");var e=i.element("arrow");var n=i.element("backdrop");var a=i.element("inner");var o=a.element("head");var s=a.element("content");return h(Host,{class:Object.assign({},i.class()),role:"dialog","aria-hidden":"".concat(this.presented!==true),"aria-modal":"".concat(this.presented===true),"aria-presented":"".concat(this.presented===true),"aria-labelledby":"".concat(this.popupId,"-heading")},h("div",{class:Object.assign({},n.class()),ref:function(i){return t.backdropEl=i}}),h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("variant-".concat(this.activeVariant)).class()),ref:function(i){return t.containerEl=i},style:{minWidth:"".concat(this.minContainerWidth,"px")}},h("div",{class:Object.assign({},e.class()),ref:function(i){return t.arrowEl=i}}),h("bal-stack",{layout:"vertical",px:this.activeVariant==="popover"?"medium":"none",py:"medium",class:Object.assign({},a.class())},this.label?h("bal-stack",{space:"auto",class:Object.assign({},o.class())},h("bal-heading",{"data-test":"bal-popup-label",level:"span","visual-level":"large",id:"".concat(this.popupId,"-heading")},this.label),this.activeClosable?h("bal-close",{"data-test":"bal-popup-close",tabindex:-1,onClick:function(){return t.onCloseClick()}}):""):"",h("div",{class:Object.assign({},s.class()),ref:function(i){return t.contentEl=i},"data-test":"bal-popup-content"},h("slot",null)))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{variant:["variantChanged"],active:["activeChanged"],contentWidth:["contentWidthChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-popup"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Popup.prototype,"createLogger",null);var popupIds=0;Popup.style=BalPopupStyle0;export{Popup as bal_popup};
1
+ import{__awaiter,__extends,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{u as isEscapeKey}from"./index.esm-cc299511.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{b as balBrowser}from"./browser-a8073d92.js";import{s as stopEventBubbling}from"./form-input-a8fdaaef.js";import{h as debounce}from"./helpers-c201154e.js";import{L as Logger}from"./log-dfd1c19f.js";import{f as focusableQueryString}from"./focus-visible-f0cdd043.js";import{a as autoUpdate,c as computePosition,s as shift,f as flip,o as offset,b as arrow}from"./floating-ui.dom.esm-f1cf1077.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";var AbstractVariantRenderer=function(){function t(){}t.prototype.showContainerElement=function(t){if(t.containerEl){this.showElement(t.containerEl)}};t.prototype.hideContainerElement=function(t){if(t.containerEl){this.hideElement(t.containerEl)}};t.prototype.showArrowElement=function(t,i){if(i===void 0){i=t.arrow}if(i&&t.arrowEl){this.showElement(t.arrowEl)}};t.prototype.hideArrowElement=function(t){if(t.arrowEl){Object.assign(t.arrowEl.style,{left:"",top:"",display:"none",visibility:"hidden"})}};t.prototype.showBackdropElement=function(t,i){if(i===void 0){i=t.backdrop}if(i&&t.backdropEl){this.showElement(t.backdropEl)}};t.prototype.hideBackdropElement=function(t){if(t.backdropEl){this.hideElement(t.backdropEl)}};t.prototype.showElement=function(t){if(t){t.style.setProperty("display","block");t.style.setProperty("visibility","visible")}};t.prototype.hideElement=function(t){if(t){t.style.removeProperty("display");t.style.removeProperty("visibility")}};return t}();var DrawerVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.backdrop=false;i.offset=0;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.trigger&&t.backdropEl){this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop);this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset);t.containerEl.style.setProperty("inset","auto 0px 0px 0px");t.containerEl.style.setProperty("bottom","".concat(this.offset,"px"));t.backdropEl.style.setProperty("bottom","".concat(this.offset,"px"));this.showBackdropElement(t,this.backdrop);this.showContainerElement(t);return[2,true]}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.backdropEl){t.balWillAnimate.emit();this.hideBackdropElement(t);this.hideContainerElement(t);t.containerEl.style.removeProperty("inset");t.containerEl.style.removeProperty("bottom");t.backdropEl.style.removeProperty("bottom");return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var FullscreenVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.offset=0;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.trigger){this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset);t.containerEl.style.setProperty("inset","".concat(this.offset,"px auto auto 0px"));if(this.offset>0){t.containerEl.style.setProperty("box-shadow","inset var(--bal-nav-meta-bar-variant-white-shadow)")}this.showBackdropElement(t);this.showContainerElement(t);this.hideArrowElement(t);return[2,true]}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl){this.hideBackdropElement(t);this.hideContainerElement(t);this.hideArrowElement(t);t.containerEl.style.removeProperty("box-shadow");t.containerEl.style.removeProperty("inset");return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var PopoverVariantRenderer=function(t){__extends(i,t);function i(){var i=t.apply(this,arguments)||this;i.placement="bottom";i.offset=0;i.arrow=false;i.backdrop=false;i.reference=undefined;i.triggerEl=null;return i}i.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e;var n=this;return __generator(this,(function(a){if(!t.trigger&&balBrowser.hasDocument){i=Array.from(document.querySelectorAll('[bal-popup="'.concat(t.el.id,'"]')))[0];t.trigger=i}if(t.trigger&&t.containerEl&&t.arrowEl){this.placement=t.getValue(t.trigger,"bal-popup-placement",t.placement);this.arrow=t.getBooleanValue(t.trigger,"bal-popup-arrow",t.arrow);this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop);this.reference=t.getValue(t.trigger,"bal-popup-reference",t.reference);this.offset=t.getNumberValue(t.trigger,"bal-popup-offset",t.offset);this.triggerEl=t.trigger;if(this.reference&&balBrowser.hasDocument){r=document.getElementById(this.reference);this.triggerEl=r?r:t.trigger}if(this.triggerEl){this.showContainerElement(t);this.showBackdropElement(t,this.backdrop);this.showArrowElement(t,this.arrow);this.triggerEl.classList.add("bal-popup-variant-popover-trigger");e=this.placement==="bottom-end"&&this.triggerEl!==t.trigger;if(e){t.setMinWidth(this.triggerEl.clientWidth)}this.cleanup=autoUpdate(this.triggerEl,t.containerEl,(function(){n.update(t)}),{ancestorScroll:true,ancestorResize:true,elementResize:false,layoutShift:true,animationFrame:true});return[2,true]}}return[2,false]}))}))};i.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e,n,a,o;return __generator(this,(function(s){if(this.triggerEl&&t.trigger&&t.containerEl&&t.arrowEl){e=this.placement==="bottom-end"&&this.triggerEl!==t.trigger;n=(i=this.triggerEl)===null||i===void 0?void 0:i.getBoundingClientRect();a=(r=t.trigger)===null||r===void 0?void 0:r.getBoundingClientRect();o=false;if(balBrowser.hasWindow){o=!!window.frameElement}computePosition(this.triggerEl,t.containerEl,{placement:this.placement,middleware:[o?undefined:shift(),flip(),offset(this.arrow?16:this.offset),arrow({element:t.arrowEl,padding:4})]}).then((function(i){var r,o;var s=i.x,u=i.y,h=i.middlewareData,p=i.placement;if(t.containerEl){Object.assign(t.containerEl.style,{left:"".concat(s,"px"),top:"".concat(u,"px")});var c=p.split("-")[0];var f={top:"bottom",right:"left",bottom:"top",left:"right"}[c];if(h.arrow&&t.arrowEl){var l=h.arrow;if(e){var d=n.right-a.right-4;Object.assign(t.arrowEl.style,(r={right:"".concat(d+a.width/2,"px"),left:"",top:u!=null&&l.y!=null?"".concat(l.y,"px"):"",bottom:""},r[f]="".concat(-4,"px"),r))}else{Object.assign(t.arrowEl.style,(o={left:s!=null&&l.x!=null?"".concat(l.x,"px"):"",top:u!=null&&l.y!=null?"".concat(l.y,"px"):"",right:"",bottom:""},o[f]="".concat(-4,"px"),o))}}}}));return[2,true]}return[2,false]}))}))};i.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(t.containerEl&&t.arrowEl&&this.triggerEl){if(this.cleanup){this.cleanup()}this.triggerEl.classList.remove("bal-popup-variant-popover-trigger");this.hideBackdropElement(t);this.hideContainerElement(t);this.hideArrowElement(t);return[2,true]}return[2,false]}))}))};return i}(AbstractVariantRenderer);var VariantRenderer=function(){function t(t){this.renderer=t}t.prototype.present=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.present(t)];case 1:i=r.sent();if(i){t.presented=true;t.balDidAnimate.emit()}return[2,i]}}))}))};t.prototype.update=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.update(t)];case 1:i=r.sent();if(i){t.balDidAnimate.emit()}return[2,i]}}))}))};t.prototype.dismiss=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:t.balWillAnimate.emit();return[4,this.renderer.dismiss(t)];case 1:i=r.sent();if(i){t.presented=false;t.balDidAnimate.emit()}return[2,i]}}))}))};return t}();var balPopupCss=":root{--bal-popup-backdrop-background:rgba(0,7,57,.8);--bal-popup-container-padding-top:0;--bal-popup-container-padding-bottom:0;--bal-popup-container-background:var(--bal-color-white);--bal-popup-variant-popover-max-width:auto;--bal-popup-variant-popover-radius:var(--bal-radius-large);--bal-popup-variant-popover-shadow:var(--bal-shadow-normal);--bal-popup-variant-drawer-radius:var(--bal-radius-large);--bal-popup-arrow-background:var(--bal-color-white)}.bal-popup{position:static;display:inline;z-index:var(--bal-z-index-popup)}.bal-popup__container{background:var(--bal-popup-container-background);display:none;visibility:hidden;padding-top:var(--bal-popup-container-padding-top);padding-bottom:var(--bal-popup-container-padding-bottom);-ms-flex-positive:1;flex-grow:1;margin:0 auto;position:relative;width:auto}.bal-popup__container--variant-popover{border-radius:var(--bal-popup-variant-popover-radius);-webkit-box-shadow:var(--bal-popup-variant-popover-shadow);box-shadow:var(--bal-popup-variant-popover-shadow);width:var(--bal-popup-variant-popover-max-width);position:absolute;top:0;left:0}.bal-popup__container--variant-fullscreen{position:fixed;margin:0;width:100%;min-width:100%;max-width:100% !important;min-height:var(--bal-app-height, 100%)}.bal-popup__container--variant-fullscreen .bal-popup__inner{padding-left:var(--bal-container-space);padding-right:var(--bal-container-space)}.bal-popup__container--variant-drawer{position:fixed;border-top-left-radius:var(--bal-popup-variant-drawer-radius);border-top-right-radius:var(--bal-popup-variant-drawer-radius);padding-left:var(--bal-container-space);padding-right:var(--bal-container-space);width:100%}.bal-popup__inner{overflow-y:auto;max-height:calc(var(--bal-app-height, 100%) - 4rem)}.bal-popup__inner__head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-popup__inner__content{width:100%}.bal-popup__arrow{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:8px;height:8px;background:var(--bal-popup-arrow-background);-webkit-transform:rotate(45deg);transform:rotate(45deg);display:none;visibility:hidden}.bal-popup__backdrop{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;bottom:0;left:0;right:0;top:0;background-color:var(--bal-popup-backdrop-background);width:100vw;display:none;visibility:hidden}.bal-popup-variant-popover-trigger,.bal-popup-permanent-trigger{z-index:calc(var(--bal-z-index-popup) + 1) !important;position:relative !important}";var BalPopupStyle0=balPopupCss;var Popup=function(){function t(t){var i=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balWillAnimate=createEvent(this,"balWillAnimate",7);this.balDidAnimate=createEvent(this,"balDidAnimate",7);this.popupId="bal-pu-".concat(popupIds++);this.isClickedOutsideOnMouseDown=false;this.isClickedOutsideOnMouseUp=false;this.popoverVariantRenderer=new VariantRenderer(new PopoverVariantRenderer);this.fullscreenVariantRenderer=new VariantRenderer(new FullscreenVariantRenderer);this.drawerVariantRenderer=new VariantRenderer(new DrawerVariantRenderer);this.lastVariant="popover";this.initialActive=this.active;this.debouncedGlobalClick=debounce((function(t){return i.notifyGlobalClick(t)}),10);this.onBackdropClick=function(t){if(i.activeBackdropDismiss&&i.presented&&t&&t.target){var r=t.target;return r.classList.contains("bal-popup__backdrop")}return false};this.onCloseClick=function(){if(i.activeClosable){i.dismiss()}};this.activeClosable=false;this.activeBackdropDismiss=false;this.activeVariant="popover";this.trigger=undefined;this.lastTrigger=undefined;this.minContainerWidth=0;this.label="";this.reference=undefined;this.variant="popover";this.placement="bottom";this.arrow=false;this.backdrop=false;this.offset=0;this.closable=false;this.backdropDismiss=false;this.active=false;this.presented=false;this.contentWidth=undefined;this.demo=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.variantChanged=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:if(!(t!==i))return[3,5];return[4,this.getVariantRenderer(i).dismiss(this)];case 1:r.sent();if(!(this.activeVariant!==t))return[3,3];this.lastVariant=this.activeVariant;this.activeVariant=t;return[4,this.getVariantRenderer(this.lastVariant).dismiss(this)];case 2:r.sent();r.label=3;case 3:if(!this.presented)return[3,5];return[4,this.getVariantRenderer(t).present(this)];case 4:r.sent();r.label=5;case 5:return[2]}}))}))};t.prototype.activeChanged=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){if(t!==i&&t!==this.presented){if(t){this.present()}else{this.dismiss()}}return[2]}))}))};t.prototype.contentWidthChanged=function(t,i){if(t!==i){if(t===undefined){this.el.style.removeProperty("--bal-popup-variant-popover-max-width")}else{this.el.style.setProperty("--bal-popup-variant-popover-max-width","".concat(this.contentWidth,"px"))}}};t.prototype.componentDidLoad=function(){this.contentWidthChanged(this.contentWidth,0);if(this.initialActive===true&&this.presented!==true){this.present()}if(this.demo){this.present()}};t.prototype.listenOnGlobalClick=function(t){return __awaiter(this,void 0,void 0,(function(){var i,r,e,n;return __generator(this,(function(a){r=t.target;e=r.closest("[bal-popup]");if(e&&balBrowser.hasWindow){n=((i=e.attributes.getNamedItem("bal-popup"))===null||i===void 0?void 0:i.nodeValue)||"";if(this.el.id===n){this.debouncedGlobalClick(e)}}return[2]}))}))};t.prototype.listenOnKeyDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.activeClosable&&this.presented&&isEscapeKey(t)){stopEventBubbling(t);this.dismiss()}return[2]}))}))};t.prototype.listenOnMouseDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.isClickedOutsideOnMouseDown=this.onBackdropClick(t);return[2]}))}))};t.prototype.listenOnMouseUp=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.isClickedOutsideOnMouseUp=this.onBackdropClick(t);return[2]}))}))};t.prototype.listenOnComponentClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.presented&&this.activeBackdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown))return[3,2];return[4,this.dismiss()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetAllVariants()];case 1:t.sent();return[4,this._present()];case 2:if(t.sent()){this.lastTrigger=this.trigger;this.balChange.emit(this.presented)}return[2]}}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetAllVariants()];case 1:t.sent();return[4,this._dismiss()];case 2:if(t.sent()){this.lastTrigger=this.trigger;this.balChange.emit(this.presented)}return[2]}}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.presented){return[2,this.dismiss()]}else{return[2,this.present()]}return[2]}))}))};t.prototype.setMinWidth=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.containerEl){this.containerEl.style.minWidth="".concat(t,"px");this.minContainerWidth=t}return[2]}))}))};t.prototype._emitChange=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.balChange.emit(this.presented);return[2]}))}))};t.prototype._present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:if(balBrowser.hasDocument){this.lastFocus=document.activeElement||undefined}if(!this.lastVariantRenderer)return[3,2];return[4,this.lastVariantRenderer.dismiss(this)];case 1:i.sent();this.presented=true;i.label=2;case 2:this.lastVariantRenderer=this.getVariantRenderer();return[4,this.lastVariantRenderer.present(this)];case 3:t=i.sent();this.focusFirstDescendant();return[2,t]}}))}))};t.prototype._dismiss=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.getVariantRenderer().dismiss(this)];case 1:i=r.sent();this.lastVariantRenderer=undefined;if(this.lastFocus&&this.lastFocus.focus){(t=this.lastFocus)===null||t===void 0?void 0:t.focus()}return[2,i]}}))}))};t.prototype.getVariantRenderer=function(t){if(t===void 0){t=this.activeVariant}switch(t){case"fullscreen":return this.fullscreenVariantRenderer;case"drawer":return this.drawerVariantRenderer;default:return this.popoverVariantRenderer}};t.prototype.getValue=function(t,i,r){var e=t.attributes.getNamedItem(i);return e?e.value:r};t.prototype.getNumberValue=function(t,i,r){var e=t.attributes.getNamedItem(i);if(e){return parseInt(e.value,10)||r}return r};t.prototype.getBooleanValue=function(t,i,r){var e=t.attributes.getNamedItem(i);if(e){var n=e.value===""||e.value==="true"?true:false;return e?n:r}return r};t.prototype.notifyGlobalClick=function(t){this.trigger=t;this.lastTrigger=this.lastTrigger===undefined?this.trigger:this.lastTrigger;this.activeVariant=this.getValue(t,"bal-popup-variant",this.variant);this.activeClosable=this.getBooleanValue(t,"bal-popup-closable",this.closable);this.activeBackdropDismiss=this.getBooleanValue(t,"bal-popup-backdrop-dismiss",this.backdropDismiss);if(this.presented&&this.lastTrigger!==this.trigger){this._present();this.lastTrigger=this.trigger}else{this.toggle()}};t.prototype.resetAllVariants=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.dismissAllOtherPopups()];case 1:i.sent();if(!(this.lastVariant!==this.activeVariant))return[3,3];t=this.getVariantRenderer(this.lastVariant);return[4,t.dismiss(this)];case 2:i.sent();i.label=3;case 3:this.lastVariant=this.activeVariant;return[2]}}))}))};t.prototype.dismissAllOtherPopups=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,r;var e=this;return __generator(this,(function(n){switch(n.label){case 0:if(!balBrowser.hasDocument)return[3,5];t=Array.from(document.getElementsByTagName("bal-popup")).filter((function(t){return t.id!==e.el.id&&t.ariaHidden!=="true"}));i=0;n.label=1;case 1:if(!(i<t.length))return[3,5];r=t[i];return[4,r._dismiss()];case 2:n.sent();return[4,r._emitChange()];case 3:n.sent();n.label=4;case 4:i++;return[3,1];case 5:return[2]}}))}))};t.prototype.focusFirstDescendant=function(){var t=this.el;var i=t.querySelector(focusableQueryString);if(i){i.focus()}else{t.focus()}};t.prototype.render=function(){var t=this;var i=BEM.block("popup");var r=i.element("container");var e=i.element("arrow");var n=i.element("backdrop");var a=i.element("inner");var o=a.element("head");var s=a.element("content");return h(Host,{class:Object.assign({},i.class()),role:"dialog","aria-hidden":"".concat(this.presented!==true),"aria-modal":"".concat(this.presented===true),"aria-presented":"".concat(this.presented===true),"aria-labelledby":"".concat(this.popupId,"-heading")},h("div",{class:Object.assign({},n.class()),ref:function(i){return t.backdropEl=i}}),h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("variant-".concat(this.activeVariant)).class()),ref:function(i){return t.containerEl=i},style:{minWidth:"".concat(this.minContainerWidth,"px")}},h("div",{class:Object.assign({},e.class()),ref:function(i){return t.arrowEl=i}}),h("bal-stack",{layout:"vertical",px:this.activeVariant==="popover"?"medium":"none",py:"medium",class:Object.assign({},a.class())},this.label?h("bal-stack",{space:"auto",class:Object.assign({},o.class())},h("bal-heading",{"data-test":"bal-popup-label",level:"span","visual-level":"large",id:"".concat(this.popupId,"-heading")},this.label),this.activeClosable?h("bal-close",{"data-test":"bal-popup-close",tabindex:-1,onClick:function(){return t.onCloseClick()}}):""):"",h("div",{class:Object.assign({},s.class()),ref:function(i){return t.contentEl=i},"data-test":"bal-popup-content"},h("slot",null)))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{variant:["variantChanged"],active:["activeChanged"],contentWidth:["contentWidthChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-popup"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Popup.prototype,"createLogger",null);var popupIds=0;Popup.style=BalPopupStyle0;export{Popup as bal_popup};
@@ -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{l as raf}from"./helpers-c201154e.js";import{L as ListenToWindowResize}from"./window-resize.decorator-d5198831.js";import{b as balBreakpoints}from"./breakpoints.subject-3605e395.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-f2ac9963.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";import"./device-8c6d2881.js";import"./tokens.esm-337782ae.js";var balProgressBarCss=":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-background-purple:var(--bal-color-purple-2);--bal-progress-bar-background-yellow:var(--bal-color-yellow-2);--bal-progress-bar-background-red:var(--bal-color-red-2);--bal-progress-bar-background-green:var(--bal-color-green-2);--bal-progress-bar-line-color-primary:var(--bal-color-primary);--bal-progress-bar-line-color-purple:var(--bal-color-purple-6);--bal-progress-bar-line-color-yellow:var(--bal-color-yellow-6);--bal-progress-bar-line-color-red:var(--bal-color-red-6);--bal-progress-bar-line-color-green:var(--bal-color-green-6);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white-of-primary,.bal-progress-bar--background-white-of-purple,.bal-progress-bar--background-white-of-red,.bal-progress-bar--background-white-of-green,.bal-progress-bar--background-white-of-yellow{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey-of-primary{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar--background-grey-of-purple{background:var(--bal-progress-bar-background-purple)}.bal-progress-bar--background-grey-of-red{background:var(--bal-progress-bar-background-red)}.bal-progress-bar--background-grey-of-green{background:var(--bal-progress-bar-background-green)}.bal-progress-bar--background-grey-of-yellow{background:var(--bal-progress-bar-background-yellow)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-color-primary);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}.bal-progress-bar__line--color-purple{background:var(--bal-progress-bar-line-color-purple)}.bal-progress-bar__line--color-yellow{background:var(--bal-progress-bar-line-color-yellow)}.bal-progress-bar__line--color-red{background:var(--bal-progress-bar-line-color-red)}.bal-progress-bar__line--color-green{background:var(--bal-progress-bar-line-color-green)}";var BalProgressBarStyle0=balProgressBarCss;var ProgressBar=function(){function r(r){registerInstance(this,r);this.animated=true;this.isTouch=balBreakpoints.isTouch;this.value=0;this.background="white";this.color="primary"}r.prototype.componentDidRender=function(){this.updateProgress()};r.prototype.breakpointListener=function(r){this.updateProgress()};r.prototype.windowResizeListener=function(){this.updateProgress()};r.prototype.configChanged=function(r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.animated=r.animated;return[2]}))}))};r.prototype.updateProgress=function(){var r=this;if(this.lineEl){raf((function(){var a=r.el.clientWidth;var e=Math.max(0,Math.min(100,r.value));var o=a/100*e;r.lineEl.style.width="".concat(o,"px");if(e===100){r.lineEl.classList.add("bal-progress-bar__line--full")}else{r.lineEl.classList.remove("bal-progress-bar__line--full")}}))}};r.prototype.render=function(){var r=this;var a=BEM.block("progress-bar");var e=a.element("line");return h(Host,{"aria-hidden":"true",class:Object.assign(Object.assign({},a.class()),a.modifier("background-".concat(this.background,"-of-").concat(this.color)).class())},h("div",{class:Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("color-".concat(this.color)).class()),e.modifier("animated").class(this.animated)),ref:function(a){return r.lineEl=a}}))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],ProgressBar.prototype,"breakpointListener",null);__decorate([ListenToWindowResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],ProgressBar.prototype,"windowResizeListener",null);ProgressBar.style=BalProgressBarStyle0;export{ProgressBar as bal_progress_bar};
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{l as raf}from"./helpers-c201154e.js";import{b as balBreakpoints}from"./breakpoints.subject-e3538fe7.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-8a50482f.js";import{L as ListenToWindowResize}from"./window-resize.decorator-9c08027e.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-7cf87670.js";var balProgressBarCss=":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-background-purple:var(--bal-color-purple-2);--bal-progress-bar-background-yellow:var(--bal-color-yellow-2);--bal-progress-bar-background-red:var(--bal-color-red-2);--bal-progress-bar-background-green:var(--bal-color-green-2);--bal-progress-bar-line-color-primary:var(--bal-color-primary);--bal-progress-bar-line-color-purple:var(--bal-color-purple-6);--bal-progress-bar-line-color-yellow:var(--bal-color-yellow-6);--bal-progress-bar-line-color-red:var(--bal-color-red-6);--bal-progress-bar-line-color-green:var(--bal-color-green-6);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white-of-primary,.bal-progress-bar--background-white-of-purple,.bal-progress-bar--background-white-of-red,.bal-progress-bar--background-white-of-green,.bal-progress-bar--background-white-of-yellow{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey-of-primary{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar--background-grey-of-purple{background:var(--bal-progress-bar-background-purple)}.bal-progress-bar--background-grey-of-red{background:var(--bal-progress-bar-background-red)}.bal-progress-bar--background-grey-of-green{background:var(--bal-progress-bar-background-green)}.bal-progress-bar--background-grey-of-yellow{background:var(--bal-progress-bar-background-yellow)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-color-primary);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}.bal-progress-bar__line--color-purple{background:var(--bal-progress-bar-line-color-purple)}.bal-progress-bar__line--color-yellow{background:var(--bal-progress-bar-line-color-yellow)}.bal-progress-bar__line--color-red{background:var(--bal-progress-bar-line-color-red)}.bal-progress-bar__line--color-green{background:var(--bal-progress-bar-line-color-green)}";var BalProgressBarStyle0=balProgressBarCss;var ProgressBar=function(){function r(r){registerInstance(this,r);this.animated=true;this.isTouch=balBreakpoints.isTouch;this.value=0;this.background="white";this.color="primary"}r.prototype.componentDidRender=function(){this.updateProgress()};r.prototype.breakpointListener=function(r){this.updateProgress()};r.prototype.windowResizeListener=function(){this.updateProgress()};r.prototype.configChanged=function(r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.animated=r.animated;return[2]}))}))};r.prototype.updateProgress=function(){var r=this;if(this.lineEl){raf((function(){var e=r.el.clientWidth;var a=Math.max(0,Math.min(100,r.value));var o=e/100*a;r.lineEl.style.width="".concat(o,"px");if(a===100){r.lineEl.classList.add("bal-progress-bar__line--full")}else{r.lineEl.classList.remove("bal-progress-bar__line--full")}}))}};r.prototype.render=function(){var r=this;var e=BEM.block("progress-bar");var a=e.element("line");return h(Host,{"aria-hidden":"true",class:Object.assign(Object.assign({},e.class()),e.modifier("background-".concat(this.background,"-of-").concat(this.color)).class())},h("div",{class:Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("color-".concat(this.color)).class()),a.modifier("animated").class(this.animated)),ref:function(e){return r.lineEl=e}}))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],ProgressBar.prototype,"breakpointListener",null);__decorate([ListenToWindowResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],ProgressBar.prototype,"windowResizeListener",null);ProgressBar.style=BalProgressBarStyle0;export{ProgressBar as bal_progress_bar};
@@ -1 +1 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{i as isDescendant}from"./helpers-c201154e.js";import{B as BalElementStateListener,L as ListenToElementStates}from"./element-states.decorator-071e2b6b.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";var balRadioButtonCss="@media (hover: hover)and (pointer: fine){.bal-radio-button__native.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}.bal-radio-button{display:block;position:relative;-ms-flex:0 0 100%;flex:0 0 100%}@media screen and (min-width: 769px),print{.bal-radio-button--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (max-width: 768px){.bal-radio-button--column-mobile-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-mobile-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-mobile-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 769px),print{.bal-radio-button--column-tablet-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-tablet-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-tablet-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 1024px){.bal-radio-button--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}.bal-radio-button__native{display:block;width:100%;height:100%;background:rgba(0,0,0,0);border-style:solid;border-radius:var(--bal-radius-normal);border-width:var(--bal-border-width-normal);border-color:var(--bal-color-border);padding:var(--bal-text-size-medium);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-radio-button__native--checked{border-color:var(--bal-color-border-primary)}.bal-radio-button__native--checked.bal-radio-button__native--color-green{background:var(--bal-color-green-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-purple{background:var(--bal-color-purple-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-red{background:var(--bal-color-red-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-yellow{background:var(--bal-color-yellow-1)}.bal-radio-button__native:disabled,.bal-radio-button__native--disabled{background:var(--bal-color-grey-1);border-color:var(--bal-color-border-grey-dark);cursor:default}.bal-radio-button__native--invalid{border-color:var(--bal-color-border-danger)}@media (hover: hover)and (pointer: fine){.bal-radio-button__native:hover:not(:disabled):not(.bal-radio-button__native--colored){background:var(--bal-color-grey-1);border-color:var(--bal-color-border-primary-hovered)}}.bal-radio-button__native:active:not(:disabled){border-color:var(--bal-color-border-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-radio-button__native--invalid:hover:not(:disabled){border-color:var(--bal-color-border-danger-hovered)}.bal-radio-button__native--invalid:active:not(:disabled){border-color:var(--bal-color-border-danger-pressed)}}";var BalRadioButtonStyle0=balRadioButtonCss;var RadioButton=function(){function a(a){var t=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balFormControlDidLoad=createEvent(this,"balFormControlDidLoad",7);this.keyboardMode=true;this.onClick=function(a){if(t.disabled||t.readonly){return stopEventBubbling(a)}var e=a.target;if(e&&e.href){return}var o=t.el.querySelector("bal-radio");var r=a.target;if(o&&r){var n=r===o||isDescendant(o,r);if(!n){stopEventBubbling(a);o.click()}}};this.onFocus=function(a){var e;if(t.disabled||t.readonly){return stopEventBubbling(a)}var o=t.el.querySelector("bal-radio");var r=a.target;if(t.keyboardMode){t.focused=true}if(o&&r){var n=r===o||isDescendant(o,r);if(n){stopEventBubbling(a);(e=o.querySelector("input"))===null||e===void 0?void 0:e.focus()}}else{t.balFocus.emit()}};this.onBlur=function(a){var e;if(t.disabled||t.readonly){return stopEventBubbling(a)}var o=t.el.querySelector("bal-radio");var r=a.target;t.focused=false;if(o&&r){var n=r===o||isDescendant(o,r);if(n){stopEventBubbling(a);(e=o.querySelector("input"))===null||e===void 0?void 0:e.blur()}}else{t.balBlur.emit()}};this.onPointerDown=function(){return t.keyboardMode=false};this.onKeydown=function(a){return t.keyboardMode=FOCUS_KEYS.includes(a.key)};this.interactionState=BalElementStateListener.DefaultState;this.checked=false;this.focused=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.color=undefined;this.colSize=1;this.colSizeTablet=1;this.colSizeMobile=1}a.prototype.createLogger=function(a){this.log=a};a.prototype.invalidHandler=function(){this.updateProps("invalid",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.disabledHandler=function(){this.updateProps("disabled",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.readonlyHandler=function(){this.updateProps("readonly",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.connectedCallback=function(){this.triggerAllHandlers();this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.triggerAllHandlers()};a.prototype.componentDidLoad=function(){this.balFormControlDidLoad.emit(this.el)};a.prototype.disconnectedCallback=function(){this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.elementStateListener=function(a){this.interactionChildElements.forEach((function(t){t.hovered=a.hovered;t.pressed=a.pressed}))};a.prototype.setChecked=function(a){if(a===void 0){a=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.checked=a;return[2]}))}))};Object.defineProperty(a.prototype,"interactionChildElements",{get:function(){return Array.from(this.el.querySelectorAll("bal-label, bal-text, bal-icon, bal-radio"))},enumerable:false,configurable:true});a.prototype.triggerAllHandlers=function(){this.disabledHandler();this.readonlyHandler();this.invalidHandler()};a.prototype.updateProps=function(a,t){var e=this[a];if(e!==undefined){this.notifyComponents(t,(function(t){return t[a]=e}))}};a.prototype.notifyComponents=function(a,t){var e=this.el.querySelectorAll(a.join(", "));e.forEach((function(a){return t(a)}))};a.prototype.render=function(){var a=BEM.block("radio-button");var t=!!this.disabled||!!this.readonly;var e=!!this.invalid;var o=!!this.color;var r=this.checked&&o;return h(Host,{class:Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("column-".concat(this.colSize)).class(this.colSize>1)),a.modifier("column-tablet-".concat(this.colSizeTablet)).class(this.colSizeTablet>1)),a.modifier("column-mobile-".concat(this.colSizeMobile)).class(this.colSizeMobile>1)),onClick:this.onClick},h("button",{role:"radio",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.element("native").class()),a.element("native").modifier("disabled").class(t)),a.element("native").modifier("invalid").class(e)),a.element("native").modifier("checked").class(this.checked)),a.element("native").modifier("colored").class(r)),a.element("native").modifier("color-".concat(this.color)).class(o)),{"bal-focusable":!this.disabled}),disabled:t,onFocus:this.onFocus,onBlur:this.onBlur},h("slot",null)))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{invalid:["invalidHandler"],disabled:["disabledHandler"],readonly:["readonlyHandler"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-button"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioButton.prototype,"createLogger",null);__decorate([ListenToElementStates(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],RadioButton.prototype,"elementStateListener",null);RadioButton.style=BalRadioButtonStyle0;export{RadioButton as bal_radio_button};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{s as stopEventBubbling}from"./form-input-a8fdaaef.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{i as isDescendant}from"./helpers-c201154e.js";import{B as BalElementStateListener,L as ListenToElementStates}from"./element-states.decorator-071e2b6b.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";var balRadioButtonCss="@media (hover: hover)and (pointer: fine){.bal-radio-button__native.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}.bal-radio-button{display:block;position:relative;-ms-flex:0 0 100%;flex:0 0 100%}@media screen and (min-width: 769px),print{.bal-radio-button--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (max-width: 768px){.bal-radio-button--column-mobile-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-mobile-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-mobile-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 769px),print{.bal-radio-button--column-tablet-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-tablet-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-tablet-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 1024px){.bal-radio-button--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-radio-button--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-radio-button--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}.bal-radio-button__native{display:block;width:100%;height:100%;background:rgba(0,0,0,0);border-style:solid;border-radius:var(--bal-radius-normal);border-width:var(--bal-border-width-normal);border-color:var(--bal-color-border);padding:var(--bal-text-size-medium);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-radio-button__native--checked{border-color:var(--bal-color-border-primary)}.bal-radio-button__native--checked.bal-radio-button__native--color-green{background:var(--bal-color-green-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-purple{background:var(--bal-color-purple-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-red{background:var(--bal-color-red-1)}.bal-radio-button__native--checked.bal-radio-button__native--color-yellow{background:var(--bal-color-yellow-1)}.bal-radio-button__native:disabled,.bal-radio-button__native--disabled{background:var(--bal-color-grey-1);border-color:var(--bal-color-border-grey-dark);cursor:default}.bal-radio-button__native--invalid{border-color:var(--bal-color-border-danger)}@media (hover: hover)and (pointer: fine){.bal-radio-button__native:hover:not(:disabled):not(.bal-radio-button__native--colored){background:var(--bal-color-grey-1);border-color:var(--bal-color-border-primary-hovered)}}.bal-radio-button__native:active:not(:disabled){border-color:var(--bal-color-border-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-radio-button__native--invalid:hover:not(:disabled){border-color:var(--bal-color-border-danger-hovered)}.bal-radio-button__native--invalid:active:not(:disabled){border-color:var(--bal-color-border-danger-pressed)}}";var BalRadioButtonStyle0=balRadioButtonCss;var RadioButton=function(){function a(a){var t=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balFormControlDidLoad=createEvent(this,"balFormControlDidLoad",7);this.keyboardMode=true;this.onClick=function(a){if(t.disabled||t.readonly){return stopEventBubbling(a)}var e=a.target;if(e&&e.href){return}var o=t.el.querySelector("bal-radio");var r=a.target;if(o&&r){var n=r===o||isDescendant(o,r);if(!n){stopEventBubbling(a);o.click()}}};this.onFocus=function(a){var e;if(t.disabled||t.readonly){return stopEventBubbling(a)}var o=t.el.querySelector("bal-radio");var r=a.target;if(t.keyboardMode){t.focused=true}if(o&&r){var n=r===o||isDescendant(o,r);if(n){stopEventBubbling(a);(e=o.querySelector("input"))===null||e===void 0?void 0:e.focus()}}else{t.balFocus.emit()}};this.onBlur=function(a){var e;if(t.disabled||t.readonly){return stopEventBubbling(a)}var o=t.el.querySelector("bal-radio");var r=a.target;t.focused=false;if(o&&r){var n=r===o||isDescendant(o,r);if(n){stopEventBubbling(a);(e=o.querySelector("input"))===null||e===void 0?void 0:e.blur()}}else{t.balBlur.emit()}};this.onPointerDown=function(){return t.keyboardMode=false};this.onKeydown=function(a){return t.keyboardMode=FOCUS_KEYS.includes(a.key)};this.interactionState=BalElementStateListener.DefaultState;this.checked=false;this.focused=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.color=undefined;this.colSize=1;this.colSizeTablet=1;this.colSizeMobile=1}a.prototype.createLogger=function(a){this.log=a};a.prototype.invalidHandler=function(){this.updateProps("invalid",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.disabledHandler=function(){this.updateProps("disabled",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.readonlyHandler=function(){this.updateProps("readonly",["bal-radio","bal-icon","bal-label","bal-text"])};a.prototype.connectedCallback=function(){this.triggerAllHandlers();this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.triggerAllHandlers()};a.prototype.componentDidLoad=function(){this.balFormControlDidLoad.emit(this.el)};a.prototype.disconnectedCallback=function(){this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.elementStateListener=function(a){this.interactionChildElements.forEach((function(t){t.hovered=a.hovered;t.pressed=a.pressed}))};a.prototype.setChecked=function(a){if(a===void 0){a=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.checked=a;return[2]}))}))};Object.defineProperty(a.prototype,"interactionChildElements",{get:function(){return Array.from(this.el.querySelectorAll("bal-label, bal-text, bal-icon, bal-radio"))},enumerable:false,configurable:true});a.prototype.triggerAllHandlers=function(){this.disabledHandler();this.readonlyHandler();this.invalidHandler()};a.prototype.updateProps=function(a,t){var e=this[a];if(e!==undefined){this.notifyComponents(t,(function(t){return t[a]=e}))}};a.prototype.notifyComponents=function(a,t){var e=this.el.querySelectorAll(a.join(", "));e.forEach((function(a){return t(a)}))};a.prototype.render=function(){var a=BEM.block("radio-button");var t=!!this.disabled||!!this.readonly;var e=!!this.invalid;var o=!!this.color;var r=this.checked&&o;return h(Host,{class:Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("column-".concat(this.colSize)).class(this.colSize>1)),a.modifier("column-tablet-".concat(this.colSizeTablet)).class(this.colSizeTablet>1)),a.modifier("column-mobile-".concat(this.colSizeMobile)).class(this.colSizeMobile>1)),onClick:this.onClick},h("button",{role:"radio",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.element("native").class()),a.element("native").modifier("disabled").class(t)),a.element("native").modifier("invalid").class(e)),a.element("native").modifier("checked").class(this.checked)),a.element("native").modifier("colored").class(r)),a.element("native").modifier("color-".concat(this.color)).class(o)),{"bal-focusable":!this.disabled}),disabled:t,onFocus:this.onFocus,onBlur:this.onBlur},h("slot",null)))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{invalid:["invalidHandler"],disabled:["disabledHandler"],readonly:["readonlyHandler"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-button"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioButton.prototype,"createLogger",null);__decorate([ListenToElementStates(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],RadioButton.prototype,"elementStateListener",null);RadioButton.style=BalRadioButtonStyle0;export{RadioButton as bal_radio_button};
@@ -1 +1 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{L as Logger}from"./log-dfd1c19f.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{s as stopEventBubbling}from"./form-input-28a08ec5.js";import{e as isSpaceKey}from"./index.esm-76abd8e3.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-checkbox__input{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-radio-checkbox--invisible{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;z-index:2;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::after{margin-top:0}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-radio-checkbox__icon{position:absolute !important;left:5.5px;z-index:1}.bal-radio-checkbox__icon--hidden{display:none !important}';var BalRadioStyle0=radioCheckboxCss;var Radio=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-rb-".concat(radioIds++);this.inheritedAttributes={};this.keyboardMode=true;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){return e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.checked=false;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.value=undefined;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.interface="radio";this.disabled=false;this.readonly=false;this.required=false;this.nonSubmit=false;this.invalid=false;this.hovered=false;this.pressed=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){if(this.value===undefined){this.value=this.inputId}var a=this.radioButton;var e=this.radioGroup;if(a||e){this.updateState()}if(e){e.addEventListener("balInput",this.updateState)}this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this.radioGroup;if(a){a.removeEventListener("balInput",this.updateState)}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.setFocus=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){a.stopPropagation();a.preventDefault();this.nativeInput.focus();this.focused=true;return[2]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.radioButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,Promise.resolve(this.nativeInput)]}))}))};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.radioGroup){a=this.radioGroup.value===this.value;if(a!==this.checked){this.checked=a}}if(this.radioButton){this.buttonTabindex=-1;if(this.radioButton.setChecked){this.radioButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.prototype,"radioButton",{get:function(){return this.el.closest("bal-radio-button")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"radioGroup",{get:function(){return this.el.closest("bal-radio-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"option",{get:function(){return{name:this.name,value:this.value,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked);this.updateState()};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=typeof this.value==="boolean"?JSON.stringify(this.value):this.value;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var d=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){t="".concat(t||""," ").concat(d,"-lbl").trim();n.id="".concat(d,"-lbl");n.htmlFor=d}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":this.disabled?"true":null,"aria-hidden":this.disabled?"true":null,"aria-focused":l?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":l},e.class()),e.modifier("radio").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("invisible").class(this.invisible)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-radio-input",type:"radio",id:d,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"aria-checked":"".concat(this.checked),name:this.name,value:r,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},i)),!this.invisible?h(k,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("radio").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat))},n,{"data-testid":"bal-radio-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-radio-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Radio.prototype,"createLogger",null);var radioIds=0;Radio.style=BalRadioStyle0;var RadioGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-rg-".concat(radioGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.setRadioTabindex(this.value);this.setRadioChecked();return[2]}))}))};this.setRadioTabindex=function(a){var o=e.getRadios();var c=o.find((function(a){return!a.disabled}));var b=o.find((function(e){return e.value===a&&!e.disabled}));if(!c&&!b){return}var l=b||c;for(var r=0,i=o;r<i.length;r++){var d=i[r];var t=d===l?0:-1;d.setButtonTabindex(t)}};this.onClick=function(a){var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-radio");if(c&&!c.disabled&&!c.readonly){var b=e.value;var l=c.value;if(l!==b){e.value=l}else if(e.allowEmptySelection){e.value=undefined}e.balChange.emit(e.value)}};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.allowEmptySelection=false;this.name=this.inputId;this.value=undefined;this.interface=undefined;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.grid=1;this.columnsTablet=1;this.columnsMobile=1;this.autoInvalidOff=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.onOptionChange();this.mutationObserverActive=this.options===undefined;return[2]}))}))};a.prototype.valueChanged=function(){this.onOptionChange()};a.prototype.invalidChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.invalid=a}));this.getRadioButtons().forEach((function(e){e.invalid=a}))}};a.prototype.disabledChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.disabled=a}));this.getRadioButtons().forEach((function(e){e.disabled=a}))}};a.prototype.readonlyChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.readonly=a}));this.getRadioButtons().forEach((function(e){e.readonly=a}))}};a.prototype.columnsChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){this.initialValue=this.value;this.mutationObserverActive=this.options===undefined};a.prototype.componentWillLoad=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange();this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}};a.prototype.radioFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.radioBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.resetListener=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.value=this.initialValue}};a.prototype.onKeydown=function(a){if(a.target&&!this.el.contains(a.target)){return}var e=this.getRadios().filter((function(a){return!a.disabled}));var o=a.target.closest("bal-radio");if(o&&e.includes(o)){var c=e.findIndex((function(a){return a===o}));var b=e[c];var l=void 0;if(["ArrowDown","ArrowRight"].includes(a.code)){l=c===e.length-1?e[0]:e[c+1]}if(["ArrowUp","ArrowLeft"].includes(a.code)){l=c===0?e[e.length-1]:e[c-1]}if(l&&e.includes(l)){l.setFocus(a);this.value=l.value;this.balChange.emit(this.value)}if(["Space"].includes(a.code)){this.value=this.allowEmptySelection&&this.value!==undefined?undefined:b.value;a.preventDefault()}}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=a;return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.setRadioInterface=function(){var a=this;this.getRadios().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.setRadioChecked=function(){this.getRadios().forEach((function(a){if(a.updateState){a.updateState()}}))};a.prototype.getRadios=function(){return Array.from(this.el.querySelectorAll("bal-radio"))};a.prototype.getRadioButtons=function(){return Array.from(this.el.querySelectorAll("bal-radio-button"))};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox-group");var o=e.element("inner");var c=this.options||[];var b=c.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},e.class()),role:"radiogroup","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":this.disabled?"true":null,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("vertical-mobile").class(this.verticalOnMobile)),o.modifier("vertical").class(this.vertical)),o.modifier("expanded").class(this.expanded)),o.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),b.map((function(e){return h("bal-radio",{key:e.value,name:e.name||a.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],grid:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-radio-group","bal-radio"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"mutationListener",null);var radioGroupIds=0;export{Radio as bal_radio,RadioGroup as bal_radio_group};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{L as Logger}from"./log-dfd1c19f.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{s as stopEventBubbling}from"./form-input-a8fdaaef.js";import{e as isSpaceKey}from"./index.esm-cc299511.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-checkbox__input{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-radio-checkbox--invisible{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;z-index:2;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--flat .bal-radio-checkbox__label::after{margin-top:0}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-radio-checkbox__icon{position:absolute !important;left:5.5px;z-index:1}.bal-radio-checkbox__icon--hidden{display:none !important}';var BalRadioStyle0=radioCheckboxCss;var Radio=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-rb-".concat(radioIds++);this.inheritedAttributes={};this.keyboardMode=true;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){return e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.checked=false;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.value=undefined;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.interface="radio";this.disabled=false;this.readonly=false;this.required=false;this.nonSubmit=false;this.invalid=false;this.hovered=false;this.pressed=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){if(this.value===undefined){this.value=this.inputId}var a=this.radioButton;var e=this.radioGroup;if(a||e){this.updateState()}if(e){e.addEventListener("balInput",this.updateState)}this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this.radioGroup;if(a){a.removeEventListener("balInput",this.updateState)}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.setFocus=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){a.stopPropagation();a.preventDefault();this.nativeInput.focus();this.focused=true;return[2]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.radioButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,Promise.resolve(this.nativeInput)]}))}))};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.radioGroup){a=this.radioGroup.value===this.value;if(a!==this.checked){this.checked=a}}if(this.radioButton){this.buttonTabindex=-1;if(this.radioButton.setChecked){this.radioButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.prototype,"radioButton",{get:function(){return this.el.closest("bal-radio-button")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"radioGroup",{get:function(){return this.el.closest("bal-radio-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"option",{get:function(){return{name:this.name,value:this.value,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked);this.updateState()};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=typeof this.value==="boolean"?JSON.stringify(this.value):this.value;var i=this.inheritedAttributes;if(this.buttonTabindex!==undefined){i.tabIndex=this.buttonTabindex}var d=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var k=this.labelHidden?"span":"label";var n={};if(!this.labelHidden){t="".concat(t||""," ").concat(d,"-lbl").trim();n.id="".concat(d,"-lbl");n.htmlFor=d}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":this.disabled?"true":null,"aria-hidden":this.disabled?"true":null,"aria-focused":l?"true":null,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":l},e.class()),e.modifier("radio").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("invisible").class(this.invisible)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-radio-input",type:"radio",id:d,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,"aria-checked":"".concat(this.checked),name:this.name,value:r,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},i)),!this.invisible?h(k,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("radio").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat))},n,{"data-testid":"bal-radio-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-radio-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Radio.prototype,"createLogger",null);var radioIds=0;Radio.style=BalRadioStyle0;var RadioGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-rg-".concat(radioGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.setRadioTabindex(this.value);this.setRadioChecked();return[2]}))}))};this.setRadioTabindex=function(a){var o=e.getRadios();var c=o.find((function(a){return!a.disabled}));var b=o.find((function(e){return e.value===a&&!e.disabled}));if(!c&&!b){return}var l=b||c;for(var r=0,i=o;r<i.length;r++){var d=i[r];var t=d===l?0:-1;d.setButtonTabindex(t)}};this.onClick=function(a){var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-radio");if(c&&!c.disabled&&!c.readonly){var b=e.value;var l=c.value;if(l!==b){e.value=l}else if(e.allowEmptySelection){e.value=undefined}e.balChange.emit(e.value)}};this.ariaForm=defaultBalAriaForm;this.options=undefined;this.allowEmptySelection=false;this.name=this.inputId;this.value=undefined;this.interface=undefined;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.grid=1;this.columnsTablet=1;this.columnsMobile=1;this.autoInvalidOff=false}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.onOptionChange();this.mutationObserverActive=this.options===undefined;return[2]}))}))};a.prototype.valueChanged=function(){this.onOptionChange()};a.prototype.invalidChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.invalid=a}));this.getRadioButtons().forEach((function(e){e.invalid=a}))}};a.prototype.disabledChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.disabled=a}));this.getRadioButtons().forEach((function(e){e.disabled=a}))}};a.prototype.readonlyChanged=function(a){if(a!==undefined){this.getRadios().forEach((function(e){e.readonly=a}));this.getRadioButtons().forEach((function(e){e.readonly=a}))}};a.prototype.columnsChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getRadioButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){this.initialValue=this.value;this.mutationObserverActive=this.options===undefined};a.prototype.componentWillLoad=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange();this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.prototype.mutationListener=function(){this.setRadioInterface();this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly);this.invalidChanged(this.invalid);this.columnsChanged(this.grid);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.listenOnClick=function(a){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}};a.prototype.radioFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.radioBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-radio")){stopEventBubbling(a)}};a.prototype.resetListener=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.value=this.initialValue}};a.prototype.onKeydown=function(a){if(a.target&&!this.el.contains(a.target)){return}var e=this.getRadios().filter((function(a){return!a.disabled}));var o=a.target.closest("bal-radio");if(o&&e.includes(o)){var c=e.findIndex((function(a){return a===o}));var b=e[c];var l=void 0;if(["ArrowDown","ArrowRight"].includes(a.code)){l=c===e.length-1?e[0]:e[c+1]}if(["ArrowUp","ArrowLeft"].includes(a.code)){l=c===0?e[e.length-1]:e[c-1]}if(l&&e.includes(l)){l.setFocus(a);this.value=l.value;this.balChange.emit(this.value)}if(["Space"].includes(a.code)){this.value=this.allowEmptySelection&&this.value!==undefined?undefined:b.value;a.preventDefault()}}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=a;return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.setRadioInterface=function(){var a=this;this.getRadios().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.setRadioChecked=function(){this.getRadios().forEach((function(a){if(a.updateState){a.updateState()}}))};a.prototype.getRadios=function(){return Array.from(this.el.querySelectorAll("bal-radio"))};a.prototype.getRadioButtons=function(){return Array.from(this.el.querySelectorAll("bal-radio-button"))};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox-group");var o=e.element("inner");var c=this.options||[];var b=c.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},e.class()),role:"radiogroup","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":this.disabled?"true":null,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("vertical-mobile").class(this.verticalOnMobile)),o.modifier("vertical").class(this.vertical)),o.modifier("expanded").class(this.expanded)),o.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),b.map((function(e){return h("bal-radio",{key:e.value,name:e.name||a.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],grid:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-radio-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-radio-group","bal-radio"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],RadioGroup.prototype,"mutationListener",null);var radioGroupIds=0;export{Radio as bal_radio,RadioGroup as bal_radio_group};
@@ -0,0 +1 @@
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,w as writeTask,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{e as isSpaceKey,s as isArrowUpKey,y as isArrowLeftKey,q as isArrowDownKey,z as isArrowRightKey,A as isHomeKey,B as isEndKey}from"./index.esm-cc299511.js";import{s as stopEventBubbling}from"./form-input-a8fdaaef.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{l as raf,j as addEventListener,r as removeEventListener}from"./helpers-c201154e.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToWindowResize}from"./window-resize.decorator-9c08027e.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-8a50482f.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import"./browser-a8073d92.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";import"./breakpoints.subject-e3538fe7.js";import"./device-8c6d2881.js";import"./tokens.esm-7cf87670.js";var balSegmentCss=":root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment{display:-ms-flexbox;display:flex;background:var(--bal-segment-background);border-radius:var(--bal-radius-normal);gap:.125rem;gap:.125rem;padding:.25rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-segment--invalid{background:var(--bal-segment-background-invalid)}.bal-segment--vertical{-ms-flex-direction:column;flex-direction:column;width:100%}.bal-segment--vertical .bal-segment-item__button{width:100%;-ms-flex:1;flex:1}.bal-segment--vertical.bal-segment--scrollable{overflow:auto;max-height:240px}.bal-segment--expanded{width:100%;min-width:100%;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.bal-segment--expanded .bal-segment-item,.bal-segment--expanded .bal-segment-item>button{-ms-flex:1;flex:1;width:100%}.bal-segment--expanded .bal-segment-item .bal-content,.bal-segment--expanded .bal-segment-item>button .bal-content{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";var BalSegmentStyle0=balSegmentCss;var Segment=function(){function e(e){var t=this;registerInstance(this,e);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.balSelect=createEvent(this,"balSelect",7);this.balVertical=createEvent(this,"balVertical",7);this.hasFocus=false;this.getSegmentItem=function(e){var i,a;var n=t.allItems.filter((function(e){return!e.disabled}));var r=n.findIndex((function(e){return e===document.activeElement.closest("bal-segment-item")}));switch(e){case"current":return n[r];case"first":return n[0];case"last":return n[n.length-1];case"next":return(i=n[r+1])!==null&&i!==void 0?i:n[0];case"previous":return(a=n[r-1])!==null&&a!==void 0?a:n[n.length-1];default:return null}};this.onPointerDown=function(){t.keyboardMode=false};this.onSlottedItemsChange=function(){t.valueChanged(t.value);t.defineWidth()};this.onClick=function(e){if(t.disabled){return}var i=e.target;var a=t.checked;if(i.tagName==="BAL-SEGMENT"){return}if(i&&i.setFocus){i.setFocus()}if(a){t.checkButton(a,i)}else{t.setCheckedClasses();t.checkButton(i,i)}if(i!==a){t.emitValueChange()}};this.focusedValue=undefined;this.keyboardMode=true;this.isVertical=false;this.isMobile=false;this.maxWidth=0;this.ariaForm=defaultBalAriaForm;this.invalid=false;this.disabled=false;this.vertical=false;this.scrollable=false;this.expanded=false;this.value=undefined}e.prototype.createLogger=function(e){this.log=e};e.prototype.disabledChanged=function(){var e=this;this.allItems.map((function(t){return t.disabled=e.disabled}))};e.prototype.valueChanged=function(e){this.balSelect.emit(e)};e.prototype.connectedCallback=function(){this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown);this.disabledChanged()};e.prototype.disconnectedCallback=function(){this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setCheckedClasses();this.defineWidth();return[2]}))}))};e.prototype.focusInListener=function(e){this.balFocus.emit(e)};e.prototype.focusOutListener=function(e){this.balBlur.emit(e)};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile};e.prototype.windowResizeListener=function(){if(this.vertical===false&&this.maxWidth>0){var e=this.el.parentElement.getBoundingClientRect();if(e.width<this.maxWidth){this.emitVerticalChange(true)}else{this.emitVerticalChange(false)}}else{this.emitVerticalChange(true)}};e.prototype.listenOnKeyDownOutside=function(){this.keyboardMode=true};e.prototype.listenOnKeyDown=function(e){this.keyboardMode=FOCUS_KEYS.includes(e.key);var t;if(isSpaceKey(e)){stopEventBubbling(e);t=this.getSegmentItem("current");this.value=t.value}else if(isArrowUpKey(e)||isArrowLeftKey(e)){stopEventBubbling(e);t=this.getSegmentItem("previous")}else if(isArrowDownKey(e)||isArrowRightKey(e)){stopEventBubbling(e);t=this.getSegmentItem("next")}else if(isHomeKey(e)){stopEventBubbling(e);t=this.getSegmentItem("first")}else if(isEndKey(e)){stopEventBubbling(e);t=this.getSegmentItem("last")}if(!t){return}var i=this.checked;if(t!==i){this.checkButton(i,t);this.emitValueChange()}if(t){t.setFocus()}};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allItems",{get:function(){return Array.from(this.el.querySelectorAll("bal-segment-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"checked",{get:function(){var e=this;return this.allItems.find((function(t){return t.value===e.value}))},enumerable:false,configurable:true});e.prototype.emitValueChange=function(){this.balChange.emit(this.value)};e.prototype.emitVerticalChange=function(e){if(this.isVertical!==e){this.isVertical=e;this.balVertical.emit(this.isVertical)}};e.prototype.defineWidth=function(){var e=this;raf((function(){if(e.isVertical===false){var t=e.el.getBoundingClientRect();e.maxWidth=t.width}e.windowResizeListener()}))};e.prototype.getIndicator=function(e){if(e){var t=e.shadowRoot||e;return t.querySelector(".bal-segment-item__indicator")}return null};e.prototype.checkButton=function(e,t){var i=this.getIndicator(e);var a=this.getIndicator(t);if(i===null||a===null){return}var n=i.getBoundingClientRect();var r=a.getBoundingClientRect();var s=n.width/r.width;var o=n.left-r.left;var l="translate3d(".concat(o,"px, 0, 0) scaleX(").concat(s,")");if(this.isVertical){var m=n.height/r.height;var c=n.top-r.top;l="translate3d(0, ".concat(c,"px, 0) scaleY(").concat(m,")")}writeTask((function(){a.classList.remove("bal-segment-item__indicator--animated");a.style.setProperty("transform",l);a.getBoundingClientRect();a.classList.add("bal-segment-item__indicator--animated");a.style.setProperty("transform","")}));this.value=t.value;this.setCheckedClasses()};e.prototype.setCheckedClasses=function(){var e=this;var t=this.allItems;var i=t.findIndex((function(t){return t.value===e.value}));var a=i+1;var n=i-1;for(var r=0,s=t;r<s.length;r++){var o=s[r];o.classList.remove("bal-segment-item--after-checked");o.classList.remove("bal-segment-item--before-checked")}if(a<t.length){t[a].classList.add("bal-segment-item--after-checked")}if(n<t.length&&n>=0){t[n].classList.add("bal-segment-item--before-checked")}};e.prototype.render=function(){var e=this,t=e.invalid,i=e.isVertical,a=e.scrollable,n=e.keyboardMode,r=e.expanded,s=e.isMobile,o=e.disabled;var l=BEM.block("segment");return h(Host,{role:"radiogroup","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l.class()),l.modifier("invalid").class(t)),l.modifier("vertical").class(i)),l.modifier("scrollable").class(a)),l.modifier("keyboard").class(n)),l.modifier("disabled").class(o)),l.modifier("expanded").class((r||s)&&!i)),onClick:this.onClick},h("slot",{onSlotchange:this.onSlottedItemsChange}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["disabledChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-segment"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Segment.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],Segment.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__metadata("design:returntype",void 0)],Segment.prototype,"focusOutListener",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Segment.prototype,"breakpointListener",null);__decorate([ListenToWindowResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Segment.prototype,"windowResizeListener",null);Segment.style=BalSegmentStyle0;var balSegmentItemCss=':root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment-item{display:block;position:relative;height:auto;text-decoration:none;text-overflow:ellipsis;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;grid-row:1;-webkit-font-kerning:none;font-kerning:none}.bal-segment-item--disabled{cursor:default !important;pointer-events:none !important}.bal-segment-item__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:2.5rem;min-width:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1;padding-top:.375rem;padding-bottom:.375rem;padding-left:20px;padding-right:20px;outline:none;border-color:rgba(0,0,0,0);border-width:var(--bal-border-width-normal);border-style:solid;border-radius:var(--bal-radius-normal);background:rgba(0,0,0,0);font-size:var(--bal-text-size-normal);font-weight:var(--bal-font-weight-bold);color:var(--bal-segment-item-text-color);overflow:hidden;position:relative;contain:content;pointer-events:none;cursor:pointer;z-index:2}.bal-segment-item__button--vertical{padding-left:.75rem;padding-right:.75rem}.bal-segment-item__button span{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-regular)}.bal-segment-item__button{will-change:color,padding;-webkit-transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{content:"";position:absolute;background:var(--bal-segment-item-divider-background);border-radius:var(--bal-radius-normal)}.bal-segment-item:not(.bal-segment-item--vertical):not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{top:2px;bottom:2px;right:-1px;width:2px}.bal-segment-item.bal-segment-item--vertical:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{left:2px;right:2px;bottom:-1px;height:2px}.bal-segment-item--invalid:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{background:var(--bal-segment-item-divider-background-invalid)}.bal-segment-item__indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none;border-radius:var(--bal-radius-normal);background:var(--bal-segment-item-indicator-background);top:0;left:0}.bal-segment-item__indicator--vertical{-webkit-transform-origin:top;transform-origin:top}.bal-segment-item__indicator--invalid{background:var(--bal-segment-item-indicator-background-invalid)}.bal-segment-item__indicator--background{min-width:100%;min-height:100%;-webkit-transform:none;transform:none;pointer-events:none}.bal-segment-item__indicator--animated{will-change:transform,opacity,top,bottom,left,right,min-width,min-heigth;-webkit-transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease;transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__indicator--checked{opacity:1}.bal-segment-item:active .bal-segment-item__indicator{min-width:calc(100% - 4px);min-height:calc(100% - 4px);top:2px !important;bottom:2px !important;left:2px !important;right:2px !important}.bal-segment-item__button__icon{position:absolute !important;opacity:0;width:0 !important;-webkit-transform:translateX(0.1rem);transform:translateX(0.1rem);pointer-events:none !important;cursor:inherit;will-change:transform,opacity}.bal-segment-item__button__icon:not(.bal-segment-item__button__icon--vertical){left:10px}.bal-segment-item__button__icon--vertical{right:10px}.bal-segment-item__button__icon--animated{opacity:1;width:.875rem !important;-webkit-transform:translateX(-4px);transform:translateX(-4px);-webkit-transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__button--checked{color:var(--bal-segment-item-text-color-checked);padding-right:40px}.bal-segment-item__button--checked:not(.bal-segment-item__button--vertical){padding-left:26px;padding-right:12px}@media (hover: hover)and (pointer: fine){.bal-segment-item:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-hovered)}}.bal-segment-item:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-pressed)}.bal-segment--keyboard .bal-segment-item__button:not(.bal-segment-item__button--disabled):focus-visible,.bal-segment--keyboard .bal-segment-item__button--focused:not(.bal-segment-item__button--disabled){border-color:var(--bal-segment-item-focus-border);border-width:var(--bal-border-width-normal);border-style:solid;-webkit-transition:border 300ms ease-in-out;transition:border 300ms ease-in-out}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled) .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid)}@media (hover: hover)and (pointer: fine){.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-hovered)}}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-pressed)}.bal-segment-item__button--invalid.bal-segment-item__button--checked{color:var(--bal-color-text-white)}.bal-segment-item__button--disabled{background:rgba(0,0,0,0);color:var(--bal-segment-item-text-color-disabled)}.bal-segment-item__button--disabled.bal-segment-item__button--checked{background:var(--bal-segment-item-indicator-background-disabled);color:var(--bal-segment-item-text-color-disabled-checked)}.bal-segment-item__button__slot--hidden{display:none !important}';var BalSegmentItemStyle0=balSegmentItemCss;var SegmentItemIds=0;var SegmentItem=function(){function e(e){var t=this;registerInstance(this,e);this.segmentEl=null;this.inheritedAttributes={};this.internalId=SegmentItemIds++;this.inputId="bal-si-".concat(this.internalId);this.updateVertical=function(e){t.isVertical=e.detail};this.updateState=function(){var e=t.segmentEl;if(e){if(e.value===""||e.value===undefined||e.value===null){var i=t.allAvailableOptions;if(i.length>0){var a=i[0];t.isFocusable=a===t.el}}else{t.checked=e.value===t.value;t.isFocusable=e.value===t.value}if(e.disabled){t.disabled=true}t.isLast=e.lastElementChild===t.el;t.isFirst=e.firstElementChild===t.el;t.calculateEmptyValue()}};this.onSlottedItemsChange=function(){t.checkSlotContent()};this.hasSlotContent=false;this.isFocusable=false;this.isVertical=false;this.isLast=false;this.isFirst=false;this.hasEmptyValue=true;this.ariaForm=defaultBalAriaForm;this.disabled=false;this.invalid=false;this.focused=false;this.checked=false;this.label="";this.value="bal-si-"+this.internalId}e.prototype.valueChanged=function(e,t){if(e!==t){this.updateState()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},inheritAttributes(this.el,["aria-label"]))};e.prototype.componentDidLoad=function(){var e=this;var t=this.segmentEl=this.el.closest("bal-segment");if(t){addEventListener(t,"balSelect",this.updateState);addEventListener(t,"balVertical",this.updateVertical)}raf((function(){e.checkSlotContent();e.updateState()}))};e.prototype.disconnectedCallback=function(){var e=this.segmentEl;if(e){removeEventListener(e,"balSelect",this.updateState);removeEventListener(e,"balVertical",this.updateVertical);this.segmentEl=null}};e.prototype.calculateEmptyValue=function(){var e=this;if(this.segmentEl){var t=Array.from(this.segmentEl.querySelectorAll("bal-segment-item"));this.hasEmptyValue=!t.some((function(t){return t.value===e.segmentEl.value}))}else{this.hasEmptyValue=false}};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=this.nativeEl;if(e!==undefined){e.focus()}return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allAvailableOptions",{get:function(){return this.allOptions.filter((function(e){return!e.disabled}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptions",{get:function(){var e=this.segmentEl;if(e){return Array.from(e.querySelectorAll("bal-segment-item"))}return[]},enumerable:false,configurable:true});e.prototype.checkSlotContent=function(){var e=this.el.querySelector('[part="slot"]');var t=e?e.innerHTML.trim():"";this.hasSlotContent=t.length>0};e.prototype.render=function(){var e=this;var t=this,i=t.checked,a=t.focused,n=t.segmentEl,r=t.label,s=t.isFocusable,o=t.isFirst,l=t.hasEmptyValue;var m=BEM.block("segment-item");var c=m.element("button");var b=m.element("indicator");var d=this.invalid||n&&n.invalid;var g=this.disabled||n&&n.disabled;var u=this.isVertical;var f=l&&o||s&&!g;var v=f&&this.ariaForm.controlId||this.inputId;var p={};if(f){var _=this.ariaForm.labelId||null;_="".concat(_||""," ").concat(v,"-lbl").trim();p={"aria-labelledby":_,"aria-describedby":this.ariaForm.messageId}}return h(Host,{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m.class()),m.modifier("vertical").class(u)),m.modifier("disabled").class(g)),m.modifier("checked").class(i)),m.modifier("invalid").class(d)),m.modifier("last").class(this.isLast&&!i))},h("button",Object.assign({id:v,role:"radio","aria-checked":i?"true":"false"},p,{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("checked").class(i)),c.modifier("invalid").class(d)),c.modifier("disabled").class(g)),c.modifier("focused").class(a)),c.modifier("vertical").class(u)),type:"button",tabIndex:f?0:-1,part:"native",disabled:g,ref:function(t){return e.nativeEl=t}},this.inheritedAttributes),h("bal-icon",{name:"check",size:"small",class:Object.assign(Object.assign(Object.assign({},c.element("icon").class()),c.element("icon").modifier("animated").class(i)),c.element("icon").modifier("vertical").class(u)),color:g?"grey-dark":d?"white":"primary"}),h("bal-stack",{space:"x-small",layout:"horizontal"},h("bal-content",{space:"none"},h("bal-label",{htmlId:"bal-si-".concat(this.internalId,"-label")},r),h("span",{part:"slot",class:Object.assign({},c.element("slot").modifier("hidden").class(!this.hasSlotContent))}," ",h("slot",{onSlotchange:this.onSlottedItemsChange}))))),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("animated").class()),b.modifier("background").class()),b.modifier("disabled").class(g)),b.modifier("invalid").class(d)),b.modifier("checked").class(i)),b.modifier("vertical").class(u))}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();SegmentItem.style=BalSegmentItemStyle0;export{Segment as bal_segment,SegmentItem as bal_segment_item};