@public-ui/components 4.2.0-rc.1 → 4.2.0-rc.2

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 (616) hide show
  1. package/assets/kolicons/kolicons.eot +0 -0
  2. package/assets/kolicons/kolicons.ttf +0 -0
  3. package/assets/kolicons/kolicons.woff +0 -0
  4. package/assets/kolicons/kolicons.woff2 +0 -0
  5. package/assets/kolicons/style.css +6 -6
  6. package/custom-elements.json +82 -4
  7. package/dist/cjs/{Alert-CZFEnpQp.js → Alert-CCe9pvqX.js} +1 -1
  8. package/dist/cjs/{Alert-CZFEnpQp.js.map → Alert-CCe9pvqX.js.map} +1 -1
  9. package/dist/cjs/Collapsible-CQJn_Nwz.js +4 -0
  10. package/dist/cjs/Collapsible-CQJn_Nwz.js.map +1 -0
  11. package/dist/cjs/{CustomSuggestionsOptionsGroup-BWMCVv4s.js → CustomSuggestionsOptionsGroup-BJTCyNYr.js} +1 -1
  12. package/dist/cjs/{CustomSuggestionsOptionsGroup-BWMCVv4s.js.map → CustomSuggestionsOptionsGroup-BJTCyNYr.js.map} +1 -1
  13. package/dist/cjs/FieldControlStateWrapper-C1DRtKiI.js +4 -0
  14. package/dist/cjs/FieldControlStateWrapper-C1DRtKiI.js.map +1 -0
  15. package/dist/cjs/FormFieldStateWrapper-ByL7oRBI.js +4 -0
  16. package/dist/cjs/FormFieldStateWrapper-ByL7oRBI.js.map +1 -0
  17. package/dist/cjs/{Heading-C8dFS1jN.js → Heading-C-7wIlLu.js} +1 -1
  18. package/dist/cjs/{Heading-C8dFS1jN.js.map → Heading-C-7wIlLu.js.map} +1 -1
  19. package/dist/cjs/Input-CA_3-eB9.js +4 -0
  20. package/dist/cjs/Input-CA_3-eB9.js.map +1 -0
  21. package/dist/cjs/InputStateWrapper-_iYP9BvE.js +4 -0
  22. package/dist/cjs/InputStateWrapper-_iYP9BvE.js.map +1 -0
  23. package/dist/cjs/{app-globals-Ce1YiCuB.js → app-globals-BZ_VVkwt.js} +1 -1
  24. package/dist/cjs/{app-globals-Ce1YiCuB.js.map → app-globals-BZ_VVkwt.js.map} +1 -1
  25. package/dist/cjs/{component-CY3ki2XC.js → component--8i7E4CQ.js} +1 -1
  26. package/dist/cjs/{component-CY3ki2XC.js.map → component--8i7E4CQ.js.map} +1 -1
  27. package/dist/cjs/{component-BcNeqWH3.js → component-bCqns4_n.js} +1 -1
  28. package/dist/cjs/{component-BcNeqWH3.js.map → component-bCqns4_n.js.map} +1 -1
  29. package/dist/cjs/{component-P70qtkzX.js → component-lBaUur7X.js} +1 -1
  30. package/dist/cjs/{component-P70qtkzX.js.map → component-lBaUur7X.js.map} +1 -1
  31. package/dist/cjs/{controller-C9wc4ULR.js → controller-BBKSlFz4.js} +1 -1
  32. package/dist/cjs/{controller-C9wc4ULR.js.map → controller-BBKSlFz4.js.map} +1 -1
  33. package/dist/cjs/{controller-Ih6TXnVX.js → controller-BEi7lIhs.js} +1 -1
  34. package/dist/cjs/{controller-Ih6TXnVX.js.map → controller-BEi7lIhs.js.map} +1 -1
  35. package/dist/cjs/controller-BkzakXL2.js +4 -0
  36. package/dist/cjs/controller-BkzakXL2.js.map +1 -0
  37. package/dist/cjs/{controller-CVoUmDyS.js → controller-FAlLAiN6.js} +1 -1
  38. package/dist/cjs/{controller-CVoUmDyS.js.map → controller-FAlLAiN6.js.map} +1 -1
  39. package/dist/cjs/{controller-icon-DiMYMQNu.js → controller-icon-BoWIawkU.js} +1 -1
  40. package/dist/cjs/{controller-icon-DiMYMQNu.js.map → controller-icon-BoWIawkU.js.map} +1 -1
  41. package/dist/cjs/{dev.utils-C6aqolAb.js → dev.utils-DYrlz4G7.js} +1 -1
  42. package/dist/{esm/dev.utils-Kck8qmtF.js.map → cjs/dev.utils-DYrlz4G7.js.map} +1 -1
  43. package/dist/cjs/{devtools-CV0ytaM7.js → devtools-CzVv9OkU.js} +1 -1
  44. package/dist/cjs/{devtools-CV0ytaM7.js.map → devtools-CzVv9OkU.js.map} +1 -1
  45. package/dist/cjs/{index-C24UiEit.js → index-DyCCobHQ.js} +1 -1
  46. package/dist/cjs/{index-C24UiEit.js.map → index-DyCCobHQ.js.map} +1 -1
  47. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-accordion.entry.cjs.js.map +1 -1
  50. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-badge.entry.cjs.js.map +1 -1
  55. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-card-wc.entry.cjs.js.map +1 -1
  61. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-click-button.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-combobox.entry.cjs.js.map +1 -1
  65. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-details.entry.cjs.js.map +1 -1
  67. package/dist/cjs/kol-dialog-wc.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-dialog-wc.entry.cjs.js.map +1 -1
  69. package/dist/cjs/kol-dialog.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-drawer.entry.cjs.js.map +1 -1
  72. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
  78. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-color.entry.cjs.js.map +1 -1
  80. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-date.entry.cjs.js.map +1 -1
  82. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-email.entry.cjs.js.map +1 -1
  84. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-file.entry.cjs.js.map +1 -1
  86. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input-number.entry.cjs.js.map +1 -1
  88. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-input-password.entry.cjs.js.map +1 -1
  90. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-input-radio.entry.cjs.js.map +1 -1
  92. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-input-range.entry.cjs.js.map +1 -1
  94. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-input-text.entry.cjs.js.map +1 -1
  96. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-meter.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  104. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-popover-button-wc.entry.cjs.js.map +1 -1
  108. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-select-wc.entry.cjs.js.map +1 -1
  113. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-select.entry.cjs.js.map +1 -1
  115. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-single-select.entry.cjs.js.map +1 -1
  117. package/dist/cjs/kol-skeleton.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  122. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
  128. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-toast-container.entry.cjs.js.map +1 -1
  130. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  132. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-tree-item-wc.entry.cjs.js.map +1 -1
  134. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  135. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  136. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  137. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  138. package/dist/cjs/kolibri.cjs.js +1 -1
  139. package/dist/cjs/loader.cjs.js +1 -1
  140. package/dist/cjs/test-component.cjs.entry.js +1 -1
  141. package/dist/components/Collapsible.js +1 -1
  142. package/dist/components/Collapsible.js.map +1 -1
  143. package/dist/components/FieldControlStateWrapper.js +1 -1
  144. package/dist/components/FieldControlStateWrapper.js.map +1 -1
  145. package/dist/components/Input.js +1 -1
  146. package/dist/components/Input.js.map +1 -1
  147. package/dist/components/InputStateWrapper.js +1 -1
  148. package/dist/components/InputStateWrapper.js.map +1 -1
  149. package/dist/components/controller4.js +1 -1
  150. package/dist/components/controller4.js.map +1 -1
  151. package/dist/components/controller7.js +1 -1
  152. package/dist/components/controller7.js.map +1 -1
  153. package/dist/components/dev.utils.js +1 -1
  154. package/dist/components/dev.utils.js.map +1 -1
  155. package/dist/components/kol-abbr.js +1 -1
  156. package/dist/components/kol-accordion.js +1 -1
  157. package/dist/components/kol-accordion.js.map +1 -1
  158. package/dist/components/kol-alert.js +1 -1
  159. package/dist/components/kol-badge.js +1 -1
  160. package/dist/components/kol-badge.js.map +1 -1
  161. package/dist/components/kol-breadcrumb.js +1 -1
  162. package/dist/components/kol-button-link.js +1 -1
  163. package/dist/components/kol-button.js +1 -1
  164. package/dist/components/kol-card-wc.js +1 -1
  165. package/dist/components/kol-card-wc.js.map +1 -1
  166. package/dist/components/kol-card.js +1 -1
  167. package/dist/components/kol-combobox.js +1 -1
  168. package/dist/components/kol-combobox.js.map +1 -1
  169. package/dist/components/kol-details.js +1 -1
  170. package/dist/components/kol-details.js.map +1 -1
  171. package/dist/components/kol-dialog-wc.js +1 -1
  172. package/dist/components/kol-dialog-wc.js.map +1 -1
  173. package/dist/components/kol-dialog.js +1 -1
  174. package/dist/components/kol-drawer.js +1 -1
  175. package/dist/components/kol-drawer.js.map +1 -1
  176. package/dist/components/kol-form.js +1 -1
  177. package/dist/components/kol-icon.js +1 -1
  178. package/dist/components/kol-input-checkbox.js +1 -1
  179. package/dist/components/kol-input-checkbox.js.map +1 -1
  180. package/dist/components/kol-input-color.js +1 -1
  181. package/dist/components/kol-input-color.js.map +1 -1
  182. package/dist/components/kol-input-date.js +1 -1
  183. package/dist/components/kol-input-date.js.map +1 -1
  184. package/dist/components/kol-input-email.js +1 -1
  185. package/dist/components/kol-input-email.js.map +1 -1
  186. package/dist/components/kol-input-file.js +1 -1
  187. package/dist/components/kol-input-file.js.map +1 -1
  188. package/dist/components/kol-input-number.js +1 -1
  189. package/dist/components/kol-input-number.js.map +1 -1
  190. package/dist/components/kol-input-password.js +1 -1
  191. package/dist/components/kol-input-password.js.map +1 -1
  192. package/dist/components/kol-input-radio.js +1 -1
  193. package/dist/components/kol-input-radio.js.map +1 -1
  194. package/dist/components/kol-input-range.js +1 -1
  195. package/dist/components/kol-input-range.js.map +1 -1
  196. package/dist/components/kol-input-text.js +1 -1
  197. package/dist/components/kol-input-text.js.map +1 -1
  198. package/dist/components/kol-link-button.js +1 -1
  199. package/dist/components/kol-link.js +1 -1
  200. package/dist/components/kol-modal.js +1 -1
  201. package/dist/components/kol-nav.js +1 -1
  202. package/dist/components/kol-nav.js.map +1 -1
  203. package/dist/components/kol-pagination.js +1 -1
  204. package/dist/components/kol-popover-button-wc.js +1 -1
  205. package/dist/components/kol-popover-button-wc.js.map +1 -1
  206. package/dist/components/kol-popover-button.js +1 -1
  207. package/dist/components/kol-select-wc.js +1 -1
  208. package/dist/components/kol-select-wc.js.map +1 -1
  209. package/dist/components/kol-select.js +1 -1
  210. package/dist/components/kol-select.js.map +1 -1
  211. package/dist/components/kol-single-select.js +1 -1
  212. package/dist/components/kol-single-select.js.map +1 -1
  213. package/dist/components/kol-skip-nav.js +1 -1
  214. package/dist/components/kol-split-button.js +1 -1
  215. package/dist/components/kol-table-stateful.js +1 -1
  216. package/dist/components/kol-table-stateless.js +1 -1
  217. package/dist/components/kol-tabs.js +1 -1
  218. package/dist/components/kol-textarea.js +1 -1
  219. package/dist/components/kol-textarea.js.map +1 -1
  220. package/dist/components/kol-toast-container.js +1 -1
  221. package/dist/components/kol-toast-container.js.map +1 -1
  222. package/dist/components/kol-toolbar.js +1 -1
  223. package/dist/components/kol-tree-item-wc.js +1 -1
  224. package/dist/components/kol-tree-item-wc.js.map +1 -1
  225. package/dist/components/kol-tree-item.js +1 -1
  226. package/dist/esm/{Alert-B7pICBxZ.js → Alert-CBfalBKc.js} +1 -1
  227. package/dist/esm/{Alert-B7pICBxZ.js.map → Alert-CBfalBKc.js.map} +1 -1
  228. package/dist/esm/Collapsible-SP4og2Wc.js +4 -0
  229. package/dist/esm/Collapsible-SP4og2Wc.js.map +1 -0
  230. package/dist/esm/{CustomSuggestionsOptionsGroup-CA44Wflr.js → CustomSuggestionsOptionsGroup-B6wXJlus.js} +1 -1
  231. package/dist/esm/{CustomSuggestionsOptionsGroup-CA44Wflr.js.map → CustomSuggestionsOptionsGroup-B6wXJlus.js.map} +1 -1
  232. package/dist/esm/FieldControlStateWrapper-jOEU9Coh.js +4 -0
  233. package/dist/esm/FieldControlStateWrapper-jOEU9Coh.js.map +1 -0
  234. package/dist/esm/FormFieldStateWrapper-BqmPPhZi.js +4 -0
  235. package/dist/esm/FormFieldStateWrapper-BqmPPhZi.js.map +1 -0
  236. package/dist/esm/{Heading-DnMesNNl.js → Heading-r-gS-c4n.js} +1 -1
  237. package/dist/{kolibri/Heading-DnMesNNl.js.map → esm/Heading-r-gS-c4n.js.map} +1 -1
  238. package/dist/esm/Input-eVFnypVp.js +4 -0
  239. package/dist/esm/Input-eVFnypVp.js.map +1 -0
  240. package/dist/esm/InputStateWrapper-B46Lksm_.js +4 -0
  241. package/dist/esm/InputStateWrapper-B46Lksm_.js.map +1 -0
  242. package/dist/esm/{app-globals-CQn3EaNv.js → app-globals-Dahy0ECI.js} +1 -1
  243. package/dist/esm/{app-globals-CQn3EaNv.js.map → app-globals-Dahy0ECI.js.map} +1 -1
  244. package/dist/esm/{component-DXb4lDOy.js → component-B1PVR7eV.js} +1 -1
  245. package/dist/esm/{component-DXb4lDOy.js.map → component-B1PVR7eV.js.map} +1 -1
  246. package/dist/esm/{component-DwXtbDH3.js → component-DwmUGvyq.js} +1 -1
  247. package/dist/esm/{component-DwXtbDH3.js.map → component-DwmUGvyq.js.map} +1 -1
  248. package/dist/esm/component-vV-KhMHx.js +4 -0
  249. package/dist/esm/{component-BicG3I3R.js.map → component-vV-KhMHx.js.map} +1 -1
  250. package/dist/esm/{controller-D4x9c0xc.js → controller-7g2YUwGs.js} +1 -1
  251. package/dist/{kolibri/controller-D4x9c0xc.js.map → esm/controller-7g2YUwGs.js.map} +1 -1
  252. package/dist/esm/controller-DD94BGwW.js +4 -0
  253. package/dist/esm/controller-DD94BGwW.js.map +1 -0
  254. package/dist/esm/controller-DIApwfoP.js +4 -0
  255. package/dist/esm/{controller-Dx0Oz1O1.js.map → controller-DIApwfoP.js.map} +1 -1
  256. package/dist/esm/{controller-DvDdCbct.js → controller-DYOg9QJk.js} +1 -1
  257. package/dist/esm/{controller-DvDdCbct.js.map → controller-DYOg9QJk.js.map} +1 -1
  258. package/dist/esm/{controller-icon-B9ROZI82.js → controller-icon-CakLg0RB.js} +1 -1
  259. package/dist/esm/{controller-icon-B9ROZI82.js.map → controller-icon-CakLg0RB.js.map} +1 -1
  260. package/dist/esm/{dev.utils-Kck8qmtF.js → dev.utils-DhW8_Z_C.js} +1 -1
  261. package/dist/esm/dev.utils-DhW8_Z_C.js.map +1 -0
  262. package/dist/esm/{devtools-CI9oUhkv.js → devtools-CR7g9ZGj.js} +1 -1
  263. package/dist/{kolibri/devtools-CI9oUhkv.js.map → esm/devtools-CR7g9ZGj.js.map} +1 -1
  264. package/dist/esm/{index-CDDnZoJp.js → index-N6JGlBHl.js} +1 -1
  265. package/dist/{kolibri/index-CDDnZoJp.js.map → esm/index-N6JGlBHl.js.map} +1 -1
  266. package/dist/esm/kol-abbr.entry.js +1 -1
  267. package/dist/esm/kol-accordion.entry.js +1 -1
  268. package/dist/esm/kol-accordion.entry.js.map +1 -1
  269. package/dist/esm/kol-alert-wc.entry.js +1 -1
  270. package/dist/esm/kol-alert.entry.js +1 -1
  271. package/dist/esm/kol-avatar.entry.js +1 -1
  272. package/dist/esm/kol-badge.entry.js +1 -1
  273. package/dist/esm/kol-badge.entry.js.map +1 -1
  274. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  275. package/dist/esm/kol-button-link.entry.js +1 -1
  276. package/dist/esm/kol-button-wc.entry.js +1 -1
  277. package/dist/esm/kol-button.entry.js +1 -1
  278. package/dist/esm/kol-card-wc.entry.js +1 -1
  279. package/dist/esm/kol-card-wc.entry.js.map +1 -1
  280. package/dist/esm/kol-card.entry.js +1 -1
  281. package/dist/esm/kol-click-button.entry.js +1 -1
  282. package/dist/esm/kol-combobox.entry.js +1 -1
  283. package/dist/esm/kol-combobox.entry.js.map +1 -1
  284. package/dist/esm/kol-details.entry.js +1 -1
  285. package/dist/esm/kol-details.entry.js.map +1 -1
  286. package/dist/esm/kol-dialog-wc.entry.js +1 -1
  287. package/dist/esm/kol-dialog-wc.entry.js.map +1 -1
  288. package/dist/esm/kol-dialog.entry.js +1 -1
  289. package/dist/esm/kol-drawer.entry.js +1 -1
  290. package/dist/esm/kol-drawer.entry.js.map +1 -1
  291. package/dist/esm/kol-form.entry.js +1 -1
  292. package/dist/esm/kol-heading.entry.js +1 -1
  293. package/dist/esm/kol-icon.entry.js +1 -1
  294. package/dist/esm/kol-image.entry.js +1 -1
  295. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  296. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  297. package/dist/esm/kol-input-color.entry.js +1 -1
  298. package/dist/esm/kol-input-color.entry.js.map +1 -1
  299. package/dist/esm/kol-input-date.entry.js +1 -1
  300. package/dist/esm/kol-input-date.entry.js.map +1 -1
  301. package/dist/esm/kol-input-email.entry.js +1 -1
  302. package/dist/esm/kol-input-email.entry.js.map +1 -1
  303. package/dist/esm/kol-input-file.entry.js +1 -1
  304. package/dist/esm/kol-input-file.entry.js.map +1 -1
  305. package/dist/esm/kol-input-number.entry.js +1 -1
  306. package/dist/esm/kol-input-number.entry.js.map +1 -1
  307. package/dist/esm/kol-input-password.entry.js +1 -1
  308. package/dist/esm/kol-input-password.entry.js.map +1 -1
  309. package/dist/esm/kol-input-radio.entry.js +1 -1
  310. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  311. package/dist/esm/kol-input-range.entry.js +1 -1
  312. package/dist/esm/kol-input-range.entry.js.map +1 -1
  313. package/dist/esm/kol-input-text.entry.js +1 -1
  314. package/dist/esm/kol-input-text.entry.js.map +1 -1
  315. package/dist/esm/kol-kolibri.entry.js +1 -1
  316. package/dist/esm/kol-link-button.entry.js +1 -1
  317. package/dist/esm/kol-link-wc.entry.js +1 -1
  318. package/dist/esm/kol-link.entry.js +1 -1
  319. package/dist/esm/kol-meter.entry.js +1 -1
  320. package/dist/esm/kol-modal.entry.js +1 -1
  321. package/dist/esm/kol-nav.entry.js +1 -1
  322. package/dist/esm/kol-nav.entry.js.map +1 -1
  323. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  324. package/dist/esm/kol-pagination.entry.js +1 -1
  325. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  326. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  327. package/dist/esm/kol-popover-button.entry.js +1 -1
  328. package/dist/esm/kol-progress.entry.js +1 -1
  329. package/dist/esm/kol-quote.entry.js +1 -1
  330. package/dist/esm/kol-select-wc.entry.js +1 -1
  331. package/dist/esm/kol-select-wc.entry.js.map +1 -1
  332. package/dist/esm/kol-select.entry.js +1 -1
  333. package/dist/esm/kol-select.entry.js.map +1 -1
  334. package/dist/esm/kol-single-select.entry.js +1 -1
  335. package/dist/esm/kol-single-select.entry.js.map +1 -1
  336. package/dist/esm/kol-skeleton.entry.js +1 -1
  337. package/dist/esm/kol-skip-nav.entry.js +1 -1
  338. package/dist/esm/kol-spin.entry.js +1 -1
  339. package/dist/esm/kol-split-button.entry.js +1 -1
  340. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  341. package/dist/esm/kol-table-stateful.entry.js +1 -1
  342. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  343. package/dist/esm/kol-table-stateless.entry.js +1 -1
  344. package/dist/esm/kol-tabs.entry.js +1 -1
  345. package/dist/esm/kol-textarea.entry.js +1 -1
  346. package/dist/esm/kol-textarea.entry.js.map +1 -1
  347. package/dist/esm/kol-toast-container.entry.js +1 -1
  348. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  349. package/dist/esm/kol-toolbar.entry.js +1 -1
  350. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  351. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  352. package/dist/esm/kol-tree-item-wc.entry.js.map +1 -1
  353. package/dist/esm/kol-tree-item.entry.js +1 -1
  354. package/dist/esm/kol-tree-wc.entry.js +1 -1
  355. package/dist/esm/kol-tree.entry.js +1 -1
  356. package/dist/esm/kol-version.entry.js +1 -1
  357. package/dist/esm/kolibri.js +1 -1
  358. package/dist/esm/loader.js +1 -1
  359. package/dist/esm/test-component.entry.js +1 -1
  360. package/dist/kolibri/{Alert-B7pICBxZ.js → Alert-CBfalBKc.js} +1 -1
  361. package/dist/kolibri/{Alert-B7pICBxZ.js.map → Alert-CBfalBKc.js.map} +1 -1
  362. package/dist/kolibri/Collapsible-SP4og2Wc.js +4 -0
  363. package/dist/kolibri/Collapsible-SP4og2Wc.js.map +1 -0
  364. package/dist/kolibri/CustomSuggestionsOptionsGroup-B6wXJlus.js +4 -0
  365. package/dist/kolibri/{CustomSuggestionsOptionsGroup-CA44Wflr.js.map → CustomSuggestionsOptionsGroup-B6wXJlus.js.map} +1 -1
  366. package/dist/kolibri/FieldControlStateWrapper-jOEU9Coh.js +4 -0
  367. package/dist/kolibri/FieldControlStateWrapper-jOEU9Coh.js.map +1 -0
  368. package/dist/kolibri/FormFieldStateWrapper-BqmPPhZi.js +4 -0
  369. package/dist/kolibri/FormFieldStateWrapper-BqmPPhZi.js.map +1 -0
  370. package/dist/kolibri/{Heading-DnMesNNl.js → Heading-r-gS-c4n.js} +1 -1
  371. package/dist/{esm/Heading-DnMesNNl.js.map → kolibri/Heading-r-gS-c4n.js.map} +1 -1
  372. package/dist/kolibri/Input-eVFnypVp.js +4 -0
  373. package/dist/kolibri/Input-eVFnypVp.js.map +1 -0
  374. package/dist/kolibri/InputStateWrapper-B46Lksm_.js +4 -0
  375. package/dist/kolibri/InputStateWrapper-B46Lksm_.js.map +1 -0
  376. package/dist/kolibri/{app-globals-CQn3EaNv.js → app-globals-Dahy0ECI.js} +1 -1
  377. package/dist/kolibri/{app-globals-CQn3EaNv.js.map → app-globals-Dahy0ECI.js.map} +1 -1
  378. package/dist/kolibri/component-B1PVR7eV.js +4 -0
  379. package/dist/kolibri/{component-DXb4lDOy.js.map → component-B1PVR7eV.js.map} +1 -1
  380. package/dist/kolibri/{component-DwXtbDH3.js → component-DwmUGvyq.js} +1 -1
  381. package/dist/kolibri/{component-DwXtbDH3.js.map → component-DwmUGvyq.js.map} +1 -1
  382. package/dist/kolibri/component-vV-KhMHx.js +4 -0
  383. package/dist/kolibri/{component-BicG3I3R.js.map → component-vV-KhMHx.js.map} +1 -1
  384. package/dist/kolibri/{controller-D4x9c0xc.js → controller-7g2YUwGs.js} +1 -1
  385. package/dist/{esm/controller-D4x9c0xc.js.map → kolibri/controller-7g2YUwGs.js.map} +1 -1
  386. package/dist/kolibri/controller-DD94BGwW.js +4 -0
  387. package/dist/kolibri/controller-DD94BGwW.js.map +1 -0
  388. package/dist/kolibri/{controller-Dx0Oz1O1.js → controller-DIApwfoP.js} +1 -1
  389. package/dist/kolibri/{controller-Dx0Oz1O1.js.map → controller-DIApwfoP.js.map} +1 -1
  390. package/dist/kolibri/{controller-DvDdCbct.js → controller-DYOg9QJk.js} +1 -1
  391. package/dist/kolibri/{controller-DvDdCbct.js.map → controller-DYOg9QJk.js.map} +1 -1
  392. package/dist/kolibri/{controller-icon-B9ROZI82.js → controller-icon-CakLg0RB.js} +1 -1
  393. package/dist/kolibri/{controller-icon-B9ROZI82.js.map → controller-icon-CakLg0RB.js.map} +1 -1
  394. package/dist/kolibri/dev.utils-DhW8_Z_C.js +4 -0
  395. package/dist/kolibri/dev.utils-DhW8_Z_C.js.map +1 -0
  396. package/dist/kolibri/{devtools-CI9oUhkv.js → devtools-CR7g9ZGj.js} +1 -1
  397. package/dist/{esm/devtools-CI9oUhkv.js.map → kolibri/devtools-CR7g9ZGj.js.map} +1 -1
  398. package/dist/kolibri/{index-CDDnZoJp.js → index-N6JGlBHl.js} +1 -1
  399. package/dist/{esm/index-CDDnZoJp.js.map → kolibri/index-N6JGlBHl.js.map} +1 -1
  400. package/dist/kolibri/kol-abbr.entry.js +1 -1
  401. package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
  402. package/dist/kolibri/kol-accordion.entry.js +1 -1
  403. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  404. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  405. package/dist/kolibri/kol-alert.entry.js +1 -1
  406. package/dist/kolibri/kol-avatar.entry.js +1 -1
  407. package/dist/kolibri/kol-badge.entry.esm.js.map +1 -1
  408. package/dist/kolibri/kol-badge.entry.js +1 -1
  409. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  410. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  411. package/dist/kolibri/kol-button-link.entry.js +1 -1
  412. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  413. package/dist/kolibri/kol-button.entry.js +1 -1
  414. package/dist/kolibri/kol-card-wc.entry.esm.js.map +1 -1
  415. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  416. package/dist/kolibri/kol-card-wc.entry.js.map +1 -1
  417. package/dist/kolibri/kol-card.entry.js +1 -1
  418. package/dist/kolibri/kol-click-button.entry.js +1 -1
  419. package/dist/kolibri/kol-combobox.entry.esm.js.map +1 -1
  420. package/dist/kolibri/kol-combobox.entry.js +1 -1
  421. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  422. package/dist/kolibri/kol-details.entry.esm.js.map +1 -1
  423. package/dist/kolibri/kol-details.entry.js +1 -1
  424. package/dist/kolibri/kol-details.entry.js.map +1 -1
  425. package/dist/kolibri/kol-dialog-wc.entry.esm.js.map +1 -1
  426. package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
  427. package/dist/kolibri/kol-dialog-wc.entry.js.map +1 -1
  428. package/dist/kolibri/kol-dialog.entry.js +1 -1
  429. package/dist/kolibri/kol-drawer.entry.esm.js.map +1 -1
  430. package/dist/kolibri/kol-drawer.entry.js +1 -1
  431. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  432. package/dist/kolibri/kol-form.entry.js +1 -1
  433. package/dist/kolibri/kol-heading.entry.js +1 -1
  434. package/dist/kolibri/kol-icon.entry.js +1 -1
  435. package/dist/kolibri/kol-image.entry.js +1 -1
  436. package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
  437. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  438. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  439. package/dist/kolibri/kol-input-color.entry.esm.js.map +1 -1
  440. package/dist/kolibri/kol-input-color.entry.js +1 -1
  441. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  442. package/dist/kolibri/kol-input-date.entry.esm.js.map +1 -1
  443. package/dist/kolibri/kol-input-date.entry.js +1 -1
  444. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  445. package/dist/kolibri/kol-input-email.entry.esm.js.map +1 -1
  446. package/dist/kolibri/kol-input-email.entry.js +1 -1
  447. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  448. package/dist/kolibri/kol-input-file.entry.esm.js.map +1 -1
  449. package/dist/kolibri/kol-input-file.entry.js +1 -1
  450. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  451. package/dist/kolibri/kol-input-number.entry.esm.js.map +1 -1
  452. package/dist/kolibri/kol-input-number.entry.js +1 -1
  453. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  454. package/dist/kolibri/kol-input-password.entry.esm.js.map +1 -1
  455. package/dist/kolibri/kol-input-password.entry.js +1 -1
  456. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  457. package/dist/kolibri/kol-input-radio.entry.esm.js.map +1 -1
  458. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  459. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  460. package/dist/kolibri/kol-input-range.entry.esm.js.map +1 -1
  461. package/dist/kolibri/kol-input-range.entry.js +1 -1
  462. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  463. package/dist/kolibri/kol-input-text.entry.esm.js.map +1 -1
  464. package/dist/kolibri/kol-input-text.entry.js +1 -1
  465. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  466. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  467. package/dist/kolibri/kol-link-button.entry.js +1 -1
  468. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  469. package/dist/kolibri/kol-link.entry.js +1 -1
  470. package/dist/kolibri/kol-meter.entry.js +1 -1
  471. package/dist/kolibri/kol-modal.entry.js +1 -1
  472. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  473. package/dist/kolibri/kol-nav.entry.js +1 -1
  474. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  475. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  476. package/dist/kolibri/kol-pagination.entry.js +1 -1
  477. package/dist/kolibri/kol-popover-button-wc.entry.esm.js.map +1 -1
  478. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  479. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  480. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  481. package/dist/kolibri/kol-progress.entry.js +1 -1
  482. package/dist/kolibri/kol-quote.entry.js +1 -1
  483. package/dist/kolibri/kol-select-wc.entry.esm.js.map +1 -1
  484. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  485. package/dist/kolibri/kol-select-wc.entry.js.map +1 -1
  486. package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
  487. package/dist/kolibri/kol-select.entry.js +1 -1
  488. package/dist/kolibri/kol-select.entry.js.map +1 -1
  489. package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
  490. package/dist/kolibri/kol-single-select.entry.js +1 -1
  491. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  492. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  493. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  494. package/dist/kolibri/kol-spin.entry.js +1 -1
  495. package/dist/kolibri/kol-split-button.entry.js +1 -1
  496. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  497. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  498. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  499. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  500. package/dist/kolibri/kol-tabs.entry.js +1 -1
  501. package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
  502. package/dist/kolibri/kol-textarea.entry.js +1 -1
  503. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  504. package/dist/kolibri/kol-toast-container.entry.esm.js.map +1 -1
  505. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  506. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  507. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  508. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  509. package/dist/kolibri/kol-tree-item-wc.entry.esm.js.map +1 -1
  510. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  511. package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
  512. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  513. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  514. package/dist/kolibri/kol-tree.entry.js +1 -1
  515. package/dist/kolibri/kol-version.entry.js +1 -1
  516. package/dist/kolibri/kolibri.esm.js +1 -1
  517. package/dist/kolibri/test-component.entry.js +1 -1
  518. package/dist/types/components/@deprecated/input/controller.d.ts +2 -1
  519. package/dist/types/components/@deprecated/input/types.d.ts +2 -2
  520. package/dist/types/components/accordion/shadow.d.ts +1 -1
  521. package/dist/types/components/combobox/shadow.d.ts +3 -1
  522. package/dist/types/components/details/shadow.d.ts +1 -1
  523. package/dist/types/components/input-color/shadow.d.ts +3 -1
  524. package/dist/types/components/input-date/shadow.d.ts +3 -1
  525. package/dist/types/components/input-email/shadow.d.ts +3 -1
  526. package/dist/types/components/input-file/shadow.d.ts +3 -1
  527. package/dist/types/components/input-number/shadow.d.ts +3 -1
  528. package/dist/types/components/input-password/controller.d.ts +4 -3
  529. package/dist/types/components/input-password/shadow.d.ts +5 -4
  530. package/dist/types/components/input-radio/shadow.d.ts +3 -1
  531. package/dist/types/components/input-range/shadow.d.ts +3 -1
  532. package/dist/types/components/input-text/shadow.d.ts +3 -1
  533. package/dist/types/components/select/component.d.ts +3 -1
  534. package/dist/types/components/select/shadow.d.ts +2 -1
  535. package/dist/types/components/single-select/shadow.d.ts +3 -1
  536. package/dist/types/components/textarea/shadow.d.ts +3 -1
  537. package/dist/types/components/tree-item/shadow.d.ts +1 -1
  538. package/dist/types/components.d.ts +121 -11
  539. package/dist/types/e2e/utils/setContentWithRetry.d.ts +3 -0
  540. package/dist/types/functional-components/FormField/FormField.d.ts +2 -1
  541. package/dist/types/schema/components/combobox.d.ts +3 -3
  542. package/dist/types/schema/components/input-color.d.ts +3 -3
  543. package/dist/types/schema/components/input-date.d.ts +3 -3
  544. package/dist/types/schema/components/input-email.d.ts +3 -3
  545. package/dist/types/schema/components/input-file.d.ts +3 -3
  546. package/dist/types/schema/components/input-number.d.ts +3 -3
  547. package/dist/types/schema/components/input-password.d.ts +4 -4
  548. package/dist/types/schema/components/input-radio.d.ts +3 -3
  549. package/dist/types/schema/components/input-range.d.ts +3 -3
  550. package/dist/types/schema/components/input-text.d.ts +3 -3
  551. package/dist/types/schema/components/select.d.ts +3 -3
  552. package/dist/types/schema/components/single-select.d.ts +3 -3
  553. package/dist/types/schema/components/textarea.d.ts +3 -3
  554. package/dist/types/schema/props/index.d.ts +1 -1
  555. package/dist/types/schema/props/visibility-toggle.d.ts +7 -0
  556. package/dist/types/utils/dev.utils.d.ts +2 -0
  557. package/doc/combobox.md +1 -0
  558. package/doc/input-color.md +1 -0
  559. package/doc/input-date.md +1 -0
  560. package/doc/input-email.md +1 -0
  561. package/doc/input-file.md +1 -0
  562. package/doc/input-number.md +1 -0
  563. package/doc/input-password.md +2 -1
  564. package/doc/input-radio.md +1 -0
  565. package/doc/input-range.md +1 -0
  566. package/doc/input-text.md +1 -0
  567. package/doc/select.md +1 -0
  568. package/doc/single-select.md +1 -0
  569. package/doc/textarea.md +1 -0
  570. package/doc/tree-item.md +2 -2
  571. package/package.json +5 -5
  572. package/vscode-custom-data.json +53 -9
  573. package/dist/cjs/Collapsible-CTW9lwpr.js +0 -4
  574. package/dist/cjs/Collapsible-CTW9lwpr.js.map +0 -1
  575. package/dist/cjs/FieldControlStateWrapper-DbXc2aZ3.js +0 -4
  576. package/dist/cjs/FieldControlStateWrapper-DbXc2aZ3.js.map +0 -1
  577. package/dist/cjs/FormFieldStateWrapper-D7N3J8IX.js +0 -4
  578. package/dist/cjs/FormFieldStateWrapper-D7N3J8IX.js.map +0 -1
  579. package/dist/cjs/Input-BxRbkUZf.js +0 -4
  580. package/dist/cjs/Input-BxRbkUZf.js.map +0 -1
  581. package/dist/cjs/InputStateWrapper-B5FiQrcG.js +0 -4
  582. package/dist/cjs/InputStateWrapper-B5FiQrcG.js.map +0 -1
  583. package/dist/cjs/controller-BtlC4sIj.js +0 -4
  584. package/dist/cjs/controller-BtlC4sIj.js.map +0 -1
  585. package/dist/cjs/dev.utils-C6aqolAb.js.map +0 -1
  586. package/dist/esm/Collapsible-BGo9N7tx.js +0 -4
  587. package/dist/esm/Collapsible-BGo9N7tx.js.map +0 -1
  588. package/dist/esm/FieldControlStateWrapper-XvIryGas.js +0 -4
  589. package/dist/esm/FieldControlStateWrapper-XvIryGas.js.map +0 -1
  590. package/dist/esm/FormFieldStateWrapper-205M-gUl.js +0 -4
  591. package/dist/esm/FormFieldStateWrapper-205M-gUl.js.map +0 -1
  592. package/dist/esm/Input-CN9ebZK8.js +0 -4
  593. package/dist/esm/Input-CN9ebZK8.js.map +0 -1
  594. package/dist/esm/InputStateWrapper-E_UT1PcG.js +0 -4
  595. package/dist/esm/InputStateWrapper-E_UT1PcG.js.map +0 -1
  596. package/dist/esm/component-BicG3I3R.js +0 -4
  597. package/dist/esm/controller-BGIZRLE7.js +0 -4
  598. package/dist/esm/controller-BGIZRLE7.js.map +0 -1
  599. package/dist/esm/controller-Dx0Oz1O1.js +0 -4
  600. package/dist/kolibri/Collapsible-BGo9N7tx.js +0 -4
  601. package/dist/kolibri/Collapsible-BGo9N7tx.js.map +0 -1
  602. package/dist/kolibri/CustomSuggestionsOptionsGroup-CA44Wflr.js +0 -4
  603. package/dist/kolibri/FieldControlStateWrapper-XvIryGas.js +0 -4
  604. package/dist/kolibri/FieldControlStateWrapper-XvIryGas.js.map +0 -1
  605. package/dist/kolibri/FormFieldStateWrapper-205M-gUl.js +0 -4
  606. package/dist/kolibri/FormFieldStateWrapper-205M-gUl.js.map +0 -1
  607. package/dist/kolibri/Input-CN9ebZK8.js +0 -4
  608. package/dist/kolibri/Input-CN9ebZK8.js.map +0 -1
  609. package/dist/kolibri/InputStateWrapper-E_UT1PcG.js +0 -4
  610. package/dist/kolibri/InputStateWrapper-E_UT1PcG.js.map +0 -1
  611. package/dist/kolibri/component-BicG3I3R.js +0 -4
  612. package/dist/kolibri/component-DXb4lDOy.js +0 -4
  613. package/dist/kolibri/controller-BGIZRLE7.js +0 -4
  614. package/dist/kolibri/controller-BGIZRLE7.js.map +0 -1
  615. package/dist/kolibri/dev.utils-Kck8qmtF.js +0 -4
  616. package/dist/kolibri/dev.utils-Kck8qmtF.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-C24UiEit.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),common=require("./common-DPb6NWR4.js"),tableSelection=require("./table-selection-B0zvrQJg.js"),label=require("./label-8vcJJEVI.js"),keyboard=require("./keyboard-BfFtSnNy.js"),events=require("./events-Jc2wxPjR.js");require("./i18n-CgUN6lev.js");const validateAllowMultiSort=(n,t,e={})=>{common.watchBoolean(n,"_allowMultiSort",t,Object.assign({defaultValue:!1},e))},paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(n,t)=>{common.watchValidator(n,"_paginationPosition",n=>"string"==typeof n&&paginationPositionPropTypeOptions.includes(n),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),t,{defaultValue:"bottom"})},defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779456138767"); /* IE9*/\n src: url("kolicons.eot?t=1779456138767#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779456138767") format("woff2"), url("kolicons.woff?t=1779456138767") format("woff"), url("kolicons.ttf?t=1779456138767") format("truetype"), url("kolicons.svg?t=1779456138767#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid black;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: white;\n display: flex;\n position: relative;\n min-width: calc(var(--a11y-min-size) / 2);\n min-height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: black;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n padding: 0;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n container: paging/inline-size;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-pagination__page-size-select .kol-form-field-select {\n align-items: center;\n grid-template-columns: 1fr max-content;\n }\n @container paging (width < 600px) {\n .kol-pagination:has(.kol-pagination__button--first) li:has(.kol-pagination__button--numbers),\n .kol-pagination:has(.kol-pagination__button--first) li:has(.kol-pagination__separator) {\n display: none;\n }\n }\n}',PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=n=>!0===n||""===n||"object"==typeof n&&null!==n,KolTableStateful=class{constructor(n){index.registerInstance(this,n),this.catchRef=n=>{this.tableWcRef=n},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:t})),common.setState(this,"_pageSize",t)}},this.onSelectionChange=n=>{n.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void common.setState(this,"_sortedData",this.state._data);const n=[...this.state._data];this.sortData.length>0&&n.sort((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(n,t,i.direction);if(0!==o)return"ASC"===i.direction?o:-o}return 0}),common.setState(this,"_sortedData",n)}}validateAllowMultiSort(n){validateAllowMultiSort(this,n,{defaultValue:!1})}validateData(n){tableSelection.validateTableData(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){tableSelection.validateTableDataFoot(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){tableSelection.validateFixedCols(this,n)}validatePaginationPosition(n){validatePaginationPosition(this,n)}validateHasSettingsMenu(n){tableSelection.validateHasSettingsMenu(this,n)}changeCellSort(n){var t;if(void 0===n.type||"default"===n.type){if("function"!=typeof n.compareFn)return;this.state._allowMultiSort||n.key===(null===(t=this.sortData[0])||void 0===t?void 0:t.key)||(this.sortData=[]);const e=this.sortData.findIndex(t=>t.key===n.key);if(e>=0){const n=this.sortData[e];switch(n.direction){case"ASC":n.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:n.direction="ASC"}}else n.key&&this.sortData.push({label:n.label,key:n.key,compareFn:n.compareFn,direction:"ASC"});this.updateSortedData()}}initializeSortFromHeaders(n){var t,e;let i=!1;const o=n=>{this.sortData=[],n.forEach(n=>{if(void 0!==n.type&&"default"!==n.type)return;if("function"==typeof n.compareFn&&!n.key)return void common.devHint("[KolTableStateful] A sortable column requires the 'key' property.");const t=n.key;if(!t)return;const e=n.sortDirection;"ASC"!==e&&"DESC"!==e||"function"==typeof n.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:n.label,key:t,compareFn:n.compareFn,direction:e}),i=!0)})};return null===(t=n.horizontal)||void 0===t||t.forEach(o),null===(e=n.vertical)||void 0===e||e.forEach(o),i}validateHeaders(n){common.emptyStringByArrayHandler(n,()=>{common.objectObjectHandler(n,()=>{try{n=common.parseJson(n)}catch(n){}common.watchValidator(this,"_headers",n=>"object"==typeof n&&null!==n,new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e;const i=n;this.initializeSortFromHeaders(i)&&setTimeout(()=>this.updateSortedData()),i.horizontal&&i.vertical&&(null===(t=i.horizontal)||void 0===t?void 0:t.length)>0&&(null===(e=i.vertical)||void 0===e?void 0:e.length)>0&&(this.disableSort=!0,common.devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})})})}validateLabel(n){label.validateLabel(this,n,{required:!0})}validateSelection(n){tableSelection.validateTableSelection(this,n)}validateOn(n){tableSelection.validateTableStatefulCallbacks(this,n)}validatePagination(n){try{n=common.parseJson(n)}catch(n){}this.showPagination=paginationValidator(n),common.watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;null===(n=this.tableWcRef)||void 0===n||n.addEventListener(events.KolEvent.selectionChange,this.onSelectionChange)}disconnectedCallback(){var n;null===(n=this.tableWcRef)||void 0===n||n.removeEventListener(events.KolEvent.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateFixedCols(this._fixedCols),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(n,t,e){return"number"==typeof t&&t>0&&"number"==typeof e&&e>0?(this.pageStartSlice=t*(e-1),this.pageEndSlice=t*e>n.length?n.length:t*e,n.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=n.length,n)}renderPagination(n){const t=i18n.translate("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${i18n.translate(`kol-pagination-position-${n}`)})`}});return index.h("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},index.h("div",{class:"kol-table-stateful__pagination-wrapper"},index.h(componentNames.KolPaginationWcTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_hasButtons:this.state._pagination._hasButtons,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._data.length,_label:t})))}getHeaderCellSortState(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&"function"==typeof n.compareFn){if(n.key){const t=this.sortData.find(t=>t.key===n.key);if(null==t?void 0:t.direction)return t.direction}return"NOS"}}getHeaderCellSortOrder(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&this.state._allowMultiSort&&"function"==typeof n.compareFn&&n.key){const t=this.sortData.findIndex(t=>t.key===n.key);if(t>=0)return t+1}}handleSort({key:n}){var t,e;const i=null!==(t=this.state._headers.horizontal)&&void 0!==t?t:[],o=null!==(e=this.state._headers.vertical)&&void 0!==e?e:[],a=[];for(const n of i)Array.isArray(n)&&a.push(...n);for(const n of o)Array.isArray(n)&&a.push(...n);const l=a.find(t=>t.key===n);l&&this.changeCellSort(l)}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=null!==(t=e.keyPropertyName)&&void 0!==t?t:"id",o=new Set(n.map(String)),a=this.state._sortedData.filter(n=>o.has(String(n[i])));if(i)return a}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})}));const o=this.getSelectedData(t);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[keyboard.Callback.onSelectionChange])&&this.state._on[keyboard.Callback.onSelectionChange](n,o),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.selectionChange,o)}async getSelection(){var n;const t=(null===(n=this.state._selection)||void 0===n?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}async resetSort(){this.initializeSortFromHeaders(this.state._headers),this.updateSortedData()}render(){var n,t,e,i,o,a;const l=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(t=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==t?t:10:this.state._sortedData.length,this.state._pagination._page||1),s="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,r="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,c={horizontal:null!==(i=null===(e=this.state._headers.horizontal)||void 0===e?void 0:e.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==i?i:[],vertical:null!==(a=null===(o=this.state._headers.vertical)||void 0===o?void 0:o.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==a?a:[]};return index.h(index.Host,{key:"ff4f00a0204e983543c6201f493590ca15de5ff4",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&s,index.h(componentNames.KolTableStatelessWcTag,{key:"94fda731902c6bdc71bd066f22ca1314871479b9",ref:this.catchRef,_data:l,_fixedCols:this._fixedCols,_headerCells:c,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu,_variant:this._variant}),this.pageEndSlice>0&&this.showPagination&&r)}get host(){return index.getElement(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};KolTableStateful.style={default:defaultStyleCss},exports.kol_table_stateful=KolTableStateful;
4
+ "use strict";var index=require("./index-DyCCobHQ.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),common=require("./common-DPb6NWR4.js"),tableSelection=require("./table-selection-B0zvrQJg.js"),label=require("./label-8vcJJEVI.js"),keyboard=require("./keyboard-BfFtSnNy.js"),events=require("./events-Jc2wxPjR.js");require("./i18n-CgUN6lev.js");const validateAllowMultiSort=(n,t,e={})=>{common.watchBoolean(n,"_allowMultiSort",t,Object.assign({defaultValue:!1},e))},paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(n,t)=>{common.watchValidator(n,"_paginationPosition",n=>"string"==typeof n&&paginationPositionPropTypeOptions.includes(n),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),t,{defaultValue:"bottom"})},defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779833120296"); /* IE9*/\n src: url("kolicons.eot?t=1779833120296#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779833120296") format("woff2"), url("kolicons.woff?t=1779833120296") format("woff"), url("kolicons.ttf?t=1779833120296") format("truetype"), url("kolicons.svg?t=1779833120296#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid black;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: white;\n display: flex;\n position: relative;\n min-width: calc(var(--a11y-min-size) / 2);\n min-height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: black;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n padding: 0;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n container: paging/inline-size;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-pagination__page-size-select .kol-form-field-select {\n align-items: center;\n grid-template-columns: 1fr max-content;\n }\n @container paging (width < 600px) {\n .kol-pagination:has(.kol-pagination__button--first) li:has(.kol-pagination__button--numbers),\n .kol-pagination:has(.kol-pagination__button--first) li:has(.kol-pagination__separator) {\n display: none;\n }\n }\n}',PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=n=>!0===n||""===n||"object"==typeof n&&null!==n,KolTableStateful=class{constructor(n){index.registerInstance(this,n),this.catchRef=n=>{this.tableWcRef=n},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(n,t),common.setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:t})),common.setState(this,"_pageSize",t)}},this.onSelectionChange=n=>{n.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void common.setState(this,"_sortedData",this.state._data);const n=[...this.state._data];this.sortData.length>0&&n.sort((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(n,t,i.direction);if(0!==o)return"ASC"===i.direction?o:-o}return 0}),common.setState(this,"_sortedData",n)}}validateAllowMultiSort(n){validateAllowMultiSort(this,n,{defaultValue:!1})}validateData(n){tableSelection.validateTableData(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){tableSelection.validateTableDataFoot(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){tableSelection.validateFixedCols(this,n)}validatePaginationPosition(n){validatePaginationPosition(this,n)}validateHasSettingsMenu(n){tableSelection.validateHasSettingsMenu(this,n)}changeCellSort(n){var t;if(void 0===n.type||"default"===n.type){if("function"!=typeof n.compareFn)return;this.state._allowMultiSort||n.key===(null===(t=this.sortData[0])||void 0===t?void 0:t.key)||(this.sortData=[]);const e=this.sortData.findIndex(t=>t.key===n.key);if(e>=0){const n=this.sortData[e];switch(n.direction){case"ASC":n.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:n.direction="ASC"}}else n.key&&this.sortData.push({label:n.label,key:n.key,compareFn:n.compareFn,direction:"ASC"});this.updateSortedData()}}initializeSortFromHeaders(n){var t,e;let i=!1;const o=n=>{this.sortData=[],n.forEach(n=>{if(void 0!==n.type&&"default"!==n.type)return;if("function"==typeof n.compareFn&&!n.key)return void common.devHint("[KolTableStateful] A sortable column requires the 'key' property.");const t=n.key;if(!t)return;const e=n.sortDirection;"ASC"!==e&&"DESC"!==e||"function"==typeof n.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:n.label,key:t,compareFn:n.compareFn,direction:e}),i=!0)})};return null===(t=n.horizontal)||void 0===t||t.forEach(o),null===(e=n.vertical)||void 0===e||e.forEach(o),i}validateHeaders(n){common.emptyStringByArrayHandler(n,()=>{common.objectObjectHandler(n,()=>{try{n=common.parseJson(n)}catch(n){}common.watchValidator(this,"_headers",n=>"object"==typeof n&&null!==n,new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e;const i=n;this.initializeSortFromHeaders(i)&&setTimeout(()=>this.updateSortedData()),i.horizontal&&i.vertical&&(null===(t=i.horizontal)||void 0===t?void 0:t.length)>0&&(null===(e=i.vertical)||void 0===e?void 0:e.length)>0&&(this.disableSort=!0,common.devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})})})}validateLabel(n){label.validateLabel(this,n,{required:!0})}validateSelection(n){tableSelection.validateTableSelection(this,n)}validateOn(n){tableSelection.validateTableStatefulCallbacks(this,n)}validatePagination(n){try{n=common.parseJson(n)}catch(n){}this.showPagination=paginationValidator(n),common.watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;null===(n=this.tableWcRef)||void 0===n||n.addEventListener(events.KolEvent.selectionChange,this.onSelectionChange)}disconnectedCallback(){var n;null===(n=this.tableWcRef)||void 0===n||n.removeEventListener(events.KolEvent.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateFixedCols(this._fixedCols),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(n,t,e){return"number"==typeof t&&t>0&&"number"==typeof e&&e>0?(this.pageStartSlice=t*(e-1),this.pageEndSlice=t*e>n.length?n.length:t*e,n.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=n.length,n)}renderPagination(n){const t=i18n.translate("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${i18n.translate(`kol-pagination-position-${n}`)})`}});return index.h("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},index.h("div",{class:"kol-table-stateful__pagination-wrapper"},index.h(componentNames.KolPaginationWcTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_hasButtons:this.state._pagination._hasButtons,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._data.length,_label:t})))}getHeaderCellSortState(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&"function"==typeof n.compareFn){if(n.key){const t=this.sortData.find(t=>t.key===n.key);if(null==t?void 0:t.direction)return t.direction}return"NOS"}}getHeaderCellSortOrder(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&this.state._allowMultiSort&&"function"==typeof n.compareFn&&n.key){const t=this.sortData.findIndex(t=>t.key===n.key);if(t>=0)return t+1}}handleSort({key:n}){var t,e;const i=null!==(t=this.state._headers.horizontal)&&void 0!==t?t:[],o=null!==(e=this.state._headers.vertical)&&void 0!==e?e:[],a=[];for(const n of i)Array.isArray(n)&&a.push(...n);for(const n of o)Array.isArray(n)&&a.push(...n);const l=a.find(t=>t.key===n);l&&this.changeCellSort(l)}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=null!==(t=e.keyPropertyName)&&void 0!==t?t:"id",o=new Set(n.map(String)),a=this.state._sortedData.filter(n=>o.has(String(n[i])));if(i)return a}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})}));const o=this.getSelectedData(t);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[keyboard.Callback.onSelectionChange])&&this.state._on[keyboard.Callback.onSelectionChange](n,o),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.selectionChange,o)}async getSelection(){var n;const t=(null===(n=this.state._selection)||void 0===n?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}async resetSort(){this.initializeSortFromHeaders(this.state._headers),this.updateSortedData()}render(){var n,t,e,i,o,a;const l=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(t=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==t?t:10:this.state._sortedData.length,this.state._pagination._page||1),s="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,r="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,c={horizontal:null!==(i=null===(e=this.state._headers.horizontal)||void 0===e?void 0:e.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==i?i:[],vertical:null!==(a=null===(o=this.state._headers.vertical)||void 0===o?void 0:o.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==a?a:[]};return index.h(index.Host,{key:"ff4f00a0204e983543c6201f493590ca15de5ff4",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&s,index.h(componentNames.KolTableStatelessWcTag,{key:"94fda731902c6bdc71bd066f22ca1314871479b9",ref:this.catchRef,_data:l,_fixedCols:this._fixedCols,_headerCells:c,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu,_variant:this._variant}),this.pageEndSlice>0&&this.showPagination&&r)}get host(){return index.getElement(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};KolTableStateful.style={default:defaultStyleCss},exports.kol_table_stateful=KolTableStateful;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-C24UiEit.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),component=require("./component-BcNeqWH3.js"),component$1=require("./component-P70qtkzX.js"),common=require("./common-DPb6NWR4.js"),tableSelection=require("./table-selection-B0zvrQJg.js"),label=require("./label-8vcJJEVI.js"),variantClassName=require("./variant-class-name-BCWuCRd0.js"),keyboard=require("./keyboard-BfFtSnNy.js"),clsx=require("./clsx-Bm_HQUnh.js"),dev_utils=require("./dev.utils-C6aqolAb.js"),events=require("./events-Jc2wxPjR.js"),_Uint8Array=require("./_Uint8Array-BAQUGozM.js"),isArray=require("./isArray-BOIOdEQh.js");require("./i18n-CgUN6lev.js"),require("./bem-registry-CRVGjDoN.js"),require("./component-CY3ki2XC.js");var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED),this}function setCacheHas(e){return this.__data__.has(e)}function SetCache(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new _Uint8Array.MapCache;++t<a;)this.add(e[t])}function arraySome(e,t){for(var a=-1,i=null==e?0:e.length;++a<i;)if(t(e[a],a,e))return!0;return!1}function cacheHas(e,t){return e.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var COMPARE_PARTIAL_FLAG$3=1,COMPARE_UNORDERED_FLAG$1=2;function equalArrays(e,t,a,i,l,s){var r=a&COMPARE_PARTIAL_FLAG$3,o=e.length,n=t.length;if(o!=n&&!(r&&n>o))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,b=!0,u=a&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var v=e[h],f=t[h];if(i)var _=r?i(f,v,h,t,e,s):i(v,f,h,e,t,s);if(void 0!==_){if(_)continue;b=!1;break}if(u){if(!arraySome(t,function(e,t){if(!cacheHas(u,t)&&(v===e||l(v,e,a,i,s)))return u.push(t)})){b=!1;break}}else if(v!==f&&!l(v,f,a,i,s)){b=!1;break}}return s.delete(e),s.delete(t),b}function mapToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e,i){a[++t]=[i,e]}),a}function setToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e){a[++t]=e}),a}var COMPARE_PARTIAL_FLAG$2=1,COMPARE_UNORDERED_FLAG=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=isArray.Symbol?isArray.Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,a,i,l,s,r){switch(a){case dataViewTag:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag:return!(e.byteLength!=t.byteLength||!s(new _Uint8Array.Uint8Array(e),new _Uint8Array.Uint8Array(t)));case boolTag:case dateTag:case numberTag:return _Uint8Array.eq(+e,+t);case errorTag:return e.name==t.name&&e.message==t.message;case regexpTag:case stringTag:return e==t+"";case mapTag:var o=mapToArray;case setTag:var n=i&COMPARE_PARTIAL_FLAG$2;if(o||(o=setToArray),e.size!=t.size&&!n)return!1;var c=r.get(e);if(c)return c==t;i|=COMPARE_UNORDERED_FLAG,r.set(e,t);var d=equalArrays(o(e),o(t),i,l,s,r);return r.delete(e),d;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var COMPARE_PARTIAL_FLAG$1=1,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function equalObjects(e,t,a,i,l,s){var r=a&COMPARE_PARTIAL_FLAG$1,o=_Uint8Array.getAllKeys(e),n=o.length;if(n!=_Uint8Array.getAllKeys(t).length&&!r)return!1;for(var c=n;c--;){var d=o[c];if(!(r?d in t:hasOwnProperty$1.call(t,d)))return!1}var h=s.get(e),b=s.get(t);if(h&&b)return h==t&&b==e;var u=!0;s.set(e,t),s.set(t,e);for(var v=r;++c<n;){var f=e[d=o[c]],_=t[d];if(i)var y=r?i(_,f,d,t,e,s):i(f,_,d,e,t,s);if(!(void 0===y?f===_||l(f,_,a,i,s):y)){u=!1;break}v||(v="constructor"==d)}if(u&&!v){var g=e.constructor,p=t.constructor;g==p||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof p&&p instanceof p||(u=!1)}return s.delete(e),s.delete(t),u}var COMPARE_PARTIAL_FLAG=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseIsEqualDeep(e,t,a,i,l,s){var r=isArray.isArray(e),o=isArray.isArray(t),n=r?arrayTag:_Uint8Array.getTag(e),c=o?arrayTag:_Uint8Array.getTag(t),d=(n=n==argsTag?objectTag:n)==objectTag,h=(c=c==argsTag?objectTag:c)==objectTag,b=n==c;if(b&&_Uint8Array.isBuffer(e)){if(!_Uint8Array.isBuffer(t))return!1;r=!0,d=!1}if(b&&!d)return s||(s=new _Uint8Array.Stack),r||_Uint8Array.isTypedArray(e)?equalArrays(e,t,a,i,l,s):equalByTag(e,t,n,a,i,l,s);if(!(a&COMPARE_PARTIAL_FLAG)){var u=d&&hasOwnProperty.call(e,"__wrapped__"),v=h&&hasOwnProperty.call(t,"__wrapped__");if(u||v){var f=u?e.value():e,_=v?t.value():t;return s||(s=new _Uint8Array.Stack),l(f,_,a,i,s)}}return!!b&&(s||(s=new _Uint8Array.Stack),equalObjects(e,t,a,i,l,s))}function baseIsEqual(e,t,a,i,l){return e===t||(null==e||null==t||!isArray.isObjectLike(e)&&!isArray.isObjectLike(t)?e!=e&&t!=t:baseIsEqualDeep(e,t,a,i,baseIsEqual,l))}function isEqual(e,t){return baseIsEqual(e,t)}const isHeaderRows=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)),validateTableHeaderCells=(e,t)=>{common.emptyStringByArrayHandler(t,()=>{common.objectObjectHandler(t,()=>{try{t=common.parseJson(t)}catch(e){}common.watchValidator(e,"_headerCells",e=>{if("object"!=typeof e||null===e)return!1;const t=e.horizontal,a=e.vertical;if(void 0!==t&&!isHeaderRows(t)||void 0!==a&&!isHeaderRows(a))return!1;const i=[];for(const e of null!=t?t:[])i.push(...e);for(const e of null!=a?a:[])i.push(...e);return i.every(e=>void 0===e.width||"number"==typeof e.width)},new Set(["TableHeaderCellsPropType"]),t)})})},RESIZE_DEBOUNCE_DELAY=150,KolTableStatelessWc=class{constructor(e){index.registerInstance(this,e),this.translateNoEntries=i18n.translate("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=i18n.translate("kol-sort"),this.translateSortOrder=i18n.translate("kol-table-sort-order"),this.maxCols=0,this.fixedOffsets=[],this.settingsChangedCounter=0,this.tableDivElementHasScrollbar=!1,this.stickyColsDisabled=!1,this.renderTableRow=(e,t,a,i=!1)=>{var l,s;let r=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(r=null!==(s=this.getDataKey(e[0].data))&&void 0!==s?s:r),index.h("tr",{class:clsx.clsx("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${r}`},this.renderSelectionCell(e,t),e.map((e,i)=>this.renderTableCell(e,t,i,a)))},this.renderTableCell=(e,t,a,i)=>{if(!1===e.visible)return"";let l=`${t}-${a}-${e.label}`;if(e.data){const i=this.getDataKey(e.data);l=i?`${i}-${this.horizontal?a:t}`:l}if(e.headerCell)return this.renderHeadingCell(e,t,a,i);{const t="function"!=typeof e.render&&e.label===this.translateNoEntries,i=this.getActionColumnHeader(a),s=Boolean(i&&e.data),r=this.isFixedCol(a),o="left"===r?this.getOffsetString(e.colIndex,!0):void 0,n="right"===r?this.getOffsetString(e.colIndex):void 0,c="function"==typeof e.render;return index.h("td",{key:`cell-${l}-${this.settingsChangedCounter}`,class:clsx.clsx("kol-table__cell kol-table__cell--body",e.textAlign&&`kol-table__cell--align-${e.textAlign}`,s&&"kol-table__cell--actions",r&&`kol-table__cell--sticky-${r}`),"aria-atomic":t?"false":void 0,"aria-live":t?"polite":void 0,"aria-relevant":t?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,left:o,right:n},ref:c?t=>{this.cellRender(e,t)}:void 0},s&&i&&e.data?this.renderActionItems(i,e.data,l):c?"":e.label)}},this.renderActionItems=(e,t,a)=>{const i=e.actions(t);return index.h("div",{class:"kol-table__cell-actions"},i.map((e,t)=>{if("button"===e.type){const i=tslib_es6.__rest(e,[]);return index.h(componentNames.KolButtonWcTag,Object.assign({key:`action-${a}-${t}`},i,{_variant:i._variant}))}if("link"===e.type){const i=tslib_es6.__rest(e,[]);return index.h(componentNames.KolLinkWcTag,Object.assign({key:`action-${a}-${t}`},i))}return null}))}}validateHasSettingsMenu(e){tableSelection.validateHasSettingsMenu(this,e)}validateData(e){tableSelection.validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){tableSelection.validateTableDataFoot(this,e)}validateFixedCols(e){tableSelection.validateFixedCols(this,e),this.checkAndUpdateStickyState()}validateHeaderCells(e){validateTableHeaderCells(this,e),isEqual(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){tableSelection.validateTableCallbacks(this,e)}validateSelection(e){tableSelection.validateTableSelection(this,e),this.checkAndUpdateStickyState()}validateVariantClassName(e){variantClassName.validateVariantClassName(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let i=this.checkboxRefs.indexOf(a);i>-1&&(e.preventDefault(),"ArrowDown"===e.key?(i=(i+1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()):"ArrowUp"===e.key&&(e.preventDefault(),i=(i+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement)),this.checkAndUpdateStickyState()}handleSettingsChange(e){var t;const a=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});common.setState(this,"_headerCells",a),this.settingsChangedCounter++,"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[keyboard.Callback.onChangeHeaderCells])&&this.state._on[keyboard.Callback.onChangeHeaderCells](e,a)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect(),clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout(()=>{this.checkAndUpdateStickyState()},150)}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}calculateFixedColsWidth(){var e,t,a,i,l,s;if(!this._fixedCols)return 0;const r=this.getPrimaryHeaders(this.state._headerCells);let o=0;for(let a=0;a<this._fixedCols[0]&&a<r.length;a++)o+=null!==(t=null===(e=r[a])||void 0===e?void 0:e.width)&&void 0!==t?t:0;for(let e=this.maxCols-this._fixedCols[1];e<this.maxCols&&e<r.length;e++)o+=null!==(i=null===(a=r[e])||void 0===a?void 0:a.width)&&void 0!==i?i:0;if(this.state._selection){const e=null===(l=this.tableDivElement)||void 0===l?void 0:l.querySelector(".kol-table__cell--selection");o+=null!==(s=null==e?void 0:e.offsetWidth)&&void 0!==s?s:0}return o}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols)return void(this.stickyColsDisabled=!1);const e=this.tableDivElement.clientWidth,t=this.calculateFixedColsWidth();this.stickyColsDisabled=t>0&&t>=e}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,dev_utils.nonce())}),this.dataToKeyMap.forEach((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)})}getDataKey(e){return this.dataToKeyMap.get(e)}getActionColumnHeader(e){const t=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!t||0===t.length)return;const a=this.getPrimaryHeaders(this.state._headerCells)[e];return a&&"action"===a.type?a:void 0}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}})))}getNumberOfCols(e,t){let a=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;t+=null!==(a=e.colSpan)&&void 0!==a?a:1}),a<t&&(a=t)}),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;t+=null!==(a=e.rowSpan)&&void 0!==a?a:1}),i<t&&(i=t)}),0===i?i=t.length:i-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,i}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,a;let i=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===i.length&&(i=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(a=e.vertical)&&void 0!==a?a:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(e,t,a){var i,l,s,r,o,n,c,d;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[],this.maxCols=this.getNumberOfCols(t.horizontal,e);const h=this.getPrimaryHeaders(t);let b=this.getNumberOfRows(t.vertical,e),u=0;a&&(u=b,b+=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.length)||0);const v=[],f=[],_=[];t.vertical.forEach((e,t)=>{f[t]=0,_[t]=[]});const y=h;for(let i=u;i<b;i++){const d=[];t.vertical.forEach((e,t)=>{let a=0;if(_[t].forEach(e=>a+=e),a<=i){const l=e[i-a+f[t]];if("object"==typeof l){d.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let e=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(e=l.rowSpan),_[t].push(e),"number"==typeof l.colSpan&&l.colSpan>1)for(let a=1;a<l.colSpan;a++)_[t+a].push(e);f[t]++}}});for(let t=0;t<this.maxCols;t++){let h=this.isFixedCol(t);if("left"===h&&void 0===this.getFixedOffset(t)){let e=null!==(l=this.fixedOffsets[t-1])&&void 0!==l?l:0;e+=null!==(r=null===(s=y[t-1])||void 0===s?void 0:s.width)&&void 0!==r?r:0,this.fixedOffsets[t]=e}if("right"===h&&void 0===this.getFixedOffset(t)){let e=null!==(o=this.fixedOffsets[t+1])&&void 0!==o?o:0;e+=null!==(c=null===(n=y[t+1])||void 0===n?void 0:n.width)&&void 0!==c?c:0,this.fixedOffsets[t]=e}if(!0===this.horizontal){const l=a&&this.state._dataFoot?this.state._dataFoot[i-u]:e[i];if("object"==typeof y[t]&&null!==y[t]&&"object"==typeof l&&null!==l&&("string"==typeof y[t].key||"function"==typeof y[t].render)){const e=l[y[t].key];d.push(Object.assign(Object.assign({},y[t]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:l,label:e}))}}else if("object"==typeof y[i]&&null!==y[i]&&"object"==typeof e[t]&&null!==e[t]&&("string"==typeof y[i].key||"function"==typeof y[i].render)){const a=y[i].key,l=e[t][a];d.push(Object.assign(Object.assign({},y[i]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:e[t],label:l}))}}v.push(d)}if(0===e.length){let e=this.getVisibleColSpan(null===(d=t.horizontal)||void 0===d?void 0:d[0]),a=0;Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{a+=e.rowSpan||1}));const i={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(a,1)};0===v.length?v.push([i]):v[0].push(i)}return v}getVisibleColSpan(e){var t;return null!==(t=null==e?void 0:e.reduce((e,t)=>"visible"in t&&!1===t.visible?e:e+(t.colSpan||1),0))&&void 0!==t?t:0}isFixedCol(e){if(this._fixedCols&&void 0!==e&&!this.stickyColsDisabled)return e<this._fixedCols[0]?"left":e>=this.maxCols-this._fixedCols[1]?"right":void 0}getFixedOffset(e){if(this.tableDivElement&&void 0!==e)return void 0!==this.fixedOffsets[e]?this.fixedOffsets[e]:void 0}getOffsetString(e,t){return t&&this._selection?"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(e)+"px)":this.getFixedOffset(e)+"px"}handleSelectionChangeCallbackAndEvent(e,t){var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a[keyboard.Callback.onSelectionChange])&&this.state._on[keyboard.Callback.onSelectionChange](e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});common.setState(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu),this.validateVariantClassName(this._variant)}renderSelectionCell(e,t){var a;const i=this.state._selection;if(!i)return"";const l=this.getSelectionKeyPropertyName(),s=null===(a=e[0])||void 0===a?void 0:a.data;if(!s)return"";const r=s[l],o=i.multiple||void 0===i.multiple,n=(()=>{const e=null==i?void 0:i.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),c=(()=>{const e=null==i?void 0:i.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),d=i.label(s),h={name:"selection",checked:n,disabled:c,id:String(r),"aria-label":d};return index.h("td",{key:`tbody-${t}-selection`,class:"kol-table__cell kol-table__cell--selection"},index.h("div",{class:clsx.clsx("kol-table__selection",{"kol-table__selection--checked":n})},o?index.h("label",{class:clsx.clsx("kol-table__selection-label",{"kol-table__selection-label--disabled":c})},index.h(component.IconFC,{class:"kol-table__selection-icon",icons:"kolicon "+(n?"kolicon-check":""),label:""}),index.h("input",Object.assign({class:clsx.clsx("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},h,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==i?void 0:i.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),a=n?t.filter(e=>String(e)!==String(r)):[...t,r];this.handleSelectionChangeCallbackAndEvent(e,null!=a?a:[])}}))):index.h("label",{class:"kol-table__selection-label"},index.h("input",Object.assign({class:clsx.clsx("kol-table__selection-input kol-table__selection-input--radio")},h,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[r])}}))),index.h("div",{class:"kol-table__selection-input-tooltip"},index.h(component$1.TooltipFC,{label:d,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var a;const i=null===(a=this.state._selection)||void 0===a?void 0:a.disabledKeys;return!(void 0===i?[]:Array.isArray(i)?i:[i]).some(a=>String(a)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const a=this.getSelectionKeyPropertyName(),i=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&i.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[a])),i}getTableMinWidth(){var e,t;const a=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],i=[];a.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&i.push(e.width)})});const l=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],s=[];l.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&s.push(e.width)})});const r=[...s,...i];return 0===r.length?"0px":1===r.length?`${r[0]}px`:`calc(${r.map(e=>`${e}px`).join(" + ")})`}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!a)return index.h("td",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===a.multiple)return index.h("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const i=null!==(t=null===(e=this.getSelectedKeysWithoutDisabledKeys())||void 0===e?void 0:e.length)&&void 0!==t?t:0,l=i===this.getDataWithSelectionEnabled().length,s=0!==i&&!l;let r="kol-table-selection-indeterminate";l&&!s&&(r="kol-table-selection-none"),0===i&&(r="kol-table-selection-all");const o=i18n.translate(r);return index.h("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},index.h("div",{class:clsx.clsx("kol-table__selection",{"kol-table__selection--indeterminate":s,"kol-table__selection--checked":l})},index.h("label",{class:"kol-table__selection-label"},index.h(component.IconFC,{class:"kol-table__selection-icon",icons:"kolicon "+(s?"kolicon-minus":l?"kolicon-check":""),label:""}),index.h("input",{class:clsx.clsx("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:l&&!s,indeterminate:s,"aria-label":o,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!l))}})),index.h("div",{class:"kol-table__selection-input-tooltip"},index.h(component$1.TooltipFC,{label:o,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const e=this.state._headerCells.horizontal,t=this.state._headerCells.vertical;if(!Array.isArray(e)||0===e.length||!Array.isArray(t)||0===t.length)return index.h(index.Fragment,null);const a=t.reduce((e,t)=>{var a;const i=null==t?void 0:t[0];return e+(null!==(a=null==i?void 0:i.width)&&void 0!==a?a:0)},0);return index.h("td",{"aria-hidden":"true",colSpan:t.length,rowSpan:e.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(e,t,a,i){if(!1===e.visible)return"";const l=!1!==(null==e?void 0:e.sortable),s="string"==typeof e.sortDirection,r=l&&s;let o="none",n="kolicon-sort-neutral";if(r&&e.sortDirection)switch(e.sortDirection){case"ASC":n="kolicon-sort-asc",o="ascending";break;case"DESC":n="kolicon-sort-desc",o="descending";break;default:o="none"}const c=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",d="number"==typeof e.sortOrder&&e.sortOrder>0?e.sortOrder:void 0,h=this.getSortAriaDescription(d),b=void 0!==e.width?`${e.width}px`:void 0,u=this.isFixedCol(a),v="left"===u?this.getOffsetString(a,!0):void 0,f="right"===u?this.getOffsetString(a):void 0;return index.h("th",{key:`${t}-${a}-${e.label}`,class:clsx.clsx("kol-table__cell kol-table__cell--header",`kol-table__cell--${o}`,e.textAlign&&`kol-table__cell--align-${e.textAlign}`,u&&`kol-table__cell--sticky-${u}`),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:b,left:v,right:f},"aria-sort":o,"data-sort":r&&e.sortDirection?`sort-${e.sortDirection}`:void 0},r&&e.sortDirection?index.h("span",{class:"kol-table__sort"},index.h(componentNames.KolButtonWcTag,{class:"kol-table__sort-button",_icons:{right:n},_label:e.label,_ariaDescription:h,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection}),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.sort,{key:e.key,currentSortDirection:e.sortDirection})}}}),d&&index.h("span",{"aria-hidden":"true",class:"kol-table__sort-order"},d)):e.label)}renderSpacer(e,t){var a;const i=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=this.getVisibleColSpan(null==t?void 0:t[0]),s=this.state._selection?1:0;return index.h("tr",{"aria-hidden":"true",class:clsx.clsx("kol-table__spacer",`kol-table__spacer--${e}`)},index.h("td",{class:clsx.clsx(`kol-table__spacer-line kol-table__spacer-line--${e}`),colSpan:i+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return index.h("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",e),e.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const t=this.state._headerCells.horizontal;return index.h("div",{key:"f2486903b816a22f05eb8f3278aa61bb7fe61043",class:clsx.clsx("kol-table",{[`kol-table--${this.state._variant}`]:void 0!==this.state._variant})},this.state._hasSettingsMenu&&index.h(componentNames.KolTableSettingsWcTag,{key:"df6067ff8e4ab98b9110c4838d57cfda5ff5e24e",_horizontalHeaderCells:null!=t?t:[]}),index.h("div",{key:"4f716fe9c5ff063b14eb67b07d587973bbd7a524",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},index.h("table",{key:"028b31dffc8dad64fc7de580932648cd5e82d227",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},index.h("caption",{key:"8a6a42b7b4fcaff5c8fd6980cd0d5e67a8aaf3fc",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(t)&&index.h("thead",{key:"71ba0ca807d7a4f1ed6ea77a7c279f9a65bd946c",class:"kol-table__head"},[t.map((e,t)=>index.h("tr",{class:"kol-table__head-row",key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map((e,a)=>this.renderHeadingCell(e,t,a,!1)))),this.renderSpacer("head",t)]),index.h("tbody",{key:"2da2b2676d50a7c64442f13e5928c3a5cc8ece62",class:"kol-table__body"},e.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return index.getElement(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"],_variant:["validateVariantClassName"]}}};exports.kol_table_stateless_wc=KolTableStatelessWc;
4
+ "use strict";var index=require("./index-DyCCobHQ.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),component=require("./component-bCqns4_n.js"),component$1=require("./component-lBaUur7X.js"),common=require("./common-DPb6NWR4.js"),tableSelection=require("./table-selection-B0zvrQJg.js"),label=require("./label-8vcJJEVI.js"),variantClassName=require("./variant-class-name-BCWuCRd0.js"),keyboard=require("./keyboard-BfFtSnNy.js"),clsx=require("./clsx-Bm_HQUnh.js"),dev_utils=require("./dev.utils-DYrlz4G7.js"),events=require("./events-Jc2wxPjR.js"),_Uint8Array=require("./_Uint8Array-BAQUGozM.js"),isArray=require("./isArray-BOIOdEQh.js");require("./i18n-CgUN6lev.js"),require("./bem-registry-CRVGjDoN.js"),require("./component--8i7E4CQ.js");var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED),this}function setCacheHas(e){return this.__data__.has(e)}function SetCache(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new _Uint8Array.MapCache;++t<a;)this.add(e[t])}function arraySome(e,t){for(var a=-1,i=null==e?0:e.length;++a<i;)if(t(e[a],a,e))return!0;return!1}function cacheHas(e,t){return e.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var COMPARE_PARTIAL_FLAG$3=1,COMPARE_UNORDERED_FLAG$1=2;function equalArrays(e,t,a,i,l,s){var r=a&COMPARE_PARTIAL_FLAG$3,o=e.length,n=t.length;if(o!=n&&!(r&&n>o))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,b=!0,u=a&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var v=e[h],f=t[h];if(i)var _=r?i(f,v,h,t,e,s):i(v,f,h,e,t,s);if(void 0!==_){if(_)continue;b=!1;break}if(u){if(!arraySome(t,function(e,t){if(!cacheHas(u,t)&&(v===e||l(v,e,a,i,s)))return u.push(t)})){b=!1;break}}else if(v!==f&&!l(v,f,a,i,s)){b=!1;break}}return s.delete(e),s.delete(t),b}function mapToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e,i){a[++t]=[i,e]}),a}function setToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e){a[++t]=e}),a}var COMPARE_PARTIAL_FLAG$2=1,COMPARE_UNORDERED_FLAG=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=isArray.Symbol?isArray.Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,a,i,l,s,r){switch(a){case dataViewTag:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag:return!(e.byteLength!=t.byteLength||!s(new _Uint8Array.Uint8Array(e),new _Uint8Array.Uint8Array(t)));case boolTag:case dateTag:case numberTag:return _Uint8Array.eq(+e,+t);case errorTag:return e.name==t.name&&e.message==t.message;case regexpTag:case stringTag:return e==t+"";case mapTag:var o=mapToArray;case setTag:var n=i&COMPARE_PARTIAL_FLAG$2;if(o||(o=setToArray),e.size!=t.size&&!n)return!1;var c=r.get(e);if(c)return c==t;i|=COMPARE_UNORDERED_FLAG,r.set(e,t);var d=equalArrays(o(e),o(t),i,l,s,r);return r.delete(e),d;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var COMPARE_PARTIAL_FLAG$1=1,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function equalObjects(e,t,a,i,l,s){var r=a&COMPARE_PARTIAL_FLAG$1,o=_Uint8Array.getAllKeys(e),n=o.length;if(n!=_Uint8Array.getAllKeys(t).length&&!r)return!1;for(var c=n;c--;){var d=o[c];if(!(r?d in t:hasOwnProperty$1.call(t,d)))return!1}var h=s.get(e),b=s.get(t);if(h&&b)return h==t&&b==e;var u=!0;s.set(e,t),s.set(t,e);for(var v=r;++c<n;){var f=e[d=o[c]],_=t[d];if(i)var y=r?i(_,f,d,t,e,s):i(f,_,d,e,t,s);if(!(void 0===y?f===_||l(f,_,a,i,s):y)){u=!1;break}v||(v="constructor"==d)}if(u&&!v){var g=e.constructor,p=t.constructor;g==p||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof p&&p instanceof p||(u=!1)}return s.delete(e),s.delete(t),u}var COMPARE_PARTIAL_FLAG=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseIsEqualDeep(e,t,a,i,l,s){var r=isArray.isArray(e),o=isArray.isArray(t),n=r?arrayTag:_Uint8Array.getTag(e),c=o?arrayTag:_Uint8Array.getTag(t),d=(n=n==argsTag?objectTag:n)==objectTag,h=(c=c==argsTag?objectTag:c)==objectTag,b=n==c;if(b&&_Uint8Array.isBuffer(e)){if(!_Uint8Array.isBuffer(t))return!1;r=!0,d=!1}if(b&&!d)return s||(s=new _Uint8Array.Stack),r||_Uint8Array.isTypedArray(e)?equalArrays(e,t,a,i,l,s):equalByTag(e,t,n,a,i,l,s);if(!(a&COMPARE_PARTIAL_FLAG)){var u=d&&hasOwnProperty.call(e,"__wrapped__"),v=h&&hasOwnProperty.call(t,"__wrapped__");if(u||v){var f=u?e.value():e,_=v?t.value():t;return s||(s=new _Uint8Array.Stack),l(f,_,a,i,s)}}return!!b&&(s||(s=new _Uint8Array.Stack),equalObjects(e,t,a,i,l,s))}function baseIsEqual(e,t,a,i,l){return e===t||(null==e||null==t||!isArray.isObjectLike(e)&&!isArray.isObjectLike(t)?e!=e&&t!=t:baseIsEqualDeep(e,t,a,i,baseIsEqual,l))}function isEqual(e,t){return baseIsEqual(e,t)}const isHeaderRows=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)),validateTableHeaderCells=(e,t)=>{common.emptyStringByArrayHandler(t,()=>{common.objectObjectHandler(t,()=>{try{t=common.parseJson(t)}catch(e){}common.watchValidator(e,"_headerCells",e=>{if("object"!=typeof e||null===e)return!1;const t=e.horizontal,a=e.vertical;if(void 0!==t&&!isHeaderRows(t)||void 0!==a&&!isHeaderRows(a))return!1;const i=[];for(const e of null!=t?t:[])i.push(...e);for(const e of null!=a?a:[])i.push(...e);return i.every(e=>void 0===e.width||"number"==typeof e.width)},new Set(["TableHeaderCellsPropType"]),t)})})},RESIZE_DEBOUNCE_DELAY=150,KolTableStatelessWc=class{constructor(e){index.registerInstance(this,e),this.translateNoEntries=i18n.translate("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=i18n.translate("kol-sort"),this.translateSortOrder=i18n.translate("kol-table-sort-order"),this.maxCols=0,this.fixedOffsets=[],this.settingsChangedCounter=0,this.tableDivElementHasScrollbar=!1,this.stickyColsDisabled=!1,this.renderTableRow=(e,t,a,i=!1)=>{var l,s;let r=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(r=null!==(s=this.getDataKey(e[0].data))&&void 0!==s?s:r),index.h("tr",{class:clsx.clsx("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${r}`},this.renderSelectionCell(e,t),e.map((e,i)=>this.renderTableCell(e,t,i,a)))},this.renderTableCell=(e,t,a,i)=>{if(!1===e.visible)return"";let l=`${t}-${a}-${e.label}`;if(e.data){const i=this.getDataKey(e.data);l=i?`${i}-${this.horizontal?a:t}`:l}if(e.headerCell)return this.renderHeadingCell(e,t,a,i);{const t="function"!=typeof e.render&&e.label===this.translateNoEntries,i=this.getActionColumnHeader(a),s=Boolean(i&&e.data),r=this.isFixedCol(a),o="left"===r?this.getOffsetString(e.colIndex,!0):void 0,n="right"===r?this.getOffsetString(e.colIndex):void 0,c="function"==typeof e.render;return index.h("td",{key:`cell-${l}-${this.settingsChangedCounter}`,class:clsx.clsx("kol-table__cell kol-table__cell--body",e.textAlign&&`kol-table__cell--align-${e.textAlign}`,s&&"kol-table__cell--actions",r&&`kol-table__cell--sticky-${r}`),"aria-atomic":t?"false":void 0,"aria-live":t?"polite":void 0,"aria-relevant":t?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,left:o,right:n},ref:c?t=>{this.cellRender(e,t)}:void 0},s&&i&&e.data?this.renderActionItems(i,e.data,l):c?"":e.label)}},this.renderActionItems=(e,t,a)=>{const i=e.actions(t);return index.h("div",{class:"kol-table__cell-actions"},i.map((e,t)=>{if("button"===e.type){const i=tslib_es6.__rest(e,[]);return index.h(componentNames.KolButtonWcTag,Object.assign({key:`action-${a}-${t}`},i,{_variant:i._variant}))}if("link"===e.type){const i=tslib_es6.__rest(e,[]);return index.h(componentNames.KolLinkWcTag,Object.assign({key:`action-${a}-${t}`},i))}return null}))}}validateHasSettingsMenu(e){tableSelection.validateHasSettingsMenu(this,e)}validateData(e){tableSelection.validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){tableSelection.validateTableDataFoot(this,e)}validateFixedCols(e){tableSelection.validateFixedCols(this,e),this.checkAndUpdateStickyState()}validateHeaderCells(e){validateTableHeaderCells(this,e),isEqual(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){tableSelection.validateTableCallbacks(this,e)}validateSelection(e){tableSelection.validateTableSelection(this,e),this.checkAndUpdateStickyState()}validateVariantClassName(e){variantClassName.validateVariantClassName(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let i=this.checkboxRefs.indexOf(a);i>-1&&(e.preventDefault(),"ArrowDown"===e.key?(i=(i+1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()):"ArrowUp"===e.key&&(e.preventDefault(),i=(i+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement)),this.checkAndUpdateStickyState()}handleSettingsChange(e){var t;const a=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});common.setState(this,"_headerCells",a),this.settingsChangedCounter++,"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[keyboard.Callback.onChangeHeaderCells])&&this.state._on[keyboard.Callback.onChangeHeaderCells](e,a)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect(),clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout(()=>{this.checkAndUpdateStickyState()},150)}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}calculateFixedColsWidth(){var e,t,a,i,l,s;if(!this._fixedCols)return 0;const r=this.getPrimaryHeaders(this.state._headerCells);let o=0;for(let a=0;a<this._fixedCols[0]&&a<r.length;a++)o+=null!==(t=null===(e=r[a])||void 0===e?void 0:e.width)&&void 0!==t?t:0;for(let e=this.maxCols-this._fixedCols[1];e<this.maxCols&&e<r.length;e++)o+=null!==(i=null===(a=r[e])||void 0===a?void 0:a.width)&&void 0!==i?i:0;if(this.state._selection){const e=null===(l=this.tableDivElement)||void 0===l?void 0:l.querySelector(".kol-table__cell--selection");o+=null!==(s=null==e?void 0:e.offsetWidth)&&void 0!==s?s:0}return o}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols)return void(this.stickyColsDisabled=!1);const e=this.tableDivElement.clientWidth,t=this.calculateFixedColsWidth();this.stickyColsDisabled=t>0&&t>=e}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,dev_utils.nonce())}),this.dataToKeyMap.forEach((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)})}getDataKey(e){return this.dataToKeyMap.get(e)}getActionColumnHeader(e){const t=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!t||0===t.length)return;const a=this.getPrimaryHeaders(this.state._headerCells)[e];return a&&"action"===a.type?a:void 0}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}})))}getNumberOfCols(e,t){let a=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;t+=null!==(a=e.colSpan)&&void 0!==a?a:1}),a<t&&(a=t)}),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var a;t+=null!==(a=e.rowSpan)&&void 0!==a?a:1}),i<t&&(i=t)}),0===i?i=t.length:i-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,i}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,a;let i=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===i.length&&(i=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(a=e.vertical)&&void 0!==a?a:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(e,t,a){var i,l,s,r,o,n,c,d;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[],this.maxCols=this.getNumberOfCols(t.horizontal,e);const h=this.getPrimaryHeaders(t);let b=this.getNumberOfRows(t.vertical,e),u=0;a&&(u=b,b+=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.length)||0);const v=[],f=[],_=[];t.vertical.forEach((e,t)=>{f[t]=0,_[t]=[]});const y=h;for(let i=u;i<b;i++){const d=[];t.vertical.forEach((e,t)=>{let a=0;if(_[t].forEach(e=>a+=e),a<=i){const l=e[i-a+f[t]];if("object"==typeof l){d.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let e=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(e=l.rowSpan),_[t].push(e),"number"==typeof l.colSpan&&l.colSpan>1)for(let a=1;a<l.colSpan;a++)_[t+a].push(e);f[t]++}}});for(let t=0;t<this.maxCols;t++){let h=this.isFixedCol(t);if("left"===h&&void 0===this.getFixedOffset(t)){let e=null!==(l=this.fixedOffsets[t-1])&&void 0!==l?l:0;e+=null!==(r=null===(s=y[t-1])||void 0===s?void 0:s.width)&&void 0!==r?r:0,this.fixedOffsets[t]=e}if("right"===h&&void 0===this.getFixedOffset(t)){let e=null!==(o=this.fixedOffsets[t+1])&&void 0!==o?o:0;e+=null!==(c=null===(n=y[t+1])||void 0===n?void 0:n.width)&&void 0!==c?c:0,this.fixedOffsets[t]=e}if(!0===this.horizontal){const l=a&&this.state._dataFoot?this.state._dataFoot[i-u]:e[i];if("object"==typeof y[t]&&null!==y[t]&&"object"==typeof l&&null!==l&&("string"==typeof y[t].key||"function"==typeof y[t].render)){const e=l[y[t].key];d.push(Object.assign(Object.assign({},y[t]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:l,label:e}))}}else if("object"==typeof y[i]&&null!==y[i]&&"object"==typeof e[t]&&null!==e[t]&&("string"==typeof y[i].key||"function"==typeof y[i].render)){const a=y[i].key,l=e[t][a];d.push(Object.assign(Object.assign({},y[i]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:e[t],label:l}))}}v.push(d)}if(0===e.length){let e=this.getVisibleColSpan(null===(d=t.horizontal)||void 0===d?void 0:d[0]),a=0;Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{a+=e.rowSpan||1}));const i={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(a,1)};0===v.length?v.push([i]):v[0].push(i)}return v}getVisibleColSpan(e){var t;return null!==(t=null==e?void 0:e.reduce((e,t)=>"visible"in t&&!1===t.visible?e:e+(t.colSpan||1),0))&&void 0!==t?t:0}isFixedCol(e){if(this._fixedCols&&void 0!==e&&!this.stickyColsDisabled)return e<this._fixedCols[0]?"left":e>=this.maxCols-this._fixedCols[1]?"right":void 0}getFixedOffset(e){if(this.tableDivElement&&void 0!==e)return void 0!==this.fixedOffsets[e]?this.fixedOffsets[e]:void 0}getOffsetString(e,t){return t&&this._selection?"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(e)+"px)":this.getFixedOffset(e)+"px"}handleSelectionChangeCallbackAndEvent(e,t){var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a[keyboard.Callback.onSelectionChange])&&this.state._on[keyboard.Callback.onSelectionChange](e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});common.setState(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu),this.validateVariantClassName(this._variant)}renderSelectionCell(e,t){var a;const i=this.state._selection;if(!i)return"";const l=this.getSelectionKeyPropertyName(),s=null===(a=e[0])||void 0===a?void 0:a.data;if(!s)return"";const r=s[l],o=i.multiple||void 0===i.multiple,n=(()=>{const e=null==i?void 0:i.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),c=(()=>{const e=null==i?void 0:i.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),d=i.label(s),h={name:"selection",checked:n,disabled:c,id:String(r),"aria-label":d};return index.h("td",{key:`tbody-${t}-selection`,class:"kol-table__cell kol-table__cell--selection"},index.h("div",{class:clsx.clsx("kol-table__selection",{"kol-table__selection--checked":n})},o?index.h("label",{class:clsx.clsx("kol-table__selection-label",{"kol-table__selection-label--disabled":c})},index.h(component.IconFC,{class:"kol-table__selection-icon",icons:"kolicon "+(n?"kolicon-check":""),label:""}),index.h("input",Object.assign({class:clsx.clsx("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},h,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==i?void 0:i.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),a=n?t.filter(e=>String(e)!==String(r)):[...t,r];this.handleSelectionChangeCallbackAndEvent(e,null!=a?a:[])}}))):index.h("label",{class:"kol-table__selection-label"},index.h("input",Object.assign({class:clsx.clsx("kol-table__selection-input kol-table__selection-input--radio")},h,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[r])}}))),index.h("div",{class:"kol-table__selection-input-tooltip"},index.h(component$1.TooltipFC,{label:d,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var a;const i=null===(a=this.state._selection)||void 0===a?void 0:a.disabledKeys;return!(void 0===i?[]:Array.isArray(i)?i:[i]).some(a=>String(a)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const a=this.getSelectionKeyPropertyName(),i=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&i.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[a])),i}getTableMinWidth(){var e,t;const a=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],i=[];a.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&i.push(e.width)})});const l=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],s=[];l.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&s.push(e.width)})});const r=[...s,...i];return 0===r.length?"0px":1===r.length?`${r[0]}px`:`calc(${r.map(e=>`${e}px`).join(" + ")})`}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!a)return index.h("td",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===a.multiple)return index.h("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const i=null!==(t=null===(e=this.getSelectedKeysWithoutDisabledKeys())||void 0===e?void 0:e.length)&&void 0!==t?t:0,l=i===this.getDataWithSelectionEnabled().length,s=0!==i&&!l;let r="kol-table-selection-indeterminate";l&&!s&&(r="kol-table-selection-none"),0===i&&(r="kol-table-selection-all");const o=i18n.translate(r);return index.h("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},index.h("div",{class:clsx.clsx("kol-table__selection",{"kol-table__selection--indeterminate":s,"kol-table__selection--checked":l})},index.h("label",{class:"kol-table__selection-label"},index.h(component.IconFC,{class:"kol-table__selection-icon",icons:"kolicon "+(s?"kolicon-minus":l?"kolicon-check":""),label:""}),index.h("input",{class:clsx.clsx("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:l&&!s,indeterminate:s,"aria-label":o,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!l))}})),index.h("div",{class:"kol-table__selection-input-tooltip"},index.h(component$1.TooltipFC,{label:o,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const e=this.state._headerCells.horizontal,t=this.state._headerCells.vertical;if(!Array.isArray(e)||0===e.length||!Array.isArray(t)||0===t.length)return index.h(index.Fragment,null);const a=t.reduce((e,t)=>{var a;const i=null==t?void 0:t[0];return e+(null!==(a=null==i?void 0:i.width)&&void 0!==a?a:0)},0);return index.h("td",{"aria-hidden":"true",colSpan:t.length,rowSpan:e.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(e,t,a,i){if(!1===e.visible)return"";const l=!1!==(null==e?void 0:e.sortable),s="string"==typeof e.sortDirection,r=l&&s;let o="none",n="kolicon-sort-neutral";if(r&&e.sortDirection)switch(e.sortDirection){case"ASC":n="kolicon-sort-asc",o="ascending";break;case"DESC":n="kolicon-sort-desc",o="descending";break;default:o="none"}const c=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",d="number"==typeof e.sortOrder&&e.sortOrder>0?e.sortOrder:void 0,h=this.getSortAriaDescription(d),b=void 0!==e.width?`${e.width}px`:void 0,u=this.isFixedCol(a),v="left"===u?this.getOffsetString(a,!0):void 0,f="right"===u?this.getOffsetString(a):void 0;return index.h("th",{key:`${t}-${a}-${e.label}`,class:clsx.clsx("kol-table__cell kol-table__cell--header",`kol-table__cell--${o}`,e.textAlign&&`kol-table__cell--align-${e.textAlign}`,u&&`kol-table__cell--sticky-${u}`),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:b,left:v,right:f},"aria-sort":o,"data-sort":r&&e.sortDirection?`sort-${e.sortDirection}`:void 0},r&&e.sortDirection?index.h("span",{class:"kol-table__sort"},index.h(componentNames.KolButtonWcTag,{class:"kol-table__sort-button",_icons:{right:n},_label:e.label,_ariaDescription:h,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection}),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.sort,{key:e.key,currentSortDirection:e.sortDirection})}}}),d&&index.h("span",{"aria-hidden":"true",class:"kol-table__sort-order"},d)):e.label)}renderSpacer(e,t){var a;const i=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=this.getVisibleColSpan(null==t?void 0:t[0]),s=this.state._selection?1:0;return index.h("tr",{"aria-hidden":"true",class:clsx.clsx("kol-table__spacer",`kol-table__spacer--${e}`)},index.h("td",{class:clsx.clsx(`kol-table__spacer-line kol-table__spacer-line--${e}`),colSpan:i+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return index.h("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",e),e.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const t=this.state._headerCells.horizontal;return index.h("div",{key:"f2486903b816a22f05eb8f3278aa61bb7fe61043",class:clsx.clsx("kol-table",{[`kol-table--${this.state._variant}`]:void 0!==this.state._variant})},this.state._hasSettingsMenu&&index.h(componentNames.KolTableSettingsWcTag,{key:"df6067ff8e4ab98b9110c4838d57cfda5ff5e24e",_horizontalHeaderCells:null!=t?t:[]}),index.h("div",{key:"4f716fe9c5ff063b14eb67b07d587973bbd7a524",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},index.h("table",{key:"028b31dffc8dad64fc7de580932648cd5e82d227",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},index.h("caption",{key:"8a6a42b7b4fcaff5c8fd6980cd0d5e67a8aaf3fc",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(t)&&index.h("thead",{key:"71ba0ca807d7a4f1ed6ea77a7c279f9a65bd946c",class:"kol-table__head"},[t.map((e,t)=>index.h("tr",{class:"kol-table__head-row",key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map((e,a)=>this.renderHeadingCell(e,t,a,!1)))),this.renderSpacer("head",t)]),index.h("tbody",{key:"2da2b2676d50a7c64442f13e5928c3a5cc8ece62",class:"kol-table__body"},e.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return index.getElement(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"],_variant:["validateVariantClassName"]}}};exports.kol_table_stateless_wc=KolTableStatelessWc;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-C24UiEit.js"),componentNames=require("./component-names-5KS_pYRF.js");require("./common-DPb6NWR4.js");const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779456138767"); /* IE9*/\n src: url("kolicons.eot?t=1779456138767#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779456138767") format("woff2"), url("kolicons.woff?t=1779456138767") format("woff"), url("kolicons.ttf?t=1779456138767") format("truetype"), url("kolicons.svg?t=1779456138767#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid black;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: white;\n display: flex;\n position: relative;\n min-width: calc(var(--a11y-min-size) / 2);\n min-height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: black;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}',KolTableStateless=class{constructor(n){index.registerInstance(this,n)}render(){return index.h(componentNames.KolTableStatelessWcTag,{key:"cc690ca5a777660c9370f8c5e7d3b567e7c8ab58",_data:this._data,_dataFoot:this._dataFoot,_fixedCols:this._fixedCols,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu,_variant:this._variant})}};KolTableStateless.style={default:defaultStyleCss},exports.kol_table_stateless=KolTableStateless;
4
+ "use strict";var index=require("./index-DyCCobHQ.js"),componentNames=require("./component-names-5KS_pYRF.js");require("./common-DPb6NWR4.js");const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779833120296"); /* IE9*/\n src: url("kolicons.eot?t=1779833120296#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779833120296") format("woff2"), url("kolicons.woff?t=1779833120296") format("woff"), url("kolicons.ttf?t=1779833120296") format("truetype"), url("kolicons.svg?t=1779833120296#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid black;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: white;\n display: flex;\n position: relative;\n min-width: calc(var(--a11y-min-size) / 2);\n min-height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: black;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}',KolTableStateless=class{constructor(n){index.registerInstance(this,n)}render(){return index.h(componentNames.KolTableStatelessWcTag,{key:"cc690ca5a777660c9370f8c5e7d3b567e7c8ab58",_data:this._data,_dataFoot:this._dataFoot,_fixedCols:this._fixedCols,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu,_variant:this._variant})}};KolTableStateless.style={default:defaultStyleCss},exports.kol_table_stateless=KolTableStateless;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-C24UiEit.js"),common=require("./common-DPb6NWR4.js"),align=require("./align-B8NMKvjk.js"),label=require("./label-8vcJJEVI.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),keyboard=require("./keyboard-BfFtSnNy.js"),clsx=require("./clsx-Bm_HQUnh.js"),elementClick=require("./element-click-BNHh6n4d.js"),elementFocus=require("./element-focus-r03qIEIv.js"),events=require("./events-Jc2wxPjR.js");require("./i18n-CgUN6lev.js");const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(e,t)=>{common.watchValidator(e,"_behavior",e=>"string"==typeof e&&tabBehaviorPropTypeOptions.includes(e),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),t)},validateHasCreateButton=(e,t)=>{common.watchBoolean(e,"_hasCreateButton",t)},defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779456138767"); /* IE9*/\n src: url("kolicons.eot?t=1779456138767#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779456138767") format("woff2"), url("kolicons.woff?t=1779456138767") format("woff"), url("kolicons.ttf?t=1779456138767") format("truetype"), url("kolicons.svg?t=1779456138767#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}',KolTabs=class{constructor(e){index.registerInstance(this,e),this.onCreateLabel=`${i18n.translate("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case keyboard.KeyboardKey.ArrowRight:this.goToNextTab(e);break;case keyboard.KeyboardKey.ArrowLeft:this.goToPreviousTab(e);break;case keyboard.KeyboardKey.Space:case keyboard.KeyboardKey.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.setCurrentTabButtonRef=e=>{this.currentTabButtonRef=e},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);common.devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden",""),e.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.currentTabButtonRef))}async click(){return elementClick.delegateClick(this.host,async()=>elementClick.setClick(this.currentTabButtonRef))}renderButtonGroup(){return index.h("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((e,t)=>index.h(componentNames.KolButtonWcTag,{ref:this.state._selected===t?this.setCurrentTabButtonRef:void 0,_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===t?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===t?"custom":void 0,_customClass:this.state._selected===t?"selected":"",_ariaControls:`tabpanel-${t}`,_ariaSelected:this.state._selected===t,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${t}`,_role:"tab",_value:t})),this.state._hasCreateButton&&index.h(componentNames.KolButtonWcTag,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return index.h("div",{key:"253099cbbf5db5fa1451dbfaa29670454939e581",ref:e=>{this.tabPanelsElement=e},class:clsx.clsx("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),index.h("div",{key:"8f6a109324808cf7914ca7cdd9db878268bf3383",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){align.validateAlign(this,e)}validateBehavior(e){validateTabBehavior(this,e)}validateHasCreateButton(e){validateHasCreateButton(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),common.setState(this,"_on",t)}}validateSelected(e){common.watchNumber(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){common.watchJsonArrayString(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),common.uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=common.koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.select,t),this.focusTabById(t)}get host(){return index.getElement(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};KolTabs.style={default:defaultStyleCss},exports.kol_tabs=KolTabs;
4
+ "use strict";var index=require("./index-DyCCobHQ.js"),common=require("./common-DPb6NWR4.js"),align=require("./align-B8NMKvjk.js"),label=require("./label-8vcJJEVI.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-Cjy0vgJA.js"),keyboard=require("./keyboard-BfFtSnNy.js"),clsx=require("./clsx-Bm_HQUnh.js"),elementClick=require("./element-click-BNHh6n4d.js"),elementFocus=require("./element-focus-r03qIEIv.js"),events=require("./events-Jc2wxPjR.js");require("./i18n-CgUN6lev.js");const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(e,t)=>{common.watchValidator(e,"_behavior",e=>"string"==typeof e&&tabBehaviorPropTypeOptions.includes(e),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),t)},validateHasCreateButton=(e,t)=>{common.watchBoolean(e,"_hasCreateButton",t)},defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1779833120296"); /* IE9*/\n src: url("kolicons.eot?t=1779833120296#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1779833120296") format("woff2"), url("kolicons.woff?t=1779833120296") format("woff"), url("kolicons.ttf?t=1779833120296") format("truetype"), url("kolicons.svg?t=1779833120296#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}',KolTabs=class{constructor(e){index.registerInstance(this,e),this.onCreateLabel=`${i18n.translate("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case keyboard.KeyboardKey.ArrowRight:this.goToNextTab(e);break;case keyboard.KeyboardKey.ArrowLeft:this.goToPreviousTab(e);break;case keyboard.KeyboardKey.Space:case keyboard.KeyboardKey.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.setCurrentTabButtonRef=e=>{this.currentTabButtonRef=e},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);common.devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden",""),e.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.currentTabButtonRef))}async click(){return elementClick.delegateClick(this.host,async()=>elementClick.setClick(this.currentTabButtonRef))}renderButtonGroup(){return index.h("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((e,t)=>index.h(componentNames.KolButtonWcTag,{ref:this.state._selected===t?this.setCurrentTabButtonRef:void 0,_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===t?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===t?"custom":void 0,_customClass:this.state._selected===t?"selected":"",_ariaControls:`tabpanel-${t}`,_ariaSelected:this.state._selected===t,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${t}`,_role:"tab",_value:t})),this.state._hasCreateButton&&index.h(componentNames.KolButtonWcTag,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return index.h("div",{key:"253099cbbf5db5fa1451dbfaa29670454939e581",ref:e=>{this.tabPanelsElement=e},class:clsx.clsx("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),index.h("div",{key:"8f6a109324808cf7914ca7cdd9db878268bf3383",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){align.validateAlign(this,e)}validateBehavior(e){validateTabBehavior(this,e)}validateHasCreateButton(e){validateHasCreateButton(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),common.setState(this,"_on",t)}}validateSelected(e){common.watchNumber(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){common.watchJsonArrayString(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),common.uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=common.koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.select,t),this.focusTabById(t)}get host(){return index.getElement(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};KolTabs.style={default:defaultStyleCss},exports.kol_tabs=KolTabs;