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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) 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-fEJpzH57.js → Alert-C0ni87zH.js} +1 -1
  8. package/dist/cjs/{Alert-fEJpzH57.js.map → Alert-C0ni87zH.js.map} +1 -1
  9. package/dist/cjs/{Collapsible-BgXj2W-O.js → Collapsible-B2NYkr98.js} +1 -1
  10. package/dist/cjs/{Collapsible-BgXj2W-O.js.map → Collapsible-B2NYkr98.js.map} +1 -1
  11. package/dist/cjs/{CustomSuggestionsOptionsGroup-DqLiqK20.js → CustomSuggestionsOptionsGroup-DsfBTk3u.js} +1 -1
  12. package/dist/cjs/{CustomSuggestionsOptionsGroup-DqLiqK20.js.map → CustomSuggestionsOptionsGroup-DsfBTk3u.js.map} +1 -1
  13. package/dist/cjs/{FieldControlStateWrapper-BMuc2__Y.js → FieldControlStateWrapper-YEjIP80B.js} +1 -1
  14. package/dist/cjs/{FieldControlStateWrapper-BMuc2__Y.js.map → FieldControlStateWrapper-YEjIP80B.js.map} +1 -1
  15. package/dist/cjs/{FormFieldStateWrapper-DGbP2fH-.js → FormFieldStateWrapper-BQWVVjWk.js} +1 -1
  16. package/dist/cjs/{FormFieldStateWrapper-DGbP2fH-.js.map → FormFieldStateWrapper-BQWVVjWk.js.map} +1 -1
  17. package/dist/cjs/{Heading-BxQWS9Oj.js → Heading-CfhDOPMw.js} +1 -1
  18. package/dist/cjs/{Heading-BxQWS9Oj.js.map → Heading-CfhDOPMw.js.map} +1 -1
  19. package/dist/cjs/{Input-Dn19IFET.js → Input-wBiCBqv3.js} +1 -1
  20. package/dist/cjs/{Input-Dn19IFET.js.map → Input-wBiCBqv3.js.map} +1 -1
  21. package/dist/cjs/{InputStateWrapper-Bl92EZ5T.js → InputStateWrapper-BtfWhSAG.js} +1 -1
  22. package/dist/cjs/{InputStateWrapper-Bl92EZ5T.js.map → InputStateWrapper-BtfWhSAG.js.map} +1 -1
  23. package/dist/cjs/{app-globals-DZdhu1yH.js → app-globals-DA5QbwLT.js} +1 -1
  24. package/dist/cjs/{app-globals-DZdhu1yH.js.map → app-globals-DA5QbwLT.js.map} +1 -1
  25. package/dist/cjs/{component-C27tnivo.js → component-Cg-OygC_.js} +1 -1
  26. package/dist/cjs/{component-C27tnivo.js.map → component-Cg-OygC_.js.map} +1 -1
  27. package/dist/cjs/{component-Liy_hR04.js → component-O_tO7dUq.js} +1 -1
  28. package/dist/cjs/{component-Liy_hR04.js.map → component-O_tO7dUq.js.map} +1 -1
  29. package/dist/cjs/{component-CTPLUymr.js → component-TPBvP4ox.js} +1 -1
  30. package/dist/cjs/{component-CTPLUymr.js.map → component-TPBvP4ox.js.map} +1 -1
  31. package/dist/cjs/{controller-DlUvjie1.js → controller-BIw-uUwK.js} +1 -1
  32. package/dist/cjs/{controller-DlUvjie1.js.map → controller-BIw-uUwK.js.map} +1 -1
  33. package/dist/cjs/{controller-DceZdZQf.js → controller-DCfbk9ts.js} +1 -1
  34. package/dist/cjs/{controller-DceZdZQf.js.map → controller-DCfbk9ts.js.map} +1 -1
  35. package/dist/cjs/{controller-DkqEh37D.js → controller-axvKW-gX.js} +1 -1
  36. package/dist/cjs/{controller-DkqEh37D.js.map → controller-axvKW-gX.js.map} +1 -1
  37. package/dist/cjs/{controller-icon-DkZBowrn.js → controller-icon-DpxEr5AX.js} +1 -1
  38. package/dist/cjs/{controller-icon-DkZBowrn.js.map → controller-icon-DpxEr5AX.js.map} +1 -1
  39. package/dist/cjs/{controller-ZfYqOlWc.js → controller-pPoypcsX.js} +1 -1
  40. package/dist/cjs/{controller-ZfYqOlWc.js.map → controller-pPoypcsX.js.map} +1 -1
  41. package/dist/cjs/{dev.utils-jLeSRS1F.js → dev.utils-ciOZUMnv.js} +1 -1
  42. package/dist/cjs/{dev.utils-jLeSRS1F.js.map → dev.utils-ciOZUMnv.js.map} +1 -1
  43. package/dist/cjs/{devtools-BKBluXPb.js → devtools-CS0BGiIX.js} +1 -1
  44. package/dist/cjs/{devtools-BKBluXPb.js.map → devtools-CS0BGiIX.js.map} +1 -1
  45. package/dist/cjs/index-Dph1AncT.js +4 -0
  46. package/dist/cjs/index-Dph1AncT.js.map +1 -0
  47. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-click-button.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-dialog-wc.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-dialog.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-meter.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-skeleton.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  113. package/dist/cjs/kolibri.cjs.js +1 -1
  114. package/dist/cjs/loader.cjs.js +1 -1
  115. package/dist/cjs/test-component.cjs.entry.js +1 -1
  116. package/dist/components/kol-abbr.js +1 -1
  117. package/dist/components/kol-accordion.js +1 -1
  118. package/dist/components/kol-alert.js +1 -1
  119. package/dist/components/kol-badge.js +1 -1
  120. package/dist/components/kol-breadcrumb.js +1 -1
  121. package/dist/components/kol-button-link.js +1 -1
  122. package/dist/components/kol-button.js +1 -1
  123. package/dist/components/kol-card.js +1 -1
  124. package/dist/components/kol-combobox.js +1 -1
  125. package/dist/components/kol-details.js +1 -1
  126. package/dist/components/kol-dialog.js +1 -1
  127. package/dist/components/kol-drawer.js +1 -1
  128. package/dist/components/kol-form.js +1 -1
  129. package/dist/components/kol-icon.js +1 -1
  130. package/dist/components/kol-input-checkbox.js +1 -1
  131. package/dist/components/kol-input-color.js +1 -1
  132. package/dist/components/kol-input-date.js +1 -1
  133. package/dist/components/kol-input-email.js +1 -1
  134. package/dist/components/kol-input-file.js +1 -1
  135. package/dist/components/kol-input-number.js +1 -1
  136. package/dist/components/kol-input-password.js +1 -1
  137. package/dist/components/kol-input-radio.js +1 -1
  138. package/dist/components/kol-input-range.js +1 -1
  139. package/dist/components/kol-input-text.js +1 -1
  140. package/dist/components/kol-link-button.js +1 -1
  141. package/dist/components/kol-link.js +1 -1
  142. package/dist/components/kol-modal.js +1 -1
  143. package/dist/components/kol-nav.js +1 -1
  144. package/dist/components/kol-pagination.js +1 -1
  145. package/dist/components/kol-popover-button.js +1 -1
  146. package/dist/components/kol-select.js +1 -1
  147. package/dist/components/kol-single-select.js +1 -1
  148. package/dist/components/kol-skip-nav.js +1 -1
  149. package/dist/components/kol-split-button.js +1 -1
  150. package/dist/components/kol-table-stateful.js +1 -1
  151. package/dist/components/kol-table-stateless.js +1 -1
  152. package/dist/components/kol-tabs.js +1 -1
  153. package/dist/components/kol-textarea.js +1 -1
  154. package/dist/components/kol-toast-container.js +1 -1
  155. package/dist/components/kol-toolbar.js +1 -1
  156. package/dist/components/kol-tree-item.js +1 -1
  157. package/dist/esm/{Alert-Dwi0SIbu.js → Alert-Ccw-DwxA.js} +1 -1
  158. package/dist/esm/{Alert-Dwi0SIbu.js.map → Alert-Ccw-DwxA.js.map} +1 -1
  159. package/dist/esm/{Collapsible-D0DjrPCQ.js → Collapsible-C8qbIZUD.js} +1 -1
  160. package/dist/esm/{Collapsible-D0DjrPCQ.js.map → Collapsible-C8qbIZUD.js.map} +1 -1
  161. package/dist/esm/{CustomSuggestionsOptionsGroup-HDeTtnBz.js → CustomSuggestionsOptionsGroup-Ct0Hm2uK.js} +1 -1
  162. package/dist/{kolibri/CustomSuggestionsOptionsGroup-HDeTtnBz.js.map → esm/CustomSuggestionsOptionsGroup-Ct0Hm2uK.js.map} +1 -1
  163. package/dist/esm/{FieldControlStateWrapper-BZG3AeGU.js → FieldControlStateWrapper-DshiHE0s.js} +1 -1
  164. package/dist/{kolibri/FieldControlStateWrapper-BZG3AeGU.js.map → esm/FieldControlStateWrapper-DshiHE0s.js.map} +1 -1
  165. package/dist/esm/{FormFieldStateWrapper-DbT_eu6O.js → FormFieldStateWrapper-DsX6gk6N.js} +1 -1
  166. package/dist/{kolibri/FormFieldStateWrapper-DbT_eu6O.js.map → esm/FormFieldStateWrapper-DsX6gk6N.js.map} +1 -1
  167. package/dist/esm/{Heading-hNm0EJy2.js → Heading-D3N3WLAQ.js} +1 -1
  168. package/dist/{kolibri/Heading-hNm0EJy2.js.map → esm/Heading-D3N3WLAQ.js.map} +1 -1
  169. package/dist/esm/{Input-Dm342vhU.js → Input-vt6KaJWU.js} +1 -1
  170. package/dist/esm/{Input-Dm342vhU.js.map → Input-vt6KaJWU.js.map} +1 -1
  171. package/dist/esm/{InputStateWrapper-CLIorTSb.js → InputStateWrapper-xUqVwJbq.js} +1 -1
  172. package/dist/esm/{InputStateWrapper-CLIorTSb.js.map → InputStateWrapper-xUqVwJbq.js.map} +1 -1
  173. package/dist/esm/{app-globals-6IPlQwfA.js → app-globals-D4GzuCjA.js} +1 -1
  174. package/dist/esm/{app-globals-6IPlQwfA.js.map → app-globals-D4GzuCjA.js.map} +1 -1
  175. package/dist/esm/{component-ghWELfa6.js → component-CAXga0_U.js} +1 -1
  176. package/dist/esm/{component-ghWELfa6.js.map → component-CAXga0_U.js.map} +1 -1
  177. package/dist/esm/{component-C5-fCuhA.js → component-D3oJtEcp.js} +1 -1
  178. package/dist/esm/{component-C5-fCuhA.js.map → component-D3oJtEcp.js.map} +1 -1
  179. package/dist/esm/{component-D5yPWlmy.js → component-DpGGeM3i.js} +1 -1
  180. package/dist/esm/{component-D5yPWlmy.js.map → component-DpGGeM3i.js.map} +1 -1
  181. package/dist/esm/{controller-eT2cogRF.js → controller-B-NZHqJ8.js} +1 -1
  182. package/dist/esm/{controller-eT2cogRF.js.map → controller-B-NZHqJ8.js.map} +1 -1
  183. package/dist/esm/{controller-Bf2B7XG4.js → controller-BBKoxit_.js} +1 -1
  184. package/dist/esm/{controller-Bf2B7XG4.js.map → controller-BBKoxit_.js.map} +1 -1
  185. package/dist/esm/{controller-DXxubhmT.js → controller-BKRP0tqb.js} +1 -1
  186. package/dist/{kolibri/controller-DXxubhmT.js.map → esm/controller-BKRP0tqb.js.map} +1 -1
  187. package/dist/esm/{controller-Bkyc_RZG.js → controller-VXnGF058.js} +1 -1
  188. package/dist/esm/{controller-Bkyc_RZG.js.map → controller-VXnGF058.js.map} +1 -1
  189. package/dist/esm/{controller-icon-DB6DYeGY.js → controller-icon-CYmINtAB.js} +1 -1
  190. package/dist/esm/{controller-icon-DB6DYeGY.js.map → controller-icon-CYmINtAB.js.map} +1 -1
  191. package/dist/esm/{dev.utils-CKaUZiiF.js → dev.utils-BL9Lx_uf.js} +1 -1
  192. package/dist/esm/{dev.utils-CKaUZiiF.js.map → dev.utils-BL9Lx_uf.js.map} +1 -1
  193. package/dist/esm/{devtools-BaBYu7OV.js → devtools-CJj45nCF.js} +1 -1
  194. package/dist/{kolibri/devtools-BaBYu7OV.js.map → esm/devtools-CJj45nCF.js.map} +1 -1
  195. package/dist/esm/index-G8af0_gG.js +4 -0
  196. package/dist/esm/index-G8af0_gG.js.map +1 -0
  197. package/dist/esm/kol-abbr.entry.js +1 -1
  198. package/dist/esm/kol-accordion.entry.js +1 -1
  199. package/dist/esm/kol-alert-wc.entry.js +1 -1
  200. package/dist/esm/kol-alert.entry.js +1 -1
  201. package/dist/esm/kol-avatar.entry.js +1 -1
  202. package/dist/esm/kol-badge.entry.js +1 -1
  203. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  204. package/dist/esm/kol-button-link.entry.js +1 -1
  205. package/dist/esm/kol-button-wc.entry.js +1 -1
  206. package/dist/esm/kol-button.entry.js +1 -1
  207. package/dist/esm/kol-card-wc.entry.js +1 -1
  208. package/dist/esm/kol-card.entry.js +1 -1
  209. package/dist/esm/kol-click-button.entry.js +1 -1
  210. package/dist/esm/kol-combobox.entry.js +1 -1
  211. package/dist/esm/kol-details.entry.js +1 -1
  212. package/dist/esm/kol-dialog-wc.entry.js +1 -1
  213. package/dist/esm/kol-dialog.entry.js +1 -1
  214. package/dist/esm/kol-drawer.entry.js +1 -1
  215. package/dist/esm/kol-form.entry.js +1 -1
  216. package/dist/esm/kol-heading.entry.js +1 -1
  217. package/dist/esm/kol-icon.entry.js +1 -1
  218. package/dist/esm/kol-image.entry.js +1 -1
  219. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  220. package/dist/esm/kol-input-color.entry.js +1 -1
  221. package/dist/esm/kol-input-date.entry.js +1 -1
  222. package/dist/esm/kol-input-email.entry.js +1 -1
  223. package/dist/esm/kol-input-file.entry.js +1 -1
  224. package/dist/esm/kol-input-number.entry.js +1 -1
  225. package/dist/esm/kol-input-password.entry.js +1 -1
  226. package/dist/esm/kol-input-radio.entry.js +1 -1
  227. package/dist/esm/kol-input-range.entry.js +1 -1
  228. package/dist/esm/kol-input-text.entry.js +1 -1
  229. package/dist/esm/kol-kolibri.entry.js +1 -1
  230. package/dist/esm/kol-link-button.entry.js +1 -1
  231. package/dist/esm/kol-link-wc.entry.js +1 -1
  232. package/dist/esm/kol-link.entry.js +1 -1
  233. package/dist/esm/kol-meter.entry.js +1 -1
  234. package/dist/esm/kol-modal.entry.js +1 -1
  235. package/dist/esm/kol-nav.entry.js +1 -1
  236. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  237. package/dist/esm/kol-pagination.entry.js +1 -1
  238. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  239. package/dist/esm/kol-popover-button.entry.js +1 -1
  240. package/dist/esm/kol-progress.entry.js +1 -1
  241. package/dist/esm/kol-quote.entry.js +1 -1
  242. package/dist/esm/kol-select-wc.entry.js +1 -1
  243. package/dist/esm/kol-select.entry.js +1 -1
  244. package/dist/esm/kol-single-select.entry.js +1 -1
  245. package/dist/esm/kol-skeleton.entry.js +1 -1
  246. package/dist/esm/kol-skip-nav.entry.js +1 -1
  247. package/dist/esm/kol-spin.entry.js +1 -1
  248. package/dist/esm/kol-split-button.entry.js +1 -1
  249. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  250. package/dist/esm/kol-table-stateful.entry.js +1 -1
  251. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  252. package/dist/esm/kol-table-stateless.entry.js +1 -1
  253. package/dist/esm/kol-tabs.entry.js +1 -1
  254. package/dist/esm/kol-textarea.entry.js +1 -1
  255. package/dist/esm/kol-toast-container.entry.js +1 -1
  256. package/dist/esm/kol-toolbar.entry.js +1 -1
  257. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  258. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  259. package/dist/esm/kol-tree-item.entry.js +1 -1
  260. package/dist/esm/kol-tree-wc.entry.js +1 -1
  261. package/dist/esm/kol-tree.entry.js +1 -1
  262. package/dist/esm/kol-version.entry.js +1 -1
  263. package/dist/esm/kolibri.js +1 -1
  264. package/dist/esm/loader.js +1 -1
  265. package/dist/esm/test-component.entry.js +1 -1
  266. package/dist/kolibri/{Alert-Dwi0SIbu.js → Alert-Ccw-DwxA.js} +1 -1
  267. package/dist/kolibri/{Alert-Dwi0SIbu.js.map → Alert-Ccw-DwxA.js.map} +1 -1
  268. package/dist/kolibri/{Collapsible-D0DjrPCQ.js → Collapsible-C8qbIZUD.js} +1 -1
  269. package/dist/kolibri/{Collapsible-D0DjrPCQ.js.map → Collapsible-C8qbIZUD.js.map} +1 -1
  270. package/dist/kolibri/CustomSuggestionsOptionsGroup-Ct0Hm2uK.js +4 -0
  271. package/dist/{esm/CustomSuggestionsOptionsGroup-HDeTtnBz.js.map → kolibri/CustomSuggestionsOptionsGroup-Ct0Hm2uK.js.map} +1 -1
  272. package/dist/kolibri/FieldControlStateWrapper-DshiHE0s.js +4 -0
  273. package/dist/{esm/FieldControlStateWrapper-BZG3AeGU.js.map → kolibri/FieldControlStateWrapper-DshiHE0s.js.map} +1 -1
  274. package/dist/kolibri/{FormFieldStateWrapper-DbT_eu6O.js → FormFieldStateWrapper-DsX6gk6N.js} +1 -1
  275. package/dist/{esm/FormFieldStateWrapper-DbT_eu6O.js.map → kolibri/FormFieldStateWrapper-DsX6gk6N.js.map} +1 -1
  276. package/dist/kolibri/Heading-D3N3WLAQ.js +4 -0
  277. package/dist/{esm/Heading-hNm0EJy2.js.map → kolibri/Heading-D3N3WLAQ.js.map} +1 -1
  278. package/dist/kolibri/Input-vt6KaJWU.js +4 -0
  279. package/dist/kolibri/{Input-Dm342vhU.js.map → Input-vt6KaJWU.js.map} +1 -1
  280. package/dist/kolibri/{InputStateWrapper-CLIorTSb.js → InputStateWrapper-xUqVwJbq.js} +1 -1
  281. package/dist/kolibri/{InputStateWrapper-CLIorTSb.js.map → InputStateWrapper-xUqVwJbq.js.map} +1 -1
  282. package/dist/kolibri/{app-globals-6IPlQwfA.js → app-globals-D4GzuCjA.js} +1 -1
  283. package/dist/kolibri/{app-globals-6IPlQwfA.js.map → app-globals-D4GzuCjA.js.map} +1 -1
  284. package/dist/kolibri/component-CAXga0_U.js +4 -0
  285. package/dist/kolibri/{component-ghWELfa6.js.map → component-CAXga0_U.js.map} +1 -1
  286. package/dist/kolibri/component-D3oJtEcp.js +4 -0
  287. package/dist/kolibri/{component-C5-fCuhA.js.map → component-D3oJtEcp.js.map} +1 -1
  288. package/dist/kolibri/{component-D5yPWlmy.js → component-DpGGeM3i.js} +1 -1
  289. package/dist/kolibri/{component-D5yPWlmy.js.map → component-DpGGeM3i.js.map} +1 -1
  290. package/dist/kolibri/{controller-eT2cogRF.js → controller-B-NZHqJ8.js} +1 -1
  291. package/dist/kolibri/{controller-eT2cogRF.js.map → controller-B-NZHqJ8.js.map} +1 -1
  292. package/dist/kolibri/{controller-Bf2B7XG4.js → controller-BBKoxit_.js} +1 -1
  293. package/dist/kolibri/{controller-Bf2B7XG4.js.map → controller-BBKoxit_.js.map} +1 -1
  294. package/dist/kolibri/controller-BKRP0tqb.js +4 -0
  295. package/dist/{esm/controller-DXxubhmT.js.map → kolibri/controller-BKRP0tqb.js.map} +1 -1
  296. package/dist/kolibri/{controller-Bkyc_RZG.js → controller-VXnGF058.js} +1 -1
  297. package/dist/kolibri/{controller-Bkyc_RZG.js.map → controller-VXnGF058.js.map} +1 -1
  298. package/dist/kolibri/{controller-icon-DB6DYeGY.js → controller-icon-CYmINtAB.js} +1 -1
  299. package/dist/kolibri/{controller-icon-DB6DYeGY.js.map → controller-icon-CYmINtAB.js.map} +1 -1
  300. package/dist/kolibri/{dev.utils-CKaUZiiF.js → dev.utils-BL9Lx_uf.js} +1 -1
  301. package/dist/kolibri/{dev.utils-CKaUZiiF.js.map → dev.utils-BL9Lx_uf.js.map} +1 -1
  302. package/dist/kolibri/{devtools-BaBYu7OV.js → devtools-CJj45nCF.js} +1 -1
  303. package/dist/{esm/devtools-BaBYu7OV.js.map → kolibri/devtools-CJj45nCF.js.map} +1 -1
  304. package/dist/kolibri/{index-C8rYknb2.js → index-G8af0_gG.js} +1 -1
  305. package/dist/kolibri/index-G8af0_gG.js.map +1 -0
  306. package/dist/kolibri/kol-abbr.entry.js +1 -1
  307. package/dist/kolibri/kol-accordion.entry.js +1 -1
  308. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  309. package/dist/kolibri/kol-alert.entry.js +1 -1
  310. package/dist/kolibri/kol-avatar.entry.js +1 -1
  311. package/dist/kolibri/kol-badge.entry.js +1 -1
  312. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  313. package/dist/kolibri/kol-button-link.entry.js +1 -1
  314. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  315. package/dist/kolibri/kol-button.entry.js +1 -1
  316. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  317. package/dist/kolibri/kol-card.entry.js +1 -1
  318. package/dist/kolibri/kol-click-button.entry.js +1 -1
  319. package/dist/kolibri/kol-click-button.entry.js.map +1 -1
  320. package/dist/kolibri/kol-combobox.entry.js +1 -1
  321. package/dist/kolibri/kol-details.entry.js +1 -1
  322. package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
  323. package/dist/kolibri/kol-dialog.entry.js +1 -1
  324. package/dist/kolibri/kol-drawer.entry.js +1 -1
  325. package/dist/kolibri/kol-form.entry.js +1 -1
  326. package/dist/kolibri/kol-heading.entry.js +1 -1
  327. package/dist/kolibri/kol-icon.entry.js +1 -1
  328. package/dist/kolibri/kol-image.entry.js +1 -1
  329. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  330. package/dist/kolibri/kol-input-color.entry.js +1 -1
  331. package/dist/kolibri/kol-input-date.entry.js +1 -1
  332. package/dist/kolibri/kol-input-email.entry.js +1 -1
  333. package/dist/kolibri/kol-input-file.entry.js +1 -1
  334. package/dist/kolibri/kol-input-number.entry.js +1 -1
  335. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  336. package/dist/kolibri/kol-input-password.entry.js +1 -1
  337. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  338. package/dist/kolibri/kol-input-range.entry.js +1 -1
  339. package/dist/kolibri/kol-input-text.entry.js +1 -1
  340. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  341. package/dist/kolibri/kol-link-button.entry.js +1 -1
  342. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  343. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  344. package/dist/kolibri/kol-link.entry.js +1 -1
  345. package/dist/kolibri/kol-meter.entry.js +1 -1
  346. package/dist/kolibri/kol-modal.entry.js +1 -1
  347. package/dist/kolibri/kol-nav.entry.js +1 -1
  348. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  349. package/dist/kolibri/kol-pagination.entry.js +1 -1
  350. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  351. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  352. package/dist/kolibri/kol-progress.entry.js +1 -1
  353. package/dist/kolibri/kol-quote.entry.js +1 -1
  354. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  355. package/dist/kolibri/kol-select.entry.js +1 -1
  356. package/dist/kolibri/kol-single-select.entry.js +1 -1
  357. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  358. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  359. package/dist/kolibri/kol-spin.entry.js +1 -1
  360. package/dist/kolibri/kol-split-button.entry.js +1 -1
  361. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  362. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  363. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  364. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  365. package/dist/kolibri/kol-tabs.entry.js +1 -1
  366. package/dist/kolibri/kol-textarea.entry.js +1 -1
  367. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  368. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  369. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  370. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  371. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  372. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  373. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  374. package/dist/kolibri/kol-tree.entry.js +1 -1
  375. package/dist/kolibri/kol-version.entry.js +1 -1
  376. package/dist/kolibri/kolibri.esm.js +1 -1
  377. package/dist/kolibri/test-component.entry.js +1 -1
  378. package/package.json +2 -2
  379. package/dist/cjs/index-Do5xA4dJ.js +0 -4
  380. package/dist/cjs/index-Do5xA4dJ.js.map +0 -1
  381. package/dist/esm/index-C8rYknb2.js +0 -4
  382. package/dist/esm/index-C8rYknb2.js.map +0 -1
  383. package/dist/kolibri/CustomSuggestionsOptionsGroup-HDeTtnBz.js +0 -4
  384. package/dist/kolibri/FieldControlStateWrapper-BZG3AeGU.js +0 -4
  385. package/dist/kolibri/Heading-hNm0EJy2.js +0 -4
  386. package/dist/kolibri/Input-Dm342vhU.js +0 -4
  387. package/dist/kolibri/component-C5-fCuhA.js +0 -4
  388. package/dist/kolibri/component-ghWELfa6.js +0 -4
  389. package/dist/kolibri/controller-DXxubhmT.js +0 -4
  390. package/dist/kolibri/index-C8rYknb2.js.map +0 -1
@@ -1,4 +1,4 @@
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-C8rYknb2.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BVaUp6qp.js";import{e as s,b as r,s as c,P as h,p as d,o as f,k as b}from"./common-BqV6Zb30.js";import{v as p,a as k,b as u,c as m,d as _,e as g}from"./table-selection-CXJmsMfX.js";import{v as y}from"./label-vxVEH2gH.js";import{C as v}from"./keyboard-DNd73LVa.js";import{K as x,d as w}from"./events-DHTi_wtD.js";import"./i18n-B2d_exHc.js";const z=(n,t,e={})=>{s(n,"_allowMultiSort",t,Object.assign({defaultValue:!1},e))},S=["top","bottom","both"],j=(n,t)=>{r(n,"_paginationPosition",n=>"string"==typeof n&&S.includes(n),new Set([`PaginationPositionPropType {${S.join(", ")}`]),t,{defaultValue:"bottom"})},C='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775118370120"); /* IE9*/\n src: url("kolicons.eot?t=1775118370120#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775118370120") format("woff2"), url("kolicons.woff?t=1775118370120") format("woff"), url("kolicons.ttf?t=1775118370120") format("truetype"), url("kolicons.svg?t=1775118370120#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\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 #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\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: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\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}',T=[10,20,50,100],O=n=>!0===n||""===n||"object"==typeof n&&null!==n,D=class{constructor(t){n(this,t),this.catchRef=n=>{this.tableWcRef=n},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(n,t),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(n,t),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(n,t),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)return void c(this,"_sortedData",this.state._data);const n=[...this.state._data];this.sortData.length>0&&n.sort((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(n,t,i.direction);if(0!==o)return"ASC"===i.direction?o:-o}return 0}),c(this,"_sortedData",n)}}validateAllowMultiSort(n){z(this,n,{defaultValue:!1})}validateData(n){p(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){k(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){u(this,n)}validatePaginationPosition(n){j(this,n)}validateHasSettingsMenu(n){m(this,n)}changeCellSort(n){var t;if(void 0===n.type||"default"===n.type){if("function"!=typeof n.compareFn)return;this.state._allowMultiSort||n.key===(null===(t=this.sortData[0])||void 0===t?void 0:t.key)||(this.sortData=[]);const e=this.sortData.findIndex(t=>t.key===n.key);if(e>=0){const n=this.sortData[e];switch(n.direction){case"ASC":n.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:n.direction="ASC"}}else n.key&&this.sortData.push({label:n.label,key:n.key,compareFn:n.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(n){h(n,()=>{f(n,()=>{try{n=d(n)}catch(n){}r(this,"_headers",n=>"object"==typeof n&&null!==n,new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e,i,o;const a=n=>{let t=!1;this.sortData=[],n.forEach(n=>{if(void 0!==n.type&&"default"!==n.type)return;if("function"==typeof n.compareFn&&!n.key)return void b("[KolTableStateful] A sortable column requires the 'key' property.");const e=n.key;if(!e)return;const i=n.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof n.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:n.label,key:e,compareFn:n.compareFn,direction:i}),t=!0)}),t&&setTimeout(()=>this.updateSortedData())},l=n;null===(t=l.horizontal)||void 0===t||t.forEach(a),null===(e=l.vertical)||void 0===e||e.forEach(a),l.horizontal&&l.vertical&&(null===(i=l.horizontal)||void 0===i?void 0:i.length)>0&&(null===(o=l.vertical)||void 0===o?void 0:o.length)>0&&(this.disableSort=!0,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){y(this,n,{required:!0})}validateSelection(n){_(this,n)}validateOn(n){g(this,n)}validatePagination(n){try{n=d(n)}catch(n){}this.showPagination=O(n),r(this,"_pagination",O,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;null===(n=this.tableWcRef)||void 0===n||n.addEventListener(x.selectionChange,this.onSelectionChange)}disconnectedCallback(){var n;null===(n=this.tableWcRef)||void 0===n||n.removeEventListener(x.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateFixedCols(this._fixedCols),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(n,t,e){return"number"==typeof t&&t>0&&"number"==typeof e&&e>0?(this.pageStartSlice=t*(e-1),this.pageEndSlice=t*e>n.length?n.length:t*e,n.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=n.length,n)}renderPagination(n){const 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||T,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&"function"==typeof n.compareFn){if(n.key){const t=this.sortData.find(t=>t.key===n.key);if(null==t?void 0:t.direction)return t.direction}return"NOS"}}getHeaderCellSortOrder(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&this.state._allowMultiSort&&"function"==typeof n.compareFn&&n.key){const t=this.sortData.findIndex(t=>t.key===n.key);if(t>=0)return t+1}}handleSort({key:n}){const t=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find(t=>t.key===n);t&&this.changeCellSort(t)}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=null!==(t=e.keyPropertyName)&&void 0!==t?t:"id",o=new Set(n.map(String)),a=this.state._sortedData.filter(n=>o.has(String(n[i])));if(i)return a}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})}));const o=this.getSelectedData(t);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[v.onSelectionChange])&&this.state._on[v.onSelectionChange](n,o),this.host&&w(this.host,x.selectionChange,o)}async getSelection(){var n;const t=(null===(n=this.state._selection)||void 0===n?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}render(){var n,i,o,a,s,r;const c=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(i=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==i?i:10:this.state._sortedData.length,this.state._pagination._page||1),d="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,h="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(a=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==a?a:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==r?r:[]};return t(e,{key:"49e3e80896f7836176d2dbacfa4a7e14901cbd55",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&d,t(l,{key:"dd47470aa5b318ce94adcc12c500431258c4b8fb",ref:this.catchRef,_data:c,_fixedCols:this._fixedCols,_headerCells:p,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu}),this.pageEndSlice>0&&this.showPagination&&h)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};D.style={default:C};export{D as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-G8af0_gG.js";import{g as o,k as l}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BVaUp6qp.js";import{e as s,b as r,s as c,P as h,p as d,o as f,k as b}from"./common-BqV6Zb30.js";import{v as p,a as k,b as u,c as m,d as _,e as g}from"./table-selection-CXJmsMfX.js";import{v as y}from"./label-vxVEH2gH.js";import{C as v}from"./keyboard-DNd73LVa.js";import{K as x,d as w}from"./events-DHTi_wtD.js";import"./i18n-B2d_exHc.js";const z=(n,t,e={})=>{s(n,"_allowMultiSort",t,Object.assign({defaultValue:!1},e))},S=["top","bottom","both"],j=(n,t)=>{r(n,"_paginationPosition",n=>"string"==typeof n&&S.includes(n),new Set([`PaginationPositionPropType {${S.join(", ")}`]),t,{defaultValue:"bottom"})},C='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775135018085"); /* IE9*/\n src: url("kolicons.eot?t=1775135018085#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775135018085") format("woff2"), url("kolicons.woff?t=1775135018085") format("woff"), url("kolicons.ttf?t=1775135018085") format("truetype"), url("kolicons.svg?t=1775135018085#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\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 #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\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: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\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}',T=[10,20,50,100],O=n=>!0===n||""===n||"object"==typeof n&&null!==n,D=class{constructor(t){n(this,t),this.catchRef=n=>{this.tableWcRef=n},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_fixedCols:[0,0],_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(n,t),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePage:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(n,t),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:t}))},onChangePageSize:(n,t)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(n,t),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)return void c(this,"_sortedData",this.state._data);const n=[...this.state._data];this.sortData.length>0&&n.sort((n,t)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(n,t,i.direction);if(0!==o)return"ASC"===i.direction?o:-o}return 0}),c(this,"_sortedData",n)}}validateAllowMultiSort(n){z(this,n,{defaultValue:!1})}validateData(n){p(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(n){k(this,n,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateFixedCols(n){u(this,n)}validatePaginationPosition(n){j(this,n)}validateHasSettingsMenu(n){m(this,n)}changeCellSort(n){var t;if(void 0===n.type||"default"===n.type){if("function"!=typeof n.compareFn)return;this.state._allowMultiSort||n.key===(null===(t=this.sortData[0])||void 0===t?void 0:t.key)||(this.sortData=[]);const e=this.sortData.findIndex(t=>t.key===n.key);if(e>=0){const n=this.sortData[e];switch(n.direction){case"ASC":n.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:n.direction="ASC"}}else n.key&&this.sortData.push({label:n.label,key:n.key,compareFn:n.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(n){h(n,()=>{f(n,()=>{try{n=d(n)}catch(n){}r(this,"_headers",n=>"object"==typeof n&&null!==n,new Set(["KoliBriTableHeaders"]),n,{hooks:{beforePatch:n=>{var t,e,i,o;const a=n=>{let t=!1;this.sortData=[],n.forEach(n=>{if(void 0!==n.type&&"default"!==n.type)return;if("function"==typeof n.compareFn&&!n.key)return void b("[KolTableStateful] A sortable column requires the 'key' property.");const e=n.key;if(!e)return;const i=n.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof n.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:n.label,key:e,compareFn:n.compareFn,direction:i}),t=!0)}),t&&setTimeout(()=>this.updateSortedData())},l=n;null===(t=l.horizontal)||void 0===t||t.forEach(a),null===(e=l.vertical)||void 0===e||e.forEach(a),l.horizontal&&l.vertical&&(null===(i=l.horizontal)||void 0===i?void 0:i.length)>0&&(null===(o=l.vertical)||void 0===o?void 0:o.length)>0&&(this.disableSort=!0,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){y(this,n,{required:!0})}validateSelection(n){_(this,n)}validateOn(n){g(this,n)}validatePagination(n){try{n=d(n)}catch(n){}this.showPagination=O(n),r(this,"_pagination",O,new Set(["boolean","KoliBriTablePagination"]),n,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var n;null===(n=this.tableWcRef)||void 0===n||n.addEventListener(x.selectionChange,this.onSelectionChange)}disconnectedCallback(){var n;null===(n=this.tableWcRef)||void 0===n||n.removeEventListener(x.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateFixedCols(this._fixedCols),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(n,t,e){return"number"==typeof t&&t>0&&"number"==typeof e&&e>0?(this.pageStartSlice=t*(e-1),this.pageEndSlice=t*e>n.length?n.length:t*e,n.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=n.length,n)}renderPagination(n){const 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||T,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&"function"==typeof n.compareFn){if(n.key){const t=this.sortData.find(t=>t.key===n.key);if(null==t?void 0:t.direction)return t.direction}return"NOS"}}getHeaderCellSortOrder(n){if((void 0===n.type||"default"===n.type)&&!this.disableSort&&this.state._allowMultiSort&&"function"==typeof n.compareFn&&n.key){const t=this.sortData.findIndex(t=>t.key===n.key);if(t>=0)return t+1}}handleSort({key:n}){const t=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find(t=>t.key===n);t&&this.changeCellSort(t)}getSelectedData(n){var t;const e=this.state._selection;if(e){const i=null!==(t=e.keyPropertyName)&&void 0!==t?t:"id",o=new Set(n.map(String)),a=this.state._sortedData.filter(n=>o.has(String(n[i])));if(i)return a}return null}handleSelectionChange(n,t){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:t})}));const o=this.getSelectedData(t);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[v.onSelectionChange])&&this.state._on[v.onSelectionChange](n,o),this.host&&w(this.host,x.selectionChange,o)}async getSelection(){var n;const t=(null===(n=this.state._selection)||void 0===n?void 0:n.selectedKeys)||[];return this.getSelectedData(t)}render(){var n,i,o,a,s,r;const c=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(i=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==i?i:10:this.state._sortedData.length,this.state._pagination._page||1),d="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,h="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(a=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==a?a:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(n=>n.map(n=>Object.assign(Object.assign({},n),{sortDirection:this.getHeaderCellSortState(n),sortOrder:this.getHeaderCellSortOrder(n)}))))&&void 0!==r?r:[]};return t(e,{key:"49e3e80896f7836176d2dbacfa4a7e14901cbd55",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&d,t(l,{key:"dd47470aa5b318ce94adcc12c500431258c4b8fb",ref:this.catchRef,_data:c,_fixedCols:this._fixedCols,_headerCells:p,_label:this.state._label,_dataFoot:this.state._dataFoot,_on:{onSort:(n,t)=>{this.handleSort(t)},onSelectionChange:(n,t)=>{this.handleSelectionChange(n,t)}},_selection:this.state._selection,_hasSettingsMenu:this.state._hasSettingsMenu}),this.pageEndSlice>0&&this.showPagination&&h)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};D.style={default:C};export{D as kol_table_stateful};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as e,F as i,g as n}from"./index-C8rYknb2.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{b as s,c as o,t as r}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BVaUp6qp.js";import{I as c}from"./component-C5-fCuhA.js";import{T as d}from"./component-ghWELfa6.js";import{P as u,o as f,p as h,b,s as v}from"./common-BqV6Zb30.js";import{c as _,v as p,a as k,b as y,f as m,d as g}from"./table-selection-CXJmsMfX.js";import{v as S}from"./label-vxVEH2gH.js";import{C as j}from"./keyboard-DNd73LVa.js";import{c as w}from"./clsx-COFh-Vc8.js";import{n as A}from"./dev.utils-CKaUZiiF.js";import{d as C,K as $}from"./events-DHTi_wtD.js";import{M as x,e as O,U as D,f as H,b as F,d as T,S as M,h as K}from"./_Uint8Array-kJHDjtoP.js";import{S as W,a as R,i as z}from"./isArray-CcrBs4JM.js";import"./i18n-B2d_exHc.js";import"./bem-registry-Bux_TllX.js";import"./component-D5yPWlmy.js";var B="__lodash_hash_undefined__";function E(e){return this.__data__.set(e,B),this}function P(e){return this.__data__.has(e)}function I(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new x;++t<i;)this.add(e[t])}function U(e,t){for(var i=-1,l=null==e?0:e.length;++i<l;)if(t(e[i],i,e))return!0;return!1}function L(e,t){return e.has(t)}I.prototype.add=I.prototype.push=E,I.prototype.has=P;var N=1,V=2;function q(e,t,i,l,a,s){var o=i&N,r=e.length,n=t.length;if(r!=n&&!(o&&n>r))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,b=i&V?new I:void 0;for(s.set(e,t),s.set(t,e);++h<r;){var f=e[h],v=t[h];if(l)var _=o?l(v,f,h,t,e,s):l(f,v,h,e,t,s);if(void 0!==_){if(_)continue;u=!1;break}if(b){if(!U(t,function(e,t){if(!L(b,t)&&(f===e||a(f,e,i,l,s)))return b.push(t)})){u=!1;break}}else if(f!==v&&!a(f,v,i,l,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function X(e){var t=-1,i=Array(e.size);return e.forEach(function(e,l){i[++t]=[l,e]}),i}function J(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Z=1,G=2,Y="[object Boolean]",Q="[object Date]",tt="[object Error]",et="[object Map]",it="[object Number]",nt="[object RegExp]",lt="[object Set]",st="[object String]",ot="[object Symbol]",rt="[object ArrayBuffer]",at="[object DataView]",ct=W?W.prototype:void 0,dt=ct?ct.valueOf:void 0;function ut(e,t,i,l,a,s,o){switch(i){case at:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rt:return!(e.byteLength!=t.byteLength||!s(new D(e),new D(t)));case Y:case Q:case it:return O(+e,+t);case tt:return e.name==t.name&&e.message==t.message;case nt:case st:return e==t+"";case et:var r=X;case lt:var n=l&Z;if(r||(r=J),e.size!=t.size&&!n)return!1;var c=o.get(e);if(c)return c==t;l|=G,o.set(e,t);var d=q(r(e),r(t),l,a,s,o);return o.delete(e),d;case ot:if(dt)return dt.call(e)==dt.call(t)}return!1}var ft=1,ht=Object.prototype,bt=ht.hasOwnProperty;function vt(e,t,i,l,a,s){var o=i&ft,r=H(e),n=r.length;if(n!=H(t).length&&!o)return!1;for(var c=n;c--;){var d=r[c];if(!(o?d in t:bt.call(t,d)))return!1}var h=s.get(e),u=s.get(t);if(h&&u)return h==t&&u==e;var b=!0;s.set(e,t),s.set(t,e);for(var f=o;++c<n;){var v=e[d=r[c]],_=t[d];if(l)var p=o?l(_,v,d,t,e,s):l(v,_,d,e,t,s);if(!(void 0===p?v===_||a(v,_,i,l,s):p)){b=!1;break}f||(f="constructor"==d)}if(b&&!f){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return s.delete(e),s.delete(t),b}var _t=1,pt="[object Arguments]",kt="[object Array]",yt="[object Object]",mt=Object.prototype,gt=mt.hasOwnProperty;function St(e,t,i,l,a,s){var o=R(e),r=R(t),n=o?kt:F(e),c=r?kt:F(t),d=(n=n==pt?yt:n)==yt,h=(c=c==pt?yt:c)==yt,u=n==c;if(u&&T(e)){if(!T(t))return!1;o=!0,d=!1}if(u&&!d)return s||(s=new M),o||K(e)?q(e,t,i,l,a,s):ut(e,t,n,i,l,a,s);if(!(i&_t)){var b=d&&gt.call(e,"__wrapped__"),f=h&&gt.call(t,"__wrapped__");if(b||f){var v=b?e.value():e,_=f?t.value():t;return s||(s=new M),a(v,_,i,l,s)}}return!!u&&(s||(s=new M),vt(e,t,i,l,a,s))}function jt(e,t,i,l,a){return e===t||(null==e||null==t||!z(e)&&!z(t)?e!=e&&t!=t:St(e,t,i,l,jt,a))}function wt(e,t){return jt(e,t)}const At=(e,t)=>{u(t,()=>{f(t,()=>{try{t=h(t)}catch(e){}b(e,"_headerCells",e=>{var t,i;return"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&[...null!==(t=e.horizontal)&&void 0!==t?t:[],...null!==(i=e.vertical)&&void 0!==i?i:[]].flat().every(e=>void 0===e.width||"number"==typeof e.width)&&!0},new Set(["TableHeaderCellsPropType"]),t)})})},Ct=150,$t=class{constructor(i){t(this,i),this.translateNoEntries=a("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=a("kol-sort"),this.translateSortOrder=a("kol-table-sort-order"),this.maxCols=0,this.fixedOffsets=[],this.tableDivElementHasScrollbar=!1,this.stickyColsDisabled=!1,this.renderTableRow=(t,i,l,a=!1)=>{var s,o;let r=String(i);return this.horizontal&&(null===(s=t[0])||void 0===s?void 0:s.data)&&(r=null!==(o=this.getDataKey(t[0].data))&&void 0!==o?o:r),e("tr",{class:w("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${r}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,l)))},this.renderTableCell=(t,i,l,a)=>{if(!1===t.visible)return"";let s=`${i}-${l}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);s=e?`${e}-${this.horizontal?l:i}`:s}if(t.headerCell)return this.renderHeadingCell(t,i,l,a);{const i="function"!=typeof t.render&&t.label===this.translateNoEntries,a=this.getActionColumnHeader(l),o=Boolean(a&&t.data),r=this.isFixedCol(l),n="left"===r?this.getOffsetString(t.colIndex,!0):void 0,c="right"===r?this.getOffsetString(t.colIndex):void 0;return e("td",{key:`cell-${s}`,class:w("kol-table__cell kol-table__cell--body",t.textAlign&&`kol-table__cell--align-${t.textAlign}`,o&&"kol-table__cell--actions",r&&`kol-table__cell--sticky-${r}`),"aria-atomic":i?"false":void 0,"aria-live":i?"polite":void 0,"aria-relevant":i?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,left:n,right:c},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},o&&a&&t.data?this.renderActionItems(a,t.data,s):"function"!=typeof t.render?t.label:"")}},this.renderActionItems=(t,i,a)=>{const r=t.actions(i);return e("div",{class:"kol-table__cell-actions"},r.map((t,i)=>{if("button"===t.type){const o=l(t,[]);return e(s,Object.assign({key:`action-${a}-${i}`},o,{_variant:o._variant}))}if("link"===t.type){const s=l(t,[]);return e(o,Object.assign({key:`action-${a}-${i}`},s))}return null}))}}validateHasSettingsMenu(e){_(this,e)}validateData(e){p(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){k(this,e)}validateFixedCols(e){y(this,e),this.checkAndUpdateStickyState()}validateHeaderCells(e){At(this,e),wt(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){S(this,e,{required:!0})}validateOn(e){m(this,e)}validateSelection(e){g(this,e),this.checkAndUpdateStickyState()}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const i=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(i);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement)),this.checkAndUpdateStickyState()}handleSettingsChange(e){var t;const i=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});v(this,"_headerCells",i),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[j.onChangeHeaderCells])&&this.state._on[j.onChangeHeaderCells](e,i)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect(),clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout(()=>{this.checkAndUpdateStickyState()},Ct)}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}calculateFixedColsWidth(){var e,t,i,l,a,s;if(!this._fixedCols)return 0;const o=this.getPrimaryHeaders(this.state._headerCells);let r=0;for(let i=0;i<this._fixedCols[0]&&i<o.length;i++)r+=null!==(t=null===(e=o[i])||void 0===e?void 0:e.width)&&void 0!==t?t:0;for(let e=this.maxCols-this._fixedCols[1];e<this.maxCols&&e<o.length;e++)r+=null!==(l=null===(i=o[e])||void 0===i?void 0:i.width)&&void 0!==l?l:0;if(this.state._selection){const e=null===(a=this.tableDivElement)||void 0===a?void 0:a.querySelector(".kol-table__cell--selection");r+=null!==(s=null==e?void 0:e.offsetWidth)&&void 0!==s?s:0}return r}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols)return void(this.stickyColsDisabled=!1);const e=this.tableDivElement.clientWidth,t=this.calculateFixedColsWidth();this.stickyColsDisabled=t>0&&t>=e}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,A())}),this.dataToKeyMap.forEach((t,i)=>{e.includes(i)||this.dataToKeyMap.delete(i)})}getDataKey(e){return this.dataToKeyMap.get(e)}getActionColumnHeader(e){const t=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!t||0===t.length)return;const i=this.getPrimaryHeaders(this.state._headerCells)[e];return i&&"action"===i.type?i:void 0}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const i=e.render(t,e,e.data,this.state._data);"string"==typeof i&&(t.textContent=i)}})))}getNumberOfCols(e,t){let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;t+=null!==(i=e.colSpan)&&void 0!==i?i:1}),i<t&&(i=t)}),0===i&&(i=t.length),i}getNumberOfRows(e,t){var i;let l=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;t+=null!==(i=e.rowSpan)&&void 0!==i?i:1}),l<t&&(l=t)}),0===l?l=t.length:l-=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.length)||0,l}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,i;let l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(i=e.vertical)&&void 0!==i?i:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,i){var l,a,s,o,r,n,c;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[],this.maxCols=this.getNumberOfCols(t.horizontal,e);const d=this.getPrimaryHeaders(t);let h=this.getNumberOfRows(t.vertical,e),u=0;i&&(u=h,h+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const b=[],f=[],v=[];t.vertical.forEach((e,t)=>{f[t]=0,v[t]=[]});const _=d;for(let l=u;l<h;l++){const d=[];t.vertical.forEach((e,t)=>{let i=0;if(v[t].forEach(e=>i+=e),i<=l){const a=e[l-i+f[t]];if("object"==typeof a){d.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),v[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let i=1;i<a.colSpan;i++)v[t+i].push(e);f[t]++}}});for(let t=0;t<this.maxCols;t++){let h=this.isFixedCol(t);if("left"===h&&void 0===this.getFixedOffset(t)){let e=null!==(a=this.fixedOffsets[t-1])&&void 0!==a?a:0;e+=null!==(o=null===(s=_[t-1])||void 0===s?void 0:s.width)&&void 0!==o?o:0,this.fixedOffsets[t]=e}if("right"===h&&void 0===this.getFixedOffset(t)){let e=null!==(r=this.fixedOffsets[t+1])&&void 0!==r?r:0;e+=null!==(c=null===(n=_[t+1])||void 0===n?void 0:n.width)&&void 0!==c?c:0,this.fixedOffsets[t]=e}if(!0===this.horizontal){const a=i&&this.state._dataFoot?this.state._dataFoot[l-u]:e[l];if("object"==typeof _[t]&&null!==_[t]&&"object"==typeof a&&null!==a&&("string"==typeof _[t].key||"function"==typeof _[t].render)){const e=a[_[t].key];d.push(Object.assign(Object.assign({},_[t]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:a,label:e}))}}else if("object"==typeof _[l]&&null!==_[l]&&"object"==typeof e[t]&&null!==e[t]&&("string"==typeof _[l].key||"function"==typeof _[l].render)){const i=_[l].key,a=e[t][i];d.push(Object.assign(Object.assign({},_[l]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:e[t],label:a}))}}b.push(d)}if(0===e.length){let e=0,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{i+=e.rowSpan||1}));const l={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(i,1)};0===b.length?b.push([l]):b[0].push(l)}return b}isFixedCol(e){if(this._fixedCols&&void 0!==e&&!this.stickyColsDisabled)return e<this._fixedCols[0]?"left":e>=this.maxCols-this._fixedCols[1]?"right":void 0}getFixedOffset(e){if(this.tableDivElement&&void 0!==e)return void 0!==this.fixedOffsets[e]?this.fixedOffsets[e]:void 0}getOffsetString(e,t){return t&&this._selection?"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(e)+"px)":this.getFixedOffset(e)+"px"}handleSelectionChangeCallbackAndEvent(e,t){var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[j.onSelectionChange])&&this.state._on[j.onSelectionChange](e,t),this.host&&C(this.host,$.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});v(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,i){var l;const a=this.state._selection;if(!a)return"";const s=this.getSelectionKeyPropertyName(),o=null===(l=t[0])||void 0===l?void 0:l.data;if(!o)return"";const r=o[s],n=a.multiple||void 0===a.multiple,h=(()=>{const e=null==a?void 0:a.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),u=(()=>{const e=null==a?void 0:a.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),b=a.label(o),f={name:"selection",checked:h,disabled:u,id:String(r),"aria-label":b};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:w("kol-table__selection",{"kol-table__selection--checked":h})},n?e("label",{class:w("kol-table__selection-label",{"kol-table__selection-label--disabled":u})},e(c,{class:"kol-table__selection-icon",icons:"kolicon "+(h?"kolicon-check":""),label:""}),e("input",Object.assign({class:w("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==a?void 0:a.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),i=h?t.filter(e=>String(e)!==String(r)):[...t,r];this.handleSelectionChangeCallbackAndEvent(e,null!=i?i:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:w("kol-table__selection-input kol-table__selection-input--radio")},f,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[r])}}))),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:b,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var i;const l=null===(i=this.state._selection)||void 0===i?void 0:i.disabledKeys;return!(void 0===l?[]:Array.isArray(l)?l:[l]).some(i=>String(i)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const i=this.getSelectionKeyPropertyName(),l=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&l.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[i])),l}getTableMinWidth(){var e,t;const i=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],l=[];i.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&l.push(e.width)})});const a=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],s=[];a.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&s.push(e.width)})});const o=[...s,...l];return 0===o.length?"0px":1===o.length?`${o[0]}px`:`calc(${o.map(e=>`${e}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(!1===l.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const s=null!==(i=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==i?i:0,o=s===this.getDataWithSelectionEnabled().length,r=0!==s&&!o;let n="kol-table-selection-indeterminate";o&&!r&&(n="kol-table-selection-none"),0===s&&(n="kol-table-selection-all");const h=a(n);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:w("kol-table__selection",{"kol-table__selection--indeterminate":r,"kol-table__selection--checked":o})},e("label",{class:"kol-table__selection-label"},e(c,{class:"kol-table__selection-icon",icons:"kolicon "+(r?"kolicon-minus":o?"kolicon-check":""),label:""}),e("input",{class:w("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!r,indeterminate:r,"aria-label":h,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!o))}})),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:h,badgeText:"",id:`${n}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal,l=this.state._headerCells.vertical;if(!Array.isArray(t)||0===t.length||!Array.isArray(l)||0===l.length)return e(i,null);const a=l.reduce((e,t)=>{var i;const l=null==t?void 0:t[0];return e+(null!==(i=null==l?void 0:l.width)&&void 0!==i?i:0)},0);return e("td",{"aria-hidden":"true",colSpan:l.length,rowSpan:t.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(t,i,l,a){if(!1===t.visible)return"";const o=!1!==(null==t?void 0:t.sortable),r="string"==typeof t.sortDirection,n=o&&r;let c="none",d="kolicon-sort-neutral";if(n&&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=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",u="number"==typeof t.sortOrder&&t.sortOrder>0?t.sortOrder:void 0,b=this.getSortAriaDescription(u),f=void 0!==t.width?`${t.width}px`:void 0,v=this.isFixedCol(l),_="left"===v?this.getOffsetString(l,!0):void 0,p="right"===v?this.getOffsetString(l):void 0;return e("th",{key:`${i}-${l}-${t.label}`,class:w("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:f,left:_,right:p},"aria-sort":c,"data-sort":n&&t.sortDirection?`sort-${t.sortDirection}`:void 0},n&&t.sortDirection?e("span",{class:"kol-table__sort"},e(s,{class:"kol-table__sort-button",_icons:{right:d},_label:t.label,_ariaDescription:b,_on:{onClick:e=>{var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&C(this.host,$.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}),u&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},u)):t.label)}renderSpacer(t,i){var l,a;const s=(null===(l=this.state._headerCells.vertical)||void 0===l?void 0:l.length)||0,o=null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.reduce((e,t)=>e+(t.colSpan||1),0),r=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:w("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:w(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:s+o+r}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const i=this.state._headerCells.horizontal;return e("div",{key:"c010db0107c8eac0c74782191e5aebddf36903b3",class:"kol-table"},this.state._hasSettingsMenu&&e(r,{key:"97972d69593a2c96bc33680728b01a0ca62ebace",_horizontalHeaderCells:null!=i?i:[]}),e("div",{key:"c13d8c5f350f6f1e6770a30008cecd0e758990b5",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"b50354595342c4fca9f51618ac031beab362fdaa",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"a8ab9c5220f469621ef8cfcb0d343b00c81c55ca",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(i)&&e("thead",{key:"aaad51ae0f6f33f40d9de0faeef482dc13c47211",class:"kol-table__head"},[i.map((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),0===i&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,i,t,!1)))),this.renderSpacer("head",i)]),e("tbody",{key:"a25f4158471a652bebb0e684e72c64afeb52057c",class:"kol-table__body"},t.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"]}}};export{$t as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as i,g as n}from"./index-G8af0_gG.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{b as s,c as o,t as r}from"./component-names-Dy77vq43.js";import{t as a}from"./i18n-BVaUp6qp.js";import{I as c}from"./component-D3oJtEcp.js";import{T as d}from"./component-CAXga0_U.js";import{P as u,o as f,p as h,b,s as v}from"./common-BqV6Zb30.js";import{c as _,v as p,a as k,b as y,f as m,d as g}from"./table-selection-CXJmsMfX.js";import{v as S}from"./label-vxVEH2gH.js";import{C as j}from"./keyboard-DNd73LVa.js";import{c as w}from"./clsx-COFh-Vc8.js";import{n as A}from"./dev.utils-BL9Lx_uf.js";import{d as $,K as x}from"./events-DHTi_wtD.js";import{M as C,e as D,U as O,f as H,b as T,d as F,S as M,h as K}from"./_Uint8Array-kJHDjtoP.js";import{S as B,a as R,i as z}from"./isArray-CcrBs4JM.js";import"./i18n-B2d_exHc.js";import"./bem-registry-Bux_TllX.js";import"./component-DpGGeM3i.js";var E="__lodash_hash_undefined__";function W(e){return this.__data__.set(e,E),this}function I(e){return this.__data__.has(e)}function L(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new C;++t<i;)this.add(e[t])}function P(e,t){for(var i=-1,l=null==e?0:e.length;++i<l;)if(t(e[i],i,e))return!0;return!1}function U(e,t){return e.has(t)}L.prototype.add=L.prototype.push=W,L.prototype.has=I;var N=1,V=2;function G(e,t,i,l,a,s){var o=i&N,r=e.length,n=t.length;if(r!=n&&!(o&&n>r))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,b=i&V?new L:void 0;for(s.set(e,t),s.set(t,e);++h<r;){var f=e[h],v=t[h];if(l)var _=o?l(v,f,h,t,e,s):l(f,v,h,e,t,s);if(void 0!==_){if(_)continue;u=!1;break}if(b){if(!P(t,function(e,t){if(!U(b,t)&&(f===e||a(f,e,i,l,s)))return b.push(t)})){u=!1;break}}else if(f!==v&&!a(f,v,i,l,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function X(e){var t=-1,i=Array(e.size);return e.forEach(function(e,l){i[++t]=[l,e]}),i}function q(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var J=1,Z=2,Q="[object Boolean]",Y="[object Date]",tt="[object Error]",et="[object Map]",it="[object Number]",nt="[object RegExp]",lt="[object Set]",st="[object String]",ot="[object Symbol]",rt="[object ArrayBuffer]",at="[object DataView]",ct=B?B.prototype:void 0,dt=ct?ct.valueOf:void 0;function ut(e,t,i,l,a,s,o){switch(i){case at:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rt:return!(e.byteLength!=t.byteLength||!s(new O(e),new O(t)));case Q:case Y:case it:return D(+e,+t);case tt:return e.name==t.name&&e.message==t.message;case nt:case st:return e==t+"";case et:var r=X;case lt:var n=l&J;if(r||(r=q),e.size!=t.size&&!n)return!1;var c=o.get(e);if(c)return c==t;l|=Z,o.set(e,t);var d=G(r(e),r(t),l,a,s,o);return o.delete(e),d;case ot:if(dt)return dt.call(e)==dt.call(t)}return!1}var ft=1,ht=Object.prototype,bt=ht.hasOwnProperty;function vt(e,t,i,l,a,s){var o=i&ft,r=H(e),n=r.length;if(n!=H(t).length&&!o)return!1;for(var c=n;c--;){var d=r[c];if(!(o?d in t:bt.call(t,d)))return!1}var h=s.get(e),u=s.get(t);if(h&&u)return h==t&&u==e;var b=!0;s.set(e,t),s.set(t,e);for(var f=o;++c<n;){var v=e[d=r[c]],_=t[d];if(l)var p=o?l(_,v,d,t,e,s):l(v,_,d,e,t,s);if(!(void 0===p?v===_||a(v,_,i,l,s):p)){b=!1;break}f||(f="constructor"==d)}if(b&&!f){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return s.delete(e),s.delete(t),b}var _t=1,pt="[object Arguments]",kt="[object Array]",yt="[object Object]",mt=Object.prototype,gt=mt.hasOwnProperty;function St(e,t,i,l,a,s){var o=R(e),r=R(t),n=o?kt:T(e),c=r?kt:T(t),d=(n=n==pt?yt:n)==yt,h=(c=c==pt?yt:c)==yt,u=n==c;if(u&&F(e)){if(!F(t))return!1;o=!0,d=!1}if(u&&!d)return s||(s=new M),o||K(e)?G(e,t,i,l,a,s):ut(e,t,n,i,l,a,s);if(!(i&_t)){var b=d&&gt.call(e,"__wrapped__"),f=h&&gt.call(t,"__wrapped__");if(b||f){var v=b?e.value():e,_=f?t.value():t;return s||(s=new M),a(v,_,i,l,s)}}return!!u&&(s||(s=new M),vt(e,t,i,l,a,s))}function jt(e,t,i,l,a){return e===t||(null==e||null==t||!z(e)&&!z(t)?e!=e&&t!=t:St(e,t,i,l,jt,a))}function wt(e,t){return jt(e,t)}const At=(e,t)=>{u(t,()=>{f(t,()=>{try{t=h(t)}catch(e){}b(e,"_headerCells",e=>{var t,i;return"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&[...null!==(t=e.horizontal)&&void 0!==t?t:[],...null!==(i=e.vertical)&&void 0!==i?i:[]].flat().every(e=>void 0===e.width||"number"==typeof e.width)&&!0},new Set(["TableHeaderCellsPropType"]),t)})})},$t=150,xt=class{constructor(i){t(this,i),this.translateNoEntries=a("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=a("kol-sort"),this.translateSortOrder=a("kol-table-sort-order"),this.maxCols=0,this.fixedOffsets=[],this.tableDivElementHasScrollbar=!1,this.stickyColsDisabled=!1,this.renderTableRow=(t,i,l,a=!1)=>{var s,o;let r=String(i);return this.horizontal&&(null===(s=t[0])||void 0===s?void 0:s.data)&&(r=null!==(o=this.getDataKey(t[0].data))&&void 0!==o?o:r),e("tr",{class:w("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${r}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,l)))},this.renderTableCell=(t,i,l,a)=>{if(!1===t.visible)return"";let s=`${i}-${l}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);s=e?`${e}-${this.horizontal?l:i}`:s}if(t.headerCell)return this.renderHeadingCell(t,i,l,a);{const i="function"!=typeof t.render&&t.label===this.translateNoEntries,a=this.getActionColumnHeader(l),o=Boolean(a&&t.data),r=this.isFixedCol(l),n="left"===r?this.getOffsetString(t.colIndex,!0):void 0,c="right"===r?this.getOffsetString(t.colIndex):void 0;return e("td",{key:`cell-${s}`,class:w("kol-table__cell kol-table__cell--body",t.textAlign&&`kol-table__cell--align-${t.textAlign}`,o&&"kol-table__cell--actions",r&&`kol-table__cell--sticky-${r}`),"aria-atomic":i?"false":void 0,"aria-live":i?"polite":void 0,"aria-relevant":i?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,left:n,right:c},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},o&&a&&t.data?this.renderActionItems(a,t.data,s):"function"!=typeof t.render?t.label:"")}},this.renderActionItems=(t,i,a)=>{const r=t.actions(i);return e("div",{class:"kol-table__cell-actions"},r.map((t,i)=>{if("button"===t.type){const o=l(t,[]);return e(s,Object.assign({key:`action-${a}-${i}`},o,{_variant:o._variant}))}if("link"===t.type){const s=l(t,[]);return e(o,Object.assign({key:`action-${a}-${i}`},s))}return null}))}}validateHasSettingsMenu(e){_(this,e)}validateData(e){p(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){k(this,e)}validateFixedCols(e){y(this,e),this.checkAndUpdateStickyState()}validateHeaderCells(e){At(this,e),wt(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){S(this,e,{required:!0})}validateOn(e){m(this,e)}validateSelection(e){g(this,e),this.checkAndUpdateStickyState()}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const i=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(i);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.handleResize.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement)),this.checkAndUpdateStickyState()}handleSettingsChange(e){var t;const i=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});v(this,"_headerCells",i),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[j.onChangeHeaderCells])&&this.state._on[j.onChangeHeaderCells](e,i)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect(),clearTimeout(this.resizeDebounceTimeout)}handleResize(){this.checkDivElementScrollbar(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout(()=>{this.checkAndUpdateStickyState()},$t)}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}calculateFixedColsWidth(){var e,t,i,l,a,s;if(!this._fixedCols)return 0;const o=this.getPrimaryHeaders(this.state._headerCells);let r=0;for(let i=0;i<this._fixedCols[0]&&i<o.length;i++)r+=null!==(t=null===(e=o[i])||void 0===e?void 0:e.width)&&void 0!==t?t:0;for(let e=this.maxCols-this._fixedCols[1];e<this.maxCols&&e<o.length;e++)r+=null!==(l=null===(i=o[e])||void 0===i?void 0:i.width)&&void 0!==l?l:0;if(this.state._selection){const e=null===(a=this.tableDivElement)||void 0===a?void 0:a.querySelector(".kol-table__cell--selection");r+=null!==(s=null==e?void 0:e.offsetWidth)&&void 0!==s?s:0}return r}checkAndUpdateStickyState(){if(!this.tableDivElement||!this._fixedCols)return void(this.stickyColsDisabled=!1);const e=this.tableDivElement.clientWidth,t=this.calculateFixedColsWidth();this.stickyColsDisabled=t>0&&t>=e}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,A())}),this.dataToKeyMap.forEach((t,i)=>{e.includes(i)||this.dataToKeyMap.delete(i)})}getDataKey(e){return this.dataToKeyMap.get(e)}getActionColumnHeader(e){const t=this.horizontal?this.state._headerCells.horizontal:this.state._headerCells.vertical;if(!t||0===t.length)return;const i=this.getPrimaryHeaders(this.state._headerCells)[e];return i&&"action"===i.type?i:void 0}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const i=e.render(t,e,e.data,this.state._data);"string"==typeof i&&(t.textContent=i)}})))}getNumberOfCols(e,t){let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;t+=null!==(i=e.colSpan)&&void 0!==i?i:1}),i<t&&(i=t)}),0===i&&(i=t.length),i}getNumberOfRows(e,t){var i;let l=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;t+=null!==(i=e.rowSpan)&&void 0!==i?i:1}),l<t&&(l=t)}),0===l?l=t.length:l-=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.length)||0,l}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,i;let l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(i=e.vertical)&&void 0!==i?i:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,i){var l,a,s,o,r,n,c;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[],this.maxCols=this.getNumberOfCols(t.horizontal,e);const d=this.getPrimaryHeaders(t);let h=this.getNumberOfRows(t.vertical,e),u=0;i&&(u=h,h+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const b=[],f=[],v=[];t.vertical.forEach((e,t)=>{f[t]=0,v[t]=[]});const _=d;for(let l=u;l<h;l++){const d=[];t.vertical.forEach((e,t)=>{let i=0;if(v[t].forEach(e=>i+=e),i<=l){const a=e[l-i+f[t]];if("object"==typeof a){d.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),v[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let i=1;i<a.colSpan;i++)v[t+i].push(e);f[t]++}}});for(let t=0;t<this.maxCols;t++){let h=this.isFixedCol(t);if("left"===h&&void 0===this.getFixedOffset(t)){let e=null!==(a=this.fixedOffsets[t-1])&&void 0!==a?a:0;e+=null!==(o=null===(s=_[t-1])||void 0===s?void 0:s.width)&&void 0!==o?o:0,this.fixedOffsets[t]=e}if("right"===h&&void 0===this.getFixedOffset(t)){let e=null!==(r=this.fixedOffsets[t+1])&&void 0!==r?r:0;e+=null!==(c=null===(n=_[t+1])||void 0===n?void 0:n.width)&&void 0!==c?c:0,this.fixedOffsets[t]=e}if(!0===this.horizontal){const a=i&&this.state._dataFoot?this.state._dataFoot[l-u]:e[l];if("object"==typeof _[t]&&null!==_[t]&&"object"==typeof a&&null!==a&&("string"==typeof _[t].key||"function"==typeof _[t].render)){const e=a[_[t].key];d.push(Object.assign(Object.assign({},_[t]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:a,label:e}))}}else if("object"==typeof _[l]&&null!==_[l]&&"object"==typeof e[t]&&null!==e[t]&&("string"==typeof _[l].key||"function"==typeof _[l].render)){const i=_[l].key,a=e[t][i];d.push(Object.assign(Object.assign({},_[l]),{colIndex:t,colSpan:void 0,rowSpan:void 0,data:e[t],label:a}))}}b.push(d)}if(0===e.length){let e=0,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{i+=e.rowSpan||1}));const l={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(i,1)};0===b.length?b.push([l]):b[0].push(l)}return b}isFixedCol(e){if(this._fixedCols&&void 0!==e&&!this.stickyColsDisabled)return e<this._fixedCols[0]?"left":e>=this.maxCols-this._fixedCols[1]?"right":void 0}getFixedOffset(e){if(this.tableDivElement&&void 0!==e)return void 0!==this.fixedOffsets[e]?this.fixedOffsets[e]:void 0}getOffsetString(e,t){return t&&this._selection?"calc( var(--kol-table-selection-col-width) + "+this.getFixedOffset(e)+"px)":this.getFixedOffset(e)+"px"}handleSelectionChangeCallbackAndEvent(e,t){var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[j.onSelectionChange])&&this.state._on[j.onSelectionChange](e,t),this.host&&$(this.host,x.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});v(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,i){var l;const a=this.state._selection;if(!a)return"";const s=this.getSelectionKeyPropertyName(),o=null===(l=t[0])||void 0===l?void 0:l.data;if(!o)return"";const r=o[s],n=a.multiple||void 0===a.multiple,h=(()=>{const e=null==a?void 0:a.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),u=(()=>{const e=null==a?void 0:a.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(r))})(),b=a.label(o),f={name:"selection",checked:h,disabled:u,id:String(r),"aria-label":b};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:w("kol-table__selection",{"kol-table__selection--checked":h})},n?e("label",{class:w("kol-table__selection-label",{"kol-table__selection-label--disabled":u})},e(c,{class:"kol-table__selection-icon",icons:"kolicon "+(h?"kolicon-check":""),label:""}),e("input",Object.assign({class:w("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==a?void 0:a.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),i=h?t.filter(e=>String(e)!==String(r)):[...t,r];this.handleSelectionChangeCallbackAndEvent(e,null!=i?i:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:w("kol-table__selection-input kol-table__selection-input--radio")},f,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[r])}}))),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:b,badgeText:"",id:`${r}-label`,refFloating:()=>{}}))))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var i;const l=null===(i=this.state._selection)||void 0===i?void 0:i.disabledKeys;return!(void 0===l?[]:Array.isArray(l)?l:[l]).some(i=>String(i)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const i=this.getSelectionKeyPropertyName(),l=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&l.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[i])),l}getTableMinWidth(){var e,t;const i=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],l=[];i.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&l.push(e.width)})});const a=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],s=[];a.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&s.push(e.width)})});const o=[...s,...l];return 0===o.length?"0px":1===o.length?`${o[0]}px`:`calc(${o.map(e=>`${e}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(!1===l.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const s=null!==(i=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==i?i:0,o=s===this.getDataWithSelectionEnabled().length,r=0!==s&&!o;let n="kol-table-selection-indeterminate";o&&!r&&(n="kol-table-selection-none"),0===s&&(n="kol-table-selection-all");const h=a(n);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:w("kol-table__selection",{"kol-table__selection--indeterminate":r,"kol-table__selection--checked":o})},e("label",{class:"kol-table__selection-label"},e(c,{class:"kol-table__selection-icon",icons:"kolicon "+(r?"kolicon-minus":o?"kolicon-check":""),label:""}),e("input",{class:w("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!r,indeterminate:r,"aria-label":h,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!o))}})),e("div",{class:"kol-table__selection-input-tooltip"},e(d,{label:h,badgeText:"",id:`${n}-label`,refFloating:()=>{}}))))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal,l=this.state._headerCells.vertical;if(!Array.isArray(t)||0===t.length||!Array.isArray(l)||0===l.length)return e(i,null);const a=l.reduce((e,t)=>{var i;const l=null==t?void 0:t[0];return e+(null!==(i=null==l?void 0:l.width)&&void 0!==i?i:0)},0);return e("td",{"aria-hidden":"true",colSpan:l.length,rowSpan:t.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(t,i,l,a){if(!1===t.visible)return"";const o=!1!==(null==t?void 0:t.sortable),r="string"==typeof t.sortDirection,n=o&&r;let c="none",d="kolicon-sort-neutral";if(n&&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=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",u="number"==typeof t.sortOrder&&t.sortOrder>0?t.sortOrder:void 0,b=this.getSortAriaDescription(u),f=void 0!==t.width?`${t.width}px`:void 0,v=this.isFixedCol(l),_="left"===v?this.getOffsetString(l,!0):void 0,p="right"===v?this.getOffsetString(l):void 0;return e("th",{key:`${i}-${l}-${t.label}`,class:w("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:f,left:_,right:p},"aria-sort":c,"data-sort":n&&t.sortDirection?`sort-${t.sortDirection}`:void 0},n&&t.sortDirection?e("span",{class:"kol-table__sort"},e(s,{class:"kol-table__sort-button",_icons:{right:d},_label:t.label,_ariaDescription:b,_on:{onClick:e=>{var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&$(this.host,x.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}),u&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},u)):t.label)}renderSpacer(t,i){var l,a;const s=(null===(l=this.state._headerCells.vertical)||void 0===l?void 0:l.length)||0,o=null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.reduce((e,t)=>e+(t.colSpan||1),0),r=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:w("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:w(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:s+o+r}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const i=this.state._headerCells.horizontal;return e("div",{key:"c010db0107c8eac0c74782191e5aebddf36903b3",class:"kol-table"},this.state._hasSettingsMenu&&e(r,{key:"97972d69593a2c96bc33680728b01a0ca62ebace",_horizontalHeaderCells:null!=i?i:[]}),e("div",{key:"c13d8c5f350f6f1e6770a30008cecd0e758990b5",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"b50354595342c4fca9f51618ac031beab362fdaa",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"a8ab9c5220f469621ef8cfcb0d343b00c81c55ca",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(i)&&e("thead",{key:"aaad51ae0f6f33f40d9de0faeef482dc13c47211",class:"kol-table__head"},[i.map((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),0===i&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,i,t,!1)))),this.renderSpacer("head",i)]),e("tbody",{key:"a25f4158471a652bebb0e684e72c64afeb52057c",class:"kol-table__body"},t.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_fixedCols:["validateFixedCols"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"]}}};export{xt as kol_table_stateless_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e}from"./index-C8rYknb2.js";import{k as t}from"./component-names-Dy77vq43.js";import"./common-BqV6Zb30.js";const o='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775118370120"); /* IE9*/\n src: url("kolicons.eot?t=1775118370120#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775118370120") format("woff2"), url("kolicons.woff?t=1775118370120") format("woff"), url("kolicons.ttf?t=1775118370120") format("truetype"), url("kolicons.svg?t=1775118370120#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\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 #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\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: #000;\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}',i=class{constructor(e){n(this,e)}render(){return e(t,{key:"1721a4103183d1bdb4419ae518b10338bfcf31ff",_data:this._data,_dataFoot:this._dataFoot,_fixedCols:this._fixedCols,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
4
+ import{r as n,h as e}from"./index-G8af0_gG.js";import{k as t}from"./component-names-Dy77vq43.js";import"./common-BqV6Zb30.js";const o='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775135018085"); /* IE9*/\n src: url("kolicons.eot?t=1775135018085#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775135018085") format("woff2"), url("kolicons.woff?t=1775135018085") format("woff"), url("kolicons.ttf?t=1775135018085") format("truetype"), url("kolicons.svg?t=1775135018085#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\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 #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table {\n --kol-table-selection-col-width: var(--a11y-min-size);\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n background-color: white;\n position: sticky !important;\n left: 0;\n z-index: 2;\n width: var(--kol-table-selection-col-width, auto);\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__cell--actions {\n white-space: nowrap;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-table__cell--actions .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-table__cell--actions .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-table__cell--actions :host {\n display: inline-block;\n }\n .kol-table__cell--actions .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-table__cell--actions .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-table__cell--actions .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-table__cell--actions .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-table__cell--actions .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-table__cell--actions .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-table__cell--actions .kol-link__icon {\n display: inline-flex;\n }\n .kol-table__cell--sticky-left, .kol-table__cell--sticky-right {\n background-color: white;\n position: sticky !important;\n z-index: 1;\n }\n .kol-table__cell--sticky-left:nth-last-child(1 of .kol-table__cell--sticky-left) {\n border-right: 2px solid black;\n }\n .kol-table__cell--sticky-right:nth-child(1 of .kol-table__cell--sticky-left) {\n border-left: 2px solid black;\n }\n .kol-table__cell-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection {\n position: relative;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\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: #000;\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}',i=class{constructor(e){n(this,e)}render(){return e(t,{key:"1721a4103183d1bdb4419ae518b10338bfcf31ff",_data:this._data,_dataFoot:this._dataFoot,_fixedCols:this._fixedCols,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t,g as e}from"./index-C8rYknb2.js";import{b as o,e as i,k as a,s,N as l,G as r,H as c,Q as h}from"./common-BqV6Zb30.js";import{v as d}from"./align-D3Z54kEL.js";import{v as f}from"./label-vxVEH2gH.js";import{b}from"./component-names-Dy77vq43.js";import{t as u}from"./i18n-BVaUp6qp.js";import{K as p}from"./keyboard-DNd73LVa.js";import{c as m}from"./clsx-COFh-Vc8.js";import{d as k,s as g}from"./element-click-BTxuJDNT.js";import{d as y,s as v}from"./element-focus-BKUtVrWY.js";import{d as w,K as _}from"./events-DHTi_wtD.js";import"./i18n-B2d_exHc.js";const x=["select-automatic","select-manual"],T=(e,t)=>{o(e,"_behavior",e=>"string"==typeof e&&x.includes(e),new Set([`KoliBriTabBehavior {${x.join(", ")}`]),t)},z=(e,t)=>{i(e,"_hasCreateButton",t)},C='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775118370120"); /* IE9*/\n src: url("kolicons.eot?t=1775118370120#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775118370120") format("woff2"), url("kolicons.woff?t=1775118370120") format("woff"), url("kolicons.ttf?t=1775118370120") format("truetype"), url("kolicons.svg?t=1775118370120#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}',B=class{constructor(e){n(this,e),this.onCreateLabel=`${u("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case p.ArrowRight:this.goToNextTab(e);break;case p.ArrowLeft:this.goToPreviousTab(e);break;case p.Space:case p.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.setCurrentTabButtonRef=e=>{this.currentTabButtonRef=e},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);a("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden",""),e.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&w(this.host,_.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}async focus(){return y(this.host,()=>v(this.currentTabButtonRef))}async click(){return k(this.host,async()=>g(this.currentTabButtonRef))}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((e,n)=>t(b,{ref:this.state._selected===n?this.setCurrentTabButtonRef:void 0,_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===n?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===n?"custom":void 0,_customClass:this.state._selected===n?"selected":"",_ariaControls:`tabpanel-${n}`,_ariaSelected:this.state._selected===n,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${n}`,_role:"tab",_value:n})),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:"40cde6ced5533ac105935fdd8399f2578f187116",ref:e=>{this.tabPanelsElement=e},class:m("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"b2e2655b1aa19615d5167da39db1151033a09462",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){d(this,e)}validateBehavior(e){T(this,e)}validateHasCreateButton(e){z(this,e)}validateLabel(e){f(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),s(this,"_on",t)}}validateSelected(e){l(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){r(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),c("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&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"]}}};B.style={default:C};export{B as kol_tabs};
4
+ import{r as n,h as t,g as e}from"./index-G8af0_gG.js";import{b as o,e as i,k as a,s,N as l,G as r,H as c,Q as h}from"./common-BqV6Zb30.js";import{v as d}from"./align-D3Z54kEL.js";import{v as f}from"./label-vxVEH2gH.js";import{b}from"./component-names-Dy77vq43.js";import{t as u}from"./i18n-BVaUp6qp.js";import{K as p}from"./keyboard-DNd73LVa.js";import{c as m}from"./clsx-COFh-Vc8.js";import{d as k,s as g}from"./element-click-BTxuJDNT.js";import{d as y,s as v}from"./element-focus-BKUtVrWY.js";import{d as w,K as _}from"./events-DHTi_wtD.js";import"./i18n-B2d_exHc.js";const x=["select-automatic","select-manual"],T=(e,t)=>{o(e,"_behavior",e=>"string"==typeof e&&x.includes(e),new Set([`KoliBriTabBehavior {${x.join(", ")}`]),t)},z=(e,t)=>{i(e,"_hasCreateButton",t)},C='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\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 opacity: 0.5;\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=1775135018085"); /* IE9*/\n src: url("kolicons.eot?t=1775135018085#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1775135018085") format("woff2"), url("kolicons.woff?t=1775135018085") format("woff"), url("kolicons.ttf?t=1775135018085") format("truetype"), url("kolicons.svg?t=1775135018085#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: #000;\n background-color: #fff;\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: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}',B=class{constructor(e){n(this,e),this.onCreateLabel=`${u("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case p.ArrowRight:this.goToNextTab(e);break;case p.ArrowLeft:this.goToPreviousTab(e);break;case p.Space:case p.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.setCurrentTabButtonRef=e=>{this.currentTabButtonRef=e},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);a("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden",""),e.setAttribute("tabindex","0");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&w(this.host,_.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}async focus(){return y(this.host,()=>v(this.currentTabButtonRef))}async click(){return k(this.host,async()=>g(this.currentTabButtonRef))}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((e,n)=>t(b,{ref:this.state._selected===n?this.setCurrentTabButtonRef:void 0,_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===n?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===n?"custom":void 0,_customClass:this.state._selected===n?"selected":"",_ariaControls:`tabpanel-${n}`,_ariaSelected:this.state._selected===n,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${n}`,_role:"tab",_value:n})),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:"40cde6ced5533ac105935fdd8399f2578f187116",ref:e=>{this.tabPanelsElement=e},class:m("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),t("div",{key:"b2e2655b1aa19615d5167da39db1151033a09462",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){d(this,e)}validateBehavior(e){T(this,e)}validateHasCreateButton(e){z(this,e)}validateLabel(e){f(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),s(this,"_on",t)}}validateSelected(e){l(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){r(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),c("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&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"]}}};B.style={default:C};export{B as kol_tabs};