@public-ui/components 4.3.0-rc.8 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (467) 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-DaJBbnJz.js → Alert-DOZ5jD4Z.js} +5 -5
  8. package/dist/cjs/{Alert-DaJBbnJz.js.map → Alert-DOZ5jD4Z.js.map} +1 -1
  9. package/dist/cjs/{Collapsible-A7UN8xYs.js → Collapsible-CvAuF1NY.js} +5 -5
  10. package/dist/cjs/{Collapsible-A7UN8xYs.js.map → Collapsible-CvAuF1NY.js.map} +1 -1
  11. package/dist/cjs/{CustomSuggestionsOptionsGroup-B3zKmcfZ.js → CustomSuggestionsOptionsGroup-CewH-4LP.js} +3 -3
  12. package/dist/cjs/{CustomSuggestionsOptionsGroup-B3zKmcfZ.js.map → CustomSuggestionsOptionsGroup-CewH-4LP.js.map} +1 -1
  13. package/dist/cjs/{FieldControlStateWrapper-Blru_T0E.js → FieldControlStateWrapper-DGt3PP_z.js} +7 -7
  14. package/dist/cjs/{FieldControlStateWrapper-Blru_T0E.js.map → FieldControlStateWrapper-DGt3PP_z.js.map} +1 -1
  15. package/dist/cjs/{FormFieldStateWrapper-DZhEbBYb.js → FormFieldStateWrapper-CpXhI6_0.js} +7 -7
  16. package/dist/cjs/{FormFieldStateWrapper-DZhEbBYb.js.map → FormFieldStateWrapper-CpXhI6_0.js.map} +1 -1
  17. package/dist/cjs/{Heading-CtLCdnno.js → Heading-DN_dHcPW.js} +3 -3
  18. package/dist/cjs/{Heading-CtLCdnno.js.map → Heading-DN_dHcPW.js.map} +1 -1
  19. package/dist/cjs/{Input-CTIvgASH.js → Input-DJcVWEKj.js} +5 -5
  20. package/dist/cjs/{Input-CTIvgASH.js.map → Input-DJcVWEKj.js.map} +1 -1
  21. package/dist/cjs/{InputStateWrapper-D-fmIPN-.js → InputStateWrapper-CdwcznYd.js} +7 -7
  22. package/dist/{kolibri/InputStateWrapper-BkBD8al2.js.map → cjs/InputStateWrapper-CdwcznYd.js.map} +1 -1
  23. package/dist/cjs/{app-globals-hKB4iA5u.js → app-globals-DVB3x8O8.js} +4 -4
  24. package/dist/cjs/{app-globals-hKB4iA5u.js.map → app-globals-DVB3x8O8.js.map} +1 -1
  25. package/dist/cjs/{component-DzuSWpVF.js → component-Bducgk0B.js} +3 -3
  26. package/dist/cjs/{component-DzuSWpVF.js.map → component-Bducgk0B.js.map} +1 -1
  27. package/dist/cjs/{component-XgOEs159.js → component-Bkq_S4-F.js} +3 -3
  28. package/dist/cjs/{component-XgOEs159.js.map → component-Bkq_S4-F.js.map} +1 -1
  29. package/dist/cjs/{component-D2hfqi2r.js → component-DsOmmb34.js} +4 -4
  30. package/dist/cjs/{component-D2hfqi2r.js.map → component-DsOmmb34.js.map} +1 -1
  31. package/dist/cjs/{component-GSsStkDl.js → component-ghRUi4y3.js} +4 -4
  32. package/dist/cjs/{component-GSsStkDl.js.map → component-ghRUi4y3.js.map} +1 -1
  33. package/dist/cjs/{controller-BdPPNnZm.js → controller-B4QXfwn1.js} +3 -3
  34. package/dist/cjs/{controller-BdPPNnZm.js.map → controller-B4QXfwn1.js.map} +1 -1
  35. package/dist/cjs/{controller-BRUHGsKj.js → controller-C9l_vfsq.js} +3 -3
  36. package/dist/cjs/{controller-BRUHGsKj.js.map → controller-C9l_vfsq.js.map} +1 -1
  37. package/dist/cjs/{controller-DI9a-feu.js → controller-PzSnWMee.js} +3 -3
  38. package/dist/cjs/{controller-DI9a-feu.js.map → controller-PzSnWMee.js.map} +1 -1
  39. package/dist/cjs/{controller-icon-Ds2Cvph9.js → controller-icon-DbtCUP4L.js} +6 -6
  40. package/dist/cjs/{controller-icon-Ds2Cvph9.js.map → controller-icon-DbtCUP4L.js.map} +1 -1
  41. package/dist/cjs/{dev.utils-C5bWjmuw.js → dev.utils-idPmRZ7D.js} +3 -3
  42. package/dist/cjs/{dev.utils-C5bWjmuw.js.map → dev.utils-idPmRZ7D.js.map} +1 -1
  43. package/dist/cjs/{devtools-CpVKpbEG.js → devtools-Do6QhVjH.js} +4 -4
  44. package/dist/cjs/{devtools-CpVKpbEG.js.map → devtools-Do6QhVjH.js.map} +1 -1
  45. package/dist/cjs/{index-PpdE67jR.js → index-DN0jEVKb.js} +3 -3
  46. package/dist/cjs/index-DN0jEVKb.js.map +1 -0
  47. package/dist/cjs/kol-abbr.cjs.entry.js +2 -2
  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 +14 -14
  70. package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
  71. package/dist/cjs/kol-input-color.cjs.entry.js +12 -12
  72. package/dist/cjs/kol-input-date.cjs.entry.js +12 -12
  73. package/dist/cjs/kol-input-email.cjs.entry.js +14 -14
  74. package/dist/cjs/kol-input-file.cjs.entry.js +12 -12
  75. package/dist/cjs/kol-input-number.cjs.entry.js +15 -15
  76. package/dist/cjs/kol-input-number.entry.cjs.js.map +1 -1
  77. package/dist/cjs/kol-input-password.cjs.entry.js +13 -13
  78. package/dist/cjs/kol-input-radio.cjs.entry.js +14 -13
  79. package/dist/cjs/kol-input-radio.entry.cjs.js.map +1 -1
  80. package/dist/cjs/kol-input-range.cjs.entry.js +12 -12
  81. package/dist/cjs/kol-input-text.cjs.entry.js +14 -14
  82. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link-button.cjs.entry.js +2 -2
  84. package/dist/cjs/kol-link-wc.cjs.entry.js +4 -4
  85. package/dist/cjs/kol-link.cjs.entry.js +2 -2
  86. package/dist/cjs/kol-meter.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-modal.cjs.entry.js +2 -2
  88. package/dist/cjs/kol-nav.cjs.entry.js +3 -3
  89. package/dist/cjs/kol-pagination-wc.cjs.entry.js +2 -2
  90. package/dist/cjs/kol-pagination.cjs.entry.js +2 -2
  91. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +2 -2
  92. package/dist/cjs/kol-popover-button.cjs.entry.js +2 -2
  93. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-select-wc.cjs.entry.js +12 -11
  96. package/dist/cjs/kol-select-wc.entry.cjs.js.map +1 -1
  97. package/dist/cjs/kol-select.cjs.entry.js +2 -2
  98. package/dist/cjs/kol-single-select.cjs.entry.js +14 -14
  99. package/dist/cjs/kol-skeleton.cjs.entry.js +2 -2
  100. package/dist/cjs/kol-skip-nav.cjs.entry.js +2 -2
  101. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-split-button.cjs.entry.js +2 -2
  103. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-table-stateful.cjs.entry.js +2 -2
  105. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +5 -5
  106. package/dist/cjs/kol-table-stateless.cjs.entry.js +2 -2
  107. package/dist/cjs/kol-tabs.cjs.entry.js +2 -2
  108. package/dist/cjs/kol-textarea.cjs.entry.js +11 -11
  109. package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
  110. package/dist/cjs/kol-toast-container.cjs.entry.js +7 -7
  111. package/dist/cjs/kol-toolbar.cjs.entry.js +2 -2
  112. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +4 -4
  113. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +3 -3
  114. package/dist/cjs/kol-tree-item.cjs.entry.js +2 -2
  115. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  118. package/dist/cjs/kolibri.cjs.js +2 -2
  119. package/dist/cjs/loader.cjs.js +2 -2
  120. package/dist/cjs/test-component.cjs.entry.js +1 -1
  121. package/dist/collection/components/abbr/style.css +2 -2
  122. package/dist/collection/components/accordion/style.css +2 -2
  123. package/dist/collection/components/alert/style.css +2 -2
  124. package/dist/collection/components/badge/style.css +2 -2
  125. package/dist/collection/components/breadcrumb/style.css +2 -2
  126. package/dist/collection/components/button/style.css +2 -2
  127. package/dist/collection/components/button-link/style.css +2 -2
  128. package/dist/collection/components/card/style.css +2 -2
  129. package/dist/collection/components/combobox/style.css +2 -2
  130. package/dist/collection/components/details/style.css +2 -2
  131. package/dist/collection/components/dialog/style.css +2 -2
  132. package/dist/collection/components/drawer/style.css +2 -2
  133. package/dist/collection/components/form/style.css +2 -2
  134. package/dist/collection/components/icon/style.css +2 -2
  135. package/dist/collection/components/input-checkbox/style.css +2 -2
  136. package/dist/collection/components/input-color/style.css +2 -2
  137. package/dist/collection/components/input-date/style.css +2 -2
  138. package/dist/collection/components/input-email/style.css +2 -2
  139. package/dist/collection/components/input-file/style.css +2 -2
  140. package/dist/collection/components/input-number/shadow.js +3 -3
  141. package/dist/collection/components/input-number/shadow.js.map +1 -1
  142. package/dist/collection/components/input-number/style.css +2 -2
  143. package/dist/collection/components/input-password/style.css +2 -2
  144. package/dist/collection/components/input-radio/style.css +2 -2
  145. package/dist/collection/components/input-range/style.css +2 -2
  146. package/dist/collection/components/input-text/style.css +2 -2
  147. package/dist/collection/components/link/style.css +2 -2
  148. package/dist/collection/components/link-button/style.css +2 -2
  149. package/dist/collection/components/modal/style.css +2 -2
  150. package/dist/collection/components/nav/style.css +2 -2
  151. package/dist/collection/components/pagination/style.css +2 -2
  152. package/dist/collection/components/popover-button/style.css +2 -2
  153. package/dist/collection/components/select/style.css +2 -2
  154. package/dist/collection/components/single-select/style.css +2 -2
  155. package/dist/collection/components/skip-nav/style.css +2 -2
  156. package/dist/collection/components/split-button/style.css +2 -2
  157. package/dist/collection/components/table-stateful/style.css +2 -2
  158. package/dist/collection/components/table-stateless/style.css +2 -2
  159. package/dist/collection/components/tabs/style.css +2 -2
  160. package/dist/collection/components/textarea/style.css +2 -2
  161. package/dist/collection/components/toaster/style.css +2 -2
  162. package/dist/collection/components/toolbar/style.css +2 -2
  163. package/dist/collection/components/tree-item/style.css +2 -2
  164. package/dist/collection/functional-component-wrappers/CheckboxStateWrapper/CheckboxStateWrapper.js +2 -2
  165. package/dist/collection/functional-component-wrappers/CheckboxStateWrapper/CheckboxStateWrapper.js.map +1 -1
  166. package/dist/collection/functional-component-wrappers/InputStateWrapper/InputStateWrapper.js +1 -1
  167. package/dist/collection/functional-component-wrappers/InputStateWrapper/InputStateWrapper.js.map +1 -1
  168. package/dist/collection/functional-component-wrappers/RadioStateWrapper/RadioStateWrapper.js +3 -1
  169. package/dist/collection/functional-component-wrappers/RadioStateWrapper/RadioStateWrapper.js.map +1 -1
  170. package/dist/collection/functional-component-wrappers/SelectStateWrapper/SelectStateWrapper.js +2 -1
  171. package/dist/collection/functional-component-wrappers/SelectStateWrapper/SelectStateWrapper.js.map +1 -1
  172. package/dist/collection/functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper.js +1 -1
  173. package/dist/collection/functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper.js.map +1 -1
  174. package/dist/components/InputStateWrapper.js +1 -1
  175. package/dist/components/InputStateWrapper.js.map +1 -1
  176. package/dist/components/kol-abbr.js +1 -1
  177. package/dist/components/kol-accordion.js +1 -1
  178. package/dist/components/kol-alert.js +1 -1
  179. package/dist/components/kol-badge.js +1 -1
  180. package/dist/components/kol-breadcrumb.js +1 -1
  181. package/dist/components/kol-button-link.js +1 -1
  182. package/dist/components/kol-button.js +1 -1
  183. package/dist/components/kol-card.js +1 -1
  184. package/dist/components/kol-combobox.js +1 -1
  185. package/dist/components/kol-details.js +1 -1
  186. package/dist/components/kol-dialog.js +1 -1
  187. package/dist/components/kol-drawer.js +1 -1
  188. package/dist/components/kol-form.js +1 -1
  189. package/dist/components/kol-icon.js +1 -1
  190. package/dist/components/kol-input-checkbox.js +3 -3
  191. package/dist/components/kol-input-checkbox.js.map +1 -1
  192. package/dist/components/kol-input-color.js +1 -1
  193. package/dist/components/kol-input-date.js +1 -1
  194. package/dist/components/kol-input-email.js +1 -1
  195. package/dist/components/kol-input-file.js +1 -1
  196. package/dist/components/kol-input-number.js +4 -4
  197. package/dist/components/kol-input-number.js.map +1 -1
  198. package/dist/components/kol-input-password.js +1 -1
  199. package/dist/components/kol-input-radio.js +4 -3
  200. package/dist/components/kol-input-radio.js.map +1 -1
  201. package/dist/components/kol-input-range.js +1 -1
  202. package/dist/components/kol-input-text.js +1 -1
  203. package/dist/components/kol-link-button.js +1 -1
  204. package/dist/components/kol-link.js +1 -1
  205. package/dist/components/kol-modal.js +1 -1
  206. package/dist/components/kol-nav.js +1 -1
  207. package/dist/components/kol-pagination.js +1 -1
  208. package/dist/components/kol-popover-button.js +1 -1
  209. package/dist/components/kol-select-wc.js +2 -1
  210. package/dist/components/kol-select-wc.js.map +1 -1
  211. package/dist/components/kol-select.js +1 -1
  212. package/dist/components/kol-single-select.js +1 -1
  213. package/dist/components/kol-skip-nav.js +1 -1
  214. package/dist/components/kol-split-button.js +1 -1
  215. package/dist/components/kol-table-stateful.js +1 -1
  216. package/dist/components/kol-table-stateless.js +1 -1
  217. package/dist/components/kol-tabs.js +1 -1
  218. package/dist/components/kol-textarea.js +2 -2
  219. package/dist/components/kol-textarea.js.map +1 -1
  220. package/dist/components/kol-toast-container.js +1 -1
  221. package/dist/components/kol-toolbar.js +1 -1
  222. package/dist/components/kol-tree-item.js +1 -1
  223. package/dist/esm/{Alert-DaPXnitr.js → Alert-B0-brpb4.js} +5 -5
  224. package/dist/esm/{Alert-DaPXnitr.js.map → Alert-B0-brpb4.js.map} +1 -1
  225. package/dist/esm/{Collapsible-DF7peDBr.js → Collapsible-CMBFLf1n.js} +5 -5
  226. package/dist/{kolibri/Collapsible-DF7peDBr.js.map → esm/Collapsible-CMBFLf1n.js.map} +1 -1
  227. package/dist/esm/{CustomSuggestionsOptionsGroup-Cq1zSfAU.js → CustomSuggestionsOptionsGroup-KlCOgWwU.js} +3 -3
  228. package/dist/{kolibri/CustomSuggestionsOptionsGroup-Cq1zSfAU.js.map → esm/CustomSuggestionsOptionsGroup-KlCOgWwU.js.map} +1 -1
  229. package/dist/esm/{FieldControlStateWrapper-BJhTtIF3.js → FieldControlStateWrapper-Bc00aGW7.js} +7 -7
  230. package/dist/esm/{FieldControlStateWrapper-BJhTtIF3.js.map → FieldControlStateWrapper-Bc00aGW7.js.map} +1 -1
  231. package/dist/esm/{FormFieldStateWrapper-BogeRuh6.js → FormFieldStateWrapper-RFAVyAWM.js} +7 -7
  232. package/dist/esm/{FormFieldStateWrapper-BogeRuh6.js.map → FormFieldStateWrapper-RFAVyAWM.js.map} +1 -1
  233. package/dist/esm/{Heading-Fmn2Xnfo.js → Heading-B1x6PKRk.js} +3 -3
  234. package/dist/{kolibri/Heading-Fmn2Xnfo.js.map → esm/Heading-B1x6PKRk.js.map} +1 -1
  235. package/dist/esm/{Input-My07QUjz.js → Input-CybpAJ8Y.js} +5 -5
  236. package/dist/{kolibri/Input-My07QUjz.js.map → esm/Input-CybpAJ8Y.js.map} +1 -1
  237. package/dist/esm/{InputStateWrapper-BkBD8al2.js → InputStateWrapper-DyXXkT2u.js} +7 -7
  238. package/dist/{cjs/InputStateWrapper-D-fmIPN-.js.map → esm/InputStateWrapper-DyXXkT2u.js.map} +1 -1
  239. package/dist/esm/{app-globals-BSt2bjJi.js → app-globals-Dlgvv6eG.js} +4 -4
  240. package/dist/esm/{app-globals-BSt2bjJi.js.map → app-globals-Dlgvv6eG.js.map} +1 -1
  241. package/dist/esm/{component-lILf7M8Y.js → component-C0fGqGE4.js} +3 -3
  242. package/dist/esm/{component-lILf7M8Y.js.map → component-C0fGqGE4.js.map} +1 -1
  243. package/dist/esm/{component-DDkRuod7.js → component-D7UTo-Wg.js} +4 -4
  244. package/dist/{kolibri/component-DDkRuod7.js.map → esm/component-D7UTo-Wg.js.map} +1 -1
  245. package/dist/esm/{component-BXaOK6YH.js → component-Mx0ifAnr.js} +3 -3
  246. package/dist/esm/{component-BXaOK6YH.js.map → component-Mx0ifAnr.js.map} +1 -1
  247. package/dist/esm/{component-DBqyeAbt.js → component-ta0hHoH-.js} +4 -4
  248. package/dist/esm/{component-DBqyeAbt.js.map → component-ta0hHoH-.js.map} +1 -1
  249. package/dist/esm/{controller-B-aPh-rK.js → controller-200FFpKL.js} +3 -3
  250. package/dist/{kolibri/controller-B-aPh-rK.js.map → esm/controller-200FFpKL.js.map} +1 -1
  251. package/dist/esm/{controller-i4DAkaDb.js → controller-CjCv-oWv.js} +3 -3
  252. package/dist/{kolibri/controller-i4DAkaDb.js.map → esm/controller-CjCv-oWv.js.map} +1 -1
  253. package/dist/esm/{controller-icon-lAqXvi57.js → controller-icon-E2i_Tvo6.js} +6 -6
  254. package/dist/{kolibri/controller-icon-lAqXvi57.js.map → esm/controller-icon-E2i_Tvo6.js.map} +1 -1
  255. package/dist/esm/{controller-BKG2L8_f.js → controller-y_HtAlud.js} +3 -3
  256. package/dist/esm/{controller-BKG2L8_f.js.map → controller-y_HtAlud.js.map} +1 -1
  257. package/dist/esm/{dev.utils-4OwwrWYD.js → dev.utils-Bp48T7K-.js} +3 -3
  258. package/dist/esm/{dev.utils-4OwwrWYD.js.map → dev.utils-Bp48T7K-.js.map} +1 -1
  259. package/dist/esm/{devtools-DQZUKzkH.js → devtools-BXXGUaVw.js} +4 -4
  260. package/dist/{kolibri/devtools-DQZUKzkH.js.map → esm/devtools-BXXGUaVw.js.map} +1 -1
  261. package/dist/esm/{index-wGO77oPq.js → index-CJ6nR8sE.js} +3 -3
  262. package/dist/esm/index-CJ6nR8sE.js.map +1 -0
  263. package/dist/esm/kol-abbr.entry.js +2 -2
  264. package/dist/esm/kol-accordion.entry.js +5 -5
  265. package/dist/esm/kol-alert-wc.entry.js +4 -4
  266. package/dist/esm/kol-alert.entry.js +2 -2
  267. package/dist/esm/kol-avatar.entry.js +1 -1
  268. package/dist/esm/kol-badge.entry.js +5 -5
  269. package/dist/esm/kol-breadcrumb.entry.js +3 -3
  270. package/dist/esm/kol-button-link.entry.js +2 -2
  271. package/dist/esm/kol-button-wc.entry.js +4 -4
  272. package/dist/esm/kol-button.entry.js +2 -2
  273. package/dist/esm/kol-card-wc.entry.js +6 -6
  274. package/dist/esm/kol-card.entry.js +2 -2
  275. package/dist/esm/kol-click-button.entry.js +2 -2
  276. package/dist/esm/kol-combobox.entry.js +13 -13
  277. package/dist/esm/kol-details.entry.js +5 -5
  278. package/dist/esm/kol-dialog-wc.entry.js +2 -2
  279. package/dist/esm/kol-dialog.entry.js +2 -2
  280. package/dist/esm/kol-drawer.entry.js +3 -3
  281. package/dist/esm/kol-form.entry.js +5 -5
  282. package/dist/esm/kol-heading.entry.js +1 -1
  283. package/dist/esm/kol-icon.entry.js +3 -3
  284. package/dist/esm/kol-image.entry.js +1 -1
  285. package/dist/esm/kol-input-checkbox.entry.js +14 -14
  286. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  287. package/dist/esm/kol-input-color.entry.js +12 -12
  288. package/dist/esm/kol-input-date.entry.js +12 -12
  289. package/dist/esm/kol-input-email.entry.js +14 -14
  290. package/dist/esm/kol-input-file.entry.js +12 -12
  291. package/dist/esm/kol-input-number.entry.js +15 -15
  292. package/dist/esm/kol-input-number.entry.js.map +1 -1
  293. package/dist/esm/kol-input-password.entry.js +13 -13
  294. package/dist/esm/kol-input-radio.entry.js +14 -13
  295. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  296. package/dist/esm/kol-input-range.entry.js +12 -12
  297. package/dist/esm/kol-input-text.entry.js +14 -14
  298. package/dist/esm/kol-kolibri.entry.js +1 -1
  299. package/dist/esm/kol-link-button.entry.js +2 -2
  300. package/dist/esm/kol-link-wc.entry.js +4 -4
  301. package/dist/esm/kol-link.entry.js +2 -2
  302. package/dist/esm/kol-meter.entry.js +1 -1
  303. package/dist/esm/kol-modal.entry.js +2 -2
  304. package/dist/esm/kol-nav.entry.js +3 -3
  305. package/dist/esm/kol-pagination-wc.entry.js +2 -2
  306. package/dist/esm/kol-pagination.entry.js +2 -2
  307. package/dist/esm/kol-popover-button-wc.entry.js +2 -2
  308. package/dist/esm/kol-popover-button.entry.js +2 -2
  309. package/dist/esm/kol-progress.entry.js +1 -1
  310. package/dist/esm/kol-quote.entry.js +1 -1
  311. package/dist/esm/kol-select-wc.entry.js +12 -11
  312. package/dist/esm/kol-select-wc.entry.js.map +1 -1
  313. package/dist/esm/kol-select.entry.js +2 -2
  314. package/dist/esm/kol-single-select.entry.js +14 -14
  315. package/dist/esm/kol-skeleton.entry.js +2 -2
  316. package/dist/esm/kol-skip-nav.entry.js +2 -2
  317. package/dist/esm/kol-spin.entry.js +1 -1
  318. package/dist/esm/kol-split-button.entry.js +2 -2
  319. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  320. package/dist/esm/kol-table-stateful.entry.js +2 -2
  321. package/dist/esm/kol-table-stateless-wc.entry.js +5 -5
  322. package/dist/esm/kol-table-stateless.entry.js +2 -2
  323. package/dist/esm/kol-tabs.entry.js +2 -2
  324. package/dist/esm/kol-textarea.entry.js +11 -11
  325. package/dist/esm/kol-textarea.entry.js.map +1 -1
  326. package/dist/esm/kol-toast-container.entry.js +7 -7
  327. package/dist/esm/kol-toolbar.entry.js +2 -2
  328. package/dist/esm/kol-tooltip-wc.entry.js +4 -4
  329. package/dist/esm/kol-tree-item-wc.entry.js +3 -3
  330. package/dist/esm/kol-tree-item.entry.js +2 -2
  331. package/dist/esm/kol-tree-wc.entry.js +1 -1
  332. package/dist/esm/kol-tree.entry.js +1 -1
  333. package/dist/esm/kol-version.entry.js +1 -1
  334. package/dist/esm/kolibri.js +3 -3
  335. package/dist/esm/loader.js +3 -3
  336. package/dist/esm/test-component.entry.js +1 -1
  337. package/dist/kolibri/{Alert-DaPXnitr.js → Alert-B0-brpb4.js} +2 -2
  338. package/dist/kolibri/{Alert-DaPXnitr.js.map → Alert-B0-brpb4.js.map} +1 -1
  339. package/dist/kolibri/Collapsible-CMBFLf1n.js +5 -0
  340. package/dist/{esm/Collapsible-DF7peDBr.js.map → kolibri/Collapsible-CMBFLf1n.js.map} +1 -1
  341. package/dist/kolibri/CustomSuggestionsOptionsGroup-KlCOgWwU.js +5 -0
  342. package/dist/{esm/CustomSuggestionsOptionsGroup-Cq1zSfAU.js.map → kolibri/CustomSuggestionsOptionsGroup-KlCOgWwU.js.map} +1 -1
  343. package/dist/kolibri/FieldControlStateWrapper-Bc00aGW7.js +5 -0
  344. package/dist/kolibri/{FieldControlStateWrapper-BJhTtIF3.js.map → FieldControlStateWrapper-Bc00aGW7.js.map} +1 -1
  345. package/dist/kolibri/{FormFieldStateWrapper-BogeRuh6.js → FormFieldStateWrapper-RFAVyAWM.js} +2 -2
  346. package/dist/kolibri/{FormFieldStateWrapper-BogeRuh6.js.map → FormFieldStateWrapper-RFAVyAWM.js.map} +1 -1
  347. package/dist/kolibri/Heading-B1x6PKRk.js +5 -0
  348. package/dist/{esm/Heading-Fmn2Xnfo.js.map → kolibri/Heading-B1x6PKRk.js.map} +1 -1
  349. package/dist/kolibri/Input-CybpAJ8Y.js +5 -0
  350. package/dist/{esm/Input-My07QUjz.js.map → kolibri/Input-CybpAJ8Y.js.map} +1 -1
  351. package/dist/kolibri/{InputStateWrapper-BkBD8al2.js → InputStateWrapper-DyXXkT2u.js} +2 -2
  352. package/dist/{esm/InputStateWrapper-BkBD8al2.js.map → kolibri/InputStateWrapper-DyXXkT2u.js.map} +1 -1
  353. package/dist/kolibri/{app-globals-BSt2bjJi.js → app-globals-Dlgvv6eG.js} +2 -2
  354. package/dist/kolibri/{app-globals-BSt2bjJi.js.map → app-globals-Dlgvv6eG.js.map} +1 -1
  355. package/dist/kolibri/component-C0fGqGE4.js +5 -0
  356. package/dist/kolibri/{component-lILf7M8Y.js.map → component-C0fGqGE4.js.map} +1 -1
  357. package/dist/kolibri/{component-DDkRuod7.js → component-D7UTo-Wg.js} +2 -2
  358. package/dist/{esm/component-DDkRuod7.js.map → kolibri/component-D7UTo-Wg.js.map} +1 -1
  359. package/dist/kolibri/component-Mx0ifAnr.js +5 -0
  360. package/dist/kolibri/{component-BXaOK6YH.js.map → component-Mx0ifAnr.js.map} +1 -1
  361. package/dist/kolibri/{component-DBqyeAbt.js → component-ta0hHoH-.js} +2 -2
  362. package/dist/kolibri/{component-DBqyeAbt.js.map → component-ta0hHoH-.js.map} +1 -1
  363. package/dist/kolibri/{controller-B-aPh-rK.js → controller-200FFpKL.js} +2 -2
  364. package/dist/{esm/controller-B-aPh-rK.js.map → kolibri/controller-200FFpKL.js.map} +1 -1
  365. package/dist/kolibri/controller-CjCv-oWv.js +5 -0
  366. package/dist/{esm/controller-i4DAkaDb.js.map → kolibri/controller-CjCv-oWv.js.map} +1 -1
  367. package/dist/kolibri/{controller-icon-lAqXvi57.js → controller-icon-E2i_Tvo6.js} +2 -2
  368. package/dist/{esm/controller-icon-lAqXvi57.js.map → kolibri/controller-icon-E2i_Tvo6.js.map} +1 -1
  369. package/dist/kolibri/{controller-BKG2L8_f.js → controller-y_HtAlud.js} +2 -2
  370. package/dist/kolibri/{controller-BKG2L8_f.js.map → controller-y_HtAlud.js.map} +1 -1
  371. package/dist/kolibri/{dev.utils-4OwwrWYD.js → dev.utils-Bp48T7K-.js} +2 -2
  372. package/dist/kolibri/{dev.utils-4OwwrWYD.js.map → dev.utils-Bp48T7K-.js.map} +1 -1
  373. package/dist/kolibri/{devtools-DQZUKzkH.js → devtools-BXXGUaVw.js} +2 -2
  374. package/dist/{esm/devtools-DQZUKzkH.js.map → kolibri/devtools-BXXGUaVw.js.map} +1 -1
  375. package/dist/kolibri/{index-wGO77oPq.js → index-CJ6nR8sE.js} +2 -2
  376. package/dist/kolibri/index-CJ6nR8sE.js.map +1 -0
  377. package/dist/kolibri/kol-abbr.entry.js +1 -1
  378. package/dist/kolibri/kol-accordion.entry.js +1 -1
  379. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  380. package/dist/kolibri/kol-alert.entry.js +1 -1
  381. package/dist/kolibri/kol-avatar.entry.js +1 -1
  382. package/dist/kolibri/kol-badge.entry.js +1 -1
  383. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  384. package/dist/kolibri/kol-button-link.entry.js +1 -1
  385. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  386. package/dist/kolibri/kol-button.entry.js +1 -1
  387. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  388. package/dist/kolibri/kol-card.entry.js +1 -1
  389. package/dist/kolibri/kol-click-button.entry.js +1 -1
  390. package/dist/kolibri/kol-combobox.entry.js +1 -1
  391. package/dist/kolibri/kol-details.entry.js +1 -1
  392. package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
  393. package/dist/kolibri/kol-dialog.entry.js +1 -1
  394. package/dist/kolibri/kol-drawer.entry.js +1 -1
  395. package/dist/kolibri/kol-form.entry.js +1 -1
  396. package/dist/kolibri/kol-heading.entry.js +1 -1
  397. package/dist/kolibri/kol-icon.entry.js +1 -1
  398. package/dist/kolibri/kol-image.entry.js +1 -1
  399. package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
  400. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  401. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  402. package/dist/kolibri/kol-input-color.entry.js +1 -1
  403. package/dist/kolibri/kol-input-date.entry.js +1 -1
  404. package/dist/kolibri/kol-input-email.entry.js +1 -1
  405. package/dist/kolibri/kol-input-file.entry.js +1 -1
  406. package/dist/kolibri/kol-input-number.entry.esm.js.map +1 -1
  407. package/dist/kolibri/kol-input-number.entry.js +1 -1
  408. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  409. package/dist/kolibri/kol-input-password.entry.js +1 -1
  410. package/dist/kolibri/kol-input-radio.entry.esm.js.map +1 -1
  411. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  412. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  413. package/dist/kolibri/kol-input-range.entry.js +1 -1
  414. package/dist/kolibri/kol-input-text.entry.js +1 -1
  415. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  416. package/dist/kolibri/kol-link-button.entry.js +1 -1
  417. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  418. package/dist/kolibri/kol-link.entry.js +1 -1
  419. package/dist/kolibri/kol-meter.entry.js +1 -1
  420. package/dist/kolibri/kol-modal.entry.js +1 -1
  421. package/dist/kolibri/kol-nav.entry.js +1 -1
  422. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  423. package/dist/kolibri/kol-pagination.entry.js +1 -1
  424. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  425. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  426. package/dist/kolibri/kol-progress.entry.js +1 -1
  427. package/dist/kolibri/kol-quote.entry.js +1 -1
  428. package/dist/kolibri/kol-select-wc.entry.esm.js.map +1 -1
  429. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  430. package/dist/kolibri/kol-select-wc.entry.js.map +1 -1
  431. package/dist/kolibri/kol-select.entry.js +1 -1
  432. package/dist/kolibri/kol-single-select.entry.js +1 -1
  433. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  434. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  435. package/dist/kolibri/kol-spin.entry.js +1 -1
  436. package/dist/kolibri/kol-split-button.entry.js +1 -1
  437. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  438. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  439. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  440. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  441. package/dist/kolibri/kol-tabs.entry.js +1 -1
  442. package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
  443. package/dist/kolibri/kol-textarea.entry.js +1 -1
  444. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  445. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  446. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  447. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  448. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  449. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  450. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  451. package/dist/kolibri/kol-tree.entry.js +1 -1
  452. package/dist/kolibri/kol-version.entry.js +1 -1
  453. package/dist/kolibri/kolibri.esm.js +1 -1
  454. package/dist/kolibri/test-component.entry.js +1 -1
  455. package/package.json +3 -5
  456. package/dist/cjs/index-PpdE67jR.js.map +0 -1
  457. package/dist/esm/index-wGO77oPq.js.map +0 -1
  458. package/dist/kolibri/Collapsible-DF7peDBr.js +0 -5
  459. package/dist/kolibri/CustomSuggestionsOptionsGroup-Cq1zSfAU.js +0 -5
  460. package/dist/kolibri/FieldControlStateWrapper-BJhTtIF3.js +0 -5
  461. package/dist/kolibri/Heading-Fmn2Xnfo.js +0 -5
  462. package/dist/kolibri/Input-My07QUjz.js +0 -5
  463. package/dist/kolibri/component-BXaOK6YH.js +0 -5
  464. package/dist/kolibri/component-lILf7M8Y.js +0 -5
  465. package/dist/kolibri/controller-i4DAkaDb.js +0 -5
  466. package/dist/kolibri/index-wGO77oPq.js.map +0 -1
  467. package/postinstall.js +0 -27
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as e,h as t,g as s}from"./index-wGO77oPq.js";import{a as l}from"./tslib.es6-QNbPBOk5.js";import{p as i,a,q as n,r as o,b as d,h as r}from"./component-names-Dy77vq43.js";import{t as c}from"./i18n-BsXYYo8j.js";import{d as b,K as h}from"./events-BhfZTW2e.js";import"./common-D5l8QiaY.js";import"./i18n-CoO4-0na.js";const u=e=>Number.isFinite(e)&&e!==undefined&&e>0?e:undefined;const f=class{constructor(t){e(this,t);this.headerCells=[];this.editingHeaderCells=[];this.errorMessage=null;this.translateTableSettings=c("kol-table-settings");this.translateTableSettingsCancel=c("kol-table-settings-cancel");this.translateTableSettingsApply=c("kol-table-settings-apply");this.translateErrorAllInvisible=c("kol-table-settings-error-all-invisible");this._horizontalHeaderCells=[]}handleHeaderCellsChange(e){this.headerCells=e.map((e=>[...e]));this.editingHeaderCells=e.map((e=>e.map((e=>Object.assign({},e)))))}componentWillLoad(){this.handleHeaderCellsChange(this._horizontalHeaderCells)}getPrimaryRow(){var e;return(e=this.editingHeaderCells[this.editingHeaderCells.length-1])!==null&&e!==void 0?e:[]}updatePrimaryRow(e){this.editingHeaderCells=this.editingHeaderCells.map(((t,s,l)=>s===l.length-1?e:t))}moveColumn(e,t){const s=[...this.getPrimaryRow()];const l=s.findIndex((t=>t.key===e));if(l===-1)return;let i;if(t==="up"){if(l===0)return;i=l-1}else{if(l===s.length-1)return;i=l+1}const[a]=s.splice(l,1);s.splice(i,0,a);this.updatePrimaryRow(s)}handleVisibilityChange(e,t){const s=this.getPrimaryRow().map((s=>s.key===e&&s.hidable!==false?Object.assign(Object.assign({},s),{visible:Boolean(t)}):s));this.updatePrimaryRow(s)}handleWidthChange(e,t){const s=u(Number(t));const l=this.getPrimaryRow().map((t=>t.key===e&&t.resizable!==false?Object.assign(Object.assign({},t),{width:s}):t));this.updatePrimaryRow(l)}handleCancel(){var e;this.editingHeaderCells=this.headerCells.map((e=>[...e]));this.errorMessage=null;void((e=this.popoverRef)===null||e===void 0?void 0:e.hidePopover())}handleSubmit(e){var t;e.preventDefault();const s=this.getPrimaryRow();const i=s.some((e=>e.visible!==false));if(!i){this.errorMessage=this.translateErrorAllInvisible;return}else if(this.host){this.errorMessage=null;this.headerCells=this.editingHeaderCells.map((e=>e.map((e=>Object.assign({},e)))));const e=this.editingHeaderCells.map((e=>e.map((e=>{const t=e,{hidable:s,resizable:i,sortable:a,visible:n,width:o}=t,d=l(t,["hidable","resizable","sortable","visible","width"]);const r=Object.assign({},d);if(n!==undefined)r.visible=n;if(s!==undefined)r.hidable=s;if(a!==undefined)r.sortable=a;if(i!==undefined)r.resizable=i;if(o!==undefined&&o!==null)r.width=o;return r}))));b(this.host,h.changeHeaderCells,e);void((t=this.popoverRef)===null||t===void 0?void 0:t.hidePopover())}}render(){const e=this.getPrimaryRow();return t(r,{key:"2dc78b0438f683df5d48c3701475532f542004c5",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"kolicon-settings",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:true},t("div",{key:"0a20509547d95eafdf172f6d166d1ebe4cd1e53b",class:"kol-table-settings__content"},t(i,{key:"fad17919f172d13e8505fea80cf80dfa0c601e07",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(a,{key:"59976ed2e8f1c98f92ac7b977ba2576d4dbbbe2c",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"75cd70a788598da1e8bef1ff3e6dd5bb92b09480",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"aee78d2f68659196041058ce7403df59d04197f3",class:"kol-table-settings__columns"},e.map(((s,l)=>t("div",{key:s.key,class:"kol-table-settings__column"},t(n,{_checked:s.visible!==false,_label:s.hidable?c("kol-table-settings-column-hidable",{placeholders:{column:s.label}}):c("kol-table-settings-column-not-hidable",{placeholders:{column:s.label}}),_value:true,_hideLabel:true,_disabled:s.hidable===false,_on:{onInput:(e,t)=>{var l;return this.handleVisibilityChange((l=s.key)!==null&&l!==void 0?l:"",t)}}}),t("span",{class:"kol-table-settings__column-label"},s.label),t(o,{_hideLabel:true,_value:u(s.width),_label:c("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_disabled:s.resizable===false,_on:{onInput:(e,t)=>{var l;return this.handleWidthChange((l=s.key)!==null&&l!==void 0?l:"",t)}}}),t(d,{_icons:"kolicon-chevron-up",_label:s.sortable===false||l===0?c("kol-table-settings-not-move",{placeholders:{column:s.label}}):c("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:true,_variant:"ghost",_on:{onClick:()=>{var e;return this.moveColumn((e=s.key)!==null&&e!==void 0?e:"","up")}},_disabled:s.sortable===false||l===0,"data-testid":"table-settings-move-up"}),t(d,{_icons:"kolicon-chevron-down",_label:s.sortable===false||l===e.length-1?c("kol-table-settings-not-move",{placeholders:{column:s.label}}):c("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:true,_variant:"ghost",_on:{onClick:()=>{var e;return this.moveColumn((e=s.key)!==null&&e!==void 0?e:"","down")}},_disabled:s.sortable===false||l===e.length-1,"data-testid":"table-settings-move-down"}))))),t("div",{key:"9a9a5dfc6367316dff841159e176570c3220c811",class:"kol-table-settings__actions"},t(d,{key:"67c45436924e20b4cc9ed61ce96a8959055303b4",_label:this.translateTableSettingsCancel,_variant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(d,{key:"09bcb9b1c06017cc01be5d0eba7fd6babb485beb",_label:this.translateTableSettingsApply,_variant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_horizontalHeaderCells:["handleHeaderCellsChange"]}}};export{f as kol_table_settings_wc};
4
+ import{r as e,h as t,g as s}from"./index-CJ6nR8sE.js";import{a as l}from"./tslib.es6-QNbPBOk5.js";import{p as i,a,q as n,r as o,b as d,h as r}from"./component-names-Dy77vq43.js";import{t as c}from"./i18n-BsXYYo8j.js";import{d as b,K as h}from"./events-BhfZTW2e.js";import"./common-D5l8QiaY.js";import"./i18n-CoO4-0na.js";const u=e=>Number.isFinite(e)&&e!==undefined&&e>0?e:undefined;const f=class{constructor(t){e(this,t);this.headerCells=[];this.editingHeaderCells=[];this.errorMessage=null;this.translateTableSettings=c("kol-table-settings");this.translateTableSettingsCancel=c("kol-table-settings-cancel");this.translateTableSettingsApply=c("kol-table-settings-apply");this.translateErrorAllInvisible=c("kol-table-settings-error-all-invisible");this._horizontalHeaderCells=[]}handleHeaderCellsChange(e){this.headerCells=e.map((e=>[...e]));this.editingHeaderCells=e.map((e=>e.map((e=>Object.assign({},e)))))}componentWillLoad(){this.handleHeaderCellsChange(this._horizontalHeaderCells)}getPrimaryRow(){var e;return(e=this.editingHeaderCells[this.editingHeaderCells.length-1])!==null&&e!==void 0?e:[]}updatePrimaryRow(e){this.editingHeaderCells=this.editingHeaderCells.map(((t,s,l)=>s===l.length-1?e:t))}moveColumn(e,t){const s=[...this.getPrimaryRow()];const l=s.findIndex((t=>t.key===e));if(l===-1)return;let i;if(t==="up"){if(l===0)return;i=l-1}else{if(l===s.length-1)return;i=l+1}const[a]=s.splice(l,1);s.splice(i,0,a);this.updatePrimaryRow(s)}handleVisibilityChange(e,t){const s=this.getPrimaryRow().map((s=>s.key===e&&s.hidable!==false?Object.assign(Object.assign({},s),{visible:Boolean(t)}):s));this.updatePrimaryRow(s)}handleWidthChange(e,t){const s=u(Number(t));const l=this.getPrimaryRow().map((t=>t.key===e&&t.resizable!==false?Object.assign(Object.assign({},t),{width:s}):t));this.updatePrimaryRow(l)}handleCancel(){var e;this.editingHeaderCells=this.headerCells.map((e=>[...e]));this.errorMessage=null;void((e=this.popoverRef)===null||e===void 0?void 0:e.hidePopover())}handleSubmit(e){var t;e.preventDefault();const s=this.getPrimaryRow();const i=s.some((e=>e.visible!==false));if(!i){this.errorMessage=this.translateErrorAllInvisible;return}else if(this.host){this.errorMessage=null;this.headerCells=this.editingHeaderCells.map((e=>e.map((e=>Object.assign({},e)))));const e=this.editingHeaderCells.map((e=>e.map((e=>{const t=e,{hidable:s,resizable:i,sortable:a,visible:n,width:o}=t,d=l(t,["hidable","resizable","sortable","visible","width"]);const r=Object.assign({},d);if(n!==undefined)r.visible=n;if(s!==undefined)r.hidable=s;if(a!==undefined)r.sortable=a;if(i!==undefined)r.resizable=i;if(o!==undefined&&o!==null)r.width=o;return r}))));b(this.host,h.changeHeaderCells,e);void((t=this.popoverRef)===null||t===void 0?void 0:t.hidePopover())}}render(){const e=this.getPrimaryRow();return t(r,{key:"2dc78b0438f683df5d48c3701475532f542004c5",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"kolicon-settings",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:true},t("div",{key:"0a20509547d95eafdf172f6d166d1ebe4cd1e53b",class:"kol-table-settings__content"},t(i,{key:"fad17919f172d13e8505fea80cf80dfa0c601e07",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(a,{key:"59976ed2e8f1c98f92ac7b977ba2576d4dbbbe2c",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"75cd70a788598da1e8bef1ff3e6dd5bb92b09480",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"aee78d2f68659196041058ce7403df59d04197f3",class:"kol-table-settings__columns"},e.map(((s,l)=>t("div",{key:s.key,class:"kol-table-settings__column"},t(n,{_checked:s.visible!==false,_label:s.hidable?c("kol-table-settings-column-hidable",{placeholders:{column:s.label}}):c("kol-table-settings-column-not-hidable",{placeholders:{column:s.label}}),_value:true,_hideLabel:true,_disabled:s.hidable===false,_on:{onInput:(e,t)=>{var l;return this.handleVisibilityChange((l=s.key)!==null&&l!==void 0?l:"",t)}}}),t("span",{class:"kol-table-settings__column-label"},s.label),t(o,{_hideLabel:true,_value:u(s.width),_label:c("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_disabled:s.resizable===false,_on:{onInput:(e,t)=>{var l;return this.handleWidthChange((l=s.key)!==null&&l!==void 0?l:"",t)}}}),t(d,{_icons:"kolicon-chevron-up",_label:s.sortable===false||l===0?c("kol-table-settings-not-move",{placeholders:{column:s.label}}):c("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:true,_variant:"ghost",_on:{onClick:()=>{var e;return this.moveColumn((e=s.key)!==null&&e!==void 0?e:"","up")}},_disabled:s.sortable===false||l===0,"data-testid":"table-settings-move-up"}),t(d,{_icons:"kolicon-chevron-down",_label:s.sortable===false||l===e.length-1?c("kol-table-settings-not-move",{placeholders:{column:s.label}}):c("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:true,_variant:"ghost",_on:{onClick:()=>{var e;return this.moveColumn((e=s.key)!==null&&e!==void 0?e:"","down")}},_disabled:s.sortable===false||l===e.length-1,"data-testid":"table-settings-move-down"}))))),t("div",{key:"9a9a5dfc6367316dff841159e176570c3220c811",class:"kol-table-settings__actions"},t(d,{key:"67c45436924e20b4cc9ed61ce96a8959055303b4",_label:this.translateTableSettingsCancel,_variant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(d,{key:"09bcb9b1c06017cc01be5d0eba7fd6babb485beb",_label:this.translateTableSettingsApply,_variant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_horizontalHeaderCells:["handleHeaderCellsChange"]}}};export{f as kol_table_settings_wc};
5
5
  //# sourceMappingURL=kol-table-settings-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 t,H as e,g as i}from"./index-wGO77oPq.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BsXYYo8j.js";import{e as s,b as r,s as c,P as d,o as h,p as f,j as b}from"./common-D5l8QiaY.js";import{a as p}from"./aria-labelledby-6-ki3akM.js";import{v as u}from"./aria-labelledby-bKQGdIef.js";import{v as k,a as m,b as g,c as _,d as y,e as v}from"./table-selection-BNnfuo03.js";import{v as w}from"./label-Ftw1VCQG.js";import{C as x}from"./keyboard-DNd73LVa.js";import{K as z,d as S}from"./events-BhfZTW2e.js";import"./i18n-CoO4-0na.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 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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785745220083"); /* IE9*/\n src: url("kolicons.eot?t=1785745220083#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785745220083") format("woff2"), url("kolicons.woff?t=1785745220083") format("woff"), url("kolicons.ttf?t=1785745220083") format("truetype"), url("kolicons.svg?t=1785745220083#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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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 height: 100%;\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 {\n display: grid;\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\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: grid;\n align-items: center;\n grid-template-columns: subgrid;\n grid-column: 1/6;\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 height: 100%;\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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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-form-field .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 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[multiple][size="1"] {\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-select[multiple][size="1"] option::checkmark {\n height: 100%;\n }\n .kol-select[multiple][size="1"] option:checked::before {\n display: none;\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 O=[10,20,50,100];const P=n=>n===true||n===""||typeof n==="object"&&n!==null;const D=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=u(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){g(this,n)}validatePaginationPosition(n){T(this,n)}validateHasSettingsMenu(n){_(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){d(n,(()=>{h(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){w(this,n,{required:true})}validateSelection(n){y(this,n)}validateOn(n){v(this,n)}validatePagination(n){try{n=f(n)}catch(n){}this.showPagination=P(n);r(this,"_pagination",P,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=p(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||O,_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[x.onSelectionChange])==="function"){this.state._on[x.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"]}}};D.style={default:A};export{D as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-CJ6nR8sE.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BsXYYo8j.js";import{e as s,b as r,s as c,P as d,o as h,p as f,j as b}from"./common-D5l8QiaY.js";import{a as p}from"./aria-labelledby-6-ki3akM.js";import{v as u}from"./aria-labelledby-bKQGdIef.js";import{v as k,a as m,b as g,c as _,d as y,e as v}from"./table-selection-BNnfuo03.js";import{v as w}from"./label-Ftw1VCQG.js";import{C as x}from"./keyboard-DNd73LVa.js";import{K as z,d as S}from"./events-BhfZTW2e.js";import"./i18n-CoO4-0na.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 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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785826695208"); /* IE9*/\n src: url("kolicons.eot?t=1785826695208#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785826695208") format("woff2"), url("kolicons.woff?t=1785826695208") format("woff"), url("kolicons.ttf?t=1785826695208") format("truetype"), url("kolicons.svg?t=1785826695208#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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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 height: 100%;\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 {\n display: grid;\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\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: grid;\n align-items: center;\n grid-template-columns: subgrid;\n grid-column: 1/6;\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 height: 100%;\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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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-form-field .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 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[multiple][size="1"] {\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-select[multiple][size="1"] option::checkmark {\n height: 100%;\n }\n .kol-select[multiple][size="1"] option:checked::before {\n display: none;\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 O=[10,20,50,100];const P=n=>n===true||n===""||typeof n==="object"&&n!==null;const D=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=u(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){g(this,n)}validatePaginationPosition(n){T(this,n)}validateHasSettingsMenu(n){_(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){d(n,(()=>{h(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){w(this,n,{required:true})}validateSelection(n){y(this,n)}validateOn(n){v(this,n)}validatePagination(n){try{n=f(n)}catch(n){}this.showPagination=P(n);r(this,"_pagination",P,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=p(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||O,_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[x.onSelectionChange])==="function"){this.state._on[x.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"]}}};D.style={default:A};export{D 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 l}from"./index-wGO77oPq.js";import{a as s}from"./tslib.es6-QNbPBOk5.js";import{b as n,c as o,t as a}from"./component-names-Dy77vq43.js";import{t as r}from"./i18n-BsXYYo8j.js";import{I as c}from"./component-lILf7M8Y.js";import{T as d}from"./component-DBqyeAbt.js";import{P as h,o as f,p as u,b,L as v,s as _}from"./common-D5l8QiaY.js";import{c as p,v as k,a as y,b as m,f as g,d as S}from"./table-selection-BNnfuo03.js";import{v as j}from"./label-Ftw1VCQG.js";import{v as w,c as C}from"./variant-class-name-DFWOlDkF.js";import{C as $}from"./keyboard-DNd73LVa.js";import{c as O}from"./clsx-COFh-Vc8.js";import{n as D}from"./dev.utils-4OwwrWYD.js";import{d as x,K as A}from"./events-BhfZTW2e.js";import{M as F,e as T,U as H,f as L,b as M,d as E,S as K,h as W}from"./_Uint8Array-kJHDjtoP.js";import{S as z,a as B,i as R}from"./isArray-CcrBs4JM.js";import"./i18n-CoO4-0na.js";import"./bem-registry-Coj2Hlbo.js";import"./component-DDkRuod7.js";var N="__lodash_hash_undefined__";function P(t){this.__data__.set(t,N);return this}function I(t){return this.__data__.has(t)}function V(t){var e=-1,i=t==null?0:t.length;this.__data__=new F;while(++e<i){this.add(t[e])}}V.prototype.add=V.prototype.push=P;V.prototype.has=I;function U(t,e){var i=-1,l=t==null?0:t.length;while(++i<l){if(e(t[i],i,t)){return true}}return false}function Y(t,e){return t.has(e)}var q=1,Q=2;function G(t,e,i,l,s,n){var o=i&q,a=t.length,r=e.length;if(a!=r&&!(o&&r>a)){return false}var c=n.get(t);var d=n.get(e);if(c&&d){return c==e&&d==t}var h=-1,f=true,u=i&Q?new V:undefined;n.set(t,e);n.set(e,t);while(++h<a){var b=t[h],v=e[h];if(l){var _=o?l(v,b,h,e,t,n):l(b,v,h,t,e,n)}if(_!==undefined){if(_){continue}f=false;break}if(u){if(!U(e,(function(t,e){if(!Y(u,e)&&(b===t||s(b,t,i,l,n))){return u.push(e)}}))){f=false;break}}else if(!(b===v||s(b,v,i,l,n))){f=false;break}}n["delete"](t);n["delete"](e);return f}function J(t){var e=-1,i=Array(t.size);t.forEach((function(t,l){i[++e]=[l,t]}));return i}function X(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var Z=1,tt=2;var et="[object Boolean]",it="[object Date]",lt="[object Error]",st="[object Map]",nt="[object Number]",ot="[object RegExp]",at="[object Set]",rt="[object String]",ct="[object Symbol]";var dt="[object ArrayBuffer]",ht="[object DataView]";var ft=z?z.prototype:undefined,ut=ft?ft.valueOf:undefined;function bt(t,e,i,l,s,n,o){switch(i){case ht:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case dt:if(t.byteLength!=e.byteLength||!n(new H(t),new H(e))){return false}return true;case et:case it:case nt:return T(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case ot:case rt:return t==e+"";case st:var a=J;case at:var r=l&Z;a||(a=X);if(t.size!=e.size&&!r){return false}var c=o.get(t);if(c){return c==e}l|=tt;o.set(t,e);var d=G(a(t),a(e),l,s,n,o);o["delete"](t);return d;case ct:if(ut){return ut.call(t)==ut.call(e)}}return false}var vt=1;var _t=Object.prototype;var pt=_t.hasOwnProperty;function kt(t,e,i,l,s,n){var o=i&vt,a=L(t),r=a.length,c=L(e),d=c.length;if(r!=d&&!o){return false}var h=r;while(h--){var f=a[h];if(!(o?f in e:pt.call(e,f))){return false}}var u=n.get(t);var b=n.get(e);if(u&&b){return u==e&&b==t}var v=true;n.set(t,e);n.set(e,t);var _=o;while(++h<r){f=a[h];var p=t[f],k=e[f];if(l){var y=o?l(k,p,f,e,t,n):l(p,k,f,t,e,n)}if(!(y===undefined?p===k||s(p,k,i,l,n):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}}n["delete"](t);n["delete"](e);return v}var yt=1;var mt="[object Arguments]",gt="[object Array]",St="[object Object]";var jt=Object.prototype;var wt=jt.hasOwnProperty;function Ct(t,e,i,l,s,n){var o=B(t),a=B(e),r=o?gt:M(t),c=a?gt:M(e);r=r==mt?St:r;c=c==mt?St:c;var d=r==St,h=c==St,f=r==c;if(f&&E(t)){if(!E(e)){return false}o=true;d=false}if(f&&!d){n||(n=new K);return o||W(t)?G(t,e,i,l,s,n):bt(t,e,r,i,l,s,n)}if(!(i&yt)){var u=d&&wt.call(t,"__wrapped__"),b=h&&wt.call(e,"__wrapped__");if(u||b){var v=u?t.value():t,_=b?e.value():e;n||(n=new K);return s(v,_,i,l,n)}}if(!f){return false}n||(n=new K);return kt(t,e,i,l,s,n)}function $t(t,e,i,l,s){if(t===e){return true}if(t==null||e==null||!R(t)&&!R(e)){return t!==t&&e!==e}return Ct(t,e,i,l,$t,s)}function Ot(t,e){return $t(t,e)}const Dt=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t)));const xt=(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&&!Dt(e)||i!==undefined&&!Dt(i)){return false}const l=[];for(const t of e!==null&&e!==void 0?e:[]){l.push(...t)}for(const t of i!==null&&i!==void 0?i:[]){l.push(...t)}return l.every((t=>t.width===undefined||typeof t.width==="number"))}),new Set(["TableHeaderCellsPropType"]),e)}))}))};const At=150;const Ft=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,l,s=false)=>{var n,o;let a=String(i);if(this.horizontal&&((n=t[0])===null||n===void 0?void 0:n.data)){a=(o=this.getDataKey(t[0].data))!==null&&o!==void 0?o:a}return e("tr",{class:O("kol-table__row",{"kol-table__row--body":!s,"kol-table__row--footer":s}),key:`row-${a}`},this.renderSelectionCell(t,i),t.map(((t,e)=>this.renderTableCell(t,i,e,l))))};this.renderTableCell=(t,i,l,s)=>{if(t.visible===false){return""}let n=`${i}-${l}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);n=e?`${e}-${this.horizontal?l:i}`:n}if(t.headerCell){return this.renderHeadingCell(t,i,l,s)}else{const i=typeof t.render!=="function"&&t.label===this.translateNoEntries;const s=this.getActionColumnHeader(l);const o=Boolean(s&&t.data);const a=this.isFixedCol(l);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-${n}-${this.settingsChangedCounter}`,class:O("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&&s&&t.data?this.renderActionItems(s,t.data,n):!d?t.label:"")}};this.renderActionItems=(t,i,l)=>{const a=t.actions(i);return e("div",{class:"kol-table__cell-actions"},a.map(((t,i)=>{if(t.type==="button"){const o=s(t,[]);return e(n,Object.assign({key:`action-${l}-${i}`},o,{_variant:o._variant}))}else if(t.type==="link"){const n=s(t,[]);return e(o,Object.assign({key:`action-${l}-${i}`},n))}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){xt(this,t);if(!Ot(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 l=this.checkboxRefs.indexOf(i);if(l>-1){t.preventDefault();if(t.key==="ArrowDown"){l=(l+1)%this.checkboxRefs.length;this.checkboxRefs[l].focus()}else if(t.key==="ArrowUp"){t.preventDefault();l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length;this.checkboxRefs[l].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[$.onChangeHeaderCells])==="function"){this.state._on[$.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,l,s,n;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+=(l=(i=o[t])===null||i===void 0?void 0:i.width)!==null&&l!==void 0?l:0}if(this.state._selection){const t=(s=this.tableDivElement)===null||s===void 0?void 0:s.querySelector(".kol-table__cell--selection");a+=(n=t===null||t===void 0?void 0:t.offsetWidth)!==null&&n!==void 0?n: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,D())}}));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 l=i[t];if(l&&l.type==="action"){return l}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 l=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(l<e){l=e}}));if(l===0){l=e.length}else{l-=((i=this.state._dataFoot)===null||i===void 0?void 0:i.length)||0}return l}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,l;if(((e=this.primaryHeadersCache)===null||e===void 0?void 0:e.headers)===t){this.horizontal=this.primaryHeadersCache.horizontal;return this.primaryHeadersCache.result}let s=this.getThePrimaryHeadersWithKeyOrRenderFunction((i=t.horizontal)!==null&&i!==void 0?i:[]);this.horizontal=true;if(s.length===0){s=this.getThePrimaryHeadersWithKeyOrRenderFunction((l=t.vertical)!==null&&l!==void 0?l:[]);if(s.length>0){this.horizontal=false}}this.primaryHeadersCache={headers:t,result:s,horizontal:this.horizontal};return s}createDataField(t,e,i){var l,s,n,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+=((l=this.state._dataFoot)===null||l===void 0?void 0:l.length)||0}const b=[];const v=[];const _=[];e.vertical.forEach(((t,e)=>{v[e]=0;_[e]=[]}));const p=h;for(let l=u;l<f;l++){const d=[];e.vertical.forEach(((t,e)=>{let i=0;_[e].forEach((t=>i+=t));if(i<=l){const s=t[l-i+v[e]];if(typeof s==="object"){d.push(Object.assign(Object.assign({},s),{headerCell:true,data:{}}));let t=1;if(typeof s.rowSpan==="number"&&s.rowSpan>1){t=s.rowSpan}_[e].push(t);if(typeof s.colSpan==="number"&&s.colSpan>1){for(let i=1;i<s.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=(s=this.fixedOffsets[e-1])!==null&&s!==void 0?s:0;t+=(o=(n=p[e-1])===null||n===void 0?void 0:n.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 s=i&&this.state._dataFoot?this.state._dataFoot[l-u]:t[l];if(typeof p[e]==="object"&&p[e]!==null&&typeof s==="object"&&s!==null&&(typeof p[e].key==="string"||typeof p[e].render==="function")){const t=p[e].key;const i=s[t];d.push(Object.assign(Object.assign({},p[e]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:s,label:i}))}}else{if(typeof p[l]==="object"&&p[l]!==null&&typeof t[e]==="object"&&t[e]!==null&&(typeof p[l].key==="string"||typeof p[l].render==="function")){const i=p[l].key;const s=t[e][i];d.push(Object.assign(Object.assign({},p[l]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:t[e],label:s}))}}}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 l={colSpan:t,label:this.translateNoEntries,render:undefined,rowSpan:Math.max(i,1)};if(b.length===0){b.push([l])}else{b[0].push(l)}}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[$.onSelectionChange])==="function"){this.state._on[$.onSelectionChange](t,e)}if(this.host){x(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 l;const s=this.state._selection;if(!s)return"";const n=this.getSelectionKeyPropertyName();const o=(l=t[0])===null||l===void 0?void 0:l.data;if(!o)return"";const a=o[n];const r=s.multiple||s.multiple===undefined;const h=String(a);const f=this.selectedKeysStringSet.has(h);const u=this.disabledKeysStringSet.has(h);const b=s.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:O("kol-table__selection",{"kol-table__selection--checked":f})},r?e("label",{class:O("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:O("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=s===null||s===void 0?void 0:s.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:O("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(Ft.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).map(String));this.disabledKeysStringSet=new Set(Ft.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 Ft.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>!this.disabledKeysStringSet.has(String(t))))}getSelectedKeysWithDisabledKeysOnly(){var t;return Ft.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 l=(e=this.getSelectedKeysWithDisabledKeysOnly())!==null&&e!==void 0?e:[];if(t){l.push(...this.getDataWithSelectionEnabled().map((t=>t===null||t===void 0?void 0:t[i])))}return l}getTableMinWidth(){var t,e;const i=(t=this.state._headerCells.horizontal)!==null&&t!==void 0?t:[];const l=[];i.forEach((t=>{t.forEach((t=>{if(t.visible!==false&&t.width!==undefined&&t.width>0){l.push(t.width)}}))}));const s=(e=this.state._headerCells.vertical)!==null&&e!==void 0?e:[];const n=[];s.forEach((t=>{t.forEach((t=>{if(t.width!==undefined&&t.width>0){n.push(t.width)}}))}));const o=[...n,...l];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 l=this.state._selection;if(!l){return e("td",{class:"kol-table__cell kol-table__cell--header",key:`thead-0`})}if(l.multiple===false){return e("th",{scope:"col",key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("span",{class:"visually-hidden"},r("kol-table-selection")))}const s=(i=(t=this.getSelectedKeysWithoutDisabledKeys())===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;const n=this.getDataWithSelectionEnabled().length;const o=s===n;const a=s!==0&&!o;let h="kol-table-selection-indeterminate";if(o&&!a){h="kol-table-selection-none"}if(s===0){h="kol-table-selection-all"}const f=r(h);return e("th",{scope:"col",key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("span",{class:"visually-hidden"},r("kol-table-selection")),e("div",{class:O("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:O("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 l=this.state._headerCells.vertical;if(!Array.isArray(t)||t.length===0||!Array.isArray(l)||l.length===0){return e(i,null)}const s=l.reduce(((t,e)=>{var i;const l=e===null||e===void 0?void 0:e[0];return t+((i=l===null||l===void 0?void 0:l.width)!==null&&i!==void 0?i:0)}),0);return e("td",{"aria-hidden":"true",colSpan:l.length,rowSpan:t.length,style:s>0?{width:`${s}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,l,s){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=s?"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(l);const _=v==="left"?this.getOffsetString(l,true):undefined;const p=v==="right"?this.getOffsetString(l):undefined;return e("th",{key:`${i}-${l}-${t.label}`,class:O("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(n,{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){x(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 l;const s=((l=this.state._headerCells.vertical)===null||l===void 0?void 0:l.length)||0;const n=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:O("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:O(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:s+n+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 l=this.state._headerCells.horizontal;const s=!((t=this.externalLabelElements)===null||t===void 0?void 0:t.length);return e("div",{key:"5e695caed3d8fa3e0c02628ff4683a808ff90118",class:O("kol-table",{[C(this.state._variant,"table")]:this.state._variant!==undefined})},this.state._hasSettingsMenu&&e(a,{key:"b1ab207ce8d70eea77a1539b98602e3f1ae6d838",_horizontalHeaderCells:l!==null&&l!==void 0?l:[]}),e("div",{key:"c2e77bdb173e4c07b87e961122bedcdbdfcf500c",ref:t=>this.tableDivElement=t,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?s?"-1":"0":undefined},e("table",{key:"aa63facbff8823756c31be35fcffc86a5c452740",ref:t=>{this.tableRef=t;this.syncTableLabel(this.externalLabelElements)},"aria-labelledby":s?"caption":undefined,class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},s&&e("caption",{key:"7d84c6675e6807c7db1af0c32f41d24fb232cbd4",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":undefined},this.state._label),Array.isArray(l)&&e("thead",{key:"3d64cd804254f659ba3cf2473b77873dac3820a9",class:"kol-table__head"},[l.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",l)]),e("tbody",{key:"0eac18af80cf7c63b1b7df70852bc554b731efca",class:"kol-table__body"},i.map(((t,e)=>this.renderTableRow(t,e,true)))),this.renderFoot())))}get host(){return l(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{Ft as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as i,g as l}from"./index-CJ6nR8sE.js";import{a as s}from"./tslib.es6-QNbPBOk5.js";import{b as n,c as o,t as a}from"./component-names-Dy77vq43.js";import{t as r}from"./i18n-BsXYYo8j.js";import{I as c}from"./component-C0fGqGE4.js";import{T as d}from"./component-ta0hHoH-.js";import{P as h,o as f,p as u,b,L as v,s as _}from"./common-D5l8QiaY.js";import{c as p,v as k,a as y,b as m,f as g,d as S}from"./table-selection-BNnfuo03.js";import{v as j}from"./label-Ftw1VCQG.js";import{v as w,c as C}from"./variant-class-name-DFWOlDkF.js";import{C as $}from"./keyboard-DNd73LVa.js";import{c as O}from"./clsx-COFh-Vc8.js";import{n as x}from"./dev.utils-Bp48T7K-.js";import{d as A,K as D}from"./events-BhfZTW2e.js";import{M as F,e as T,U as H,f as E,b as L,d as K,S as M,h as W}from"./_Uint8Array-kJHDjtoP.js";import{S as z,a as B,i as R}from"./isArray-CcrBs4JM.js";import"./i18n-CoO4-0na.js";import"./bem-registry-Coj2Hlbo.js";import"./component-D7UTo-Wg.js";var N="__lodash_hash_undefined__";function P(t){this.__data__.set(t,N);return this}function V(t){return this.__data__.has(t)}function I(t){var e=-1,i=t==null?0:t.length;this.__data__=new F;while(++e<i){this.add(t[e])}}I.prototype.add=I.prototype.push=P;I.prototype.has=V;function U(t,e){var i=-1,l=t==null?0:t.length;while(++i<l){if(e(t[i],i,t)){return true}}return false}function q(t,e){return t.has(e)}var G=1,J=2;function Q(t,e,i,l,s,n){var o=i&G,a=t.length,r=e.length;if(a!=r&&!(o&&r>a)){return false}var c=n.get(t);var d=n.get(e);if(c&&d){return c==e&&d==t}var h=-1,f=true,u=i&J?new I:undefined;n.set(t,e);n.set(e,t);while(++h<a){var b=t[h],v=e[h];if(l){var _=o?l(v,b,h,e,t,n):l(b,v,h,t,e,n)}if(_!==undefined){if(_){continue}f=false;break}if(u){if(!U(e,(function(t,e){if(!q(u,e)&&(b===t||s(b,t,i,l,n))){return u.push(e)}}))){f=false;break}}else if(!(b===v||s(b,v,i,l,n))){f=false;break}}n["delete"](t);n["delete"](e);return f}function Y(t){var e=-1,i=Array(t.size);t.forEach((function(t,l){i[++e]=[l,t]}));return i}function X(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var Z=1,tt=2;var et="[object Boolean]",it="[object Date]",lt="[object Error]",st="[object Map]",nt="[object Number]",ot="[object RegExp]",at="[object Set]",rt="[object String]",ct="[object Symbol]";var dt="[object ArrayBuffer]",ht="[object DataView]";var ft=z?z.prototype:undefined,ut=ft?ft.valueOf:undefined;function bt(t,e,i,l,s,n,o){switch(i){case ht:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case dt:if(t.byteLength!=e.byteLength||!n(new H(t),new H(e))){return false}return true;case et:case it:case nt:return T(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case ot:case rt:return t==e+"";case st:var a=Y;case at:var r=l&Z;a||(a=X);if(t.size!=e.size&&!r){return false}var c=o.get(t);if(c){return c==e}l|=tt;o.set(t,e);var d=Q(a(t),a(e),l,s,n,o);o["delete"](t);return d;case ct:if(ut){return ut.call(t)==ut.call(e)}}return false}var vt=1;var _t=Object.prototype;var pt=_t.hasOwnProperty;function kt(t,e,i,l,s,n){var o=i&vt,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:pt.call(e,f))){return false}}var u=n.get(t);var b=n.get(e);if(u&&b){return u==e&&b==t}var v=true;n.set(t,e);n.set(e,t);var _=o;while(++h<r){f=a[h];var p=t[f],k=e[f];if(l){var y=o?l(k,p,f,e,t,n):l(p,k,f,t,e,n)}if(!(y===undefined?p===k||s(p,k,i,l,n):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}}n["delete"](t);n["delete"](e);return v}var yt=1;var mt="[object Arguments]",gt="[object Array]",St="[object Object]";var jt=Object.prototype;var wt=jt.hasOwnProperty;function Ct(t,e,i,l,s,n){var o=B(t),a=B(e),r=o?gt:L(t),c=a?gt:L(e);r=r==mt?St:r;c=c==mt?St:c;var d=r==St,h=c==St,f=r==c;if(f&&K(t)){if(!K(e)){return false}o=true;d=false}if(f&&!d){n||(n=new M);return o||W(t)?Q(t,e,i,l,s,n):bt(t,e,r,i,l,s,n)}if(!(i&yt)){var u=d&&wt.call(t,"__wrapped__"),b=h&&wt.call(e,"__wrapped__");if(u||b){var v=u?t.value():t,_=b?e.value():e;n||(n=new M);return s(v,_,i,l,n)}}if(!f){return false}n||(n=new M);return kt(t,e,i,l,s,n)}function $t(t,e,i,l,s){if(t===e){return true}if(t==null||e==null||!R(t)&&!R(e)){return t!==t&&e!==e}return Ct(t,e,i,l,$t,s)}function Ot(t,e){return $t(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 l=[];for(const t of e!==null&&e!==void 0?e:[]){l.push(...t)}for(const t of i!==null&&i!==void 0?i:[]){l.push(...t)}return l.every((t=>t.width===undefined||typeof t.width==="number"))}),new Set(["TableHeaderCellsPropType"]),e)}))}))};const Dt=150;const Ft=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,l,s=false)=>{var n,o;let a=String(i);if(this.horizontal&&((n=t[0])===null||n===void 0?void 0:n.data)){a=(o=this.getDataKey(t[0].data))!==null&&o!==void 0?o:a}return e("tr",{class:O("kol-table__row",{"kol-table__row--body":!s,"kol-table__row--footer":s}),key:`row-${a}`},this.renderSelectionCell(t,i),t.map(((t,e)=>this.renderTableCell(t,i,e,l))))};this.renderTableCell=(t,i,l,s)=>{if(t.visible===false){return""}let n=`${i}-${l}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);n=e?`${e}-${this.horizontal?l:i}`:n}if(t.headerCell){return this.renderHeadingCell(t,i,l,s)}else{const i=typeof t.render!=="function"&&t.label===this.translateNoEntries;const s=this.getActionColumnHeader(l);const o=Boolean(s&&t.data);const a=this.isFixedCol(l);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-${n}-${this.settingsChangedCounter}`,class:O("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&&s&&t.data?this.renderActionItems(s,t.data,n):!d?t.label:"")}};this.renderActionItems=(t,i,l)=>{const a=t.actions(i);return e("div",{class:"kol-table__cell-actions"},a.map(((t,i)=>{if(t.type==="button"){const o=s(t,[]);return e(n,Object.assign({key:`action-${l}-${i}`},o,{_variant:o._variant}))}else if(t.type==="link"){const n=s(t,[]);return e(o,Object.assign({key:`action-${l}-${i}`},n))}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(!Ot(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 l=this.checkboxRefs.indexOf(i);if(l>-1){t.preventDefault();if(t.key==="ArrowDown"){l=(l+1)%this.checkboxRefs.length;this.checkboxRefs[l].focus()}else if(t.key==="ArrowUp"){t.preventDefault();l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length;this.checkboxRefs[l].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[$.onChangeHeaderCells])==="function"){this.state._on[$.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()}),Dt)}checkDivElementScrollbar(){if(this.tableDivElement){this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth}}calculateFixedColsWidth(){var t,e,i,l,s,n;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+=(l=(i=o[t])===null||i===void 0?void 0:i.width)!==null&&l!==void 0?l:0}if(this.state._selection){const t=(s=this.tableDivElement)===null||s===void 0?void 0:s.querySelector(".kol-table__cell--selection");a+=(n=t===null||t===void 0?void 0:t.offsetWidth)!==null&&n!==void 0?n: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 l=i[t];if(l&&l.type==="action"){return l}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 l=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(l<e){l=e}}));if(l===0){l=e.length}else{l-=((i=this.state._dataFoot)===null||i===void 0?void 0:i.length)||0}return l}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,l;if(((e=this.primaryHeadersCache)===null||e===void 0?void 0:e.headers)===t){this.horizontal=this.primaryHeadersCache.horizontal;return this.primaryHeadersCache.result}let s=this.getThePrimaryHeadersWithKeyOrRenderFunction((i=t.horizontal)!==null&&i!==void 0?i:[]);this.horizontal=true;if(s.length===0){s=this.getThePrimaryHeadersWithKeyOrRenderFunction((l=t.vertical)!==null&&l!==void 0?l:[]);if(s.length>0){this.horizontal=false}}this.primaryHeadersCache={headers:t,result:s,horizontal:this.horizontal};return s}createDataField(t,e,i){var l,s,n,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+=((l=this.state._dataFoot)===null||l===void 0?void 0:l.length)||0}const b=[];const v=[];const _=[];e.vertical.forEach(((t,e)=>{v[e]=0;_[e]=[]}));const p=h;for(let l=u;l<f;l++){const d=[];e.vertical.forEach(((t,e)=>{let i=0;_[e].forEach((t=>i+=t));if(i<=l){const s=t[l-i+v[e]];if(typeof s==="object"){d.push(Object.assign(Object.assign({},s),{headerCell:true,data:{}}));let t=1;if(typeof s.rowSpan==="number"&&s.rowSpan>1){t=s.rowSpan}_[e].push(t);if(typeof s.colSpan==="number"&&s.colSpan>1){for(let i=1;i<s.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=(s=this.fixedOffsets[e-1])!==null&&s!==void 0?s:0;t+=(o=(n=p[e-1])===null||n===void 0?void 0:n.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 s=i&&this.state._dataFoot?this.state._dataFoot[l-u]:t[l];if(typeof p[e]==="object"&&p[e]!==null&&typeof s==="object"&&s!==null&&(typeof p[e].key==="string"||typeof p[e].render==="function")){const t=p[e].key;const i=s[t];d.push(Object.assign(Object.assign({},p[e]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:s,label:i}))}}else{if(typeof p[l]==="object"&&p[l]!==null&&typeof t[e]==="object"&&t[e]!==null&&(typeof p[l].key==="string"||typeof p[l].render==="function")){const i=p[l].key;const s=t[e][i];d.push(Object.assign(Object.assign({},p[l]),{colIndex:e,colSpan:undefined,rowSpan:undefined,data:t[e],label:s}))}}}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 l={colSpan:t,label:this.translateNoEntries,render:undefined,rowSpan:Math.max(i,1)};if(b.length===0){b.push([l])}else{b[0].push(l)}}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[$.onSelectionChange])==="function"){this.state._on[$.onSelectionChange](t,e)}if(this.host){A(this.host,D.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 l;const s=this.state._selection;if(!s)return"";const n=this.getSelectionKeyPropertyName();const o=(l=t[0])===null||l===void 0?void 0:l.data;if(!o)return"";const a=o[n];const r=s.multiple||s.multiple===undefined;const h=String(a);const f=this.selectedKeysStringSet.has(h);const u=this.disabledKeysStringSet.has(h);const b=s.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:O("kol-table__selection",{"kol-table__selection--checked":f})},r?e("label",{class:O("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:O("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=s===null||s===void 0?void 0:s.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:O("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(Ft.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).map(String));this.disabledKeysStringSet=new Set(Ft.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 Ft.normalizeKeys((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys).filter((t=>!this.disabledKeysStringSet.has(String(t))))}getSelectedKeysWithDisabledKeysOnly(){var t;return Ft.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 l=(e=this.getSelectedKeysWithDisabledKeysOnly())!==null&&e!==void 0?e:[];if(t){l.push(...this.getDataWithSelectionEnabled().map((t=>t===null||t===void 0?void 0:t[i])))}return l}getTableMinWidth(){var t,e;const i=(t=this.state._headerCells.horizontal)!==null&&t!==void 0?t:[];const l=[];i.forEach((t=>{t.forEach((t=>{if(t.visible!==false&&t.width!==undefined&&t.width>0){l.push(t.width)}}))}));const s=(e=this.state._headerCells.vertical)!==null&&e!==void 0?e:[];const n=[];s.forEach((t=>{t.forEach((t=>{if(t.width!==undefined&&t.width>0){n.push(t.width)}}))}));const o=[...n,...l];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 l=this.state._selection;if(!l){return e("td",{class:"kol-table__cell kol-table__cell--header",key:`thead-0`})}if(l.multiple===false){return e("th",{scope:"col",key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("span",{class:"visually-hidden"},r("kol-table-selection")))}const s=(i=(t=this.getSelectedKeysWithoutDisabledKeys())===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;const n=this.getDataWithSelectionEnabled().length;const o=s===n;const a=s!==0&&!o;let h="kol-table-selection-indeterminate";if(o&&!a){h="kol-table-selection-none"}if(s===0){h="kol-table-selection-all"}const f=r(h);return e("th",{scope:"col",key:`thead-0-selection`,class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("span",{class:"visually-hidden"},r("kol-table-selection")),e("div",{class:O("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:O("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 l=this.state._headerCells.vertical;if(!Array.isArray(t)||t.length===0||!Array.isArray(l)||l.length===0){return e(i,null)}const s=l.reduce(((t,e)=>{var i;const l=e===null||e===void 0?void 0:e[0];return t+((i=l===null||l===void 0?void 0:l.width)!==null&&i!==void 0?i:0)}),0);return e("td",{"aria-hidden":"true",colSpan:l.length,rowSpan:t.length,style:s>0?{width:`${s}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,l,s){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=s?"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(l);const _=v==="left"?this.getOffsetString(l,true):undefined;const p=v==="right"?this.getOffsetString(l):undefined;return e("th",{key:`${i}-${l}-${t.label}`,class:O("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(n,{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,D.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 l;const s=((l=this.state._headerCells.vertical)===null||l===void 0?void 0:l.length)||0;const n=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:O("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:O(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:s+n+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 l=this.state._headerCells.horizontal;const s=!((t=this.externalLabelElements)===null||t===void 0?void 0:t.length);return e("div",{key:"5e695caed3d8fa3e0c02628ff4683a808ff90118",class:O("kol-table",{[C(this.state._variant,"table")]:this.state._variant!==undefined})},this.state._hasSettingsMenu&&e(a,{key:"b1ab207ce8d70eea77a1539b98602e3f1ae6d838",_horizontalHeaderCells:l!==null&&l!==void 0?l:[]}),e("div",{key:"c2e77bdb173e4c07b87e961122bedcdbdfcf500c",ref:t=>this.tableDivElement=t,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?s?"-1":"0":undefined},e("table",{key:"aa63facbff8823756c31be35fcffc86a5c452740",ref:t=>{this.tableRef=t;this.syncTableLabel(this.externalLabelElements)},"aria-labelledby":s?"caption":undefined,class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},s&&e("caption",{key:"7d84c6675e6807c7db1af0c32f41d24fb232cbd4",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":undefined},this.state._label),Array.isArray(l)&&e("thead",{key:"3d64cd804254f659ba3cf2473b77873dac3820a9",class:"kol-table__head"},[l.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",l)]),e("tbody",{key:"0eac18af80cf7c63b1b7df70852bc554b731efca",class:"kol-table__body"},i.map(((t,e)=>this.renderTableRow(t,e,true)))),this.renderFoot())))}get host(){return l(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{Ft 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-wGO77oPq.js";import{k as o}from"./component-names-Dy77vq43.js";import{v as i}from"./aria-labelledby-bKQGdIef.js";import{a as l}from"./aria-labelledby-6-ki3akM.js";import"./common-D5l8QiaY.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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785745220083"); /* IE9*/\n src: url("kolicons.eot?t=1785745220083#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785745220083") format("woff2"), url("kolicons.woff?t=1785745220083") format("woff"), url("kolicons.ttf?t=1785745220083") format("truetype"), url("kolicons.svg?t=1785745220083#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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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 height: 100%;\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 {\n display: grid;\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\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: grid;\n align-items: center;\n grid-template-columns: subgrid;\n grid-column: 1/6;\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 height: 100%;\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-CJ6nR8sE.js";import{k as o}from"./component-names-Dy77vq43.js";import{v as i}from"./aria-labelledby-bKQGdIef.js";import{a as l}from"./aria-labelledby-6-ki3akM.js";import"./common-D5l8QiaY.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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785826695208"); /* IE9*/\n src: url("kolicons.eot?t=1785826695208#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785826695208") format("woff2"), url("kolicons.woff?t=1785826695208") format("woff"), url("kolicons.ttf?t=1785826695208") format("truetype"), url("kolicons.svg?t=1785826695208#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 height: 100%;\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 grid-template-areas: "icon heading close" "icon content close";\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n }\n .kol-alert__icon {\n grid-area: icon;\n }\n .kol-alert__heading {\n grid-area: heading;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n grid-area: close;\n }\n .kol-alert__content {\n grid-area: content;\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 height: 100%;\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 {\n display: grid;\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\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: grid;\n align-items: center;\n grid-template-columns: subgrid;\n grid-column: 1/6;\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 height: 100%;\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-wGO77oPq.js";import{_ as o}from"./tslib.es6-QNbPBOk5.js";import{b as i,e as a,j as l,s,N as r,H as c,I as h,Q as d}from"./common-D5l8QiaY.js";import{v as f}from"./align-DpNc6EKs.js";import{v as u}from"./label-Ftw1VCQG.js";import{b}from"./component-names-Dy77vq43.js";import{t as p}from"./i18n-BsXYYo8j.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-CoO4-0na.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='@charset "UTF-8";\n/* 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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785745220083"); /* IE9*/\n src: url("kolicons.eot?t=1785745220083#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785745220083") format("woff2"), url("kolicons.woff?t=1785745220083") format("woff"), url("kolicons.ttf?t=1785745220083") format("truetype"), url("kolicons.svg?t=1785745220083#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{l(`[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","");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(b,{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(b,{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:"b91b05099aae90e0b3fb222c47df077111650385",ref:n=>{this.tabPanelsElement=n},class:k("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"0002ef2aa171bf02b2684b4094166d961354360e",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(n){f(this,n)}validateBehavior(n){T(this,n)}validateHasCreateButton(n){z(this,n)}validateLabel(n){u(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}s(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-CJ6nR8sE.js";import{_ as o}from"./tslib.es6-QNbPBOk5.js";import{b as i,e as a,j as l,s,N as r,H as c,I as h,Q as d}from"./common-D5l8QiaY.js";import{v as f}from"./align-DpNc6EKs.js";import{v as u}from"./label-Ftw1VCQG.js";import{b}from"./component-names-Dy77vq43.js";import{t as p}from"./i18n-BsXYYo8j.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-CoO4-0na.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='@charset "UTF-8";\n/* 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 * The `max(…, 44px)` floor guarantees the WCAG 2.5.5 (AAA) target size of 44px:\n * `to-rem(44)` runs the value through a `calc()` rem round-trip which can lose\n * sub-pixel precision and resolve to e.g. 43.99px depending on the browser\'s\n * rounding, dropping just below the required minimum.\n */\n --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px);\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 --kol-a11y-font-color: black;\n --kol-a11y-background-color: white;\n color: var(--kol-a11y-font-color);\n background-color: var(--kol-a11y-background-color);\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n --kol-a11y-font-family: Verdana;\n font-family: var(--kol-a11y-font-family);\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=1785826695208"); /* IE9*/\n src: url("kolicons.eot?t=1785826695208#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1785826695208") format("woff2"), url("kolicons.woff?t=1785826695208") format("woff"), url("kolicons.ttf?t=1785826695208") format("truetype"), url("kolicons.svg?t=1785826695208#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{l(`[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","");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(b,{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(b,{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:"b91b05099aae90e0b3fb222c47df077111650385",ref:n=>{this.tabPanelsElement=n},class:k("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"0002ef2aa171bf02b2684b4094166d961354360e",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(n){f(this,n)}validateBehavior(n){T(this,n)}validateHasCreateButton(n){z(this,n)}validateLabel(n){u(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}s(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