@baloise/ds-core 17.2.4 → 17.2.5-nightly.20250116

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 (406) hide show
  1. package/components/all.d.ts +2 -0
  2. package/components/all.js +3 -0
  3. package/components/animation.decorator.js +75 -0
  4. package/components/bal-app.js +1 -93
  5. package/components/bal-app2.js +95 -0
  6. package/components/bal-carousel.js +12 -5
  7. package/components/bal-doc-app.d.ts +11 -0
  8. package/components/bal-doc-app.js +262 -0
  9. package/components/bal-dropdown.js +771 -1
  10. package/components/bal-hint2.js +1 -1
  11. package/components/bal-nav.js +72 -48
  12. package/components/bal-option.js +166 -1
  13. package/components/bal-segment.js +27 -10
  14. package/components/bal-select-option.js +1 -45
  15. package/components/bal-select-option2.js +47 -0
  16. package/components/bal-select.js +1 -847
  17. package/components/bal-select2.js +849 -0
  18. package/components/bal-tabs2.js +67 -35
  19. package/components/helpers.js +1 -1
  20. package/components/index.js +5 -304
  21. package/components/initialize.js +303 -0
  22. package/components/keyboard.helpers.js +1 -1
  23. package/components/resize.decorator.js +5 -5
  24. package/components/swiper.util.js +1 -18
  25. package/components/tokens.esm.js +1 -1
  26. package/components/visibility.decorator.js +88 -0
  27. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  28. package/dist/baloise-design-system/baloise-design-system.js +1 -1
  29. package/dist/baloise-design-system/index.esm.js +1 -1
  30. package/dist/baloise-design-system/{p-10ebc871f4.system.entry.js → p-0640709738.system.entry.js} +1 -1
  31. package/dist/baloise-design-system/p-079850e6.system.js +1 -0
  32. package/dist/baloise-design-system/p-0b8169c8.js +1 -0
  33. package/dist/baloise-design-system/{p-dc6d33fc89.entry.js → p-0c08b7dfd0.entry.js} +1 -1
  34. package/dist/baloise-design-system/{p-24e594cd49.entry.js → p-0c3b2d6c8e.entry.js} +1 -1
  35. package/dist/baloise-design-system/{p-6b79e568.js → p-0d7b7182.js} +1 -1
  36. package/dist/baloise-design-system/p-0e323fe0.system.js +1 -1
  37. package/dist/baloise-design-system/p-0f49cb1ee6.entry.js +1 -0
  38. package/dist/baloise-design-system/p-107dc1fff5.entry.js +1 -0
  39. package/dist/baloise-design-system/{p-d0e23ec9f1.entry.js → p-116f41baa8.entry.js} +1 -1
  40. package/dist/baloise-design-system/{p-ff7903eb.js → p-12edf09f.js} +1 -1
  41. package/dist/baloise-design-system/{p-37f892f6dc.entry.js → p-147063f990.entry.js} +1 -1
  42. package/dist/baloise-design-system/{p-770f4365f6.system.entry.js → p-14c3418170.system.entry.js} +1 -1
  43. package/dist/baloise-design-system/p-1c191e7d.js +1 -0
  44. package/dist/baloise-design-system/{p-56cf1ab1.system.js → p-1d22490c.system.js} +1 -1
  45. package/dist/baloise-design-system/{p-97cd0b900d.system.entry.js → p-1df848f9fc.system.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-54ce8c3c.js → p-2789f3f3.js} +1 -1
  47. package/dist/baloise-design-system/{p-0400a0cd.system.js → p-28479bf2.system.js} +1 -1
  48. package/dist/baloise-design-system/{p-e099fd9574.entry.js → p-28f96ad58b.entry.js} +1 -1
  49. package/dist/baloise-design-system/p-2ebb0a90e9.entry.js +1 -0
  50. package/dist/baloise-design-system/{p-e0377a6d84.entry.js → p-32faec4f65.entry.js} +1 -1
  51. package/dist/baloise-design-system/{p-52cad6cf9f.entry.js → p-36db598b9c.entry.js} +1 -1
  52. package/dist/baloise-design-system/{p-a71cc6d652.entry.js → p-36fe1faedd.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-5b85dec39b.system.entry.js → p-38ca9dfde3.system.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-ccd2ef1106.entry.js → p-3bd47497b5.entry.js} +1 -1
  55. package/dist/baloise-design-system/{p-953cc30ae9.system.entry.js → p-3d0427caba.system.entry.js} +1 -1
  56. package/dist/baloise-design-system/{p-46b7cb48d1.entry.js → p-3dde5d245e.entry.js} +1 -1
  57. package/dist/baloise-design-system/{p-878cb7914d.entry.js → p-41931a0925.entry.js} +1 -1
  58. package/dist/baloise-design-system/{p-16baa62182.system.entry.js → p-440f0ed2a6.system.entry.js} +1 -1
  59. package/dist/baloise-design-system/{p-47d7e166.system.js → p-473be761.system.js} +1 -1
  60. package/dist/baloise-design-system/{p-498c20ac2a.system.entry.js → p-4b7fd117bc.system.entry.js} +1 -1
  61. package/dist/baloise-design-system/{p-0933f23da2.system.entry.js → p-4c030e87cf.system.entry.js} +1 -1
  62. package/dist/baloise-design-system/{p-2abbd888.js → p-4e2a528c.js} +1 -1
  63. package/dist/baloise-design-system/{p-cad154ad.js → p-4e9084dc.js} +1 -1
  64. package/dist/baloise-design-system/{p-b77d63ca25.entry.js → p-5591d69c49.entry.js} +1 -1
  65. package/dist/baloise-design-system/p-56b3a42db7.system.entry.js +1 -0
  66. package/dist/baloise-design-system/{p-4a80e2c1.system.js → p-56c370cb.system.js} +1 -1
  67. package/dist/baloise-design-system/{p-7cb2ead5.system.js → p-589ec95d.system.js} +1 -1
  68. package/dist/baloise-design-system/{p-87b8b65bf6.system.entry.js → p-58c831b65a.system.entry.js} +1 -1
  69. package/dist/baloise-design-system/p-58d2a0b5.system.js +1 -0
  70. package/dist/baloise-design-system/{p-0c28f0a46f.system.entry.js → p-59e2241197.system.entry.js} +1 -1
  71. package/dist/baloise-design-system/{p-c3877f26cd.entry.js → p-5a30402585.entry.js} +1 -1
  72. package/dist/baloise-design-system/{p-27a8f7d1e4.system.entry.js → p-5b93e0df0c.system.entry.js} +1 -1
  73. package/dist/baloise-design-system/{p-9618956a56.system.entry.js → p-5d2479f2ea.system.entry.js} +1 -1
  74. package/dist/baloise-design-system/{p-1334e37be0.system.entry.js → p-5f234e78f6.system.entry.js} +1 -1
  75. package/dist/baloise-design-system/{p-8360204072.entry.js → p-62251008b0.entry.js} +1 -1
  76. package/dist/baloise-design-system/{p-c642582c09.system.entry.js → p-66df17135c.system.entry.js} +1 -1
  77. package/dist/baloise-design-system/{p-47de946676.system.entry.js → p-6d9f994d96.system.entry.js} +1 -1
  78. package/dist/baloise-design-system/{p-ba4c1ed8a8.entry.js → p-6dd44e8831.entry.js} +1 -1
  79. package/dist/baloise-design-system/{p-1ae4dca673.system.entry.js → p-6e6f2f3713.system.entry.js} +1 -1
  80. package/dist/baloise-design-system/{p-932a19ea57.entry.js → p-7449aea98b.entry.js} +1 -1
  81. package/dist/baloise-design-system/{p-3df52a1f.js → p-744daf78.js} +1 -1
  82. package/dist/baloise-design-system/{p-6cdd068206.system.entry.js → p-769dd49917.system.entry.js} +1 -1
  83. package/dist/baloise-design-system/{p-761cb0e801.system.entry.js → p-79554c4acd.system.entry.js} +1 -1
  84. package/dist/baloise-design-system/{p-9db35d91.js → p-7a6a128f.js} +1 -1
  85. package/dist/baloise-design-system/{p-af0f549439.entry.js → p-809d0b3b7a.entry.js} +1 -1
  86. package/dist/baloise-design-system/{p-9ad648deea.system.entry.js → p-85e3b067cf.system.entry.js} +1 -1
  87. package/dist/baloise-design-system/{p-85479ae3cf.system.entry.js → p-85e6d3817e.system.entry.js} +1 -1
  88. package/dist/baloise-design-system/{p-524edfe610.system.entry.js → p-87458c9059.system.entry.js} +1 -1
  89. package/dist/baloise-design-system/p-8782ba61.system.js +1 -0
  90. package/dist/baloise-design-system/{p-b1d0256f19.system.entry.js → p-899bc0be9d.system.entry.js} +1 -1
  91. package/dist/baloise-design-system/{p-f2c398a3.system.js → p-89aaadaf.system.js} +1 -1
  92. package/dist/baloise-design-system/{p-2a8e0e7149.entry.js → p-8a47461794.entry.js} +1 -1
  93. package/dist/baloise-design-system/{p-60f5e5faa6.entry.js → p-8b386e9117.entry.js} +1 -1
  94. package/dist/baloise-design-system/p-8c24fdcf6c.system.entry.js +1 -0
  95. package/dist/baloise-design-system/{p-e21ccd9856.entry.js → p-921b0836e1.entry.js} +1 -1
  96. package/dist/baloise-design-system/{p-fabb559661.entry.js → p-96780bdefd.entry.js} +1 -1
  97. package/dist/baloise-design-system/{p-7256aa5d97.entry.js → p-9b2657ef04.entry.js} +1 -1
  98. package/dist/baloise-design-system/{p-2db0f14a2d.system.entry.js → p-a1952399c3.system.entry.js} +1 -1
  99. package/dist/baloise-design-system/p-a22e149aa8.system.entry.js +1 -0
  100. package/dist/baloise-design-system/{p-8227e41299.entry.js → p-a6ff014e4c.entry.js} +1 -1
  101. package/dist/baloise-design-system/p-ad5039de.system.js +1 -0
  102. package/dist/baloise-design-system/p-b276d6faa1.entry.js +1 -0
  103. package/dist/baloise-design-system/{p-cd9be615a4.entry.js → p-b4576f5814.entry.js} +1 -1
  104. package/dist/baloise-design-system/{p-18267b1371.system.entry.js → p-b55c42a4a9.system.entry.js} +1 -1
  105. package/dist/baloise-design-system/{p-c0e04c2072.system.entry.js → p-bfa5f3ae60.system.entry.js} +1 -1
  106. package/dist/baloise-design-system/p-c4088d90.js +1 -0
  107. package/dist/baloise-design-system/{p-e430294632.entry.js → p-c487d3770e.entry.js} +1 -1
  108. package/dist/baloise-design-system/{p-97f3a682.system.js → p-c6a673f7.system.js} +1 -1
  109. package/dist/baloise-design-system/{p-ed32b0b9.system.js → p-c6dfe80e.system.js} +1 -1
  110. package/dist/baloise-design-system/{p-39d3eeef8e.entry.js → p-c844e6fbc9.entry.js} +1 -1
  111. package/dist/baloise-design-system/{p-96122c3e5b.entry.js → p-c8bd61c717.entry.js} +1 -1
  112. package/dist/baloise-design-system/{p-bb7183cd00.entry.js → p-c8db6fb15f.entry.js} +1 -1
  113. package/dist/baloise-design-system/{p-f7cbcbdbfa.system.entry.js → p-c9b8ce5bb5.system.entry.js} +1 -1
  114. package/dist/baloise-design-system/{p-455872a1.system.js → p-c9b8e360.system.js} +1 -1
  115. package/dist/baloise-design-system/{p-936070bf.system.js → p-cb045ca0.system.js} +1 -1
  116. package/dist/baloise-design-system/{p-713640e3ac.system.entry.js → p-cb3920cc26.system.entry.js} +1 -1
  117. package/dist/baloise-design-system/{p-73bec757.js → p-cc35663d.js} +1 -1
  118. package/dist/baloise-design-system/{p-81894fe8.js → p-cc8cfbf3.js} +1 -1
  119. package/dist/baloise-design-system/{p-81a3bee001.entry.js → p-d0066a5950.entry.js} +1 -1
  120. package/dist/baloise-design-system/{p-8f217b03.system.js → p-d1b12bcd.system.js} +1 -1
  121. package/dist/baloise-design-system/{p-6933b37a08.entry.js → p-d306ec28cf.entry.js} +1 -1
  122. package/dist/baloise-design-system/{p-657a3eb3ee.system.entry.js → p-d3b5f9512c.system.entry.js} +1 -1
  123. package/dist/baloise-design-system/{p-67d61a81.js → p-d516d3b1.js} +1 -1
  124. package/dist/baloise-design-system/{p-42f532a0a8.entry.js → p-d568852b4c.entry.js} +1 -1
  125. package/dist/baloise-design-system/{p-58a0e8df48.entry.js → p-d60b2e3878.entry.js} +1 -1
  126. package/dist/baloise-design-system/p-d998fbe39e.system.entry.js +1 -0
  127. package/dist/baloise-design-system/{p-bcbc8278e2.system.entry.js → p-d9a6b04cb4.system.entry.js} +1 -1
  128. package/dist/baloise-design-system/{p-a2090a9d.system.js → p-d9b32333.system.js} +1 -1
  129. package/dist/baloise-design-system/{p-90a9f56d71.system.entry.js → p-ddcc5387b5.system.entry.js} +1 -1
  130. package/dist/baloise-design-system/{p-f7f06d0340.entry.js → p-e283e1cf22.entry.js} +1 -1
  131. package/dist/baloise-design-system/{p-356f75fd58.system.entry.js → p-e2c3dde206.system.entry.js} +1 -1
  132. package/dist/baloise-design-system/{p-31b6055d92.system.entry.js → p-e3b0312116.system.entry.js} +1 -1
  133. package/dist/baloise-design-system/{p-90a51218.js → p-e3c1d653.js} +1 -1
  134. package/dist/baloise-design-system/p-e48f2430ce.system.entry.js +1 -0
  135. package/dist/baloise-design-system/p-e53217f8.js +1 -1
  136. package/dist/baloise-design-system/p-e573491b.system.js +1 -0
  137. package/dist/baloise-design-system/{p-b0a4d40a.js → p-e6cf2df3.js} +1 -1
  138. package/dist/baloise-design-system/{p-2e830170.system.js → p-e7150a50.system.js} +1 -1
  139. package/dist/baloise-design-system/{p-b96fd49d.system.js → p-e7d20c82.system.js} +1 -1
  140. package/dist/baloise-design-system/p-e9445f4362.entry.js +1 -0
  141. package/dist/baloise-design-system/{p-3541dd16.js → p-ebf5cc68.js} +1 -1
  142. package/dist/baloise-design-system/p-ee379377.js +1 -0
  143. package/dist/baloise-design-system/{p-ff46a92a47.system.entry.js → p-f089f4c8c8.system.entry.js} +1 -1
  144. package/dist/baloise-design-system/{p-66d49670b0.system.entry.js → p-f35275e46a.system.entry.js} +1 -1
  145. package/dist/baloise-design-system/{p-19162db1a6.system.entry.js → p-f47bafc866.system.entry.js} +1 -1
  146. package/dist/baloise-design-system/{p-c13b1376.system.js → p-f49804d7.system.js} +1 -1
  147. package/dist/baloise-design-system/{p-296c7825b7.entry.js → p-f5e11c86e5.entry.js} +1 -1
  148. package/dist/baloise-design-system/{p-21f87590.js → p-f64319f1.js} +1 -1
  149. package/dist/baloise-design-system/{p-18ce5177f9.entry.js → p-f8ca0ec73a.entry.js} +1 -1
  150. package/dist/baloise-design-system/{p-dbc7c601d3.entry.js → p-ff12268ebc.entry.js} +1 -1
  151. package/dist/baloise-design-system/{p-bb0a588d09.system.entry.js → p-fff8faa67f.system.entry.js} +1 -1
  152. package/dist/cjs/animation.decorator-d160ba91.js +77 -0
  153. package/dist/cjs/app-globals-25e25924.js +7 -0
  154. package/dist/cjs/bal-accordion_4.cjs.entry.js +2 -2
  155. package/dist/cjs/bal-app.cjs.entry.js +1 -1
  156. package/dist/cjs/bal-button_2.cjs.entry.js +1 -1
  157. package/dist/cjs/bal-carousel_2.cjs.entry.js +22 -15
  158. package/dist/cjs/bal-checkbox-button.cjs.entry.js +3 -3
  159. package/dist/cjs/bal-checkbox_2.cjs.entry.js +4 -4
  160. package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +2 -2
  161. package/dist/cjs/bal-date-calendar_2.cjs.entry.js +4 -4
  162. package/dist/cjs/bal-date.cjs.entry.js +3 -3
  163. package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
  164. package/dist/cjs/bal-dropdown.cjs.entry.js +3 -3
  165. package/dist/cjs/bal-field_5.cjs.entry.js +2 -2
  166. package/dist/cjs/bal-file-upload.cjs.entry.js +2 -2
  167. package/dist/cjs/bal-footer.cjs.entry.js +1 -1
  168. package/dist/cjs/bal-form.cjs.entry.js +1 -1
  169. package/dist/cjs/bal-hint_5.cjs.entry.js +5 -5
  170. package/dist/cjs/bal-input-slider.cjs.entry.js +2 -2
  171. package/dist/cjs/bal-input-stepper.cjs.entry.js +2 -2
  172. package/dist/cjs/bal-input.cjs.entry.js +2 -2
  173. package/dist/cjs/bal-list_8.cjs.entry.js +5 -5
  174. package/dist/cjs/bal-logo.cjs.entry.js +4 -4
  175. package/dist/cjs/bal-modal_3.cjs.entry.js +2 -2
  176. package/dist/cjs/bal-nav_8.cjs.entry.js +6 -6
  177. package/dist/cjs/bal-navbar_5.cjs.entry.js +4 -4
  178. package/dist/cjs/bal-number-input.cjs.entry.js +2 -2
  179. package/dist/cjs/bal-option_2.cjs.entry.js +3 -3
  180. package/dist/cjs/bal-pagination.cjs.entry.js +4 -4
  181. package/dist/cjs/bal-popup.cjs.entry.js +3 -3
  182. package/dist/cjs/bal-progress-bar.cjs.entry.js +5 -5
  183. package/dist/cjs/bal-radio-button.cjs.entry.js +3 -3
  184. package/dist/cjs/bal-radio_2.cjs.entry.js +4 -4
  185. package/dist/cjs/bal-segment_2.cjs.entry.js +31 -14
  186. package/dist/cjs/bal-select_2.cjs.entry.js +2 -2
  187. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  188. package/dist/cjs/bal-spinner.cjs.entry.js +1 -1
  189. package/dist/cjs/bal-stage_6.cjs.entry.js +1 -1
  190. package/dist/cjs/bal-steps.cjs.entry.js +6 -6
  191. package/dist/cjs/bal-tab-item_2.cjs.entry.js +45 -31
  192. package/dist/cjs/bal-textarea.cjs.entry.js +2 -2
  193. package/dist/cjs/bal-time-input.cjs.entry.js +2 -2
  194. package/dist/cjs/bal-tooltip.cjs.entry.js +2 -2
  195. package/dist/cjs/baloise-design-system.cjs.js +3 -2
  196. package/dist/cjs/{breakpoints.decorator-e22cc15e.js → breakpoints.decorator-69080e45.js} +1 -1
  197. package/dist/cjs/{breakpoints.subject-5f803b3c.js → breakpoints.subject-981a5b00.js} +2 -2
  198. package/dist/cjs/{element-states.decorator-e2bc15ed.js → element-states.decorator-f79681aa.js} +1 -1
  199. package/dist/cjs/{floating-ui-24577c09.js → floating-ui-5cc3a363.js} +1 -1
  200. package/dist/cjs/{focus.decorator-b93456af.js → focus.decorator-e6050e24.js} +1 -1
  201. package/dist/cjs/{form-input-e4fdf58e.js → form-input-be32df30.js} +1 -1
  202. package/dist/cjs/{app-globals-a3f2765f.js → global-85ebe098.js} +2 -4
  203. package/dist/cjs/{helpers-94660ab2.js → helpers-240da822.js} +1 -1
  204. package/dist/cjs/index.cjs.js +5 -5
  205. package/dist/cjs/initialize-367b85e5.js +1 -1
  206. package/dist/cjs/loader.cjs.js +3 -2
  207. package/dist/cjs/{mutation.decorator-a000b7ef.js → mutation.decorator-249a9606.js} +1 -1
  208. package/dist/cjs/{overlays-4c465543.js → overlays-e408bbaf.js} +1 -1
  209. package/dist/cjs/{resize.decorator-62d31afa.js → resize.decorator-ebed89a1.js} +5 -5
  210. package/dist/cjs/{swipe.decorator-447ae00e.js → swipe.decorator-8ff8dd2c.js} +1 -1
  211. package/dist/cjs/{swipe.subject-6deb82da.js → swipe.subject-00bf8c8f.js} +1 -1
  212. package/dist/cjs/{swiper.util-abdf50f1.js → swiper.util-ef01dd7a.js} +3 -20
  213. package/dist/cjs/{tokens.esm-e91514ff.js → tokens.esm-9581da78.js} +1 -1
  214. package/dist/cjs/visibility.decorator-dc8cec8a.js +90 -0
  215. package/dist/cjs/{window-resize.decorator-17c9b489.js → window-resize.decorator-1a6cc96b.js} +1 -1
  216. package/dist/collection/collection-manifest.json +2 -1
  217. package/dist/collection/components/bal-carousel/bal-carousel.css +1 -1
  218. package/dist/collection/components/bal-carousel/bal-carousel.js +11 -4
  219. package/dist/collection/components/bal-hint/bal-hint.css +1 -1
  220. package/dist/collection/components/bal-segment/bal-segment.js +25 -14
  221. package/dist/collection/components/bal-tabs/bal-tabs.css +1 -1
  222. package/dist/collection/components/bal-tabs/bal-tabs.js +33 -31
  223. package/dist/collection/components/bal-tabs/components/tab-select.js +2 -2
  224. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +1 -0
  225. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +247 -0
  226. package/dist/collection/utils/animation/animation.decorator.js +23 -0
  227. package/dist/collection/utils/animation/animation.interfaces.js +1 -0
  228. package/dist/collection/utils/animation/animation.listener.js +30 -0
  229. package/dist/collection/utils/animation/animation.subject.js +20 -0
  230. package/dist/collection/utils/animation/index.js +2 -0
  231. package/dist/collection/utils/constants/version.constant.js +1 -1
  232. package/dist/collection/utils/helpers.js +1 -1
  233. package/dist/collection/utils/resize/resize.listener.js +4 -4
  234. package/dist/collection/utils/resize/resize.subject.js +2 -1
  235. package/dist/collection/utils/swiper/controls/dot-control.js +1 -1
  236. package/dist/collection/utils/swiper/swiper.util.js +0 -17
  237. package/dist/collection/utils/visibility/index.js +2 -0
  238. package/dist/collection/utils/visibility/visibility.decorator.js +23 -0
  239. package/dist/collection/utils/visibility/visibility.interfaces.js +1 -0
  240. package/dist/collection/utils/visibility/visibility.listener.js +41 -0
  241. package/dist/collection/utils/visibility/visibility.subject.js +23 -0
  242. package/dist/esm/animation.decorator-903bd4d2.js +75 -0
  243. package/dist/esm/app-globals-83570026.js +5 -0
  244. package/dist/esm/bal-accordion_4.entry.js +2 -2
  245. package/dist/esm/bal-app.entry.js +1 -1
  246. package/dist/esm/bal-button_2.entry.js +1 -1
  247. package/dist/esm/bal-carousel_2.entry.js +22 -15
  248. package/dist/esm/bal-checkbox-button.entry.js +3 -3
  249. package/dist/esm/bal-checkbox_2.entry.js +4 -4
  250. package/dist/esm/bal-date-calendar-cell.entry.js +2 -2
  251. package/dist/esm/bal-date-calendar_2.entry.js +4 -4
  252. package/dist/esm/bal-date.entry.js +3 -3
  253. package/dist/esm/bal-doc-app.entry.js +229 -0
  254. package/dist/esm/bal-dropdown.entry.js +3 -3
  255. package/dist/esm/bal-field_5.entry.js +2 -2
  256. package/dist/esm/bal-file-upload.entry.js +2 -2
  257. package/dist/esm/bal-footer.entry.js +1 -1
  258. package/dist/esm/bal-form.entry.js +1 -1
  259. package/dist/esm/bal-hint_5.entry.js +5 -5
  260. package/dist/esm/bal-input-slider.entry.js +2 -2
  261. package/dist/esm/bal-input-stepper.entry.js +2 -2
  262. package/dist/esm/bal-input.entry.js +2 -2
  263. package/dist/esm/bal-list_8.entry.js +5 -5
  264. package/dist/esm/bal-logo.entry.js +4 -4
  265. package/dist/esm/bal-modal_3.entry.js +2 -2
  266. package/dist/esm/bal-nav_8.entry.js +6 -6
  267. package/dist/esm/bal-navbar_5.entry.js +4 -4
  268. package/dist/esm/bal-number-input.entry.js +2 -2
  269. package/dist/esm/bal-option_2.entry.js +3 -3
  270. package/dist/esm/bal-pagination.entry.js +4 -4
  271. package/dist/esm/bal-popup.entry.js +3 -3
  272. package/dist/esm/bal-progress-bar.entry.js +5 -5
  273. package/dist/esm/bal-radio-button.entry.js +3 -3
  274. package/dist/esm/bal-radio_2.entry.js +4 -4
  275. package/dist/esm/bal-segment_2.entry.js +31 -14
  276. package/dist/esm/bal-select_2.entry.js +2 -2
  277. package/dist/esm/bal-shape.entry.js +1 -1
  278. package/dist/esm/bal-spinner.entry.js +1 -1
  279. package/dist/esm/bal-stage_6.entry.js +1 -1
  280. package/dist/esm/bal-steps.entry.js +6 -6
  281. package/dist/esm/bal-tab-item_2.entry.js +45 -31
  282. package/dist/esm/bal-textarea.entry.js +2 -2
  283. package/dist/esm/bal-time-input.entry.js +2 -2
  284. package/dist/esm/bal-tooltip.entry.js +2 -2
  285. package/dist/esm/baloise-design-system.js +3 -2
  286. package/dist/esm/{breakpoints.decorator-01f6809e.js → breakpoints.decorator-30dfcc09.js} +1 -1
  287. package/dist/esm/{breakpoints.subject-cc740608.js → breakpoints.subject-7e08db8c.js} +2 -2
  288. package/dist/esm/{element-states.decorator-4cf6af31.js → element-states.decorator-200c85c8.js} +1 -1
  289. package/dist/esm/{floating-ui-922202fe.js → floating-ui-f930810d.js} +1 -1
  290. package/dist/esm/{focus.decorator-c2c05d01.js → focus.decorator-a6de858a.js} +1 -1
  291. package/dist/esm/{form-input-1f3d8337.js → form-input-a5a2b129.js} +1 -1
  292. package/dist/esm/{app-globals-92fef8fd.js → global-88c7b04e.js} +2 -4
  293. package/dist/esm/{helpers-32d9e1cc.js → helpers-21ff73ef.js} +2 -2
  294. package/dist/esm/index.js +7 -7
  295. package/dist/esm/initialize-22c1bebc.js +1 -1
  296. package/dist/esm/loader.js +3 -2
  297. package/dist/esm/{mutation.decorator-0c202bed.js → mutation.decorator-07d5ba75.js} +1 -1
  298. package/dist/esm/{overlays-fa0ccf81.js → overlays-b7ba3a20.js} +1 -1
  299. package/dist/esm/{resize.decorator-bd416c47.js → resize.decorator-28179d27.js} +5 -5
  300. package/dist/esm/{swipe.decorator-20f4a0cb.js → swipe.decorator-b46cda4b.js} +1 -1
  301. package/dist/esm/{swipe.subject-e3db5994.js → swipe.subject-1d0412f1.js} +1 -1
  302. package/dist/esm/{swiper.util-0589b550.js → swiper.util-21981c17.js} +3 -20
  303. package/dist/esm/{tokens.esm-ddf14bd4.js → tokens.esm-6236e235.js} +1 -1
  304. package/dist/esm/visibility.decorator-d0cac6a6.js +88 -0
  305. package/dist/esm/{window-resize.decorator-b9d3c86c.js → window-resize.decorator-e4be90ee.js} +1 -1
  306. package/dist/esm-es5/animation.decorator-903bd4d2.js +1 -0
  307. package/dist/esm-es5/app-globals-83570026.js +1 -0
  308. package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
  309. package/dist/esm-es5/bal-app.entry.js +1 -1
  310. package/dist/esm-es5/bal-button_2.entry.js +1 -1
  311. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  312. package/dist/esm-es5/bal-checkbox-button.entry.js +1 -1
  313. package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
  314. package/dist/esm-es5/bal-date-calendar-cell.entry.js +1 -1
  315. package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
  316. package/dist/esm-es5/bal-date.entry.js +1 -1
  317. package/dist/esm-es5/bal-doc-app.entry.js +1 -0
  318. package/dist/esm-es5/bal-dropdown.entry.js +1 -1
  319. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  320. package/dist/esm-es5/bal-file-upload.entry.js +1 -1
  321. package/dist/esm-es5/bal-footer.entry.js +1 -1
  322. package/dist/esm-es5/bal-form.entry.js +1 -1
  323. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  324. package/dist/esm-es5/bal-input-slider.entry.js +1 -1
  325. package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
  326. package/dist/esm-es5/bal-input.entry.js +1 -1
  327. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  328. package/dist/esm-es5/bal-logo.entry.js +1 -1
  329. package/dist/esm-es5/bal-modal_3.entry.js +1 -1
  330. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  331. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  332. package/dist/esm-es5/bal-number-input.entry.js +1 -1
  333. package/dist/esm-es5/bal-option_2.entry.js +1 -1
  334. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  335. package/dist/esm-es5/bal-popup.entry.js +1 -1
  336. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  337. package/dist/esm-es5/bal-radio-button.entry.js +1 -1
  338. package/dist/esm-es5/bal-radio_2.entry.js +1 -1
  339. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  340. package/dist/esm-es5/bal-select_2.entry.js +1 -1
  341. package/dist/esm-es5/bal-shape.entry.js +1 -1
  342. package/dist/esm-es5/bal-spinner.entry.js +1 -1
  343. package/dist/esm-es5/bal-stage_6.entry.js +1 -1
  344. package/dist/esm-es5/bal-steps.entry.js +1 -1
  345. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  346. package/dist/esm-es5/bal-textarea.entry.js +1 -1
  347. package/dist/esm-es5/bal-time-input.entry.js +1 -1
  348. package/dist/esm-es5/bal-tooltip.entry.js +1 -1
  349. package/dist/esm-es5/baloise-design-system.js +1 -1
  350. package/dist/esm-es5/breakpoints.decorator-30dfcc09.js +1 -0
  351. package/dist/esm-es5/{breakpoints.subject-cc740608.js → breakpoints.subject-7e08db8c.js} +1 -1
  352. package/dist/esm-es5/{element-states.decorator-4cf6af31.js → element-states.decorator-200c85c8.js} +1 -1
  353. package/dist/esm-es5/{floating-ui-922202fe.js → floating-ui-f930810d.js} +1 -1
  354. package/dist/esm-es5/{focus.decorator-c2c05d01.js → focus.decorator-a6de858a.js} +1 -1
  355. package/dist/esm-es5/{form-input-1f3d8337.js → form-input-a5a2b129.js} +1 -1
  356. package/dist/esm-es5/global-88c7b04e.js +1 -0
  357. package/dist/esm-es5/{helpers-32d9e1cc.js → helpers-21ff73ef.js} +1 -1
  358. package/dist/esm-es5/index.js +1 -1
  359. package/dist/esm-es5/initialize-22c1bebc.js +1 -1
  360. package/dist/esm-es5/loader.js +1 -1
  361. package/dist/esm-es5/{mutation.decorator-0c202bed.js → mutation.decorator-07d5ba75.js} +1 -1
  362. package/dist/esm-es5/{overlays-fa0ccf81.js → overlays-b7ba3a20.js} +1 -1
  363. package/dist/esm-es5/{resize.decorator-bd416c47.js → resize.decorator-28179d27.js} +1 -1
  364. package/dist/esm-es5/{swipe.decorator-20f4a0cb.js → swipe.decorator-b46cda4b.js} +1 -1
  365. package/dist/esm-es5/{swipe.subject-e3db5994.js → swipe.subject-1d0412f1.js} +1 -1
  366. package/dist/esm-es5/swiper.util-21981c17.js +1 -0
  367. package/dist/esm-es5/visibility.decorator-d0cac6a6.js +1 -0
  368. package/dist/esm-es5/{window-resize.decorator-b9d3c86c.js → window-resize.decorator-e4be90ee.js} +1 -1
  369. package/dist/types/components/bal-carousel/bal-carousel.d.ts +3 -2
  370. package/dist/types/components/bal-segment/bal-segment.d.ts +5 -2
  371. package/dist/types/components/bal-tabs/bal-tabs.d.ts +5 -3
  372. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
  373. package/dist/types/components.d.ts +37 -0
  374. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
  375. package/dist/types/utils/animation/animation.decorator.d.ts +3 -0
  376. package/dist/types/utils/animation/animation.interfaces.d.ts +7 -0
  377. package/dist/types/utils/animation/animation.listener.d.ts +9 -0
  378. package/dist/types/utils/animation/animation.subject.d.ts +9 -0
  379. package/dist/types/utils/animation/index.d.ts +2 -0
  380. package/dist/types/utils/helpers.d.ts +1 -1
  381. package/dist/types/utils/swiper/swiper.util.d.ts +0 -1
  382. package/dist/types/utils/visibility/index.d.ts +2 -0
  383. package/dist/types/utils/visibility/visibility.decorator.d.ts +3 -0
  384. package/dist/types/utils/visibility/visibility.interfaces.d.ts +4 -0
  385. package/dist/types/utils/visibility/visibility.listener.d.ts +9 -0
  386. package/dist/types/utils/visibility/visibility.subject.d.ts +9 -0
  387. package/package.json +7 -7
  388. package/components/bal-dropdown2.js +0 -773
  389. package/components/bal-option2.js +0 -168
  390. package/dist/baloise-design-system/p-12ff7815.js +0 -1
  391. package/dist/baloise-design-system/p-288461e687.system.entry.js +0 -1
  392. package/dist/baloise-design-system/p-349d1c26c6.entry.js +0 -1
  393. package/dist/baloise-design-system/p-39dba60e75.system.entry.js +0 -1
  394. package/dist/baloise-design-system/p-5622c208.system.js +0 -1
  395. package/dist/baloise-design-system/p-70f7b546.system.js +0 -1
  396. package/dist/baloise-design-system/p-78ba217818.entry.js +0 -1
  397. package/dist/baloise-design-system/p-7b6c84c359.system.entry.js +0 -1
  398. package/dist/baloise-design-system/p-b3e4339305.entry.js +0 -1
  399. package/dist/baloise-design-system/p-ef436fd645.system.entry.js +0 -1
  400. package/dist/baloise-design-system/p-f67047f5ce.entry.js +0 -1
  401. package/dist/esm-es5/app-globals-92fef8fd.js +0 -1
  402. package/dist/esm-es5/breakpoints.decorator-01f6809e.js +0 -1
  403. package/dist/esm-es5/swiper.util-0589b550.js +0 -1
  404. /package/dist/baloise-design-system/{p-c9bb496a.system.js → p-7ab3d4a4.system.js} +0 -0
  405. /package/dist/baloise-design-system/{p-1837eab3.js → p-e690debe.js} +0 -0
  406. /package/dist/esm-es5/{tokens.esm-ddf14bd4.js → tokens.esm-6236e235.js} +0 -0
@@ -1,850 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { _ as __decorate, a as __metadata } from './tslib.es6.js';
3
- import { l as lodash_isnil } from './index3.js';
4
- import { p as rIC, d as waitAfterIdleCallback, h as deepReady, j as isDescendant, k as debounce } from './helpers.js';
5
- import { a as areArraysEqual } from './array.js';
6
- import { r as removeValue, p as preventDefault, l as length, g as getValues, i as includes, s as startsWith, a as addValue, f as findLabelByValue, b as findOptionByLabel, v as validateAfterBlur } from './utils.js';
7
- import { s as stopEventBubbling } from './form-input.js';
8
- import { B as BEM } from './bem.js';
9
- import { L as Logger } from './log.js';
10
- import { d as defaultBalAriaForm } from './form.js';
11
- import { d as defineCustomElement$7 } from './bal-checkbox2.js';
12
- import { d as defineCustomElement$6 } from './bal-close2.js';
13
- import { d as defineCustomElement$5 } from './bal-icon2.js';
14
- import { d as defineCustomElement$4 } from './bal-popover2.js';
15
- import { d as defineCustomElement$3 } from './bal-popover-content2.js';
16
- import { d as defineCustomElement$2 } from './bal-tag2.js';
17
- import { a as isSpaceKey, c as isArrowDownKey, d as isArrowUpKey, i as isEnterKey, e as isEscapeKey, k as isBackspaceKey } from './keyboard.helpers.js';
18
-
19
- const watchForOptions = (containerEl, tagName, onChange) => {
20
- /* tslint:disable-next-line */
21
- if (typeof MutationObserver === 'undefined') {
22
- return;
23
- }
24
- const mutation = new MutationObserver(mutationList => {
25
- mutationList = mutationList.filter(record => record.target.nodeName === tagName.toUpperCase() || record.target.nodeName === 'bal-select'.toUpperCase());
26
- if (mutationList.length > 0) {
27
- onChange(undefined);
28
- }
29
- });
30
- mutation.observe(containerEl, {
31
- childList: true,
32
- subtree: true,
33
- attributes: true,
34
- characterData: true,
35
- });
36
- return mutation;
37
- };
38
-
39
- const balSelectCss = ":root{--bal-select-control-background:var(--bal-color-white);--bal-select-control-background-hover:var(--bal-form-field-control-background-hover);--bal-select-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-select-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-select-control-input-background:var(--bal-color-grey-1);--bal-select-control-native-input-background:transparent;--bal-select-control-native-input-background-hover:transparent;--bal-select-control-input-inverted-footer-background:transparent;--bal-select-control-input-inverted-footer-background-hover:transparent;--bal-select-control-input-multiple-background:transparent;--bal-select-control-input-multiple-background-read-only-selection:transparent;--bal-select-control-input-option-background:transparent;--bal-select-control-input-option-background-selected:var(--bal-color-primary-1);--bal-select-control-input-option-background-focused:var(--bal-color-grey-2);--bal-select-control-input-option-background-hover:var(--bal-color-grey-2);--bal-select-control-border-radius:var(--bal-form-field-control-radius);--bal-select-popover-border-color:var(--bal-color-grey-2);--bal-select-control-border-color:var(--bal-form-field-control-border-color);--bal-select-control-border-color-focused:var(--bal-color-primary);--bal-select-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-select-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-select-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-select-control-border-color-focus-within:var(--bal-color-primary);--bal-select-option-border-top-color:var(--bal-color-grey-2);--bal-select-popover-empty-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color:var(--bal-form-field-control-color);--bal-select-control-text-color-focused:var(--bal-color-primary);--bal-select-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-select-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-select-option-content-label-text-color:var(--bal-form-field-control-color)}bal-select-option{display:none !important}.bal-select{display:block;position:relative;width:100%;-ms-flex:1;flex:1;font-family:var(--bal-font-family-text)}.bal-select__popover{border:.125rem solid var(--bal-select-popover-border-color)}.bal-select__popover__empty{padding:.5rem 1rem;font-family:var(--bal-font-family-text);color:var(--bal-select-popover-empty-text-color)}.bal-select__popover__empty--hidden{display:none}.bal-select__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-select__control{display:-ms-flexbox;display:flex;border-width:.125rem;border-style:solid;border-color:var(--bal-select-control-border-color);border-radius:var(--bal-select-control-border-radius);background:var(--bal-select-control-background);font-size:var(--bal-font-weight-regular);font-family:var(--bal-font-family-text);color:var(--bal-select-control-text-color);outline:none;-webkit-box-shadow:none;box-shadow:none;padding-right:1rem;min-height:3rem}.bal-select__control--focused{border-color:var(--bal-select-control-border-color-focused)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover{border-color:var(--bal-select-control-border-color-hover);background-color:var(--bal-select-control-background-hover)}.bal-select__control:not(.bal-select__control--disabled):not(.bal-select__control--invalid):not(.bal-select__control--inverted-footer):hover .bal-select__control__input{background-color:var(--bal-select-control-input-background)}.bal-select__control--invalid:not(.bal-select__control--disabled){border-color:var(--bal-select-control-border-color-invalid) !important;background:var(--bal-select-control-background-invalid) !important}.bal-select__control:focus-within{border-color:var(--bal-select-control-border-color-focus-within) !important}.bal-select__control--disabled{background-color:var(--bal-select-control-background-disabled) !important;border-color:var(--bal-select-control-border-color-disabled) !important}.bal-select__control--disabled,.bal-select__control--disabled input{cursor:default !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;pointer-events:none !important;color:var(--bal-select-input-text-color-disabled)}.bal-select__control--inverted-footer{border:none;background-color:var(--bal-select-control-input-inverted-footer-background) !important;padding-right:0}.bal-select__control--inverted-footer:hover{background-color:var(--bal-select-control-input-inverted-footer-background-hover) !important}.bal-select__control--inverted-footer .input{color:var(--bal-select-control-inverted-footer-native-input-text-color);background-color:var(--bal-select-control-native-input-background) !important}.bal-select__control--inverted-footer .input:hover{background-color:var(--bal-select-control-native-input-background-hover) !important}.bal-select__control__icon{min-height:100% !important;max-height:100% !important}.bal-select__control__icon--loading{display:none}.bal-select__control__icon--clickable{cursor:pointer}.bal-select__control__selections{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.125rem;max-width:100%;min-width:0;gap:0;padding-left:.375rem}.bal-select__control__selections .bal-tag{margin-left:.25rem;margin-top:.375rem;margin-bottom:.375rem}.bal-select__control__selections .bal-tag+.input{padding-left:.625rem}.bal-select__control__input{border:none !important;outline:none !important;outline-width:0 !important;height:2.75rem !important;-webkit-box-shadow:none !important;box-shadow:none !important;background:var(--bal-select-control-input-multiple-background);-ms-flex:1;flex:1;min-height:2.75rem !important;padding-left:.25rem !important;padding-right:.625rem !important;text-overflow:ellipsis}.bal-select__control__input:-moz-read-only{-moz-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:-moz-read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__control__input:read-only::-moz-selection{background:var(--bal-select-control-input-multiple-background-read-only-selection)}.bal-select__option{visibility:visible;font-family:var(--bal-font-family-text);background:var(--bal-select-control-input-option-background);border:none;cursor:pointer;outline:none;min-height:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0;margin:0;border-top:.125rem solid var(--bal-select-option-border-top-color);text-align:inherit;white-space:nowrap;width:100%}.bal-select__option:first-child{border-top:none}.bal-select__option::-moz-focus-inner{border:none}.bal-select__option--selected{background:var(--bal-select-control-input-option-background-selected)}.bal-select__option--selected .bal-select__option__content__label{font-weight:var(--bal-font-weight-bold)}.bal-select__option--focused{background:var(--bal-select-control-input-option-background-focused)}.bal-select__option:hover{background:var(--bal-select-control-input-option-background-hover)}.bal-select__option__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;min-height:3rem;padding:.75rem 1rem;gap:.75rem}.bal-select__option__content__checkbox{margin:0;padding:0}.bal-select__option__content__label{margin:0;padding:0;font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-select-option-content-label-text-color);line-height:1.125rem;word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}";
40
- const BalSelectStyle0 = balSelectCss;
41
-
42
- const isHuman = true;
43
- const isNotHuman = false;
44
- const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement {
45
- constructor() {
46
- super();
47
- this.__registerHost();
48
- this.balChange = createEvent(this, "balChange", 7);
49
- this.balInputClick = createEvent(this, "balInputClick", 7);
50
- this.balInput = createEvent(this, "balInput", 7);
51
- this.balBlur = createEvent(this, "balBlur", 7);
52
- this.balFocus = createEvent(this, "balFocus", 7);
53
- this.balCancel = createEvent(this, "balCancel", 7);
54
- this.balKeyPress = createEvent(this, "balKeyPress", 7);
55
- this.didInit = false;
56
- this.inputId = `bal-select-${selectIds++}`;
57
- this.initialValue = [];
58
- this.removeValue = (value) => {
59
- if (!this.disabled) {
60
- this.updateRawValue(removeValue(this.rawValue, value), isHuman);
61
- if (this.multiple && this.typeahead) {
62
- this.setFocus();
63
- }
64
- this.fireBlur();
65
- }
66
- };
67
- /**
68
- * EVENT BINDING
69
- * ------------------------------------------------------
70
- */
71
- this.fireBlur = (ev = new CustomEvent('blur')) => {
72
- if (!this.isPopoverOpen && !this.hasFocus) {
73
- rIC(() => this.balBlur.emit(ev));
74
- }
75
- };
76
- this.handleClick = (ev) => {
77
- if (this.disabled || this.readonly) {
78
- preventDefault(ev);
79
- }
80
- };
81
- this.handlePopoverChange = (ev) => {
82
- ev.stopPropagation();
83
- if (this.isPopoverOpen !== ev.detail) {
84
- this.isPopoverOpen = ev.detail;
85
- if (this.isPopoverOpen) {
86
- this.updateFocus();
87
- }
88
- else {
89
- this.focusIndex = -1;
90
- if (this.multiple && this.typeahead) {
91
- this.updateInputValue('');
92
- }
93
- this.fireBlur(ev);
94
- }
95
- }
96
- };
97
- this.handleInputBlur = (ev) => {
98
- preventDefault(ev);
99
- const target = ev.relatedTarget;
100
- if (target === null ||
101
- (target &&
102
- target.nodeName &&
103
- (target.nodeName === 'BAL-MODAL' || target.nodeName === 'INPUT' || target.nodeName === 'BUTTON'))) {
104
- this.validateAfterBlur(isHuman);
105
- }
106
- this.hasFocus = false;
107
- this.fireBlur(ev);
108
- };
109
- this.handleInputFocus = (ev) => {
110
- this.balFocus.emit(ev);
111
- this.hasFocus = true;
112
- };
113
- this.handleInputClick = async (ev, isIconClick = false) => {
114
- var _a, _b, _c, _d;
115
- stopEventBubbling(ev);
116
- if (this.isChipClicked(ev)) {
117
- return;
118
- }
119
- if (this.disabled || this.readonly) {
120
- preventDefault(ev);
121
- }
122
- else {
123
- this.focusIndex = -1;
124
- this.balInputClick.emit(ev);
125
- if (this.typeahead) {
126
- if (this.isPopoverOpen && isIconClick) {
127
- await ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.dismiss());
128
- }
129
- else {
130
- await ((_b = this.popoverElement) === null || _b === void 0 ? void 0 : _b.present());
131
- }
132
- }
133
- else {
134
- if (this.isPopoverOpen) {
135
- await ((_c = this.popoverElement) === null || _c === void 0 ? void 0 : _c.dismiss());
136
- }
137
- else {
138
- await ((_d = this.popoverElement) === null || _d === void 0 ? void 0 : _d.present());
139
- }
140
- }
141
- }
142
- };
143
- this.handleKeyPress = async (ev) => {
144
- if (!this.isPopoverOpen && isSpaceKey(ev)) {
145
- preventDefault(ev);
146
- await this.open();
147
- }
148
- this.balKeyPress.emit(ev);
149
- };
150
- this.handleInputChange = (ev) => {
151
- if (!this.disabled && !this.readonly) {
152
- this.inputValue = ev.target.value;
153
- }
154
- };
155
- this.handleInput = async (ev) => {
156
- if (!this.disabled && !this.readonly) {
157
- this.inputValue = ev.target.value;
158
- if (!this.isPopoverOpen) {
159
- this.popoverElement.present();
160
- }
161
- this.focusIndex = -1;
162
- this.updateFocus();
163
- preventDefault(ev);
164
- this.balInput.emit(this.inputValue);
165
- }
166
- };
167
- this.handleOptionMouseEnter = (index) => {
168
- this.focusIndex = index;
169
- };
170
- this.hasFocus = false;
171
- this.inputValue = '';
172
- this.focusIndex = -1;
173
- this.isPopoverOpen = false;
174
- this.options = new Map();
175
- this.labelToScrollTo = '';
176
- this.labelToSelectTo = '';
177
- this.ariaForm = defaultBalAriaForm;
178
- this.name = this.inputId;
179
- this.invalid = false;
180
- this.filter = 'includes';
181
- this.balTabindex = 0;
182
- this.freeSolo = false;
183
- this.multiple = false;
184
- this.maxLength = undefined;
185
- this.noDataLabel = undefined;
186
- this.autocomplete = 'off';
187
- this.typeahead = false;
188
- this.selectionOptional = false;
189
- this.disabled = false;
190
- this.readonly = false;
191
- this.required = false;
192
- this.inverted = false;
193
- this.placeholder = undefined;
194
- this.scrollable = 250;
195
- this.loading = false;
196
- this.remote = false;
197
- this.autoInvalidOff = false;
198
- this.value = [];
199
- this.rawValue = [];
200
- }
201
- createLogger(log) {
202
- this.log = log;
203
- }
204
- valueWatcher() {
205
- this.syncRawValue(false);
206
- }
207
- updateRawValue(newValue, isHuman = true) {
208
- if (!areArraysEqual(newValue, this.rawValue || [])) {
209
- this.rawValue = [...newValue];
210
- this.syncNativeInput();
211
- if (this.didInit && isHuman === true) {
212
- if (this.multiple) {
213
- if (lodash_isnil(this.rawValue)) {
214
- this.emitChangeEvent([]);
215
- }
216
- else {
217
- this.emitChangeEvent([...this.rawValue]);
218
- }
219
- }
220
- else {
221
- if (lodash_isnil(this.rawValue) || length(this.rawValue) === 0) {
222
- this.emitChangeEvent(undefined);
223
- }
224
- else {
225
- this.emitChangeEvent(this.rawValue[0]);
226
- }
227
- }
228
- }
229
- }
230
- }
231
- emitChangeEvent(detail) {
232
- this.balChange.emit(detail);
233
- }
234
- /**
235
- * LIFECYCLE
236
- * ------------------------------------------------------
237
- */
238
- connectedCallback() {
239
- const debounceUpdateOptions = debounce(() => this.updateOptions(), 0);
240
- this.initialValue = this.value;
241
- debounceUpdateOptions();
242
- this.mutationO = watchForOptions(this.el, 'bal-select-option', () => {
243
- debounceUpdateOptions();
244
- });
245
- }
246
- componentWillLoad() {
247
- this.waitForOptionsAndThenUpdateRawValues();
248
- this.isInsideOfFooter();
249
- if (!lodash_isnil(this.rawValue) && this.options.size > 0 && length(this.rawValue) === 1) {
250
- const firstOption = this.options.get(this.rawValue[0]);
251
- if (!lodash_isnil(firstOption)) {
252
- this.inputValue = firstOption.label;
253
- }
254
- }
255
- }
256
- componentDidLoad() {
257
- this.syncRawValue(false);
258
- if (!this.multiple) {
259
- this.inputElement.value = this.inputValue;
260
- }
261
- this.didInit = true;
262
- }
263
- disconnectedCallback() {
264
- if (this.mutationO) {
265
- this.mutationO.disconnect();
266
- this.mutationO = undefined;
267
- }
268
- }
269
- /**
270
- * LISTENERS
271
- * ------------------------------------------------------
272
- */
273
- listenOnClick(ev) {
274
- if (this.disabled && ev.target && ev.target === this.el) {
275
- preventDefault(ev);
276
- }
277
- }
278
- resetHandler(ev) {
279
- const formElement = ev.target;
280
- if (formElement === null || formElement === void 0 ? void 0 : formElement.contains(this.el)) {
281
- if (this.resetHandlerTimer) {
282
- clearTimeout(this.resetHandlerTimer);
283
- }
284
- this.resetHandlerTimer = setTimeout(() => {
285
- this.value = this.initialValue;
286
- this.syncRawValue(false);
287
- this.syncNativeInput();
288
- if (this.nativeSelectEl) {
289
- const options = Array.from(this.nativeSelectEl.options);
290
- options.forEach(o => (o.selected = true));
291
- }
292
- }, 0);
293
- }
294
- }
295
- async handleKeyDown(ev) {
296
- if (this.isPopoverOpen) {
297
- if (isArrowDownKey(ev) || isArrowUpKey(ev)) {
298
- preventDefault(ev);
299
- this.navigateWithArrowKey(ev);
300
- this.updateFocus();
301
- }
302
- if (isEnterKey(ev)) {
303
- preventDefault(ev);
304
- this.selectedFocusedOption();
305
- }
306
- if (isEscapeKey(ev)) {
307
- this.cancel();
308
- }
309
- if (isBackspaceKey(ev) && this.typeahead && this.multiple) {
310
- if (this.inputElement.value === '' && length(this.rawValue) > 0) {
311
- const valuesArray = getValues(this.rawValue);
312
- this.removeValue(valuesArray[length(this.rawValue) - 1]);
313
- }
314
- }
315
- if (!this.typeahead && ev.key.length === 1) {
316
- this.focusOptionByLabel(ev.key);
317
- }
318
- if (isSpaceKey(ev) && !this.typeahead) {
319
- preventDefault(ev);
320
- }
321
- }
322
- else {
323
- if (this.hasFocus) {
324
- if (isArrowDownKey(ev) || isArrowUpKey(ev)) {
325
- preventDefault(ev);
326
- await this.open();
327
- }
328
- if (!this.typeahead && ev.key.length === 1) {
329
- this.selectOptionByLabel(ev.key);
330
- }
331
- }
332
- }
333
- }
334
- /**
335
- * PUBLIC METHODS
336
- * ------------------------------------------------------
337
- */
338
- /**
339
- * Sets the focus on the input element
340
- */
341
- async setFocus() {
342
- if (this.inputElement && !this.disabled) {
343
- await waitAfterIdleCallback();
344
- this.inputElement.focus();
345
- }
346
- }
347
- /**
348
- * Returns the value of the component
349
- */
350
- async getValue() {
351
- return this.rawValue;
352
- }
353
- /**
354
- * Sets the value to `[]`, the input value to ´''´ and the focus index to ´0´.
355
- */
356
- async clear() {
357
- this.focusIndex = -1;
358
- if (this.inputElement) {
359
- this.updateInputValue('');
360
- this.updateRawValue([], isHuman);
361
- this.value = this.multiple ? [] : '';
362
- }
363
- }
364
- /**
365
- * Opens the popover
366
- */
367
- async open() {
368
- if (!this.disabled && !this.readonly && !lodash_isnil(this.popoverElement)) {
369
- await this.popoverElement.present();
370
- }
371
- }
372
- /**
373
- * Closes the popover
374
- */
375
- async close() {
376
- if (!this.disabled && !this.readonly && !lodash_isnil(this.popoverElement)) {
377
- this.blurSelect();
378
- }
379
- }
380
- /**
381
- * Cancel the popover
382
- */
383
- async cancel() {
384
- this.labelToScrollTo = '';
385
- this.close();
386
- this.scrollTo(0);
387
- this.balCancel.emit();
388
- }
389
- /**
390
- * Select option by passed value
391
- */
392
- async select(value) {
393
- const option = this.options.get(value);
394
- if (!lodash_isnil(option)) {
395
- this.optionSelected(option);
396
- }
397
- }
398
- /**
399
- * @internal
400
- */
401
- async setAriaForm(ariaForm) {
402
- this.ariaForm = Object.assign({}, ariaForm);
403
- }
404
- async waitForOptionsAndThenUpdateRawValues() {
405
- clearTimeout(this.waitForOptionsAndThenUpdateRawValuesTimer);
406
- await deepReady(this.el);
407
- const hasOptions = this.options.size > 0;
408
- if (hasOptions) {
409
- if (!this.remote) {
410
- this.syncRawValue(isNotHuman);
411
- }
412
- }
413
- else {
414
- this.waitForOptionsAndThenUpdateRawValuesTimer = setTimeout(() => this.waitForOptionsAndThenUpdateRawValues(), 10);
415
- }
416
- }
417
- async updateOptions() {
418
- const optionElements = this.getChildOpts();
419
- const options = new Map();
420
- for (let index = 0; index < optionElements.length; index++) {
421
- const element = optionElements[index];
422
- options.set(element.value, {
423
- value: element.value,
424
- label: element.label,
425
- disabled: element.disabled,
426
- id: element.for,
427
- textContent: element.textContent,
428
- innerHTML: element.innerHTML,
429
- });
430
- }
431
- if (!this.selectionOptional && Array.isArray(this.rawValue)) {
432
- for (let index = 0; index < this.rawValue.length; index++) {
433
- const val = this.rawValue[index];
434
- if (!options.has(val)) {
435
- const newRawValue = removeValue(this.rawValue, val);
436
- this.updateRawValue(newRawValue, isNotHuman);
437
- }
438
- }
439
- }
440
- this.options = new Map(options);
441
- if (!this.typeahead) {
442
- await this.syncNativeInput();
443
- }
444
- if (this.didInit && !this.remote) {
445
- this.validateAfterBlur();
446
- }
447
- }
448
- /**
449
- * GETTERS
450
- * ------------------------------------------------------
451
- */
452
- get optionArray() {
453
- const options = Array.from(this.options, ([_, value]) => value);
454
- if (!this.typeahead || this.remote) {
455
- return options;
456
- }
457
- return options.filter(option => this.filter === 'includes'
458
- ? includes(option.textContent, this.inputValue)
459
- : startsWith(option.textContent, this.inputValue));
460
- }
461
- hasOptions() {
462
- return this.optionArray.length > 0;
463
- }
464
- get inputPlaceholder() {
465
- if (this.multiple) {
466
- if (length(this.rawValue) < 1) {
467
- return this.placeholder;
468
- }
469
- return undefined;
470
- }
471
- else {
472
- if (!lodash_isnil(this.rawValue) && length(this.rawValue) > 0) {
473
- return undefined;
474
- }
475
- }
476
- return this.placeholder;
477
- }
478
- getChildOpts() {
479
- return Array.from(this.el.querySelectorAll('bal-select-option'));
480
- }
481
- getPopoverContent() {
482
- return this.popoverElement.querySelector('.bal-popover__content__inner');
483
- }
484
- updateFocus() {
485
- if (this.focusIndex < -1) {
486
- this.focusIndex = -1;
487
- }
488
- const visibleOptions = this.optionArray;
489
- if (visibleOptions.length > 0) {
490
- if (visibleOptions.length <= this.focusIndex) {
491
- this.focusIndex = visibleOptions.length - 1;
492
- }
493
- const option = visibleOptions[this.focusIndex];
494
- if (option && option.id) {
495
- const focusedElement = this.el.querySelector(`button#${option.id}`);
496
- if (focusedElement) {
497
- clearTimeout(this.updateFocusTimer);
498
- this.updateFocusTimer = setTimeout(() => {
499
- this.scrollToFocusedOption(focusedElement);
500
- }, 0);
501
- }
502
- }
503
- }
504
- else {
505
- this.focusIndex = -1;
506
- }
507
- }
508
- scrollToFocusedOption(focusedElement) {
509
- if (focusedElement && this.popoverElement) {
510
- const popoverContentElement = this.getPopoverContent();
511
- if (popoverContentElement) {
512
- // up
513
- const topOfOption = focusedElement.offsetTop;
514
- const topOfPopoverContent = popoverContentElement.scrollTop;
515
- if (topOfOption < topOfPopoverContent) {
516
- popoverContentElement.scrollTop = topOfOption;
517
- }
518
- // down
519
- const bottomOfOption = focusedElement.offsetTop + focusedElement.clientHeight;
520
- const bottomOfPopoverContent = popoverContentElement.scrollTop + popoverContentElement.clientHeight;
521
- if (bottomOfOption > bottomOfPopoverContent) {
522
- popoverContentElement.scrollTop = popoverContentElement.scrollTop + focusedElement.clientHeight;
523
- }
524
- }
525
- }
526
- }
527
- scrollTo(scrollTop) {
528
- const popoverContentElement = this.getPopoverContent();
529
- if (popoverContentElement) {
530
- popoverContentElement.scrollTop = scrollTop;
531
- }
532
- }
533
- selectedFocusedOption() {
534
- const visibleOptions = this.optionArray;
535
- if (visibleOptions.length > this.focusIndex) {
536
- const focusedOption = visibleOptions[this.focusIndex];
537
- if (focusedOption) {
538
- this.optionSelected(focusedOption);
539
- }
540
- }
541
- }
542
- navigateWithArrowKey(ev) {
543
- if (isArrowDownKey(ev)) {
544
- this.focusIndex = this.focusIndex + 1;
545
- }
546
- else {
547
- if (isArrowUpKey(ev)) {
548
- this.focusIndex = this.focusIndex - 1;
549
- }
550
- }
551
- }
552
- focusOptionByLabel(key) {
553
- this.labelToScrollTo = this.labelToScrollTo + key;
554
- clearTimeout(this.clearScrollToValue);
555
- this.clearScrollToValue = setTimeout(() => {
556
- this.scrollToLabel(this.labelToScrollTo);
557
- }, 600);
558
- }
559
- selectOptionByLabel(key) {
560
- this.labelToSelectTo = this.labelToSelectTo + key;
561
- clearTimeout(this.clearSelectValue);
562
- this.clearSelectValue = setTimeout(() => {
563
- this.selectLabel(this.labelToSelectTo);
564
- this.labelToSelectTo = '';
565
- }, 600);
566
- }
567
- async selectLabel(label) {
568
- if (label !== ' ') {
569
- const option = this.optionArray.find(o => startsWith(o.label || '', label));
570
- if (!lodash_isnil(option) && option.id) {
571
- const optionElement = this.el.querySelector(`button#${option.id}`);
572
- if (!lodash_isnil(optionElement)) {
573
- const index = this.optionArray.indexOf(option);
574
- this.focusIndex = index;
575
- this.select(option.value);
576
- }
577
- }
578
- this.labelToScrollTo = '';
579
- }
580
- }
581
- async scrollToLabel(label) {
582
- if (label !== ' ') {
583
- const option = this.optionArray.find(o => startsWith(o.label || '', label));
584
- if (!lodash_isnil(option) && option.id) {
585
- const optionElement = this.el.querySelector(`button#${option.id}`);
586
- if (!lodash_isnil(optionElement)) {
587
- const index = this.optionArray.indexOf(option);
588
- this.focusIndex = index;
589
- this.scrollTo(optionElement.offsetTop);
590
- }
591
- }
592
- this.labelToScrollTo = '';
593
- }
594
- }
595
- /********************************************************
596
- * VALUE & FILTER & SELECTION
597
- ********************************************************/
598
- syncRawValue(isHuman = true) {
599
- let newValue = [];
600
- if (!lodash_isnil(this.value) && this.value !== '') {
601
- if (Array.isArray(this.value)) {
602
- newValue = [...this.value.filter(v => !lodash_isnil(v))];
603
- }
604
- else {
605
- if (this.value.split('').includes(',')) {
606
- newValue = [
607
- ...this.value
608
- .split(',')
609
- .filter(v => v)
610
- .map(v => v.trim()),
611
- ];
612
- }
613
- else {
614
- newValue = [this.value];
615
- }
616
- }
617
- }
618
- // trigger the raw value change
619
- this.updateRawValue(newValue, isHuman);
620
- }
621
- blurSelect() {
622
- this.popoverElement.dismiss();
623
- }
624
- optionSelected(selectedOption) {
625
- const valuesArray = getValues(this.rawValue);
626
- const isAlreadySelected = valuesArray.some(v => v === selectedOption.value);
627
- this.updateValue(selectedOption.value, !isAlreadySelected);
628
- if (!this.multiple) {
629
- this.blurSelect();
630
- }
631
- else {
632
- if (this.typeahead) {
633
- this.setFocus();
634
- }
635
- }
636
- }
637
- updateValue(newValue, isSelected = true) {
638
- if (this.multiple) {
639
- if (isSelected) {
640
- this.updateRawValue(addValue(this.rawValue, newValue, this.multiple), isHuman);
641
- }
642
- else {
643
- this.updateRawValue(removeValue(this.rawValue, newValue), isHuman);
644
- }
645
- }
646
- else {
647
- this.updateRawValue(addValue(this.rawValue, newValue, this.multiple), isHuman);
648
- if (this.rawValue && this.rawValue.length > 0) {
649
- this.updateInputValue(findLabelByValue(this.options, this.rawValue[0]));
650
- }
651
- }
652
- }
653
- validateAfterBlur(isHuman = isNotHuman) {
654
- let newRawValue = this.rawValue;
655
- if (this.didInit && !this.multiple) {
656
- if (this.typeahead && (this.selectionOptional || this.remote)) {
657
- const typedOption = findOptionByLabel(this.options, this.inputElement.value);
658
- if (typedOption) {
659
- newRawValue = [typedOption.value];
660
- }
661
- else {
662
- newRawValue = [this.inputElement.value];
663
- }
664
- }
665
- else {
666
- newRawValue = validateAfterBlur(this.rawValue, this.options, this.inputElement.value);
667
- }
668
- this.updateRawValue(newRawValue, isHuman);
669
- }
670
- }
671
- syncNativeInput() {
672
- if (!this.multiple) {
673
- if (length(this.rawValue) > 0) {
674
- const valuesArray = getValues(this.rawValue);
675
- let label = findLabelByValue(this.options, valuesArray[0]);
676
- if (!this.multiple && this.typeahead && this.selectionOptional && label === '') {
677
- label = valuesArray.join(', ');
678
- }
679
- return this.updateInputValue(label);
680
- }
681
- }
682
- return Promise.resolve();
683
- }
684
- updateInputValue(value) {
685
- return new Promise(resolve => {
686
- if (this.updateInputValueTimer) {
687
- clearTimeout(this.updateInputValueTimer);
688
- }
689
- this.updateInputValueTimer = setTimeout(() => {
690
- if (!lodash_isnil(this.inputElement)) {
691
- this.inputElement.value = value;
692
- this.inputValue = value;
693
- resolve();
694
- }
695
- }, 0);
696
- });
697
- }
698
- isChipClicked(ev) {
699
- let isChipClicked = false;
700
- if (this.multiple) {
701
- const chips = this.selectionEl.querySelectorAll('bal-tag');
702
- const target = ev.target;
703
- chips.forEach(chip => {
704
- const isChip = isDescendant(chip, target) || chip === target;
705
- if (isChip) {
706
- isChipClicked = isChip;
707
- }
708
- });
709
- }
710
- return isChipClicked;
711
- }
712
- isInsideOfFooter() {
713
- this.inverted = this.el.closest('bal-footer') !== null;
714
- }
715
- /**
716
- * RENDER
717
- * ------------------------------------------------------
718
- */
719
- render() {
720
- var _a;
721
- const Chip = (props) => (h("bal-tag", { key: '79401261d2710c20cf092eb9fbb7fb9df4a8b58c', size: "", closable: !this.disabled, disabled: this.disabled, invalid: this.invalid, tabindex: -1, onBalCloseClick: _ => this.removeValue(props.value), "data-testid": "bal-select-chip" }, findLabelByValue(this.options, props.value) || props.value));
722
- const valuesArray = getValues(this.rawValue);
723
- const block = BEM.block('select');
724
- const nativeEl = block.element('native');
725
- const controlEl = block.element('control');
726
- const controlIconEl = controlEl.element('icon');
727
- const controlSelectionsEl = controlEl.element('selections');
728
- const controlInputEl = controlEl.element('input');
729
- const popoverContentEl = block.element('popover');
730
- const popoverContentEmptyEl = popoverContentEl.element('empty');
731
- const optionEl = block.element('option');
732
- const optionContentEl = optionEl.element('content');
733
- const optionContentCheckboxEl = optionContentEl.element('checkbox');
734
- const optionContentLabelEl = optionContentEl.element('label');
735
- return (h(Host, { key: '6f73b54fd82f27f6aec3afde83fa9b6df2b2783b', role: "listbox", onClick: this.handleClick, "aria-disabled": this.disabled ? 'true' : null, "data-value": (_a = this.rawValue) === null || _a === void 0 ? void 0 : _a.map(v => findLabelByValue(this.options, v)).join(','), class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('inverted').class(this.inverted)), block.modifier('inverted-footer').class(this.inverted)) }, h("select", { key: 'acac08e4b77913e59024df94a888d06a9f839084', class: Object.assign({}, nativeEl.class()), name: this.name, multiple: this.multiple, required: this.required, tabindex: -1, ref: el => (this.nativeSelectEl = el) }, valuesArray.map((value) => (h("option", { key: value, value: value, selected: true }, value)))), h("bal-popover", { key: '0bb66730c86b7730411c2ccee9fa1a1903b51df5', onBalChange: this.handlePopoverChange, ref: el => (this.popoverElement = el) }, h("div", { key: '65ad688a0ea4c704e25eedf57cdde2f0b7042839', "bal-popover-trigger": true, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, controlEl.class()), controlEl.modifier('invalid').class(this.invalid)), controlEl.modifier('disabled').class(this.disabled || this.readonly)), controlEl.modifier('focused').class(this.isPopoverOpen)), controlEl.modifier('inverted-footer').class(this.inverted)) }, h("div", { key: '5c92ecce5f080f9219838cefa496b8f86e6a5e1e', class: Object.assign(Object.assign({}, controlSelectionsEl.class()), controlSelectionsEl
736
- .modifier('clickable')
737
- .class(!this.isPopoverOpen && !this.disabled && !this.readonly)), onClick: this.handleInputClick, ref: el => (this.selectionEl = el) }, valuesArray
738
- .filter(_ => this.multiple)
739
- .map((value) => (h(Chip, { value: value }))), h("input", { key: 'f3fdeee4cd978843101e662b9654ff48c379a706', type: "text", class: Object.assign(Object.assign({}, controlInputEl.class()), { 'input': true, 'is-inverted': this.inverted, 'is-danger': this.invalid, 'is-disabled': this.disabled || this.readonly, 'is-clickable': !this.isPopoverOpen && !this.disabled && !this.readonly, 'data-test-select-input': true }), id: this.ariaForm.controlId || this.inputId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : null, "data-testid": "bal-select-input", autocomplete: this.autocomplete, "aria-autocomplete": this.autocomplete === 'off' ? 'none' : null, placeholder: this.inputPlaceholder, readonly: !this.typeahead || this.disabled || this.readonly, contentEditable: this.typeahead, disabled: this.disabled, maxLength: this.maxLength, tabindex: this.balTabindex, onInput: this.handleInput, onClick: this.handleInputClick, onChange: this.handleInputChange, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onKeyPress: this.handleKeyPress, ref: el => (this.inputElement = el) })), !this.freeSolo && !this.loading ? (h("bal-icon", { class: Object.assign(Object.assign(Object.assign({}, controlIconEl.class()), controlIconEl.modifier('loading').class(this.loading)), controlIconEl.modifier('clickable').class(!this.disabled && !this.readonly)), name: !this.inverted ? 'caret-down' : 'caret-up', color: this.disabled || this.readonly
740
- ? 'grey-light'
741
- : this.inverted
742
- ? 'white'
743
- : this.invalid
744
- ? 'danger'
745
- : 'primary', turn: this.isPopoverOpen, onClick: ev => this.handleInputClick(ev, true), size: !this.inverted ? '' : 'x-small' })) : ('')), h("bal-popover-content", { key: '858a34fd9deb5e3f681f44587d4b1092f0107386', class: Object.assign({}, popoverContentEl.class()), scrollable: this.scrollable, spaceless: true, expanded: true }, this.optionArray.map((option, index) => (h("button", { key: option.value, type: "button", role: "option", id: option.id, "data-value": option.value, "data-label": option.label, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, optionEl.class()), optionEl
746
- .modifier('selected')
747
- .class(valuesArray.includes(option.value) && !(this.typeahead && !this.multiple))), optionEl.modifier('focused').class(this.focusIndex === index)), optionEl.modifier('checkbox').class(this.multiple)), optionEl.modifier('disabled').class(option.disabled === true)), "data-testid": "bal-select-option", disabled: option.disabled, tabIndex: -1, onMouseEnter: () => this.handleOptionMouseEnter(index), onClick: () => this.optionSelected(option) }, h("div", { class: Object.assign({}, optionContentEl.class()) }, h("span", { class: Object.assign({}, optionContentCheckboxEl.class()), style: { display: this.multiple ? 'flex' : 'none' } }, h("bal-checkbox", { checked: valuesArray.includes(option.value), tabindex: -1, nonSubmit: true, flat: true, onBalChange: preventDefault })), h("span", { class: Object.assign({}, optionContentLabelEl.class()), innerHTML: option.innerHTML }))))), h("div", { key: '5df467dccba15602535dfacaae0ea7b410cf3d6d', class: Object.assign(Object.assign({}, popoverContentEmptyEl.class()), popoverContentEmptyEl
748
- .modifier('hidden')
749
- .class(this.noDataLabel === undefined || this.hasOptions() || !this.typeahead || this.selectionOptional)) }, this.noDataLabel)))));
750
- }
751
- get el() { return this; }
752
- static get watchers() { return {
753
- "value": ["valueWatcher"]
754
- }; }
755
- static get style() { return BalSelectStyle0; }
756
- }, [0, "bal-select", {
757
- "name": [1],
758
- "invalid": [4],
759
- "filter": [1],
760
- "balTabindex": [2, "bal-tabindex"],
761
- "freeSolo": [4, "free-solo"],
762
- "multiple": [4],
763
- "maxLength": [2, "max-length"],
764
- "noDataLabel": [1, "no-data-label"],
765
- "autocomplete": [1],
766
- "typeahead": [4],
767
- "selectionOptional": [4, "selection-optional"],
768
- "disabled": [4],
769
- "readonly": [4],
770
- "required": [4],
771
- "inverted": [4],
772
- "placeholder": [1],
773
- "scrollable": [2],
774
- "loading": [4],
775
- "remote": [4],
776
- "autoInvalidOff": [516, "auto-invalid-off"],
777
- "value": [1025],
778
- "hasFocus": [32],
779
- "inputValue": [32],
780
- "focusIndex": [32],
781
- "isPopoverOpen": [32],
782
- "options": [32],
783
- "labelToScrollTo": [32],
784
- "labelToSelectTo": [32],
785
- "ariaForm": [32],
786
- "rawValue": [32],
787
- "setFocus": [64],
788
- "getValue": [64],
789
- "clear": [64],
790
- "open": [64],
791
- "close": [64],
792
- "cancel": [64],
793
- "select": [64],
794
- "setAriaForm": [64]
795
- }, [[6, "click", "listenOnClick"], [6, "reset", "resetHandler"], [8, "keydown", "handleKeyDown"]], {
796
- "value": ["valueWatcher"]
797
- }]);
798
- __decorate([
799
- Logger('bal-select'),
800
- __metadata("design:type", Function),
801
- __metadata("design:paramtypes", [Function]),
802
- __metadata("design:returntype", void 0)
803
- ], Select.prototype, "createLogger", null);
804
- let selectIds = 0;
805
- function defineCustomElement$1() {
806
- if (typeof customElements === "undefined") {
807
- return;
808
- }
809
- const components = ["bal-select", "bal-checkbox", "bal-close", "bal-icon", "bal-popover", "bal-popover-content", "bal-tag"];
810
- components.forEach(tagName => { switch (tagName) {
811
- case "bal-select":
812
- if (!customElements.get(tagName)) {
813
- customElements.define(tagName, Select);
814
- }
815
- break;
816
- case "bal-checkbox":
817
- if (!customElements.get(tagName)) {
818
- defineCustomElement$7();
819
- }
820
- break;
821
- case "bal-close":
822
- if (!customElements.get(tagName)) {
823
- defineCustomElement$6();
824
- }
825
- break;
826
- case "bal-icon":
827
- if (!customElements.get(tagName)) {
828
- defineCustomElement$5();
829
- }
830
- break;
831
- case "bal-popover":
832
- if (!customElements.get(tagName)) {
833
- defineCustomElement$4();
834
- }
835
- break;
836
- case "bal-popover-content":
837
- if (!customElements.get(tagName)) {
838
- defineCustomElement$3();
839
- }
840
- break;
841
- case "bal-tag":
842
- if (!customElements.get(tagName)) {
843
- defineCustomElement$2();
844
- }
845
- break;
846
- } });
847
- }
1
+ import { S as Select, d as defineCustomElement$1 } from './bal-select2.js';
848
2
 
849
3
  const BalSelect = Select;
850
4
  const defineCustomElement = defineCustomElement$1;