@public-ui/components 4.3.0-rc.0 → 4.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) 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 +1 -1
  7. package/dist/cjs/{Alert-CVPzTxE7.js → Alert-DGeuWGwx.js} +5 -5
  8. package/dist/cjs/{Alert-CVPzTxE7.js.map → Alert-DGeuWGwx.js.map} +1 -1
  9. package/dist/cjs/{Collapsible-DgZrS8sE.js → Collapsible-D5MJpSsb.js} +5 -5
  10. package/dist/cjs/{Collapsible-DgZrS8sE.js.map → Collapsible-D5MJpSsb.js.map} +1 -1
  11. package/dist/cjs/{CustomSuggestionsOptionsGroup-Cu-DKRH_.js → CustomSuggestionsOptionsGroup-CXqRxSlV.js} +3 -3
  12. package/dist/cjs/{CustomSuggestionsOptionsGroup-Cu-DKRH_.js.map → CustomSuggestionsOptionsGroup-CXqRxSlV.js.map} +1 -1
  13. package/dist/cjs/{FieldControlStateWrapper-CElQn7sN.js → FieldControlStateWrapper-9AbnJdJw.js} +7 -7
  14. package/dist/cjs/{FieldControlStateWrapper-CElQn7sN.js.map → FieldControlStateWrapper-9AbnJdJw.js.map} +1 -1
  15. package/dist/cjs/{FormFieldStateWrapper-C93KLp60.js → FormFieldStateWrapper-D8PA3SkL.js} +7 -7
  16. package/dist/cjs/{FormFieldStateWrapper-C93KLp60.js.map → FormFieldStateWrapper-D8PA3SkL.js.map} +1 -1
  17. package/dist/cjs/{Heading-Cswcjs5-.js → Heading-D9SmGbfD.js} +3 -3
  18. package/dist/cjs/{Heading-Cswcjs5-.js.map → Heading-D9SmGbfD.js.map} +1 -1
  19. package/dist/cjs/{Input-BmS5OT6F.js → Input-7dreufF0.js} +5 -5
  20. package/dist/cjs/{Input-BmS5OT6F.js.map → Input-7dreufF0.js.map} +1 -1
  21. package/dist/cjs/{InputStateWrapper-79jr7rz8.js → InputStateWrapper-ntE05AJl.js} +6 -6
  22. package/dist/cjs/{InputStateWrapper-79jr7rz8.js.map → InputStateWrapper-ntE05AJl.js.map} +1 -1
  23. package/dist/cjs/{app-globals-x09whKfp.js → app-globals-DS0A1y3l.js} +4 -4
  24. package/dist/cjs/{app-globals-x09whKfp.js.map → app-globals-DS0A1y3l.js.map} +1 -1
  25. package/dist/cjs/{component-4yrnT9ww.js → component-BEcrKHc2.js} +4 -4
  26. package/dist/cjs/{component-4yrnT9ww.js.map → component-BEcrKHc2.js.map} +1 -1
  27. package/dist/cjs/{component-C1vBQDN-.js → component-BpTg8PCv.js} +3 -3
  28. package/dist/cjs/{component-C1vBQDN-.js.map → component-BpTg8PCv.js.map} +1 -1
  29. package/dist/cjs/{component-CYZTV5r0.js → component-DA5ZXmFP.js} +4 -4
  30. package/dist/cjs/{component-CYZTV5r0.js.map → component-DA5ZXmFP.js.map} +1 -1
  31. package/dist/cjs/{component-EJOcQRXl.js → component-U7UWIKdR.js} +3 -3
  32. package/dist/cjs/{component-EJOcQRXl.js.map → component-U7UWIKdR.js.map} +1 -1
  33. package/dist/cjs/{controller-CShnVKSd.js → controller-Br37uto2.js} +3 -3
  34. package/dist/cjs/{controller-CShnVKSd.js.map → controller-Br37uto2.js.map} +1 -1
  35. package/dist/cjs/{controller-3DispTOw.js → controller-CWTdHXvg.js} +3 -3
  36. package/dist/cjs/{controller-3DispTOw.js.map → controller-CWTdHXvg.js.map} +1 -1
  37. package/dist/cjs/{controller-P5D-ZKaP.js → controller-DmoMYYzy.js} +3 -3
  38. package/dist/cjs/{controller-P5D-ZKaP.js.map → controller-DmoMYYzy.js.map} +1 -1
  39. package/dist/cjs/{controller-icon-BfIYzDZs.js → controller-icon-CdwPO8hD.js} +6 -6
  40. package/dist/cjs/{controller-icon-BfIYzDZs.js.map → controller-icon-CdwPO8hD.js.map} +1 -1
  41. package/dist/cjs/{dev.utils-Cdn-EtYb.js → dev.utils-BaRzDChI.js} +3 -3
  42. package/dist/cjs/{dev.utils-Cdn-EtYb.js.map → dev.utils-BaRzDChI.js.map} +1 -1
  43. package/dist/cjs/{devtools-BQj_-O6G.js → devtools-Ch90JQxx.js} +4 -4
  44. package/dist/cjs/{devtools-BQj_-O6G.js.map → devtools-Ch90JQxx.js.map} +1 -1
  45. package/dist/cjs/{index-DBbl8tEq.js → index-Dk00HcEs.js} +3 -3
  46. package/dist/cjs/{index-DBbl8tEq.js.map → index-Dk00HcEs.js.map} +1 -1
  47. package/dist/cjs/kol-abbr.cjs.entry.js +5 -5
  48. package/dist/cjs/kol-accordion.cjs.entry.js +5 -5
  49. package/dist/cjs/kol-alert-wc.cjs.entry.js +4 -4
  50. package/dist/cjs/kol-alert.cjs.entry.js +2 -2
  51. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-badge.cjs.entry.js +5 -5
  53. package/dist/cjs/kol-breadcrumb.cjs.entry.js +3 -3
  54. package/dist/cjs/kol-button-link.cjs.entry.js +2 -2
  55. package/dist/cjs/kol-button-wc.cjs.entry.js +4 -4
  56. package/dist/cjs/kol-button.cjs.entry.js +2 -2
  57. package/dist/cjs/kol-card-wc.cjs.entry.js +6 -6
  58. package/dist/cjs/kol-card.cjs.entry.js +2 -2
  59. package/dist/cjs/kol-click-button.cjs.entry.js +2 -2
  60. package/dist/cjs/kol-combobox.cjs.entry.js +13 -13
  61. package/dist/cjs/kol-details.cjs.entry.js +5 -5
  62. package/dist/cjs/kol-dialog-wc.cjs.entry.js +2 -2
  63. package/dist/cjs/kol-dialog.cjs.entry.js +2 -2
  64. package/dist/cjs/kol-drawer.cjs.entry.js +3 -3
  65. package/dist/cjs/kol-form.cjs.entry.js +5 -5
  66. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-icon.cjs.entry.js +3 -3
  68. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-checkbox.cjs.entry.js +12 -12
  70. package/dist/cjs/kol-input-color.cjs.entry.js +12 -12
  71. package/dist/cjs/kol-input-date.cjs.entry.js +12 -12
  72. package/dist/cjs/kol-input-email.cjs.entry.js +14 -14
  73. package/dist/cjs/kol-input-file.cjs.entry.js +12 -12
  74. package/dist/cjs/kol-input-number.cjs.entry.js +12 -12
  75. package/dist/cjs/kol-input-password.cjs.entry.js +13 -13
  76. package/dist/cjs/kol-input-radio.cjs.entry.js +12 -12
  77. package/dist/cjs/kol-input-range.cjs.entry.js +12 -12
  78. package/dist/cjs/kol-input-text.cjs.entry.js +14 -14
  79. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-link-button.cjs.entry.js +2 -2
  81. package/dist/cjs/kol-link-wc.cjs.entry.js +4 -4
  82. package/dist/cjs/kol-link.cjs.entry.js +2 -2
  83. package/dist/cjs/kol-meter.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-modal.cjs.entry.js +2 -2
  85. package/dist/cjs/kol-nav.cjs.entry.js +3 -3
  86. package/dist/cjs/kol-pagination-wc.cjs.entry.js +2 -2
  87. package/dist/cjs/kol-pagination.cjs.entry.js +2 -2
  88. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +2 -2
  89. package/dist/cjs/kol-popover-button.cjs.entry.js +2 -2
  90. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-select-wc.cjs.entry.js +10 -10
  93. package/dist/cjs/kol-select.cjs.entry.js +2 -2
  94. package/dist/cjs/kol-single-select.cjs.entry.js +14 -14
  95. package/dist/cjs/kol-skeleton.cjs.entry.js +2 -2
  96. package/dist/cjs/kol-skip-nav.cjs.entry.js +2 -2
  97. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-split-button.cjs.entry.js +2 -2
  99. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-table-stateful.cjs.entry.js +2 -2
  101. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +5 -5
  102. package/dist/cjs/kol-table-stateless.cjs.entry.js +2 -2
  103. package/dist/cjs/kol-tabs.cjs.entry.js +2 -2
  104. package/dist/cjs/kol-textarea.cjs.entry.js +10 -10
  105. package/dist/cjs/kol-toast-container.cjs.entry.js +7 -7
  106. package/dist/cjs/kol-toolbar.cjs.entry.js +2 -2
  107. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +4 -4
  108. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +3 -3
  109. package/dist/cjs/kol-tree-item.cjs.entry.js +2 -2
  110. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  113. package/dist/cjs/kolibri.cjs.js +2 -2
  114. package/dist/cjs/loader.cjs.js +2 -2
  115. package/dist/cjs/test-component.cjs.entry.js +1 -1
  116. package/dist/collection/components/abbr/style.css +2 -2
  117. package/dist/collection/components/accordion/style.css +2 -2
  118. package/dist/collection/components/alert/style.css +2 -2
  119. package/dist/collection/components/badge/style.css +2 -2
  120. package/dist/collection/components/breadcrumb/style.css +2 -2
  121. package/dist/collection/components/button/style.css +2 -2
  122. package/dist/collection/components/button-link/style.css +2 -2
  123. package/dist/collection/components/card/style.css +2 -2
  124. package/dist/collection/components/combobox/style.css +2 -2
  125. package/dist/collection/components/details/style.css +2 -2
  126. package/dist/collection/components/dialog/style.css +2 -2
  127. package/dist/collection/components/drawer/style.css +2 -2
  128. package/dist/collection/components/form/style.css +2 -2
  129. package/dist/collection/components/icon/style.css +2 -2
  130. package/dist/collection/components/input-checkbox/style.css +2 -2
  131. package/dist/collection/components/input-color/style.css +2 -2
  132. package/dist/collection/components/input-date/style.css +2 -2
  133. package/dist/collection/components/input-email/style.css +2 -2
  134. package/dist/collection/components/input-file/style.css +2 -2
  135. package/dist/collection/components/input-number/style.css +2 -2
  136. package/dist/collection/components/input-password/style.css +2 -2
  137. package/dist/collection/components/input-radio/style.css +2 -2
  138. package/dist/collection/components/input-range/style.css +2 -2
  139. package/dist/collection/components/input-text/style.css +2 -2
  140. package/dist/collection/components/link/style.css +2 -2
  141. package/dist/collection/components/link-button/style.css +2 -2
  142. package/dist/collection/components/modal/style.css +2 -2
  143. package/dist/collection/components/nav/style.css +2 -2
  144. package/dist/collection/components/pagination/style.css +2 -2
  145. package/dist/collection/components/popover-button/style.css +2 -2
  146. package/dist/collection/components/select/style.css +2 -2
  147. package/dist/collection/components/single-select/style.css +2 -2
  148. package/dist/collection/components/skip-nav/style.css +2 -2
  149. package/dist/collection/components/split-button/style.css +2 -2
  150. package/dist/collection/components/table-stateful/style.css +2 -2
  151. package/dist/collection/components/table-stateless/style.css +2 -2
  152. package/dist/collection/components/tabs/style.css +2 -2
  153. package/dist/collection/components/textarea/style.css +2 -2
  154. package/dist/collection/components/toaster/style.css +2 -2
  155. package/dist/collection/components/toolbar/style.css +2 -2
  156. package/dist/collection/components/tree-item/style.css +2 -2
  157. package/dist/components/kol-abbr.js +1 -1
  158. package/dist/components/kol-accordion.js +1 -1
  159. package/dist/components/kol-alert.js +1 -1
  160. package/dist/components/kol-badge.js +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.js +1 -1
  165. package/dist/components/kol-combobox.js +1 -1
  166. package/dist/components/kol-details.js +1 -1
  167. package/dist/components/kol-dialog.js +1 -1
  168. package/dist/components/kol-drawer.js +1 -1
  169. package/dist/components/kol-form.js +1 -1
  170. package/dist/components/kol-icon.js +1 -1
  171. package/dist/components/kol-input-checkbox.js +1 -1
  172. package/dist/components/kol-input-color.js +1 -1
  173. package/dist/components/kol-input-date.js +1 -1
  174. package/dist/components/kol-input-email.js +1 -1
  175. package/dist/components/kol-input-file.js +1 -1
  176. package/dist/components/kol-input-number.js +1 -1
  177. package/dist/components/kol-input-password.js +1 -1
  178. package/dist/components/kol-input-radio.js +1 -1
  179. package/dist/components/kol-input-range.js +1 -1
  180. package/dist/components/kol-input-text.js +1 -1
  181. package/dist/components/kol-link-button.js +1 -1
  182. package/dist/components/kol-link.js +1 -1
  183. package/dist/components/kol-modal.js +1 -1
  184. package/dist/components/kol-nav.js +1 -1
  185. package/dist/components/kol-pagination.js +1 -1
  186. package/dist/components/kol-popover-button.js +1 -1
  187. package/dist/components/kol-select.js +1 -1
  188. package/dist/components/kol-single-select.js +1 -1
  189. package/dist/components/kol-skip-nav.js +1 -1
  190. package/dist/components/kol-split-button.js +1 -1
  191. package/dist/components/kol-table-stateful.js +1 -1
  192. package/dist/components/kol-table-stateless.js +1 -1
  193. package/dist/components/kol-tabs.js +1 -1
  194. package/dist/components/kol-textarea.js +1 -1
  195. package/dist/components/kol-toast-container.js +1 -1
  196. package/dist/components/kol-toolbar.js +1 -1
  197. package/dist/components/kol-tree-item.js +1 -1
  198. package/dist/esm/{Alert-COvq80W3.js → Alert-2bYvhb8i.js} +5 -5
  199. package/dist/esm/{Alert-COvq80W3.js.map → Alert-2bYvhb8i.js.map} +1 -1
  200. package/dist/esm/{Collapsible-7IQAII4d.js → Collapsible-OjK6lDr2.js} +5 -5
  201. package/dist/{kolibri/Collapsible-7IQAII4d.js.map → esm/Collapsible-OjK6lDr2.js.map} +1 -1
  202. package/dist/esm/{CustomSuggestionsOptionsGroup-CUxWnoxh.js → CustomSuggestionsOptionsGroup-Cw_y_smw.js} +3 -3
  203. package/dist/{kolibri/CustomSuggestionsOptionsGroup-CUxWnoxh.js.map → esm/CustomSuggestionsOptionsGroup-Cw_y_smw.js.map} +1 -1
  204. package/dist/esm/{FieldControlStateWrapper-CCrS0kX3.js → FieldControlStateWrapper-CU6OjlrU.js} +7 -7
  205. package/dist/esm/{FieldControlStateWrapper-CCrS0kX3.js.map → FieldControlStateWrapper-CU6OjlrU.js.map} +1 -1
  206. package/dist/esm/{FormFieldStateWrapper-DCXQnRBu.js → FormFieldStateWrapper-C31luuWs.js} +7 -7
  207. package/dist/{kolibri/FormFieldStateWrapper-DCXQnRBu.js.map → esm/FormFieldStateWrapper-C31luuWs.js.map} +1 -1
  208. package/dist/esm/{Heading-Hh3eykel.js → Heading-C9p_CRv4.js} +3 -3
  209. package/dist/{kolibri/Heading-Hh3eykel.js.map → esm/Heading-C9p_CRv4.js.map} +1 -1
  210. package/dist/esm/{Input-Chj5JCQv.js → Input-CwcyFZhB.js} +5 -5
  211. package/dist/{kolibri/Input-Chj5JCQv.js.map → esm/Input-CwcyFZhB.js.map} +1 -1
  212. package/dist/esm/{InputStateWrapper-DA1rfFPc.js → InputStateWrapper-CcDZH7W5.js} +6 -6
  213. package/dist/esm/{InputStateWrapper-DA1rfFPc.js.map → InputStateWrapper-CcDZH7W5.js.map} +1 -1
  214. package/dist/esm/{app-globals-CpkHeTen.js → app-globals-Cwf240Bw.js} +4 -4
  215. package/dist/esm/{app-globals-CpkHeTen.js.map → app-globals-Cwf240Bw.js.map} +1 -1
  216. package/dist/esm/{component-CQaxTS4u.js → component-4RtkhTfb.js} +4 -4
  217. package/dist/{kolibri/component-CQaxTS4u.js.map → esm/component-4RtkhTfb.js.map} +1 -1
  218. package/dist/esm/{component-DTx6ZVqq.js → component-BFsdrctP.js} +4 -4
  219. package/dist/esm/{component-DTx6ZVqq.js.map → component-BFsdrctP.js.map} +1 -1
  220. package/dist/esm/{component-DHo2YdSx.js → component-ijX_kUom.js} +3 -3
  221. package/dist/esm/{component-DHo2YdSx.js.map → component-ijX_kUom.js.map} +1 -1
  222. package/dist/esm/{component-DohIJBPw.js → component-j5NhcleS.js} +3 -3
  223. package/dist/esm/{component-DohIJBPw.js.map → component-j5NhcleS.js.map} +1 -1
  224. package/dist/esm/{controller-DR9zGh9W.js → controller-B4DO-yV0.js} +3 -3
  225. package/dist/esm/{controller-DR9zGh9W.js.map → controller-B4DO-yV0.js.map} +1 -1
  226. package/dist/esm/{controller-eoW_d0fK.js → controller-CcrsrzWi.js} +3 -3
  227. package/dist/esm/{controller-eoW_d0fK.js.map → controller-CcrsrzWi.js.map} +1 -1
  228. package/dist/esm/{controller-DNx_ULdZ.js → controller-DvdfA2RR.js} +3 -3
  229. package/dist/{kolibri/controller-DNx_ULdZ.js.map → esm/controller-DvdfA2RR.js.map} +1 -1
  230. package/dist/esm/{controller-icon-ClFIXmW5.js → controller-icon-D3_aQk9W.js} +6 -6
  231. package/dist/esm/{controller-icon-ClFIXmW5.js.map → controller-icon-D3_aQk9W.js.map} +1 -1
  232. package/dist/esm/{dev.utils-HhhlYW_9.js → dev.utils-Cv9uCwkA.js} +3 -3
  233. package/dist/esm/{dev.utils-HhhlYW_9.js.map → dev.utils-Cv9uCwkA.js.map} +1 -1
  234. package/dist/esm/{devtools-CnPiO1UI.js → devtools-BOWjtOAI.js} +4 -4
  235. package/dist/esm/{devtools-CnPiO1UI.js.map → devtools-BOWjtOAI.js.map} +1 -1
  236. package/dist/esm/{index-Brmny3Vg.js → index-DqvPZ16l.js} +3 -3
  237. package/dist/{kolibri/index-Brmny3Vg.js.map → esm/index-DqvPZ16l.js.map} +1 -1
  238. package/dist/esm/kol-abbr.entry.js +5 -5
  239. package/dist/esm/kol-accordion.entry.js +5 -5
  240. package/dist/esm/kol-alert-wc.entry.js +4 -4
  241. package/dist/esm/kol-alert.entry.js +2 -2
  242. package/dist/esm/kol-avatar.entry.js +1 -1
  243. package/dist/esm/kol-badge.entry.js +5 -5
  244. package/dist/esm/kol-breadcrumb.entry.js +3 -3
  245. package/dist/esm/kol-button-link.entry.js +2 -2
  246. package/dist/esm/kol-button-wc.entry.js +4 -4
  247. package/dist/esm/kol-button.entry.js +2 -2
  248. package/dist/esm/kol-card-wc.entry.js +6 -6
  249. package/dist/esm/kol-card.entry.js +2 -2
  250. package/dist/esm/kol-click-button.entry.js +2 -2
  251. package/dist/esm/kol-combobox.entry.js +13 -13
  252. package/dist/esm/kol-details.entry.js +5 -5
  253. package/dist/esm/kol-dialog-wc.entry.js +2 -2
  254. package/dist/esm/kol-dialog.entry.js +2 -2
  255. package/dist/esm/kol-drawer.entry.js +3 -3
  256. package/dist/esm/kol-form.entry.js +5 -5
  257. package/dist/esm/kol-heading.entry.js +1 -1
  258. package/dist/esm/kol-icon.entry.js +3 -3
  259. package/dist/esm/kol-image.entry.js +1 -1
  260. package/dist/esm/kol-input-checkbox.entry.js +12 -12
  261. package/dist/esm/kol-input-color.entry.js +12 -12
  262. package/dist/esm/kol-input-date.entry.js +12 -12
  263. package/dist/esm/kol-input-email.entry.js +14 -14
  264. package/dist/esm/kol-input-file.entry.js +12 -12
  265. package/dist/esm/kol-input-number.entry.js +12 -12
  266. package/dist/esm/kol-input-password.entry.js +13 -13
  267. package/dist/esm/kol-input-radio.entry.js +12 -12
  268. package/dist/esm/kol-input-range.entry.js +12 -12
  269. package/dist/esm/kol-input-text.entry.js +14 -14
  270. package/dist/esm/kol-kolibri.entry.js +1 -1
  271. package/dist/esm/kol-link-button.entry.js +2 -2
  272. package/dist/esm/kol-link-wc.entry.js +4 -4
  273. package/dist/esm/kol-link.entry.js +2 -2
  274. package/dist/esm/kol-meter.entry.js +1 -1
  275. package/dist/esm/kol-modal.entry.js +2 -2
  276. package/dist/esm/kol-nav.entry.js +3 -3
  277. package/dist/esm/kol-pagination-wc.entry.js +2 -2
  278. package/dist/esm/kol-pagination.entry.js +2 -2
  279. package/dist/esm/kol-popover-button-wc.entry.js +2 -2
  280. package/dist/esm/kol-popover-button.entry.js +2 -2
  281. package/dist/esm/kol-progress.entry.js +1 -1
  282. package/dist/esm/kol-quote.entry.js +1 -1
  283. package/dist/esm/kol-select-wc.entry.js +10 -10
  284. package/dist/esm/kol-select.entry.js +2 -2
  285. package/dist/esm/kol-single-select.entry.js +14 -14
  286. package/dist/esm/kol-skeleton.entry.js +2 -2
  287. package/dist/esm/kol-skip-nav.entry.js +2 -2
  288. package/dist/esm/kol-spin.entry.js +1 -1
  289. package/dist/esm/kol-split-button.entry.js +2 -2
  290. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  291. package/dist/esm/kol-table-stateful.entry.js +2 -2
  292. package/dist/esm/kol-table-stateless-wc.entry.js +5 -5
  293. package/dist/esm/kol-table-stateless.entry.js +2 -2
  294. package/dist/esm/kol-tabs.entry.js +2 -2
  295. package/dist/esm/kol-textarea.entry.js +10 -10
  296. package/dist/esm/kol-toast-container.entry.js +7 -7
  297. package/dist/esm/kol-toolbar.entry.js +2 -2
  298. package/dist/esm/kol-tooltip-wc.entry.js +4 -4
  299. package/dist/esm/kol-tree-item-wc.entry.js +3 -3
  300. package/dist/esm/kol-tree-item.entry.js +2 -2
  301. package/dist/esm/kol-tree-wc.entry.js +1 -1
  302. package/dist/esm/kol-tree.entry.js +1 -1
  303. package/dist/esm/kol-version.entry.js +1 -1
  304. package/dist/esm/kolibri.js +3 -3
  305. package/dist/esm/loader.js +3 -3
  306. package/dist/esm/test-component.entry.js +1 -1
  307. package/dist/kolibri/{Alert-COvq80W3.js → Alert-2bYvhb8i.js} +2 -2
  308. package/dist/kolibri/{Alert-COvq80W3.js.map → Alert-2bYvhb8i.js.map} +1 -1
  309. package/dist/kolibri/Collapsible-OjK6lDr2.js +5 -0
  310. package/dist/{esm/Collapsible-7IQAII4d.js.map → kolibri/Collapsible-OjK6lDr2.js.map} +1 -1
  311. package/dist/kolibri/CustomSuggestionsOptionsGroup-Cw_y_smw.js +5 -0
  312. package/dist/{esm/CustomSuggestionsOptionsGroup-CUxWnoxh.js.map → kolibri/CustomSuggestionsOptionsGroup-Cw_y_smw.js.map} +1 -1
  313. package/dist/kolibri/FieldControlStateWrapper-CU6OjlrU.js +5 -0
  314. package/dist/kolibri/{FieldControlStateWrapper-CCrS0kX3.js.map → FieldControlStateWrapper-CU6OjlrU.js.map} +1 -1
  315. package/dist/kolibri/{FormFieldStateWrapper-DCXQnRBu.js → FormFieldStateWrapper-C31luuWs.js} +2 -2
  316. package/dist/{esm/FormFieldStateWrapper-DCXQnRBu.js.map → kolibri/FormFieldStateWrapper-C31luuWs.js.map} +1 -1
  317. package/dist/kolibri/Heading-C9p_CRv4.js +5 -0
  318. package/dist/{esm/Heading-Hh3eykel.js.map → kolibri/Heading-C9p_CRv4.js.map} +1 -1
  319. package/dist/kolibri/Input-CwcyFZhB.js +5 -0
  320. package/dist/{esm/Input-Chj5JCQv.js.map → kolibri/Input-CwcyFZhB.js.map} +1 -1
  321. package/dist/kolibri/InputStateWrapper-CcDZH7W5.js +5 -0
  322. package/dist/kolibri/{InputStateWrapper-DA1rfFPc.js.map → InputStateWrapper-CcDZH7W5.js.map} +1 -1
  323. package/dist/kolibri/app-globals-Cwf240Bw.js +5 -0
  324. package/dist/kolibri/{app-globals-CpkHeTen.js.map → app-globals-Cwf240Bw.js.map} +1 -1
  325. package/dist/kolibri/{component-CQaxTS4u.js → component-4RtkhTfb.js} +2 -2
  326. package/dist/{esm/component-CQaxTS4u.js.map → kolibri/component-4RtkhTfb.js.map} +1 -1
  327. package/dist/kolibri/component-BFsdrctP.js +5 -0
  328. package/dist/kolibri/{component-DTx6ZVqq.js.map → component-BFsdrctP.js.map} +1 -1
  329. package/dist/kolibri/{component-DHo2YdSx.js → component-ijX_kUom.js} +2 -2
  330. package/dist/kolibri/{component-DHo2YdSx.js.map → component-ijX_kUom.js.map} +1 -1
  331. package/dist/kolibri/{component-DohIJBPw.js → component-j5NhcleS.js} +2 -2
  332. package/dist/kolibri/{component-DohIJBPw.js.map → component-j5NhcleS.js.map} +1 -1
  333. package/dist/kolibri/{controller-DR9zGh9W.js → controller-B4DO-yV0.js} +2 -2
  334. package/dist/kolibri/{controller-DR9zGh9W.js.map → controller-B4DO-yV0.js.map} +1 -1
  335. package/dist/kolibri/{controller-eoW_d0fK.js → controller-CcrsrzWi.js} +2 -2
  336. package/dist/kolibri/{controller-eoW_d0fK.js.map → controller-CcrsrzWi.js.map} +1 -1
  337. package/dist/kolibri/{controller-DNx_ULdZ.js → controller-DvdfA2RR.js} +2 -2
  338. package/dist/{esm/controller-DNx_ULdZ.js.map → kolibri/controller-DvdfA2RR.js.map} +1 -1
  339. package/dist/kolibri/{controller-icon-ClFIXmW5.js → controller-icon-D3_aQk9W.js} +2 -2
  340. package/dist/kolibri/{controller-icon-ClFIXmW5.js.map → controller-icon-D3_aQk9W.js.map} +1 -1
  341. package/dist/kolibri/{dev.utils-HhhlYW_9.js → dev.utils-Cv9uCwkA.js} +2 -2
  342. package/dist/kolibri/{dev.utils-HhhlYW_9.js.map → dev.utils-Cv9uCwkA.js.map} +1 -1
  343. package/dist/kolibri/{devtools-CnPiO1UI.js → devtools-BOWjtOAI.js} +2 -2
  344. package/dist/kolibri/{devtools-CnPiO1UI.js.map → devtools-BOWjtOAI.js.map} +1 -1
  345. package/dist/kolibri/{index-Brmny3Vg.js → index-DqvPZ16l.js} +2 -2
  346. package/dist/{esm/index-Brmny3Vg.js.map → kolibri/index-DqvPZ16l.js.map} +1 -1
  347. package/dist/kolibri/kol-abbr.entry.js +1 -1
  348. package/dist/kolibri/kol-accordion.entry.js +1 -1
  349. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  350. package/dist/kolibri/kol-alert.entry.js +1 -1
  351. package/dist/kolibri/kol-avatar.entry.js +1 -1
  352. package/dist/kolibri/kol-badge.entry.js +1 -1
  353. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  354. package/dist/kolibri/kol-button-link.entry.js +1 -1
  355. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  356. package/dist/kolibri/kol-button.entry.js +1 -1
  357. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  358. package/dist/kolibri/kol-card.entry.js +1 -1
  359. package/dist/kolibri/kol-click-button.entry.js +1 -1
  360. package/dist/kolibri/kol-combobox.entry.js +1 -1
  361. package/dist/kolibri/kol-details.entry.js +1 -1
  362. package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
  363. package/dist/kolibri/kol-dialog.entry.js +1 -1
  364. package/dist/kolibri/kol-drawer.entry.js +1 -1
  365. package/dist/kolibri/kol-form.entry.js +1 -1
  366. package/dist/kolibri/kol-heading.entry.js +1 -1
  367. package/dist/kolibri/kol-icon.entry.js +1 -1
  368. package/dist/kolibri/kol-image.entry.js +1 -1
  369. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  370. package/dist/kolibri/kol-input-color.entry.js +1 -1
  371. package/dist/kolibri/kol-input-date.entry.js +1 -1
  372. package/dist/kolibri/kol-input-email.entry.js +1 -1
  373. package/dist/kolibri/kol-input-file.entry.js +1 -1
  374. package/dist/kolibri/kol-input-number.entry.js +1 -1
  375. package/dist/kolibri/kol-input-password.entry.js +1 -1
  376. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  377. package/dist/kolibri/kol-input-range.entry.js +1 -1
  378. package/dist/kolibri/kol-input-text.entry.js +1 -1
  379. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  380. package/dist/kolibri/kol-link-button.entry.js +1 -1
  381. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  382. package/dist/kolibri/kol-link.entry.js +1 -1
  383. package/dist/kolibri/kol-meter.entry.js +1 -1
  384. package/dist/kolibri/kol-modal.entry.js +1 -1
  385. package/dist/kolibri/kol-nav.entry.js +1 -1
  386. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  387. package/dist/kolibri/kol-pagination.entry.js +1 -1
  388. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  389. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  390. package/dist/kolibri/kol-progress.entry.js +1 -1
  391. package/dist/kolibri/kol-quote.entry.js +1 -1
  392. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  393. package/dist/kolibri/kol-select.entry.js +1 -1
  394. package/dist/kolibri/kol-single-select.entry.js +1 -1
  395. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  396. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  397. package/dist/kolibri/kol-spin.entry.js +1 -1
  398. package/dist/kolibri/kol-split-button.entry.js +1 -1
  399. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  400. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  401. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  402. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  403. package/dist/kolibri/kol-tabs.entry.js +1 -1
  404. package/dist/kolibri/kol-textarea.entry.js +1 -1
  405. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  406. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  407. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  408. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  409. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  410. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  411. package/dist/kolibri/kol-tree.entry.js +1 -1
  412. package/dist/kolibri/kol-version.entry.js +1 -1
  413. package/dist/kolibri/kolibri.esm.js +1 -1
  414. package/dist/kolibri/test-component.entry.js +1 -1
  415. package/package.json +1 -1
  416. package/dist/kolibri/Collapsible-7IQAII4d.js +0 -5
  417. package/dist/kolibri/CustomSuggestionsOptionsGroup-CUxWnoxh.js +0 -5
  418. package/dist/kolibri/FieldControlStateWrapper-CCrS0kX3.js +0 -5
  419. package/dist/kolibri/Heading-Hh3eykel.js +0 -5
  420. package/dist/kolibri/Input-Chj5JCQv.js +0 -5
  421. package/dist/kolibri/InputStateWrapper-DA1rfFPc.js +0 -5
  422. package/dist/kolibri/app-globals-CpkHeTen.js +0 -5
  423. package/dist/kolibri/component-DTx6ZVqq.js +0 -5
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t,H as e,g as i}from"./index-Brmny3Vg.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-CaL2ODdQ.js";import{e as s,b as r,s as c,P as h,o as d,p as f,j as b}from"./common-DEEjER7G.js";import{v as p,a as u}from"./aria-labelledby-BUOJRaGL.js";import{v as k,a as m,b as _,c as g,d as y,e as v}from"./table-selection-DlaNrAWM.js";import{v as x}from"./label-Cg7TG_7b.js";import{C as w}from"./keyboard-DNd73LVa.js";import{K as z,d as S}from"./events-BhfZTW2e.js";import"./i18n-B2d_exHc.js";const j=(n,t,e={})=>{s(n,"_allowMultiSort",t,Object.assign({defaultValue:false},e))};const C=["top","bottom","both"];const T=(n,t)=>{r(n,`_paginationPosition`,(n=>typeof n==="string"&&C.includes(n)),new Set([`PaginationPositionPropType {${C.join(", ")}`]),t,{defaultValue:"bottom"})};const O='@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=1780914078349"); /* IE9*/\n src: url("kolicons.eot?t=1780914078349#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780914078349") format("woff2"), url("kolicons.woff?t=1780914078349") format("woff"), url("kolicons.ttf?t=1780914078349") format("truetype"), url("kolicons.svg?t=1780914078349#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-settings-wc:not(:has(~ .kol-table__scroll-container .kol-table__caption)) {\n display: block;\n min-height: var(--a11y-min-size);\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:has(.kol-span__slot[hidden])::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 position: relative;\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 z-index: 1;\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}';const A=[10,20,50,100];const D=n=>n===true||n===""||typeof n==="object"&&n!==null;const P=class{constructor(t){n(this,t);this.resolvedElements=[];this.catchRef=n=>{this.tableWcRef=n};this.sortData=[];this.showPagination=false;this.pageStartSlice=0;this.pageEndSlice=10;this.disableSort=false;this._paginationPosition="bottom";this.state={_allowMultiSort:false,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:false};this.handlePagination={onClick:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onClick)==="function"){this.state._pagination._on.onClick(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onChangePage)==="function"){this.state._pagination._on.onChangePage(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onChangePageSize)==="function"){this.state._pagination._on.onChangePageSize(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:t}));c(this,"_pageSize",t)}};this.onSelectionChange=n=>{n.stopPropagation()};this.updateSortedData=()=>{if(this.disableSort){c(this,"_sortedData",this.state._data);return}const n=[...this.state._data];if(this.sortData.length>0){n.sort(((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e];const o=i.compareFn(n,t,i.direction);if(o!==0){return i.direction==="ASC"?o:-o}}return 0}))}c(this,"_sortedData",n)};this.handleChangeHeaderCells=n=>{this.adjustedHeaderCells=n}}validateAriaLabelledby(n){this.syncExternalLabel(n)}syncExternalLabel(n){this.resolvedElements=p(this,this.host,this.internals,n)}validateAllowMultiSort(n){j(this,n,{defaultValue:false})}validateData(n){k(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){m(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){_(this,n)}validatePaginationPosition(n){T(this,n)}validateHasSettingsMenu(n){g(this,n)}changeCellSort(n){var t;if(n.type===undefined||n.type==="default"){if(typeof n.compareFn!=="function"){return}if(!this.state._allowMultiSort&&n.key!==((t=this.sortData[0])===null||t===void 0?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";break}}else if(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=false;const o=n=>{this.sortData=[];n.forEach((n=>{if(n.type!==undefined&&n.type!=="default"){return}if(typeof n.compareFn==="function"&&!n.key){b(`[KolTableStateful] A sortable column requires the 'key' property.`);return}const t=n.key;if(!t){return}const e=n.sortDirection;if(e==="ASC"||e==="DESC"){if(typeof n.compareFn==="function"){if(this.state._allowMultiSort||this.sortData.length===0){this.sortData.push({label:n.label,key:t,compareFn:n.compareFn,direction:e})}i=true}}}))};(t=n.horizontal)===null||t===void 0?void 0:t.forEach(o);(e=n.vertical)===null||e===void 0?void 0:e.forEach(o);return i}validateHeaders(n){h(n,(()=>{d(n,(()=>{try{n=f(n)}catch(n){}r(this,"_headers",(n=>typeof n==="object"&&n!==null),new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e;const i=n;if(this.headerKeysChanged(this.state._headers,i)){this.adjustedHeaderCells=undefined}const o=this.initializeSortFromHeaders(i);if(o){setTimeout((()=>this.updateSortedData()))}if(i.horizontal&&i.vertical&&((t=i.horizontal)===null||t===void 0?void 0:t.length)>0&&((e=i.vertical)===null||e===void 0?void 0:e.length)>0){this.disableSort=true;b(`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){x(this,n,{required:true})}validateSelection(n){y(this,n)}validateOn(n){v(this,n)}validatePagination(n){try{n=f(n)}catch(n){}this.showPagination=D(n);r(this,"_pagination",D,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;(n=this.tableWcRef)===null||n===void 0?void 0:n.addEventListener(z.selectionChange,this.onSelectionChange);if(!this.resolvedElements.length){this.syncExternalLabel(this._ariaLabelledby)}}disconnectedCallback(){var n;(n=this.tableWcRef)===null||n===void 0?void 0:n.removeEventListener(z.selectionChange,this.onSelectionChange)}componentWillLoad(){this.internals=u(this.host);this.syncExternalLabel(this._ariaLabelledby);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){if(typeof t==="number"&&t>0&&typeof e==="number"&&e>0){this.pageStartSlice=t*(e-1);this.pageEndSlice=t*e>n.length?n.length:t*e;return n.slice(this.pageStartSlice,this.pageEndSlice)}else{this.pageStartSlice=0;this.pageEndSlice=n.length;return n}}renderPagination(n){const e=a("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${a(`kol-pagination-position-${n}`)})`}});return t("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},t("div",{class:"kol-table-stateful__pagination-wrapper"},t(o,{_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||A,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(n){if(n.type!==undefined&&n.type!=="default"){return}if(!this.disableSort&&typeof n.compareFn==="function"){if(n.key){const t=this.sortData.find((t=>t.key===n.key));if(t===null||t===void 0?void 0:t.direction){return t.direction}}return"NOS"}}getHeaderCellSortOrder(n){if(n.type!==undefined&&n.type!=="default"){return}if(!this.disableSort&&this.state._allowMultiSort&&typeof n.compareFn==="function"&&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=(t=this.state._headers.horizontal)!==null&&t!==void 0?t:[];const o=(e=this.state._headers.vertical)!==null&&e!==void 0?e:[];const l=[];for(const n of i){if(Array.isArray(n)){l.push(...n)}}for(const n of o){if(Array.isArray(n)){l.push(...n)}}const a=l.find((t=>t.key===n));if(a){this.changeCellSort(a)}}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=(t=e.keyPropertyName)!==null&&t!==void 0?t:"id";const o=new Set(n.map(String));const l=this.state._sortedData.filter((n=>o.has(String(n[i]))));if(i)return l}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;if(i)this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})});const o=this.getSelectedData(t);if(typeof((e=this.state._on)===null||e===void 0?void 0:e[w.onSelectionChange])==="function"){this.state._on[w.onSelectionChange](n,o)}if(this.host){S(this.host,z.selectionChange,o)}}async getSelection(){var n;const t=((n=this.state._selection)===null||n===void 0?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}async resetSort(){this.initializeSortFromHeaders(this.state._headers);this.updateSortedData()}headerKeysChanged(n,t){const e=n=>{var t,e,i,o;return[...(e=(t=n.horizontal)===null||t===void 0?void 0:t.flatMap((n=>n.map((n=>n===null||n===void 0?void 0:n.key)).filter((n=>Boolean(n))))))!==null&&e!==void 0?e:[],...(o=(i=n.vertical)===null||i===void 0?void 0:i.flatMap((n=>n.map((n=>n===null||n===void 0?void 0:n.key)).filter((n=>Boolean(n))))))!==null&&o!==void 0?o:[]]};const i=e(n);const o=e(t);return i.length!==o.length||i.some(((n,t)=>n!==o[t]))}mergeAdjustedHeaderCells(n){var t;const e=new Map;(t=this.state._headers.horizontal)===null||t===void 0?void 0:t.forEach((n=>n.forEach((n=>{if(n===null||n===void 0?void 0:n.key){e.set(n.key,n)}}))));return n.map((n=>n.map((n=>{const t=(n===null||n===void 0?void 0:n.key)?e.get(n.key):undefined;if(!t){return n}const i=Object.assign({},t);if(n.visible!==undefined)i.visible=n.visible;if(n.width!==undefined)i.width=n.width;if(n.hidable!==undefined)i.hidable=n.hidable;if(n.sortable!==undefined)i.sortable=n.sortable;if(n.resizable!==undefined)i.resizable=n.resizable;return i}))))}buildHeaderCells(){var n,t,e,i;const o=n=>n?Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}):n;const l=((n=this.adjustedHeaderCells)===null||n===void 0?void 0:n.horizontal)?this.mergeAdjustedHeaderCells(this.adjustedHeaderCells.horizontal):this.state._headers.horizontal;return{horizontal:(t=l===null||l===void 0?void 0:l.map((n=>n.map(o))))!==null&&t!==void 0?t:[],vertical:(i=(e=this.state._headers.vertical)===null||e===void 0?void 0:e.map((n=>n.map(o))))!==null&&i!==void 0?i:[]}}render(){var n,i;const o=this.selectDisplayedData(this.state._sortedData,this.showPagination?(i=(n=this.state._pagination)===null||n===void 0?void 0:n._pageSize)!==null&&i!==void 0?i:10:this.state._sortedData.length,this.state._pagination._page||1);const a=this._paginationPosition==="top"||this._paginationPosition==="both"?this.renderPagination("top"):null;const s=this._paginationPosition==="bottom"||this._paginationPosition==="both"?this.renderPagination("bottom"):null;const r=this.buildHeaderCells();return t(e,{key:"90a24351760bff3f69028dff8a3cde65a9648953",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&a,t(l,{key:"4b3f6706a8c37ac9cbc741334d9d424e96c0d789",externalLabelElements:this.resolvedElements,ref:this.catchRef,_data:o,_fixedCols:this._fixedCols,_headerCells:r,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)},onChangeHeaderCells:(n,t)=>{this.handleChangeHeaderCells(t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu,_variant:this._variant}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return i(this)}static get watchers(){return{_ariaLabelledby:["validateAriaLabelledby"],_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};P.style={default:O};export{P as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-DqvPZ16l.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-CaL2ODdQ.js";import{e as s,b as r,s as c,P as h,o as d,p as f,j as b}from"./common-DEEjER7G.js";import{v as p,a as u}from"./aria-labelledby-BUOJRaGL.js";import{v as k,a as m,b as _,c as g,d as y,e as v}from"./table-selection-DlaNrAWM.js";import{v as x}from"./label-Cg7TG_7b.js";import{C as w}from"./keyboard-DNd73LVa.js";import{K as z,d as S}from"./events-BhfZTW2e.js";import"./i18n-B2d_exHc.js";const j=(n,t,e={})=>{s(n,"_allowMultiSort",t,Object.assign({defaultValue:false},e))};const C=["top","bottom","both"];const T=(n,t)=>{r(n,`_paginationPosition`,(n=>typeof n==="string"&&C.includes(n)),new Set([`PaginationPositionPropType {${C.join(", ")}`]),t,{defaultValue:"bottom"})};const O='@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=1780919027063"); /* IE9*/\n src: url("kolicons.eot?t=1780919027063#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780919027063") format("woff2"), url("kolicons.woff?t=1780919027063") format("woff"), url("kolicons.ttf?t=1780919027063") format("truetype"), url("kolicons.svg?t=1780919027063#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-settings-wc:not(:has(~ .kol-table__scroll-container .kol-table__caption)) {\n display: block;\n min-height: var(--a11y-min-size);\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:has(.kol-span__slot[hidden])::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 position: relative;\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 z-index: 1;\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}';const A=[10,20,50,100];const D=n=>n===true||n===""||typeof n==="object"&&n!==null;const P=class{constructor(t){n(this,t);this.resolvedElements=[];this.catchRef=n=>{this.tableWcRef=n};this.sortData=[];this.showPagination=false;this.pageStartSlice=0;this.pageEndSlice=10;this.disableSort=false;this._paginationPosition="bottom";this.state={_allowMultiSort:false,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:false};this.handlePagination={onClick:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onClick)==="function"){this.state._pagination._on.onClick(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onChangePage)==="function"){this.state._pagination._on.onChangePage(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;if(typeof((e=this.state._pagination._on)===null||e===void 0?void 0:e.onChangePageSize)==="function"){this.state._pagination._on.onChangePageSize(n,t)}c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:t}));c(this,"_pageSize",t)}};this.onSelectionChange=n=>{n.stopPropagation()};this.updateSortedData=()=>{if(this.disableSort){c(this,"_sortedData",this.state._data);return}const n=[...this.state._data];if(this.sortData.length>0){n.sort(((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e];const o=i.compareFn(n,t,i.direction);if(o!==0){return i.direction==="ASC"?o:-o}}return 0}))}c(this,"_sortedData",n)};this.handleChangeHeaderCells=n=>{this.adjustedHeaderCells=n}}validateAriaLabelledby(n){this.syncExternalLabel(n)}syncExternalLabel(n){this.resolvedElements=p(this,this.host,this.internals,n)}validateAllowMultiSort(n){j(this,n,{defaultValue:false})}validateData(n){k(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){m(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){_(this,n)}validatePaginationPosition(n){T(this,n)}validateHasSettingsMenu(n){g(this,n)}changeCellSort(n){var t;if(n.type===undefined||n.type==="default"){if(typeof n.compareFn!=="function"){return}if(!this.state._allowMultiSort&&n.key!==((t=this.sortData[0])===null||t===void 0?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";break}}else if(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=false;const o=n=>{this.sortData=[];n.forEach((n=>{if(n.type!==undefined&&n.type!=="default"){return}if(typeof n.compareFn==="function"&&!n.key){b(`[KolTableStateful] A sortable column requires the 'key' property.`);return}const t=n.key;if(!t){return}const e=n.sortDirection;if(e==="ASC"||e==="DESC"){if(typeof n.compareFn==="function"){if(this.state._allowMultiSort||this.sortData.length===0){this.sortData.push({label:n.label,key:t,compareFn:n.compareFn,direction:e})}i=true}}}))};(t=n.horizontal)===null||t===void 0?void 0:t.forEach(o);(e=n.vertical)===null||e===void 0?void 0:e.forEach(o);return i}validateHeaders(n){h(n,(()=>{d(n,(()=>{try{n=f(n)}catch(n){}r(this,"_headers",(n=>typeof n==="object"&&n!==null),new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e;const i=n;if(this.headerKeysChanged(this.state._headers,i)){this.adjustedHeaderCells=undefined}const o=this.initializeSortFromHeaders(i);if(o){setTimeout((()=>this.updateSortedData()))}if(i.horizontal&&i.vertical&&((t=i.horizontal)===null||t===void 0?void 0:t.length)>0&&((e=i.vertical)===null||e===void 0?void 0:e.length)>0){this.disableSort=true;b(`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){x(this,n,{required:true})}validateSelection(n){y(this,n)}validateOn(n){v(this,n)}validatePagination(n){try{n=f(n)}catch(n){}this.showPagination=D(n);r(this,"_pagination",D,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;(n=this.tableWcRef)===null||n===void 0?void 0:n.addEventListener(z.selectionChange,this.onSelectionChange);if(!this.resolvedElements.length){this.syncExternalLabel(this._ariaLabelledby)}}disconnectedCallback(){var n;(n=this.tableWcRef)===null||n===void 0?void 0:n.removeEventListener(z.selectionChange,this.onSelectionChange)}componentWillLoad(){this.internals=u(this.host);this.syncExternalLabel(this._ariaLabelledby);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){if(typeof t==="number"&&t>0&&typeof e==="number"&&e>0){this.pageStartSlice=t*(e-1);this.pageEndSlice=t*e>n.length?n.length:t*e;return n.slice(this.pageStartSlice,this.pageEndSlice)}else{this.pageStartSlice=0;this.pageEndSlice=n.length;return n}}renderPagination(n){const e=a("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${a(`kol-pagination-position-${n}`)})`}});return t("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},t("div",{class:"kol-table-stateful__pagination-wrapper"},t(o,{_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||A,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(n){if(n.type!==undefined&&n.type!=="default"){return}if(!this.disableSort&&typeof n.compareFn==="function"){if(n.key){const t=this.sortData.find((t=>t.key===n.key));if(t===null||t===void 0?void 0:t.direction){return t.direction}}return"NOS"}}getHeaderCellSortOrder(n){if(n.type!==undefined&&n.type!=="default"){return}if(!this.disableSort&&this.state._allowMultiSort&&typeof n.compareFn==="function"&&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=(t=this.state._headers.horizontal)!==null&&t!==void 0?t:[];const o=(e=this.state._headers.vertical)!==null&&e!==void 0?e:[];const l=[];for(const n of i){if(Array.isArray(n)){l.push(...n)}}for(const n of o){if(Array.isArray(n)){l.push(...n)}}const a=l.find((t=>t.key===n));if(a){this.changeCellSort(a)}}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=(t=e.keyPropertyName)!==null&&t!==void 0?t:"id";const o=new Set(n.map(String));const l=this.state._sortedData.filter((n=>o.has(String(n[i]))));if(i)return l}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;if(i)this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})});const o=this.getSelectedData(t);if(typeof((e=this.state._on)===null||e===void 0?void 0:e[w.onSelectionChange])==="function"){this.state._on[w.onSelectionChange](n,o)}if(this.host){S(this.host,z.selectionChange,o)}}async getSelection(){var n;const t=((n=this.state._selection)===null||n===void 0?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}async resetSort(){this.initializeSortFromHeaders(this.state._headers);this.updateSortedData()}headerKeysChanged(n,t){const e=n=>{var t,e,i,o;return[...(e=(t=n.horizontal)===null||t===void 0?void 0:t.flatMap((n=>n.map((n=>n===null||n===void 0?void 0:n.key)).filter((n=>Boolean(n))))))!==null&&e!==void 0?e:[],...(o=(i=n.vertical)===null||i===void 0?void 0:i.flatMap((n=>n.map((n=>n===null||n===void 0?void 0:n.key)).filter((n=>Boolean(n))))))!==null&&o!==void 0?o:[]]};const i=e(n);const o=e(t);return i.length!==o.length||i.some(((n,t)=>n!==o[t]))}mergeAdjustedHeaderCells(n){var t;const e=new Map;(t=this.state._headers.horizontal)===null||t===void 0?void 0:t.forEach((n=>n.forEach((n=>{if(n===null||n===void 0?void 0:n.key){e.set(n.key,n)}}))));return n.map((n=>n.map((n=>{const t=(n===null||n===void 0?void 0:n.key)?e.get(n.key):undefined;if(!t){return n}const i=Object.assign({},t);if(n.visible!==undefined)i.visible=n.visible;if(n.width!==undefined)i.width=n.width;if(n.hidable!==undefined)i.hidable=n.hidable;if(n.sortable!==undefined)i.sortable=n.sortable;if(n.resizable!==undefined)i.resizable=n.resizable;return i}))))}buildHeaderCells(){var n,t,e,i;const o=n=>n?Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}):n;const l=((n=this.adjustedHeaderCells)===null||n===void 0?void 0:n.horizontal)?this.mergeAdjustedHeaderCells(this.adjustedHeaderCells.horizontal):this.state._headers.horizontal;return{horizontal:(t=l===null||l===void 0?void 0:l.map((n=>n.map(o))))!==null&&t!==void 0?t:[],vertical:(i=(e=this.state._headers.vertical)===null||e===void 0?void 0:e.map((n=>n.map(o))))!==null&&i!==void 0?i:[]}}render(){var n,i;const o=this.selectDisplayedData(this.state._sortedData,this.showPagination?(i=(n=this.state._pagination)===null||n===void 0?void 0:n._pageSize)!==null&&i!==void 0?i:10:this.state._sortedData.length,this.state._pagination._page||1);const a=this._paginationPosition==="top"||this._paginationPosition==="both"?this.renderPagination("top"):null;const s=this._paginationPosition==="bottom"||this._paginationPosition==="both"?this.renderPagination("bottom"):null;const r=this.buildHeaderCells();return t(e,{key:"90a24351760bff3f69028dff8a3cde65a9648953",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&a,t(l,{key:"4b3f6706a8c37ac9cbc741334d9d424e96c0d789",externalLabelElements:this.resolvedElements,ref:this.catchRef,_data:o,_fixedCols:this._fixedCols,_headerCells:r,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)},onChangeHeaderCells:(n,t)=>{this.handleChangeHeaderCells(t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu,_variant:this._variant}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return i(this)}static get watchers(){return{_ariaLabelledby:["validateAriaLabelledby"],_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};P.style={default:O};export{P as kol_table_stateful};
5
5
  //# sourceMappingURL=kol-table-stateful.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as e,F as i,g as n}from"./index-Brmny3Vg.js";import{a as l}from"./tslib.es6-QNbPBOk5.js";import{b as s,c as o,t as a}from"./component-names-Dy77vq43.js";import{t as r}from"./i18n-CaL2ODdQ.js";import{I as c}from"./component-DHo2YdSx.js";import{T as d}from"./component-DTx6ZVqq.js";import{P as h,o as f,p as u,b,L as v,s as _}from"./common-DEEjER7G.js";import{c as p,v as k,a as y,b as m,f as g,d as S}from"./table-selection-DlaNrAWM.js";import{v as j}from"./label-Cg7TG_7b.js";import{v as w}from"./variant-class-name-CkfE8oGZ.js";import{C}from"./keyboard-DNd73LVa.js";import{c as $}from"./clsx-COFh-Vc8.js";import{n as x}from"./dev.utils-HhhlYW_9.js";import{d as O,K as A}from"./events-BhfZTW2e.js";import{M as D,e as T,U as H,f as E,b as F,d as L,S as M,h as K}from"./_Uint8Array-kJHDjtoP.js";import{S as z,a as W,i as B}from"./isArray-CcrBs4JM.js";import"./i18n-B2d_exHc.js";import"./bem-registry-B9CzNnO1.js";import"./component-CQaxTS4u.js";var N="__lodash_hash_undefined__";function R(t){this.__data__.set(t,N);return this}function P(t){return this.__data__.has(t)}function V(t){var e=-1,i=t==null?0:t.length;this.__data__=new D;while(++e<i){this.add(t[e])}}V.prototype.add=V.prototype.push=R;V.prototype.has=P;function I(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)){return true}}return false}function U(t,e){return t.has(e)}var q=1,G=2;function Q(t,e,i,n,l,s){var o=i&q,a=t.length,r=e.length;if(a!=r&&!(o&&r>a)){return false}var c=s.get(t);var d=s.get(e);if(c&&d){return c==e&&d==t}var h=-1,f=true,u=i&G?new V:undefined;s.set(t,e);s.set(e,t);while(++h<a){var b=t[h],v=e[h];if(n){var _=o?n(v,b,h,e,t,s):n(b,v,h,t,e,s)}if(_!==undefined){if(_){continue}f=false;break}if(u){if(!I(e,(function(t,e){if(!U(u,e)&&(b===t||l(b,t,i,n,s))){return u.push(e)}}))){f=false;break}}else if(!(b===v||l(b,v,i,n,s))){f=false;break}}s["delete"](t);s["delete"](e);return f}function Z(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}function J(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var Y=1,X=2;var tt="[object Boolean]",et="[object Date]",it="[object Error]",nt="[object Map]",lt="[object Number]",st="[object RegExp]",ot="[object Set]",at="[object String]",rt="[object Symbol]";var ct="[object ArrayBuffer]",dt="[object DataView]";var ht=z?z.prototype:undefined,ft=ht?ht.valueOf:undefined;function ut(t,e,i,n,l,s,o){switch(i){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case ct:if(t.byteLength!=e.byteLength||!s(new H(t),new H(e))){return false}return true;case tt:case et:case lt:return T(+t,+e);case it:return t.name==e.name&&t.message==e.message;case st:case at:return t==e+"";case nt:var a=Z;case ot:var r=n&Y;a||(a=J);if(t.size!=e.size&&!r){return false}var c=o.get(t);if(c){return c==e}n|=X;o.set(t,e);var d=Q(a(t),a(e),n,l,s,o);o["delete"](t);return d;case rt:if(ft){return ft.call(t)==ft.call(e)}}return false}var bt=1;var vt=Object.prototype;var _t=vt.hasOwnProperty;function pt(t,e,i,n,l,s){var o=i&bt,a=E(t),r=a.length,c=E(e),d=c.length;if(r!=d&&!o){return false}var h=r;while(h--){var f=a[h];if(!(o?f in e:_t.call(e,f))){return false}}var u=s.get(t);var b=s.get(e);if(u&&b){return u==e&&b==t}var v=true;s.set(t,e);s.set(e,t);var _=o;while(++h<r){f=a[h];var p=t[f],k=e[f];if(n){var y=o?n(k,p,f,e,t,s):n(p,k,f,t,e,s)}if(!(y===undefined?p===k||l(p,k,i,n,s):y)){v=false;break}_||(_=f=="constructor")}if(v&&!_){var m=t.constructor,g=e.constructor;if(m!=g&&("constructor"in t&&"constructor"in e)&&!(typeof m=="function"&&m instanceof m&&typeof g=="function"&&g instanceof g)){v=false}}s["delete"](t);s["delete"](e);return v}var kt=1;var yt="[object Arguments]",mt="[object Array]",gt="[object Object]";var St=Object.prototype;var jt=St.hasOwnProperty;function wt(t,e,i,n,l,s){var o=W(t),a=W(e),r=o?mt:F(t),c=a?mt:F(e);r=r==yt?gt:r;c=c==yt?gt:c;var d=r==gt,h=c==gt,f=r==c;if(f&&L(t)){if(!L(e)){return false}o=true;d=false}if(f&&!d){s||(s=new M);return o||K(t)?Q(t,e,i,n,l,s):ut(t,e,r,i,n,l,s)}if(!(i&kt)){var u=d&&jt.call(t,"__wrapped__"),b=h&&jt.call(e,"__wrapped__");if(u||b){var v=u?t.value():t,_=b?e.value():e;s||(s=new M);return l(v,_,i,n,s)}}if(!f){return false}s||(s=new M);return pt(t,e,i,n,l,s)}function Ct(t,e,i,n,l){if(t===e){return true}if(t==null||e==null||!B(t)&&!B(e)){return t!==t&&e!==e}return wt(t,e,i,n,Ct,l)}function $t(t,e){return Ct(t,e)}const xt=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t)));const Ot=(t,e)=>{h(e,(()=>{f(e,(()=>{try{e=u(e)}catch(t){}b(t,"_headerCells",(t=>{if(typeof t!=="object"||t===null)return false;const e=t.horizontal;const i=t.vertical;if(e!==undefined&&!xt(e)||i!==undefined&&!xt(i)){return false}const n=[];for(const t of e!==null&&e!==void 0?e:[]){n.push(...t)}for(const t of i!==null&&i!==void 0?i:[]){n.push(...t)}return n.every((t=>t.width===undefined||typeof t.width==="number"))}),new Set(["TableHeaderCellsPropType"]),e)}))}))};const At=150;const Dt=class{constructor(i){t(this,i);this.translateNoEntries=r("kol-no-entries");this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:false};this.horizontal=true;this.cellsToRenderTimeouts=new Map;this.dataToKeyMap=new Map;this.selectedKeysStringSet=new Set;this.disabledKeysStringSet=new Set;this.checkboxRefs=[];this.translateSort=r("kol-sort");this.translateSortOrder=r("kol-table-sort-order");this.maxCols=0;this.fixedOffsets=[];this.settingsChangedCounter=0;this.tableDivElementHasScrollbar=false;this.stickyColsDisabled=false;this.renderTableRow=(t,i,n,l=false)=>{var s,o;let a=String(i);if(this.horizontal&&((s=t[0])===null||s===void 0?void 0:s.data)){a=(o=this.getDataKey(t[0].data))!==null&&o!==void 0?o:a}return e("tr",{class:$("kol-table__row",{"kol-table__row--body":!l,"kol-table__row--footer":l}),key:`row-${a}`},this.renderSelectionCell(t,i),t.map(((t,e)=>this.renderTableCell(t,i,e,n))))};this.renderTableCell=(t,i,n,l)=>{if(t.visible===false){return""}let s=`${i}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);s=e?`${e}-${this.horizontal?n:i}`:s}if(t.headerCell){return this.renderHeadingCell(t,i,n,l)}else{const i=typeof t.render!=="function"&&t.label===this.translateNoEntries;const l=this.getActionColumnHeader(n);const o=Boolean(l&&t.data);const a=this.isFixedCol(n);const r=a==="left"?this.getOffsetString(t.colIndex,true):undefined;const c=a==="right"?this.getOffsetString(t.colIndex):undefined;const d=typeof t.render==="function";return e("td",{key:`cell-${s}-${this.settingsChangedCounter}`,class:$("kol-table__cell kol-table__cell--body",t.textAlign&&`kol-table__cell--align-${t.textAlign}`,o&&"kol-table__cell--actions",a&&`kol-table__cell--sticky-${a}`),"aria-atomic":i?"false":undefined,"aria-live":i?"polite":undefined,"aria-relevant":i?"text":undefined,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,left:r,right:c},ref:d?e=>{this.cellRender(t,e)}:undefined},o&&l&&t.data?this.renderActionItems(l,t.data,s):!d?t.label:"")}};this.renderActionItems=(t,i,n)=>{const a=t.actions(i);return e("div",{class:"kol-table__cell-actions"},a.map(((t,i)=>{if(t.type==="button"){const o=l(t,[]);return e(s,Object.assign({key:`action-${n}-${i}`},o,{_variant:o._variant}))}else if(t.type==="link"){const s=l(t,[]);return e(o,Object.assign({key:`action-${n}-${i}`},s))}return null})))}}onExternalLabelElementsChange(t){this.syncTableLabel(t)}validateAriaLabelledby(){}syncTableLabel(t){if(!this.tableRef)return;if("ariaLabelledByElements"in this.tableRef){if(t===null||t===void 0?void 0:t.length){this.tableRef.ariaLabelledByElements=t}v.debug([this.tableRef,!!(t===null||t===void 0?void 0:t.length),t,this.tableRef.ariaLabelledByElements])}}validateHasSettingsMenu(t){p(this,t)}validateData(t){k(this,t,{beforePatch:t=>{this.updateDataToKeyMap(t)}})}validateDataFoot(t){y(this,t)}validateFixedCols(t){m(this,t);this.checkAndUpdateStickyState()}validateHeaderCells(t){Ot(this,t);if(!$t(this.previousHeaderCells,this.state._headerCells)){this.initializeHeaderCellSettings()}this.previousHeaderCells=this.state._headerCells}validateLabel(t){j(this,t,{required:true})}validateOn(t){g(this,t)}validateSelection(t){S(this,t);this.checkAndUpdateStickyState()}validateVariantClassName(t){w(this,t)}handleKeyDown(t){var e;if(t.key==="ArrowUp"||t.key==="ArrowDown"){const i=(e=this.tableDivElement)===null||e===void 0?void 0:e.querySelector(":focus");let n=this.checkboxRefs.indexOf(i);if(n>-1){t.preventDefault();if(t.key==="ArrowDown"){n=(n+1)%this.checkboxRefs.length;this.checkboxRefs[n].focus()}else if(t.key==="ArrowUp"){t.preventDefault();n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length;this.checkboxRefs[n].focus()}}}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){if(this.tableDivElement&&ResizeObserver){this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this));this.tableDivElementResizeObserver.observe(this.tableDivElement)}this.checkAndUpdateStickyState()}handleSettingsChange(t){var e;const i=Object.assign(Object.assign({},this.state._headerCells),{horizontal:t.detail});_(this,"_headerCells",i);this.settingsChangedCounter++;if(typeof((e=this.state._on)===null||e===void 0?void 0:e[C.onChangeHeaderCells])==="function"){this.state._on[C.onChangeHeaderCells](t,i)}}disconnectedCallback(){var t;(t=this.tableDivElementResizeObserver)===null||t===void 0?void 0:t.disconnect();clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar();clearTimeout(this.resizeDebounceTimeout);this.resizeDebounceTimeout=setTimeout((()=>{this.checkAndUpdateStickyState()}),At)}checkDivElementScrollbar(){if(this.tableDivElement){this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth}}calculateFixedColsWidth(){var t,e,i,n,l,s;if(!this._fixedCols)return 0;const o=this.getPrimaryHeaders(this.state._headerCells);let a=0;for(let i=0;i<this._fixedCols[0]&&i<o.length;i++){a+=(e=(t=o[i])===null||t===void 0?void 0:t.width)!==null&&e!==void 0?e:0}const r=this.maxCols-this._fixedCols[1];for(let t=r;t<this.maxCols&&t<o.length;t++){a+=(n=(i=o[t])===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:0}if(this.state._selection){const t=(l=this.tableDivElement)===null||l===void 0?void 0:l.querySelector(".kol-table__cell--selection");a+=(s=t===null||t===void 0?void 0:t.offsetWidth)!==null&&s!==void 0?s:0}return a}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols){this.stickyColsDisabled=false;return}const t=this.tableDivElement.clientWidth;const e=this.calculateFixedColsWidth();this.stickyColsDisabled=e>0&&e>=t}updateDataToKeyMap(t){const e=new Set(t);t.forEach((t=>{if(!this.dataToKeyMap.has(t)){this.dataToKeyMap.set(t,x())}}));this.dataToKeyMap.forEach(((t,i)=>{if(!e.has(i)){this.dataToKeyMap.delete(i)}}))}getDataKey(t){return this.dataToKeyMap.get(t)}getActionColumnHeader(t){const e=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!e||e.length===0)return undefined;const i=this.getPrimaryHeaders(this.state._headerCells);const n=i[t];if(n&&n.type==="action"){return n}return undefined}cellRender(t,e){if(e){clearTimeout(this.cellsToRenderTimeouts.get(e));this.cellsToRenderTimeouts.set(e,setTimeout((()=>{if(typeof t.render==="function"){const i=t.render(e,t,t.data,this.state._data);if(typeof i==="string"){e.textContent=i}}})))}}getNumberOfCols(t,e){let i=0;t.forEach((t=>{let e=0;if(Array.isArray(t)){t.forEach((t=>{var i;e+=(i=t.colSpan)!==null&&i!==void 0?i:1}))}if(i<e){i=e}}));if(i===0){i=e.length}return i}getNumberOfRows(t,e){var i;let n=0;t.forEach((t=>{let e=0;if(Array.isArray(t)){t.forEach((t=>{var i;e+=(i=t.rowSpan)!==null&&i!==void 0?i:1}))}if(n<e){n=e}}));if(n===0){n=e.length}else{n-=((i=this.state._dataFoot)===null||i===void 0?void 0:i.length)||0}return n}getThePrimaryHeadersWithKeyOrRenderFunction(t){const e=[];t.forEach((t=>{t.forEach((t=>{if(typeof t.key==="string"||typeof t.render==="function"){e.push(t)}}))}));return e}getPrimaryHeaders(t){var e,i,n;if(((e=this.primaryHeadersCache)===null||e===void 0?void 0:e.headers)===t){this.horizontal=this.primaryHeadersCache.horizontal;return this.primaryHeadersCache.result}let l=this.getThePrimaryHeadersWithKeyOrRenderFunction((i=t.horizontal)!==null&&i!==void 0?i:[]);this.horizontal=true;if(l.length===0){l=this.getThePrimaryHeadersWithKeyOrRenderFunction((n=t.vertical)!==null&&n!==void 0?n:[]);if(l.length>0){this.horizontal=false}}this.primaryHeadersCache={headers:t,result:l,horizontal:this.horizontal};return l}createDataField(t,e,i){var n,l,s,o,a,r,c,d;e.horizontal=Array.isArray(e===null||e===void 0?void 0:e.horizontal)?e.horizontal:[];e.vertical=Array.isArray(e===null||e===void 0?void 0:e.vertical)?e.vertical:[];this.maxCols=this.getNumberOfCols(e.horizontal,t);const h=this.getPrimaryHeaders(e);let f=this.getNumberOfRows(e.vertical,t);let u=0;if(i){u=f;f+=((n=this.state._dataFoot)===null||n===void 0?void 0:n.length)||0}const b=[];const v=[];const _=[];e.vertical.forEach(((t,e)=>{v[e]=0;_[e]=[]}));const p=h;for(let n=u;n<f;n++){const d=[];e.vertical.forEach(((t,e)=>{let i=0;_[e].forEach((t=>i+=t));if(i<=n){const l=t[n-i+v[e]];if(typeof l==="object"){d.push(Object.assign(Object.assign({},l),{headerCell:true,data:{}}));let t=1;if(typeof l.rowSpan==="number"&&l.rowSpan>1){t=l.rowSpan}_[e].push(t);if(typeof l.colSpan==="number"&&l.colSpan>1){for(let i=1;i<l.colSpan;i++){_[e+i].push(t)}}v[e]++}}}));for(let e=0;e<this.maxCols;e++){let h=this.isFixedCol(e);if(h==="left"){if(this.getFixedOffset(e)===undefined){let t=(l=this.fixedOffsets[e-1])!==null&&l!==void 0?l:0;t+=(o=(s=p[e-1])===null||s===void 0?void 0:s.width)!==null&&o!==void 0?o:0;this.fixedOffsets[e]=t}}if(h==="right"){if(this.getFixedOffset(e)===undefined){let t=(a=this.fixedOffsets[e+1])!==null&&a!==void 0?a:0;t+=(c=(r=p[e+1])===null||r===void 0?void 0:r.width)!==null&&c!==void 0?c:0;this.fixedOffsets[e]=t}}if(this.horizontal===true){const l=i&&this.state._dataFoot?this.state._dataFoot[n-u]:t[n];if(typeof p[e]==="object"&&p[e]!==null&&typeof l==="object"&&l!==null&&(typeof p[e].key==="string"||typeof p[e].render==="function")){const t=p[e].key;const i=l[t];d.push(Object.assign(Object.assign({},p[e]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:l,label:i}))}}else{if(typeof p[n]==="object"&&p[n]!==null&&typeof t[e]==="object"&&t[e]!==null&&(typeof p[n].key==="string"||typeof p[n].render==="function")){const i=p[n].key;const l=t[e][i];d.push(Object.assign(Object.assign({},p[n]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:t[e],label:l}))}}}b.push(d)}if(t.length===0){let t=this.getVisibleColSpan((d=e.horizontal)===null||d===void 0?void 0:d[0]);let i=0;if(Array.isArray(e.vertical)&&e.vertical.length>0){t-=e.vertical.length;e.vertical[0].forEach((t=>{i+=t.rowSpan||1}))}const n={colSpan:t,label:this.translateNoEntries,render:undefined,rowSpan:Math.max(i,1)};if(b.length===0){b.push([n])}else{b[0].push(n)}}return b}getVisibleColSpan(t){var e;return(e=t===null||t===void 0?void 0:t.reduce(((t,e)=>{if("visible"in e&&e.visible===false){return t}return t+(e.colSpan||1)}),0))!==null&&e!==void 0?e:0}isFixedCol(t){if(!this._fixedCols||t===undefined||this.stickyColsDisabled){return undefined}if(t<this._fixedCols[0]){return"left"}if(t>=this.maxCols-this._fixedCols[1]){return"right"}}getFixedOffset(t){if(!this.tableDivElement||t===undefined){return undefined}if(this.fixedOffsets[t]!==undefined){return this.fixedOffsets[t]}return undefined}getOffsetString(t,e){if(e&&this._selection){return"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(t)+"px)"}return this.getFixedOffset(t)+"px"}handleSelectionChangeCallbackAndEvent(t,e){var i;if(typeof((i=this.state._on)===null||i===void 0?void 0:i[C.onSelectionChange])==="function"){this.state._on[C.onSelectionChange](t,e)}if(this.host){O(this.host,A.selectionChange,e)}}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const t=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map((t=>t.map((t=>Object.assign(Object.assign({},t),{visible:typeof t.visible==="boolean"?t.visible:true,hidable:typeof t.hidable==="boolean"?t.hidable:true})))))});_(this,"_headerCells",t)}}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(t,i){var n;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName();const o=(n=t[0])===null||n===void 0?void 0:n.data;if(!o)return"";const a=o[s];const r=l.multiple||l.multiple===undefined;const h=String(a);const f=this.selectedKeysStringSet.has(h);const u=this.disabledKeysStringSet.has(h);const b=l.label(o);const v={name:"selection",checked:f,disabled:u,id:String(a),["aria-label"]:b};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:$("kol-table__selection",{"kol-table__selection--checked":f})},r?e("label",{class:$("kol-table__selection-label",{"kol-table__selection-label--disabled":u})},e(c,{class:"kol-table__selection-icon",icons:`kolicon ${f?"kolicon-check":""}`,label:""}),e("input",Object.assign({class:$("kol-table__selection-input kol-table__selection-input--checkbox"),ref:t=>t&&this.checkboxRefs.push(t)},v,{type:"checkbox",onInput:t=>{const e=(()=>{const t=l===null||l===void 0?void 0:l.selectedKeys;return t===undefined?[]:Array.isArray(t)?t:[t]})();const i=!f?[...e,a]:e.filter((t=>String(t)!==String(a)));this.handleSelectionChangeCallbackAndEvent(t,i!==null&&i!==void 0?i:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:$("kol-table__selection-input kol-table__selection-input--radio")},v,{type:"radio",onInput:t=>{this.handleSelectionChangeCallbackAndEvent(t,[a])}}))),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:b,badgeText:"",id:`${a}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var t,e;return(e=(t=this.state._selection)===null||t===void 0?void 0:t.keyPropertyName)!==null&&e!==void 0?e:"id"}static normalizeKeys(t){return t===undefined?[]:Array.isArray(t)?t:[t]}updateSelectionKeySets(){var t,e;this.selectedKeysStringSet=new Set(Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).map(String));this.disabledKeysStringSet=new Set(Dt.normalizeKeys((e=this.state._selection)===null||e===void 0?void 0:e.disabledKeys).map(String))}getDataWithSelectionEnabled(){const t=this.getSelectionKeyPropertyName();return this.state._data.filter((e=>!this.disabledKeysStringSet.has(String(e[t]))))}getSelectedKeysWithoutDisabledKeys(){var t;return Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>!this.disabledKeysStringSet.has(String(t))))}getSelectedKeysWithDisabledKeysOnly(){var t;return Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>this.disabledKeysStringSet.has(String(t))))}getRevertedSelection(t){var e;const i=this.getSelectionKeyPropertyName();const n=(e=this.getSelectedKeysWithDisabledKeysOnly())!==null&&e!==void 0?e:[];if(t){n.push(...this.getDataWithSelectionEnabled().map((t=>t===null||t===void 0?void 0:t[i])))}return n}getTableMinWidth(){var t,e;const i=(t=this.state._headerCells.horizontal)!==null&&t!==void 0?t:[];const n=[];i.forEach((t=>{t.forEach((t=>{if(t.visible!==false&&t.width!==undefined&&t.width>0){n.push(t.width)}}))}));const l=(e=this.state._headerCells.vertical)!==null&&e!==void 0?e:[];const s=[];l.forEach((t=>{t.forEach((t=>{if(t.width!==undefined&&t.width>0){s.push(t.width)}}))}));const o=[...s,...n];if(o.length===0){return"0px"}if(o.length===1){return`${o[0]}px`}return`calc(${o.map((t=>`${t}px`)).join(" + ")})`}renderHeadingSelectionCell(){var t,i;const n=this.state._selection;if(!n){return e("td",{class:"kol-table__cell kol-table__cell--header",key:`thead-0`})}if(n.multiple===false){return e("td",{key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"})}const l=(i=(t=this.getSelectedKeysWithoutDisabledKeys())===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;const s=this.getDataWithSelectionEnabled().length;const o=l===s;const a=l!==0&&!o;let h="kol-table-selection-indeterminate";if(o&&!a){h="kol-table-selection-none"}if(l===0){h="kol-table-selection-all"}const f=r(h);return e("th",{key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:$("kol-table__selection",{"kol-table__selection--indeterminate":a,"kol-table__selection--checked":o})},e("label",{class:"kol-table__selection-label"},e(c,{class:"kol-table__selection-icon",icons:`kolicon ${a?"kolicon-minus":o?"kolicon-check":""}`,label:""}),e("input",{class:$("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:t=>t&&this.checkboxRefs.push(t),name:"selection",checked:o&&!a,indeterminate:a,"aria-label":f,type:"checkbox",onInput:t=>{this.handleSelectionChangeCallbackAndEvent(t,this.getRevertedSelection(!o))}})),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:f,badgeText:"",id:`${h}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal;const n=this.state._headerCells.vertical;if(!Array.isArray(t)||t.length===0||!Array.isArray(n)||n.length===0){return e(i,null)}const l=n.reduce(((t,e)=>{var i;const n=e===null||e===void 0?void 0:e[0];return t+((i=n===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:0)}),0);return e("td",{"aria-hidden":"true",colSpan:n.length,rowSpan:t.length,style:l>0?{width:`${l}px`}:undefined})}formatSortOrderDescription(t){return this.translateSortOrder.replace("{{order}}",`${t}`)}getSortAriaDescription(t){if(typeof t==="number"&&t>0){return`${this.translateSort} – ${this.formatSortOrderDescription(t)}`}return this.translateSort}renderHeadingCell(t,i,n,l){if(t.visible===false){return""}const o=(t===null||t===void 0?void 0:t.sortable)!==false;const a=typeof t.sortDirection==="string";const r=o&&a;let c="none";let d="kolicon-sort-neutral";if(r&&t.sortDirection){switch(t.sortDirection){case"ASC":d="kolicon-sort-asc";c="ascending";break;case"DESC":d="kolicon-sort-desc";c="descending";break;default:c="none"}}const h=l?"row":typeof t.colSpan==="number"&&t.colSpan>1?"colgroup":"col";const f=typeof t.sortOrder==="number"&&t.sortOrder>0?t.sortOrder:undefined;const u=this.getSortAriaDescription(f);const b=t.width!==undefined?`${t.width}px`:undefined;const v=this.isFixedCol(n);const _=v==="left"?this.getOffsetString(n,true):undefined;const p=v==="right"?this.getOffsetString(n):undefined;return e("th",{key:`${i}-${n}-${t.label}`,class:$("kol-table__cell kol-table__cell--header",`kol-table__cell--${c}`,t.textAlign&&`kol-table__cell--align-${t.textAlign}`,v&&`kol-table__cell--sticky-${v}`),scope:h,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:b,left:_,right:p},"aria-sort":c,"data-sort":r&&t.sortDirection?`sort-${t.sortDirection}`:undefined},r&&t.sortDirection?e("span",{class:"kol-table__sort"},e(s,{class:"kol-table__sort-button",_icons:{right:d},_label:t.label,_ariaDescription:u,_on:{onClick:e=>{var i;if(typeof((i=this.state._on)===null||i===void 0?void 0:i.onSort)==="function"&&t.key&&t.sortDirection){this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection})}if(this.host){O(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}}),f&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},f)):t.label)}renderSpacer(t,i){var n;const l=((n=this.state._headerCells.vertical)===null||n===void 0?void 0:n.length)||0;const s=this.getVisibleColSpan(i===null||i===void 0?void 0:i[0]);const o=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:$("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:$(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:l+s+o}))}renderFoot(){if(!this.state._dataFoot||this.state._dataFoot.length===0){return null}const t=this.createDataField(this.state._dataFoot,this.state._headerCells,true);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map(((t,e)=>this.renderTableRow(t,e,true,true)))])}render(){var t;this.updateSelectionKeySets();const i=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const n=this.state._headerCells.horizontal;const l=!((t=this.externalLabelElements)===null||t===void 0?void 0:t.length);return e("div",{key:"1ecc521f37fb57c7f5ce2e2c1daf06850c0c9372",class:$("kol-table",{[`kol-table--${this.state._variant}`]:this.state._variant!==undefined})},this.state._hasSettingsMenu&&e(a,{key:"ec0d5f632c76388d10c3625a9f722db2d3bdf2de",_horizontalHeaderCells:n!==null&&n!==void 0?n:[]}),e("div",{key:"61c5bf820ea7c00c768caa73864bedb0e247f5bd",ref:t=>this.tableDivElement=t,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?l?"-1":"0":undefined},e("table",{key:"1f407367ae428c6d64cc7a016d74d1b00192574c",ref:t=>{this.tableRef=t;this.syncTableLabel(this.externalLabelElements)},"aria-labelledby":l?"caption":undefined,class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},l&&e("caption",{key:"92e0403f309f42a2345267cbb64e5b7bf8172ffa",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":undefined},this.state._label),Array.isArray(n)&&e("thead",{key:"fa962f7c34c749246879bec67d287619ac4afc2e",class:"kol-table__head"},[n.map(((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),i===0&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map(((t,e)=>this.renderHeadingCell(t,i,e,false)))))),this.renderSpacer("head",n)]),e("tbody",{key:"d7a9b16f85081841beb7cb33b902a09f6da43805",class:"kol-table__body"},i.map(((t,e)=>this.renderTableRow(t,e,true)))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{externalLabelElements:["onExternalLabelElementsChange"],_ariaLabelledby:["validateAriaLabelledby"],_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"],_variant:["validateVariantClassName"]}}};export{Dt as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as i,g as n}from"./index-DqvPZ16l.js";import{a as l}from"./tslib.es6-QNbPBOk5.js";import{b as s,c as o,t as a}from"./component-names-Dy77vq43.js";import{t as r}from"./i18n-CaL2ODdQ.js";import{I as c}from"./component-ijX_kUom.js";import{T as d}from"./component-BFsdrctP.js";import{P as h,o as f,p as u,b,L as v,s as _}from"./common-DEEjER7G.js";import{c as p,v as k,a as y,b as m,f as g,d as S}from"./table-selection-DlaNrAWM.js";import{v as j}from"./label-Cg7TG_7b.js";import{v as w}from"./variant-class-name-CkfE8oGZ.js";import{C}from"./keyboard-DNd73LVa.js";import{c as $}from"./clsx-COFh-Vc8.js";import{n as x}from"./dev.utils-Cv9uCwkA.js";import{d as A,K as O}from"./events-BhfZTW2e.js";import{M as D,e as T,U as E,f as F,b as H,d as L,S as M,h as K}from"./_Uint8Array-kJHDjtoP.js";import{S as z,a as R,i as B}from"./isArray-CcrBs4JM.js";import"./i18n-B2d_exHc.js";import"./bem-registry-B9CzNnO1.js";import"./component-4RtkhTfb.js";var N="__lodash_hash_undefined__";function P(t){this.__data__.set(t,N);return this}function W(t){return this.__data__.has(t)}function I(t){var e=-1,i=t==null?0:t.length;this.__data__=new D;while(++e<i){this.add(t[e])}}I.prototype.add=I.prototype.push=P;I.prototype.has=W;function U(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)){return true}}return false}function V(t,e){return t.has(e)}var q=1,G=2;function Z(t,e,i,n,l,s){var o=i&q,a=t.length,r=e.length;if(a!=r&&!(o&&r>a)){return false}var c=s.get(t);var d=s.get(e);if(c&&d){return c==e&&d==t}var h=-1,f=true,u=i&G?new I:undefined;s.set(t,e);s.set(e,t);while(++h<a){var b=t[h],v=e[h];if(n){var _=o?n(v,b,h,e,t,s):n(b,v,h,t,e,s)}if(_!==undefined){if(_){continue}f=false;break}if(u){if(!U(e,(function(t,e){if(!V(u,e)&&(b===t||l(b,t,i,n,s))){return u.push(e)}}))){f=false;break}}else if(!(b===v||l(b,v,i,n,s))){f=false;break}}s["delete"](t);s["delete"](e);return f}function J(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}function Q(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var X=1,Y=2;var tt="[object Boolean]",et="[object Date]",it="[object Error]",nt="[object Map]",lt="[object Number]",st="[object RegExp]",ot="[object Set]",at="[object String]",rt="[object Symbol]";var ct="[object ArrayBuffer]",dt="[object DataView]";var ht=z?z.prototype:undefined,ft=ht?ht.valueOf:undefined;function ut(t,e,i,n,l,s,o){switch(i){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case ct:if(t.byteLength!=e.byteLength||!s(new E(t),new E(e))){return false}return true;case tt:case et:case lt:return T(+t,+e);case it:return t.name==e.name&&t.message==e.message;case st:case at:return t==e+"";case nt:var a=J;case ot:var r=n&X;a||(a=Q);if(t.size!=e.size&&!r){return false}var c=o.get(t);if(c){return c==e}n|=Y;o.set(t,e);var d=Z(a(t),a(e),n,l,s,o);o["delete"](t);return d;case rt:if(ft){return ft.call(t)==ft.call(e)}}return false}var bt=1;var vt=Object.prototype;var _t=vt.hasOwnProperty;function pt(t,e,i,n,l,s){var o=i&bt,a=F(t),r=a.length,c=F(e),d=c.length;if(r!=d&&!o){return false}var h=r;while(h--){var f=a[h];if(!(o?f in e:_t.call(e,f))){return false}}var u=s.get(t);var b=s.get(e);if(u&&b){return u==e&&b==t}var v=true;s.set(t,e);s.set(e,t);var _=o;while(++h<r){f=a[h];var p=t[f],k=e[f];if(n){var y=o?n(k,p,f,e,t,s):n(p,k,f,t,e,s)}if(!(y===undefined?p===k||l(p,k,i,n,s):y)){v=false;break}_||(_=f=="constructor")}if(v&&!_){var m=t.constructor,g=e.constructor;if(m!=g&&("constructor"in t&&"constructor"in e)&&!(typeof m=="function"&&m instanceof m&&typeof g=="function"&&g instanceof g)){v=false}}s["delete"](t);s["delete"](e);return v}var kt=1;var yt="[object Arguments]",mt="[object Array]",gt="[object Object]";var St=Object.prototype;var jt=St.hasOwnProperty;function wt(t,e,i,n,l,s){var o=R(t),a=R(e),r=o?mt:H(t),c=a?mt:H(e);r=r==yt?gt:r;c=c==yt?gt:c;var d=r==gt,h=c==gt,f=r==c;if(f&&L(t)){if(!L(e)){return false}o=true;d=false}if(f&&!d){s||(s=new M);return o||K(t)?Z(t,e,i,n,l,s):ut(t,e,r,i,n,l,s)}if(!(i&kt)){var u=d&&jt.call(t,"__wrapped__"),b=h&&jt.call(e,"__wrapped__");if(u||b){var v=u?t.value():t,_=b?e.value():e;s||(s=new M);return l(v,_,i,n,s)}}if(!f){return false}s||(s=new M);return pt(t,e,i,n,l,s)}function Ct(t,e,i,n,l){if(t===e){return true}if(t==null||e==null||!B(t)&&!B(e)){return t!==t&&e!==e}return wt(t,e,i,n,Ct,l)}function $t(t,e){return Ct(t,e)}const xt=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t)));const At=(t,e)=>{h(e,(()=>{f(e,(()=>{try{e=u(e)}catch(t){}b(t,"_headerCells",(t=>{if(typeof t!=="object"||t===null)return false;const e=t.horizontal;const i=t.vertical;if(e!==undefined&&!xt(e)||i!==undefined&&!xt(i)){return false}const n=[];for(const t of e!==null&&e!==void 0?e:[]){n.push(...t)}for(const t of i!==null&&i!==void 0?i:[]){n.push(...t)}return n.every((t=>t.width===undefined||typeof t.width==="number"))}),new Set(["TableHeaderCellsPropType"]),e)}))}))};const Ot=150;const Dt=class{constructor(i){t(this,i);this.translateNoEntries=r("kol-no-entries");this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:false};this.horizontal=true;this.cellsToRenderTimeouts=new Map;this.dataToKeyMap=new Map;this.selectedKeysStringSet=new Set;this.disabledKeysStringSet=new Set;this.checkboxRefs=[];this.translateSort=r("kol-sort");this.translateSortOrder=r("kol-table-sort-order");this.maxCols=0;this.fixedOffsets=[];this.settingsChangedCounter=0;this.tableDivElementHasScrollbar=false;this.stickyColsDisabled=false;this.renderTableRow=(t,i,n,l=false)=>{var s,o;let a=String(i);if(this.horizontal&&((s=t[0])===null||s===void 0?void 0:s.data)){a=(o=this.getDataKey(t[0].data))!==null&&o!==void 0?o:a}return e("tr",{class:$("kol-table__row",{"kol-table__row--body":!l,"kol-table__row--footer":l}),key:`row-${a}`},this.renderSelectionCell(t,i),t.map(((t,e)=>this.renderTableCell(t,i,e,n))))};this.renderTableCell=(t,i,n,l)=>{if(t.visible===false){return""}let s=`${i}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);s=e?`${e}-${this.horizontal?n:i}`:s}if(t.headerCell){return this.renderHeadingCell(t,i,n,l)}else{const i=typeof t.render!=="function"&&t.label===this.translateNoEntries;const l=this.getActionColumnHeader(n);const o=Boolean(l&&t.data);const a=this.isFixedCol(n);const r=a==="left"?this.getOffsetString(t.colIndex,true):undefined;const c=a==="right"?this.getOffsetString(t.colIndex):undefined;const d=typeof t.render==="function";return e("td",{key:`cell-${s}-${this.settingsChangedCounter}`,class:$("kol-table__cell kol-table__cell--body",t.textAlign&&`kol-table__cell--align-${t.textAlign}`,o&&"kol-table__cell--actions",a&&`kol-table__cell--sticky-${a}`),"aria-atomic":i?"false":undefined,"aria-live":i?"polite":undefined,"aria-relevant":i?"text":undefined,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,left:r,right:c},ref:d?e=>{this.cellRender(t,e)}:undefined},o&&l&&t.data?this.renderActionItems(l,t.data,s):!d?t.label:"")}};this.renderActionItems=(t,i,n)=>{const a=t.actions(i);return e("div",{class:"kol-table__cell-actions"},a.map(((t,i)=>{if(t.type==="button"){const o=l(t,[]);return e(s,Object.assign({key:`action-${n}-${i}`},o,{_variant:o._variant}))}else if(t.type==="link"){const s=l(t,[]);return e(o,Object.assign({key:`action-${n}-${i}`},s))}return null})))}}onExternalLabelElementsChange(t){this.syncTableLabel(t)}validateAriaLabelledby(){}syncTableLabel(t){if(!this.tableRef)return;if("ariaLabelledByElements"in this.tableRef){if(t===null||t===void 0?void 0:t.length){this.tableRef.ariaLabelledByElements=t}v.debug([this.tableRef,!!(t===null||t===void 0?void 0:t.length),t,this.tableRef.ariaLabelledByElements])}}validateHasSettingsMenu(t){p(this,t)}validateData(t){k(this,t,{beforePatch:t=>{this.updateDataToKeyMap(t)}})}validateDataFoot(t){y(this,t)}validateFixedCols(t){m(this,t);this.checkAndUpdateStickyState()}validateHeaderCells(t){At(this,t);if(!$t(this.previousHeaderCells,this.state._headerCells)){this.initializeHeaderCellSettings()}this.previousHeaderCells=this.state._headerCells}validateLabel(t){j(this,t,{required:true})}validateOn(t){g(this,t)}validateSelection(t){S(this,t);this.checkAndUpdateStickyState()}validateVariantClassName(t){w(this,t)}handleKeyDown(t){var e;if(t.key==="ArrowUp"||t.key==="ArrowDown"){const i=(e=this.tableDivElement)===null||e===void 0?void 0:e.querySelector(":focus");let n=this.checkboxRefs.indexOf(i);if(n>-1){t.preventDefault();if(t.key==="ArrowDown"){n=(n+1)%this.checkboxRefs.length;this.checkboxRefs[n].focus()}else if(t.key==="ArrowUp"){t.preventDefault();n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length;this.checkboxRefs[n].focus()}}}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){if(this.tableDivElement&&ResizeObserver){this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this));this.tableDivElementResizeObserver.observe(this.tableDivElement)}this.checkAndUpdateStickyState()}handleSettingsChange(t){var e;const i=Object.assign(Object.assign({},this.state._headerCells),{horizontal:t.detail});_(this,"_headerCells",i);this.settingsChangedCounter++;if(typeof((e=this.state._on)===null||e===void 0?void 0:e[C.onChangeHeaderCells])==="function"){this.state._on[C.onChangeHeaderCells](t,i)}}disconnectedCallback(){var t;(t=this.tableDivElementResizeObserver)===null||t===void 0?void 0:t.disconnect();clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar();clearTimeout(this.resizeDebounceTimeout);this.resizeDebounceTimeout=setTimeout((()=>{this.checkAndUpdateStickyState()}),Ot)}checkDivElementScrollbar(){if(this.tableDivElement){this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth}}calculateFixedColsWidth(){var t,e,i,n,l,s;if(!this._fixedCols)return 0;const o=this.getPrimaryHeaders(this.state._headerCells);let a=0;for(let i=0;i<this._fixedCols[0]&&i<o.length;i++){a+=(e=(t=o[i])===null||t===void 0?void 0:t.width)!==null&&e!==void 0?e:0}const r=this.maxCols-this._fixedCols[1];for(let t=r;t<this.maxCols&&t<o.length;t++){a+=(n=(i=o[t])===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:0}if(this.state._selection){const t=(l=this.tableDivElement)===null||l===void 0?void 0:l.querySelector(".kol-table__cell--selection");a+=(s=t===null||t===void 0?void 0:t.offsetWidth)!==null&&s!==void 0?s:0}return a}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols){this.stickyColsDisabled=false;return}const t=this.tableDivElement.clientWidth;const e=this.calculateFixedColsWidth();this.stickyColsDisabled=e>0&&e>=t}updateDataToKeyMap(t){const e=new Set(t);t.forEach((t=>{if(!this.dataToKeyMap.has(t)){this.dataToKeyMap.set(t,x())}}));this.dataToKeyMap.forEach(((t,i)=>{if(!e.has(i)){this.dataToKeyMap.delete(i)}}))}getDataKey(t){return this.dataToKeyMap.get(t)}getActionColumnHeader(t){const e=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!e||e.length===0)return undefined;const i=this.getPrimaryHeaders(this.state._headerCells);const n=i[t];if(n&&n.type==="action"){return n}return undefined}cellRender(t,e){if(e){clearTimeout(this.cellsToRenderTimeouts.get(e));this.cellsToRenderTimeouts.set(e,setTimeout((()=>{if(typeof t.render==="function"){const i=t.render(e,t,t.data,this.state._data);if(typeof i==="string"){e.textContent=i}}})))}}getNumberOfCols(t,e){let i=0;t.forEach((t=>{let e=0;if(Array.isArray(t)){t.forEach((t=>{var i;e+=(i=t.colSpan)!==null&&i!==void 0?i:1}))}if(i<e){i=e}}));if(i===0){i=e.length}return i}getNumberOfRows(t,e){var i;let n=0;t.forEach((t=>{let e=0;if(Array.isArray(t)){t.forEach((t=>{var i;e+=(i=t.rowSpan)!==null&&i!==void 0?i:1}))}if(n<e){n=e}}));if(n===0){n=e.length}else{n-=((i=this.state._dataFoot)===null||i===void 0?void 0:i.length)||0}return n}getThePrimaryHeadersWithKeyOrRenderFunction(t){const e=[];t.forEach((t=>{t.forEach((t=>{if(typeof t.key==="string"||typeof t.render==="function"){e.push(t)}}))}));return e}getPrimaryHeaders(t){var e,i,n;if(((e=this.primaryHeadersCache)===null||e===void 0?void 0:e.headers)===t){this.horizontal=this.primaryHeadersCache.horizontal;return this.primaryHeadersCache.result}let l=this.getThePrimaryHeadersWithKeyOrRenderFunction((i=t.horizontal)!==null&&i!==void 0?i:[]);this.horizontal=true;if(l.length===0){l=this.getThePrimaryHeadersWithKeyOrRenderFunction((n=t.vertical)!==null&&n!==void 0?n:[]);if(l.length>0){this.horizontal=false}}this.primaryHeadersCache={headers:t,result:l,horizontal:this.horizontal};return l}createDataField(t,e,i){var n,l,s,o,a,r,c,d;e.horizontal=Array.isArray(e===null||e===void 0?void 0:e.horizontal)?e.horizontal:[];e.vertical=Array.isArray(e===null||e===void 0?void 0:e.vertical)?e.vertical:[];this.maxCols=this.getNumberOfCols(e.horizontal,t);const h=this.getPrimaryHeaders(e);let f=this.getNumberOfRows(e.vertical,t);let u=0;if(i){u=f;f+=((n=this.state._dataFoot)===null||n===void 0?void 0:n.length)||0}const b=[];const v=[];const _=[];e.vertical.forEach(((t,e)=>{v[e]=0;_[e]=[]}));const p=h;for(let n=u;n<f;n++){const d=[];e.vertical.forEach(((t,e)=>{let i=0;_[e].forEach((t=>i+=t));if(i<=n){const l=t[n-i+v[e]];if(typeof l==="object"){d.push(Object.assign(Object.assign({},l),{headerCell:true,data:{}}));let t=1;if(typeof l.rowSpan==="number"&&l.rowSpan>1){t=l.rowSpan}_[e].push(t);if(typeof l.colSpan==="number"&&l.colSpan>1){for(let i=1;i<l.colSpan;i++){_[e+i].push(t)}}v[e]++}}}));for(let e=0;e<this.maxCols;e++){let h=this.isFixedCol(e);if(h==="left"){if(this.getFixedOffset(e)===undefined){let t=(l=this.fixedOffsets[e-1])!==null&&l!==void 0?l:0;t+=(o=(s=p[e-1])===null||s===void 0?void 0:s.width)!==null&&o!==void 0?o:0;this.fixedOffsets[e]=t}}if(h==="right"){if(this.getFixedOffset(e)===undefined){let t=(a=this.fixedOffsets[e+1])!==null&&a!==void 0?a:0;t+=(c=(r=p[e+1])===null||r===void 0?void 0:r.width)!==null&&c!==void 0?c:0;this.fixedOffsets[e]=t}}if(this.horizontal===true){const l=i&&this.state._dataFoot?this.state._dataFoot[n-u]:t[n];if(typeof p[e]==="object"&&p[e]!==null&&typeof l==="object"&&l!==null&&(typeof p[e].key==="string"||typeof p[e].render==="function")){const t=p[e].key;const i=l[t];d.push(Object.assign(Object.assign({},p[e]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:l,label:i}))}}else{if(typeof p[n]==="object"&&p[n]!==null&&typeof t[e]==="object"&&t[e]!==null&&(typeof p[n].key==="string"||typeof p[n].render==="function")){const i=p[n].key;const l=t[e][i];d.push(Object.assign(Object.assign({},p[n]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:t[e],label:l}))}}}b.push(d)}if(t.length===0){let t=this.getVisibleColSpan((d=e.horizontal)===null||d===void 0?void 0:d[0]);let i=0;if(Array.isArray(e.vertical)&&e.vertical.length>0){t-=e.vertical.length;e.vertical[0].forEach((t=>{i+=t.rowSpan||1}))}const n={colSpan:t,label:this.translateNoEntries,render:undefined,rowSpan:Math.max(i,1)};if(b.length===0){b.push([n])}else{b[0].push(n)}}return b}getVisibleColSpan(t){var e;return(e=t===null||t===void 0?void 0:t.reduce(((t,e)=>{if("visible"in e&&e.visible===false){return t}return t+(e.colSpan||1)}),0))!==null&&e!==void 0?e:0}isFixedCol(t){if(!this._fixedCols||t===undefined||this.stickyColsDisabled){return undefined}if(t<this._fixedCols[0]){return"left"}if(t>=this.maxCols-this._fixedCols[1]){return"right"}}getFixedOffset(t){if(!this.tableDivElement||t===undefined){return undefined}if(this.fixedOffsets[t]!==undefined){return this.fixedOffsets[t]}return undefined}getOffsetString(t,e){if(e&&this._selection){return"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(t)+"px)"}return this.getFixedOffset(t)+"px"}handleSelectionChangeCallbackAndEvent(t,e){var i;if(typeof((i=this.state._on)===null||i===void 0?void 0:i[C.onSelectionChange])==="function"){this.state._on[C.onSelectionChange](t,e)}if(this.host){A(this.host,O.selectionChange,e)}}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const t=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map((t=>t.map((t=>Object.assign(Object.assign({},t),{visible:typeof t.visible==="boolean"?t.visible:true,hidable:typeof t.hidable==="boolean"?t.hidable:true})))))});_(this,"_headerCells",t)}}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(t,i){var n;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName();const o=(n=t[0])===null||n===void 0?void 0:n.data;if(!o)return"";const a=o[s];const r=l.multiple||l.multiple===undefined;const h=String(a);const f=this.selectedKeysStringSet.has(h);const u=this.disabledKeysStringSet.has(h);const b=l.label(o);const v={name:"selection",checked:f,disabled:u,id:String(a),["aria-label"]:b};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:$("kol-table__selection",{"kol-table__selection--checked":f})},r?e("label",{class:$("kol-table__selection-label",{"kol-table__selection-label--disabled":u})},e(c,{class:"kol-table__selection-icon",icons:`kolicon ${f?"kolicon-check":""}`,label:""}),e("input",Object.assign({class:$("kol-table__selection-input kol-table__selection-input--checkbox"),ref:t=>t&&this.checkboxRefs.push(t)},v,{type:"checkbox",onInput:t=>{const e=(()=>{const t=l===null||l===void 0?void 0:l.selectedKeys;return t===undefined?[]:Array.isArray(t)?t:[t]})();const i=!f?[...e,a]:e.filter((t=>String(t)!==String(a)));this.handleSelectionChangeCallbackAndEvent(t,i!==null&&i!==void 0?i:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:$("kol-table__selection-input kol-table__selection-input--radio")},v,{type:"radio",onInput:t=>{this.handleSelectionChangeCallbackAndEvent(t,[a])}}))),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:b,badgeText:"",id:`${a}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var t,e;return(e=(t=this.state._selection)===null||t===void 0?void 0:t.keyPropertyName)!==null&&e!==void 0?e:"id"}static normalizeKeys(t){return t===undefined?[]:Array.isArray(t)?t:[t]}updateSelectionKeySets(){var t,e;this.selectedKeysStringSet=new Set(Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).map(String));this.disabledKeysStringSet=new Set(Dt.normalizeKeys((e=this.state._selection)===null||e===void 0?void 0:e.disabledKeys).map(String))}getDataWithSelectionEnabled(){const t=this.getSelectionKeyPropertyName();return this.state._data.filter((e=>!this.disabledKeysStringSet.has(String(e[t]))))}getSelectedKeysWithoutDisabledKeys(){var t;return Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>!this.disabledKeysStringSet.has(String(t))))}getSelectedKeysWithDisabledKeysOnly(){var t;return Dt.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>this.disabledKeysStringSet.has(String(t))))}getRevertedSelection(t){var e;const i=this.getSelectionKeyPropertyName();const n=(e=this.getSelectedKeysWithDisabledKeysOnly())!==null&&e!==void 0?e:[];if(t){n.push(...this.getDataWithSelectionEnabled().map((t=>t===null||t===void 0?void 0:t[i])))}return n}getTableMinWidth(){var t,e;const i=(t=this.state._headerCells.horizontal)!==null&&t!==void 0?t:[];const n=[];i.forEach((t=>{t.forEach((t=>{if(t.visible!==false&&t.width!==undefined&&t.width>0){n.push(t.width)}}))}));const l=(e=this.state._headerCells.vertical)!==null&&e!==void 0?e:[];const s=[];l.forEach((t=>{t.forEach((t=>{if(t.width!==undefined&&t.width>0){s.push(t.width)}}))}));const o=[...s,...n];if(o.length===0){return"0px"}if(o.length===1){return`${o[0]}px`}return`calc(${o.map((t=>`${t}px`)).join(" + ")})`}renderHeadingSelectionCell(){var t,i;const n=this.state._selection;if(!n){return e("td",{class:"kol-table__cell kol-table__cell--header",key:`thead-0`})}if(n.multiple===false){return e("td",{key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"})}const l=(i=(t=this.getSelectedKeysWithoutDisabledKeys())===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;const s=this.getDataWithSelectionEnabled().length;const o=l===s;const a=l!==0&&!o;let h="kol-table-selection-indeterminate";if(o&&!a){h="kol-table-selection-none"}if(l===0){h="kol-table-selection-all"}const f=r(h);return e("th",{key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:$("kol-table__selection",{"kol-table__selection--indeterminate":a,"kol-table__selection--checked":o})},e("label",{class:"kol-table__selection-label"},e(c,{class:"kol-table__selection-icon",icons:`kolicon ${a?"kolicon-minus":o?"kolicon-check":""}`,label:""}),e("input",{class:$("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:t=>t&&this.checkboxRefs.push(t),name:"selection",checked:o&&!a,indeterminate:a,"aria-label":f,type:"checkbox",onInput:t=>{this.handleSelectionChangeCallbackAndEvent(t,this.getRevertedSelection(!o))}})),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:f,badgeText:"",id:`${h}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal;const n=this.state._headerCells.vertical;if(!Array.isArray(t)||t.length===0||!Array.isArray(n)||n.length===0){return e(i,null)}const l=n.reduce(((t,e)=>{var i;const n=e===null||e===void 0?void 0:e[0];return t+((i=n===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:0)}),0);return e("td",{"aria-hidden":"true",colSpan:n.length,rowSpan:t.length,style:l>0?{width:`${l}px`}:undefined})}formatSortOrderDescription(t){return this.translateSortOrder.replace("{{order}}",`${t}`)}getSortAriaDescription(t){if(typeof t==="number"&&t>0){return`${this.translateSort} – ${this.formatSortOrderDescription(t)}`}return this.translateSort}renderHeadingCell(t,i,n,l){if(t.visible===false){return""}const o=(t===null||t===void 0?void 0:t.sortable)!==false;const a=typeof t.sortDirection==="string";const r=o&&a;let c="none";let d="kolicon-sort-neutral";if(r&&t.sortDirection){switch(t.sortDirection){case"ASC":d="kolicon-sort-asc";c="ascending";break;case"DESC":d="kolicon-sort-desc";c="descending";break;default:c="none"}}const h=l?"row":typeof t.colSpan==="number"&&t.colSpan>1?"colgroup":"col";const f=typeof t.sortOrder==="number"&&t.sortOrder>0?t.sortOrder:undefined;const u=this.getSortAriaDescription(f);const b=t.width!==undefined?`${t.width}px`:undefined;const v=this.isFixedCol(n);const _=v==="left"?this.getOffsetString(n,true):undefined;const p=v==="right"?this.getOffsetString(n):undefined;return e("th",{key:`${i}-${n}-${t.label}`,class:$("kol-table__cell kol-table__cell--header",`kol-table__cell--${c}`,t.textAlign&&`kol-table__cell--align-${t.textAlign}`,v&&`kol-table__cell--sticky-${v}`),scope:h,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:b,left:_,right:p},"aria-sort":c,"data-sort":r&&t.sortDirection?`sort-${t.sortDirection}`:undefined},r&&t.sortDirection?e("span",{class:"kol-table__sort"},e(s,{class:"kol-table__sort-button",_icons:{right:d},_label:t.label,_ariaDescription:u,_on:{onClick:e=>{var i;if(typeof((i=this.state._on)===null||i===void 0?void 0:i.onSort)==="function"&&t.key&&t.sortDirection){this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection})}if(this.host){A(this.host,O.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}}),f&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},f)):t.label)}renderSpacer(t,i){var n;const l=((n=this.state._headerCells.vertical)===null||n===void 0?void 0:n.length)||0;const s=this.getVisibleColSpan(i===null||i===void 0?void 0:i[0]);const o=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:$("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:$(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:l+s+o}))}renderFoot(){if(!this.state._dataFoot||this.state._dataFoot.length===0){return null}const t=this.createDataField(this.state._dataFoot,this.state._headerCells,true);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map(((t,e)=>this.renderTableRow(t,e,true,true)))])}render(){var t;this.updateSelectionKeySets();const i=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const n=this.state._headerCells.horizontal;const l=!((t=this.externalLabelElements)===null||t===void 0?void 0:t.length);return e("div",{key:"1ecc521f37fb57c7f5ce2e2c1daf06850c0c9372",class:$("kol-table",{[`kol-table--${this.state._variant}`]:this.state._variant!==undefined})},this.state._hasSettingsMenu&&e(a,{key:"ec0d5f632c76388d10c3625a9f722db2d3bdf2de",_horizontalHeaderCells:n!==null&&n!==void 0?n:[]}),e("div",{key:"61c5bf820ea7c00c768caa73864bedb0e247f5bd",ref:t=>this.tableDivElement=t,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?l?"-1":"0":undefined},e("table",{key:"1f407367ae428c6d64cc7a016d74d1b00192574c",ref:t=>{this.tableRef=t;this.syncTableLabel(this.externalLabelElements)},"aria-labelledby":l?"caption":undefined,class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},l&&e("caption",{key:"92e0403f309f42a2345267cbb64e5b7bf8172ffa",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":undefined},this.state._label),Array.isArray(n)&&e("thead",{key:"fa962f7c34c749246879bec67d287619ac4afc2e",class:"kol-table__head"},[n.map(((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),i===0&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map(((t,e)=>this.renderHeadingCell(t,i,e,false)))))),this.renderSpacer("head",n)]),e("tbody",{key:"d7a9b16f85081841beb7cb33b902a09f6da43805",class:"kol-table__body"},i.map(((t,e)=>this.renderTableRow(t,e,true)))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{externalLabelElements:["onExternalLabelElementsChange"],_ariaLabelledby:["validateAriaLabelledby"],_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"],_variant:["validateVariantClassName"]}}};export{Dt as kol_table_stateless_wc};
5
5
  //# sourceMappingURL=kol-table-stateless-wc.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,g as t}from"./index-Brmny3Vg.js";import{k as o}from"./component-names-Dy77vq43.js";import{v as i,a as l}from"./aria-labelledby-BUOJRaGL.js";import"./common-DEEjER7G.js";const a='@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=1780914078349"); /* IE9*/\n src: url("kolicons.eot?t=1780914078349#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780914078349") format("woff2"), url("kolicons.woff?t=1780914078349") format("woff"), url("kolicons.ttf?t=1780914078349") format("truetype"), url("kolicons.svg?t=1780914078349#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-settings-wc:not(:has(~ .kol-table__scroll-container .kol-table__caption)) {\n display: block;\n min-height: var(--a11y-min-size);\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}';const r=class{constructor(e){n(this,e);this.resolvedElements=[]}validateAriaLabelledby(n){this.syncExternalLabel(n)}syncExternalLabel(n){this.resolvedElements=i(this,this.host,this.internals,n)}componentWillLoad(){this.internals=l(this.host);this.syncExternalLabel(this._ariaLabelledby)}componentDidLoad(){if(!this.resolvedElements.length){this.syncExternalLabel(this._ariaLabelledby)}}render(){return e(o,{key:"7115f32bb9375fc5d4158bef05eded091fa77091",externalLabelElements:this.resolvedElements,_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})}get host(){return t(this)}static get watchers(){return{_ariaLabelledby:["validateAriaLabelledby"]}}};r.style={default:a};export{r as kol_table_stateless};
4
+ import{r as n,h as e,g as t}from"./index-DqvPZ16l.js";import{k as o}from"./component-names-Dy77vq43.js";import{v as i,a as l}from"./aria-labelledby-BUOJRaGL.js";import"./common-DEEjER7G.js";const a='@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=1780919027063"); /* IE9*/\n src: url("kolicons.eot?t=1780919027063#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780919027063") format("woff2"), url("kolicons.woff?t=1780919027063") format("woff"), url("kolicons.ttf?t=1780919027063") format("truetype"), url("kolicons.svg?t=1780919027063#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-settings-wc:not(:has(~ .kol-table__scroll-container .kol-table__caption)) {\n display: block;\n min-height: var(--a11y-min-size);\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}';const r=class{constructor(e){n(this,e);this.resolvedElements=[]}validateAriaLabelledby(n){this.syncExternalLabel(n)}syncExternalLabel(n){this.resolvedElements=i(this,this.host,this.internals,n)}componentWillLoad(){this.internals=l(this.host);this.syncExternalLabel(this._ariaLabelledby)}componentDidLoad(){if(!this.resolvedElements.length){this.syncExternalLabel(this._ariaLabelledby)}}render(){return e(o,{key:"7115f32bb9375fc5d4158bef05eded091fa77091",externalLabelElements:this.resolvedElements,_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})}get host(){return t(this)}static get watchers(){return{_ariaLabelledby:["validateAriaLabelledby"]}}};r.style={default:a};export{r as kol_table_stateless};
5
5
  //# sourceMappingURL=kol-table-stateless.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t,g as e}from"./index-Brmny3Vg.js";import{_ as o}from"./tslib.es6-QNbPBOk5.js";import{b as i,e as a,j as s,s as l,N as r,H as c,I as h,Q as d}from"./common-DEEjER7G.js";import{v as f}from"./align-ChLoh-Dq.js";import{v as b}from"./label-Cg7TG_7b.js";import{b as u}from"./component-names-Dy77vq43.js";import{t as p}from"./i18n-CaL2ODdQ.js";import{K as m}from"./keyboard-DNd73LVa.js";import{c as k}from"./clsx-COFh-Vc8.js";import{d as g,a as y,c as v}from"./element-interaction-C5-6aPzz.js";import{d as w,K as _}from"./events-BhfZTW2e.js";import"./i18n-B2d_exHc.js";import"./element-focus-BQXzaLL9.js";const x=["select-automatic","select-manual"];const T=(n,t)=>{i(n,`_behavior`,(n=>typeof n==="string"&&x.includes(n)),new Set([`KoliBriTabBehavior {${x.join(", ")}`]),t)};const z=(n,t)=>{a(n,"_hasCreateButton",t)};const C='/* 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=1780914078349"); /* IE9*/\n src: url("kolicons.eot?t=1780914078349#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780914078349") format("woff2"), url("kolicons.woff?t=1780914078349") format("woff"), url("kolicons.ttf?t=1780914078349") format("truetype"), url("kolicons.svg?t=1780914078349#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 @media (forced-colors: active) {\n .kol-tabs__button-group .kol-button.selected {\n outline: 3px solid Highlight;\n outline-offset: -3px;\n }\n .kol-tabs__button-group .kol-button.selected:focus-visible {\n outline-style: dashed;\n }\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}';const j=class{constructor(t){n(this,t);this.onCreateLabel=`${p("kol-new")} …`;this.ctaRef=v();this.nextPossibleTabIndex=(n,t,e=1)=>{const o=t+e;if(o<n.length){if(n[o]._disabled){return this.nextPossibleTabIndex(n,t,e+1)}return o}return t};this.prevPossibleTabIndex=(n,t,e=1)=>{const o=t-e;if(o>=0){if(n[o]._disabled){return this.prevPossibleTabIndex(n,t,e+1)}return o}return t};this.onKeyDown=n=>{switch(n.key){case m.ArrowRight:this.goToNextTab(n);break;case m.ArrowLeft:this.goToPreviousTab(n);break;case m.Space:case m.Enter:this.activateFocusedTab(n);break}};this.onClickSelect=(n,t)=>{this.selectNextTabEvent(n,t)};this.onMouseDown=n=>{n.preventDefault()};this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown};this.catchTabPanelHost=n=>{this.tabPanelHost=n};this._align="top";this._hasCreateButton=false;this._selected=0;this.state={_align:"top",_label:"",_selected:0,_tabs:[]};this.selectNextNotDisabledTab=(n,t,e=true,o)=>{if(n>t.length-1){n=t.length-1}if(n<0){n=0}if(Array.isArray(t)&&t[n]){if(t[n]._disabled){if(e===true){if(n<t.length-1){return this.selectNextNotDisabledTab(n+1,t,true,o||n)}else{n=o||n;e=false}}if(e===false){if(n>0){return this.selectNextNotDisabledTab(n-1,t,false,o||n)}else{s(`[KolTabs] All tabs are disabled, and therefore no tab can be displayed.`)}}}}return n};this.syncSelectedAndTabs=(n,t,e,o)=>{let i;if(o==="_selected"){i=n}else{i=this.state._selected}let a;if(o==="_tabs"){a=n}else{a=this.state._tabs}if(a.length>0){t.set("_selected",this.selectNextNotDisabledTab(i,a))}};this.refreshTabPanels=()=>{var n,t,e,o;if(!this.tabPanelHost)return;while(this.tabPanelHost.firstChild){this.tabPanelHost.removeChild(this.tabPanelHost.firstChild)}for(let i=0;i<((n=this.state._tabs)===null||n===void 0?void 0:n.length);i++){const n=document.createElement("div");n.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`);n.setAttribute("id",`tabpanel-${i}`);n.setAttribute("role","tabpanel");n.setAttribute("hidden","");n.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`);n.appendChild(a);(t=this.tabPanelHost)===null||t===void 0?void 0:t.appendChild(n);if(typeof HTMLCollection!=="undefined"&&((e=this.host)===null||e===void 0?void 0:e.children)instanceof HTMLCollection&&((o=this.host)===null||o===void 0?void 0:o.children[i])){this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}}this.updateVisiblePanel()};this.updateVisiblePanel=()=>{if(!this.tabPanelHost)return;Array.from(this.tabPanelHost.children).forEach(((n,t)=>{if(t===this.state._selected){n.removeAttribute("hidden")}else{n.setAttribute("hidden","")}}))};this.onCreate=n=>{var t,e;n.preventDefault();(e=(t=this.state._on)===null||t===void 0?void 0:t.onCreate)===null||e===void 0?void 0:e.call(t,n);if(this.host){w(this.host,_.create)}};this.onBlur=()=>{this.currentFocusIndex=undefined}}getCurrentFocusIndex(){if(typeof this.currentFocusIndex==="number"){return this.currentFocusIndex}return this.state._selected}getKeyboardTabChangeMode(){if(this._behavior==="select-manual"){return"selectFocusOnly"}return"activateCompletely"}goToNextTab(n){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(n,t,this.getKeyboardTabChangeMode())}goToPreviousTab(n){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(n,t,this.getKeyboardTabChangeMode())}activateFocusedTab(n){if(typeof this.currentFocusIndex==="number"){this.onSelect(n,this.currentFocusIndex)}}selectNextTabEvent(n,t,e="activateCompletely"){var o,i;this.currentFocusIndex=t;this.focusTabById(t);if(e==="activateCompletely"){this._selected=t;const e=this.state._tabs[t];(i=(o=e._on)===null||o===void 0?void 0:o.onSelect)===null||i===void 0?void 0:i.call(o,n,t);this.onSelect(n,t)}}async focus(n){}async click(){}renderButtonGroup(){return t("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((n,e)=>t(u,{ref:this.state._selected===e?this.ctaRef:undefined,_disabled:n._disabled,_icons:n._icons,_hideLabel:n._hideLabel,_label:n._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:n._tooltipAlign,_variant:this.state._selected===e?"custom":undefined,_customClass:this.state._selected===e?"selected":"",_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.state._hasCreateButton&&t(u,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return t("div",{key:"cbac3f2cf4f389e4bdcd4a83c463a339a4f587c4",ref:n=>{this.tabPanelsElement=n},class:k("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"cd0aa9f1a4e1e5dc5facdf0d1d6e58013bf4bc40",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(n){f(this,n)}validateBehavior(n){T(this,n)}validateHasCreateButton(n){z(this,n)}validateLabel(n){b(this,n,{required:true})}validateOn(n){if(typeof n==="object"&&n!==null){const t={};if(typeof n.onCreate==="function"){t.onCreate=n.onCreate}if(typeof n.onSelect==="function"){t.onSelect=n.onSelect}l(this,"_on",t)}}validateSelected(n){r(this,"_selected",n,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(n){c(this,"_tabs",(n=>typeof n==="object"&&n!==null&&typeof n._label==="string"&&n._label.length>0),n,undefined,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}});h("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(n){if(this.tabPanelsElement){const t=d(`button#${this.state._label.replace(/\s/g,"-")}-tab-${n}`,this.tabPanelsElement);t===null||t===void 0?void 0:t.focus()}}onSelect(n,t){var e,o;(o=(e=this._on)===null||e===void 0?void 0:e.onSelect)===null||o===void 0?void 0:o.call(e,n,t);if(this.host){w(this.host,_.select,t)}this.focusTabById(t)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};o([g("ctaRef")],j.prototype,"focus",null);o([y("ctaRef")],j.prototype,"click",null);j.style={default:C};export{j as kol_tabs};
4
+ import{r as n,h as t,g as e}from"./index-DqvPZ16l.js";import{_ as o}from"./tslib.es6-QNbPBOk5.js";import{b as i,e as a,j as s,s as l,N as r,H as c,I as h,Q as d}from"./common-DEEjER7G.js";import{v as f}from"./align-ChLoh-Dq.js";import{v as b}from"./label-Cg7TG_7b.js";import{b as u}from"./component-names-Dy77vq43.js";import{t as p}from"./i18n-CaL2ODdQ.js";import{K as m}from"./keyboard-DNd73LVa.js";import{c as k}from"./clsx-COFh-Vc8.js";import{d as g,a as y,c as v}from"./element-interaction-C5-6aPzz.js";import{d as w,K as _}from"./events-BhfZTW2e.js";import"./i18n-B2d_exHc.js";import"./element-focus-BQXzaLL9.js";const x=["select-automatic","select-manual"];const T=(n,t)=>{i(n,`_behavior`,(n=>typeof n==="string"&&x.includes(n)),new Set([`KoliBriTabBehavior {${x.join(", ")}`]),t)};const z=(n,t)=>{a(n,"_hasCreateButton",t)};const C='/* 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=1780919027063"); /* IE9*/\n src: url("kolicons.eot?t=1780919027063#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1780919027063") format("woff2"), url("kolicons.woff?t=1780919027063") format("woff"), url("kolicons.ttf?t=1780919027063") format("truetype"), url("kolicons.svg?t=1780919027063#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 @media (forced-colors: active) {\n .kol-tabs__button-group .kol-button.selected {\n outline: 3px solid Highlight;\n outline-offset: -3px;\n }\n .kol-tabs__button-group .kol-button.selected:focus-visible {\n outline-style: dashed;\n }\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}';const j=class{constructor(t){n(this,t);this.onCreateLabel=`${p("kol-new")} …`;this.ctaRef=v();this.nextPossibleTabIndex=(n,t,e=1)=>{const o=t+e;if(o<n.length){if(n[o]._disabled){return this.nextPossibleTabIndex(n,t,e+1)}return o}return t};this.prevPossibleTabIndex=(n,t,e=1)=>{const o=t-e;if(o>=0){if(n[o]._disabled){return this.prevPossibleTabIndex(n,t,e+1)}return o}return t};this.onKeyDown=n=>{switch(n.key){case m.ArrowRight:this.goToNextTab(n);break;case m.ArrowLeft:this.goToPreviousTab(n);break;case m.Space:case m.Enter:this.activateFocusedTab(n);break}};this.onClickSelect=(n,t)=>{this.selectNextTabEvent(n,t)};this.onMouseDown=n=>{n.preventDefault()};this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown};this.catchTabPanelHost=n=>{this.tabPanelHost=n};this._align="top";this._hasCreateButton=false;this._selected=0;this.state={_align:"top",_label:"",_selected:0,_tabs:[]};this.selectNextNotDisabledTab=(n,t,e=true,o)=>{if(n>t.length-1){n=t.length-1}if(n<0){n=0}if(Array.isArray(t)&&t[n]){if(t[n]._disabled){if(e===true){if(n<t.length-1){return this.selectNextNotDisabledTab(n+1,t,true,o||n)}else{n=o||n;e=false}}if(e===false){if(n>0){return this.selectNextNotDisabledTab(n-1,t,false,o||n)}else{s(`[KolTabs] All tabs are disabled, and therefore no tab can be displayed.`)}}}}return n};this.syncSelectedAndTabs=(n,t,e,o)=>{let i;if(o==="_selected"){i=n}else{i=this.state._selected}let a;if(o==="_tabs"){a=n}else{a=this.state._tabs}if(a.length>0){t.set("_selected",this.selectNextNotDisabledTab(i,a))}};this.refreshTabPanels=()=>{var n,t,e,o;if(!this.tabPanelHost)return;while(this.tabPanelHost.firstChild){this.tabPanelHost.removeChild(this.tabPanelHost.firstChild)}for(let i=0;i<((n=this.state._tabs)===null||n===void 0?void 0:n.length);i++){const n=document.createElement("div");n.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`);n.setAttribute("id",`tabpanel-${i}`);n.setAttribute("role","tabpanel");n.setAttribute("hidden","");n.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`);n.appendChild(a);(t=this.tabPanelHost)===null||t===void 0?void 0:t.appendChild(n);if(typeof HTMLCollection!=="undefined"&&((e=this.host)===null||e===void 0?void 0:e.children)instanceof HTMLCollection&&((o=this.host)===null||o===void 0?void 0:o.children[i])){this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}}this.updateVisiblePanel()};this.updateVisiblePanel=()=>{if(!this.tabPanelHost)return;Array.from(this.tabPanelHost.children).forEach(((n,t)=>{if(t===this.state._selected){n.removeAttribute("hidden")}else{n.setAttribute("hidden","")}}))};this.onCreate=n=>{var t,e;n.preventDefault();(e=(t=this.state._on)===null||t===void 0?void 0:t.onCreate)===null||e===void 0?void 0:e.call(t,n);if(this.host){w(this.host,_.create)}};this.onBlur=()=>{this.currentFocusIndex=undefined}}getCurrentFocusIndex(){if(typeof this.currentFocusIndex==="number"){return this.currentFocusIndex}return this.state._selected}getKeyboardTabChangeMode(){if(this._behavior==="select-manual"){return"selectFocusOnly"}return"activateCompletely"}goToNextTab(n){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(n,t,this.getKeyboardTabChangeMode())}goToPreviousTab(n){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(n,t,this.getKeyboardTabChangeMode())}activateFocusedTab(n){if(typeof this.currentFocusIndex==="number"){this.onSelect(n,this.currentFocusIndex)}}selectNextTabEvent(n,t,e="activateCompletely"){var o,i;this.currentFocusIndex=t;this.focusTabById(t);if(e==="activateCompletely"){this._selected=t;const e=this.state._tabs[t];(i=(o=e._on)===null||o===void 0?void 0:o.onSelect)===null||i===void 0?void 0:i.call(o,n,t);this.onSelect(n,t)}}async focus(n){}async click(){}renderButtonGroup(){return t("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((n,e)=>t(u,{ref:this.state._selected===e?this.ctaRef:undefined,_disabled:n._disabled,_icons:n._icons,_hideLabel:n._hideLabel,_label:n._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:n._tooltipAlign,_variant:this.state._selected===e?"custom":undefined,_customClass:this.state._selected===e?"selected":"",_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.state._hasCreateButton&&t(u,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return t("div",{key:"cbac3f2cf4f389e4bdcd4a83c463a339a4f587c4",ref:n=>{this.tabPanelsElement=n},class:k("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"cd0aa9f1a4e1e5dc5facdf0d1d6e58013bf4bc40",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(n){f(this,n)}validateBehavior(n){T(this,n)}validateHasCreateButton(n){z(this,n)}validateLabel(n){b(this,n,{required:true})}validateOn(n){if(typeof n==="object"&&n!==null){const t={};if(typeof n.onCreate==="function"){t.onCreate=n.onCreate}if(typeof n.onSelect==="function"){t.onSelect=n.onSelect}l(this,"_on",t)}}validateSelected(n){r(this,"_selected",n,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(n){c(this,"_tabs",(n=>typeof n==="object"&&n!==null&&typeof n._label==="string"&&n._label.length>0),n,undefined,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}});h("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(n){if(this.tabPanelsElement){const t=d(`button#${this.state._label.replace(/\s/g,"-")}-tab-${n}`,this.tabPanelsElement);t===null||t===void 0?void 0:t.focus()}}onSelect(n,t){var e,o;(o=(e=this._on)===null||e===void 0?void 0:e.onSelect)===null||o===void 0?void 0:o.call(e,n,t);if(this.host){w(this.host,_.select,t)}this.focusTabById(t)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};o([g("ctaRef")],j.prototype,"focus",null);o([y("ctaRef")],j.prototype,"click",null);j.style={default:C};export{j as kol_tabs};
5
5
  //# sourceMappingURL=kol-tabs.entry.js.map