@public-ui/components 3.0.8-rc.2 → 3.0.8-rc.3

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 (322) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-Bd6RKJBA.js → Alert-JX8-hc0V.js} +1 -1
  3. package/dist/cjs/{Alert-Bd6RKJBA.js.map → Alert-JX8-hc0V.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-c0UbSu8F.js → Collapsible-usRciGG7.js} +1 -1
  5. package/dist/cjs/{Collapsible-c0UbSu8F.js.map → Collapsible-usRciGG7.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsOptionsGroup-r5WexI45.js → CustomSuggestionsOptionsGroup-ChMiUadq.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-r5WexI45.js.map → CustomSuggestionsOptionsGroup-ChMiUadq.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-Csh2Lt3p.js → FieldControlStateWrapper-fdSseV_4.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-Csh2Lt3p.js.map → FieldControlStateWrapper-fdSseV_4.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-ms9MM_hC.js → FormFieldStateWrapper-8H_mz97x.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-ms9MM_hC.js.map → FormFieldStateWrapper-8H_mz97x.js.map} +1 -1
  12. package/dist/cjs/{Heading-BbFdSzWc.js → Heading-BbySLyvy.js} +1 -1
  13. package/dist/cjs/{Heading-BbFdSzWc.js.map → Heading-BbySLyvy.js.map} +1 -1
  14. package/dist/cjs/Icon-ljpnXnIy.js +4 -0
  15. package/dist/cjs/{Icon-D4z1Ua5c.js.map → Icon-ljpnXnIy.js.map} +1 -1
  16. package/dist/cjs/{Input-BFxXowd4.js → Input-DNnRCJRY.js} +1 -1
  17. package/dist/cjs/{Input-BFxXowd4.js.map → Input-DNnRCJRY.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-7sRdDcCC.js → InputStateWrapper-EveAjLyV.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-7sRdDcCC.js.map → InputStateWrapper-EveAjLyV.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-D_EDrZAP.js → InternalUnderlinedBadgeText-DKHlp1B_.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-D_EDrZAP.js.map → InternalUnderlinedBadgeText-DKHlp1B_.js.map} +1 -1
  22. package/dist/cjs/{Span-CoHw4Fxy.js → Span-D54T5Fa8.js} +1 -1
  23. package/dist/cjs/{Span-CoHw4Fxy.js.map → Span-D54T5Fa8.js.map} +1 -1
  24. package/dist/cjs/{app-globals-CkWpyP_W.js → app-globals-B4gWI_Z1.js} +1 -1
  25. package/dist/cjs/{app-globals-CkWpyP_W.js.map → app-globals-B4gWI_Z1.js.map} +1 -1
  26. package/dist/cjs/{controller-fCkUnV5u.js → controller-CTmL4E6J.js} +1 -1
  27. package/dist/cjs/{controller-fCkUnV5u.js.map → controller-CTmL4E6J.js.map} +1 -1
  28. package/dist/cjs/{controller-icon-CtMwV7B8.js → controller-icon-D0aCitD_.js} +1 -1
  29. package/dist/cjs/{controller-icon-CtMwV7B8.js.map → controller-icon-D0aCitD_.js.map} +1 -1
  30. package/dist/cjs/{controller-Da2K1P8P.js → controller-kUTMMyt0.js} +1 -1
  31. package/dist/cjs/{controller-Da2K1P8P.js.map → controller-kUTMMyt0.js.map} +1 -1
  32. package/dist/cjs/{controller-CfNPWWTZ.js → controller-yhCf6UIE.js} +1 -1
  33. package/dist/cjs/{controller-CfNPWWTZ.js.map → controller-yhCf6UIE.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-CaZivRsv.js → dev.utils-Bid0DCHW.js} +1 -1
  35. package/dist/cjs/{dev.utils-CaZivRsv.js.map → dev.utils-Bid0DCHW.js.map} +1 -1
  36. package/dist/cjs/{devtools-BWIQ6t6e.js → devtools-DF7qSis6.js} +1 -1
  37. package/dist/cjs/{devtools-BWIQ6t6e.js.map → devtools-DF7qSis6.js.map} +1 -1
  38. package/dist/cjs/{index-p66prV0P.js → index-BcgPd1xa.js} +1 -1
  39. package/dist/cjs/{index-p66prV0P.js.map → index-BcgPd1xa.js.map} +1 -1
  40. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  102. package/dist/cjs/kolibri.cjs.js +1 -1
  103. package/dist/cjs/loader.cjs.js +1 -1
  104. package/dist/cjs/test-component.cjs.entry.js +1 -1
  105. package/dist/esm/{Alert-_tq2FoQ5.js → Alert-DtvOOMUX.js} +1 -1
  106. package/dist/{kolibri/Alert-_tq2FoQ5.js.map → esm/Alert-DtvOOMUX.js.map} +1 -1
  107. package/dist/esm/{Collapsible-CDwlCzFc.js → Collapsible-BF3IrE6t.js} +1 -1
  108. package/dist/esm/{Collapsible-CDwlCzFc.js.map → Collapsible-BF3IrE6t.js.map} +1 -1
  109. package/dist/esm/{CustomSuggestionsOptionsGroup-tYcs0PjI.js → CustomSuggestionsOptionsGroup-BXcv2wXg.js} +1 -1
  110. package/dist/esm/{CustomSuggestionsOptionsGroup-tYcs0PjI.js.map → CustomSuggestionsOptionsGroup-BXcv2wXg.js.map} +1 -1
  111. package/dist/esm/{FieldControlStateWrapper-DPS47DdW.js → FieldControlStateWrapper-vSHoKkZu.js} +1 -1
  112. package/dist/{kolibri/FieldControlStateWrapper-DPS47DdW.js.map → esm/FieldControlStateWrapper-vSHoKkZu.js.map} +1 -1
  113. package/dist/esm/{FormFieldStateWrapper-CXX3L-J-.js → FormFieldStateWrapper--mfN3zxB.js} +1 -1
  114. package/dist/esm/{FormFieldStateWrapper-CXX3L-J-.js.map → FormFieldStateWrapper--mfN3zxB.js.map} +1 -1
  115. package/dist/esm/{Heading-ClMNjISM.js → Heading-CtNjSZvy.js} +1 -1
  116. package/dist/{kolibri/Heading-ClMNjISM.js.map → esm/Heading-CtNjSZvy.js.map} +1 -1
  117. package/dist/esm/Icon-C0YAvZYM.js +4 -0
  118. package/dist/esm/{Icon-DbAAa0Pk.js.map → Icon-C0YAvZYM.js.map} +1 -1
  119. package/dist/esm/{Input-BeGyOfuS.js → Input-uDwRZfTu.js} +1 -1
  120. package/dist/esm/{Input-BeGyOfuS.js.map → Input-uDwRZfTu.js.map} +1 -1
  121. package/dist/esm/{InputStateWrapper-DhEnE4BK.js → InputStateWrapper-DPKOPHLb.js} +1 -1
  122. package/dist/esm/{InputStateWrapper-DhEnE4BK.js.map → InputStateWrapper-DPKOPHLb.js.map} +1 -1
  123. package/dist/esm/{InternalUnderlinedBadgeText-DoYMr6GR.js → InternalUnderlinedBadgeText-B_K9YhEU.js} +1 -1
  124. package/dist/esm/{InternalUnderlinedBadgeText-DoYMr6GR.js.map → InternalUnderlinedBadgeText-B_K9YhEU.js.map} +1 -1
  125. package/dist/esm/{Span-B8GtyhT-.js → Span-BDnbWXOy.js} +1 -1
  126. package/dist/esm/{Span-B8GtyhT-.js.map → Span-BDnbWXOy.js.map} +1 -1
  127. package/dist/esm/{app-globals-BIPpDlEg.js → app-globals-EjgzIaKw.js} +1 -1
  128. package/dist/esm/{app-globals-BIPpDlEg.js.map → app-globals-EjgzIaKw.js.map} +1 -1
  129. package/dist/esm/{controller-Cxj0GMIA.js → controller-CzA8VVx0.js} +1 -1
  130. package/dist/esm/{controller-Cxj0GMIA.js.map → controller-CzA8VVx0.js.map} +1 -1
  131. package/dist/esm/{controller-xTkXmOlE.js → controller-DZi-VgTc.js} +1 -1
  132. package/dist/esm/{controller-xTkXmOlE.js.map → controller-DZi-VgTc.js.map} +1 -1
  133. package/dist/esm/{controller-DdswdfgO.js → controller-GoVirgjr.js} +1 -1
  134. package/dist/esm/{controller-DdswdfgO.js.map → controller-GoVirgjr.js.map} +1 -1
  135. package/dist/esm/{controller-icon-DIQMFP0b.js → controller-icon-Os52h8zb.js} +1 -1
  136. package/dist/esm/{controller-icon-DIQMFP0b.js.map → controller-icon-Os52h8zb.js.map} +1 -1
  137. package/dist/esm/{dev.utils-Cn_6kyQ0.js → dev.utils-CMwuN6qh.js} +1 -1
  138. package/dist/esm/{dev.utils-Cn_6kyQ0.js.map → dev.utils-CMwuN6qh.js.map} +1 -1
  139. package/dist/esm/{devtools-COtKdu8_.js → devtools-B5bExzS0.js} +1 -1
  140. package/dist/{kolibri/devtools-COtKdu8_.js.map → esm/devtools-B5bExzS0.js.map} +1 -1
  141. package/dist/esm/{index-pomHlJYE.js → index-BIF3a06U.js} +1 -1
  142. package/dist/esm/{index-pomHlJYE.js.map → index-BIF3a06U.js.map} +1 -1
  143. package/dist/esm/kol-abbr.entry.js +1 -1
  144. package/dist/esm/kol-accordion.entry.js +1 -1
  145. package/dist/esm/kol-alert-wc.entry.js +1 -1
  146. package/dist/esm/kol-alert.entry.js +1 -1
  147. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  148. package/dist/esm/kol-avatar.entry.js +1 -1
  149. package/dist/esm/kol-badge.entry.js +1 -1
  150. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  151. package/dist/esm/kol-button-link.entry.js +1 -1
  152. package/dist/esm/kol-button-wc.entry.js +1 -1
  153. package/dist/esm/kol-button.entry.js +1 -1
  154. package/dist/esm/kol-card-wc.entry.js +1 -1
  155. package/dist/esm/kol-card.entry.js +1 -1
  156. package/dist/esm/kol-combobox.entry.js +1 -1
  157. package/dist/esm/kol-details.entry.js +1 -1
  158. package/dist/esm/kol-drawer.entry.js +1 -1
  159. package/dist/esm/kol-form.entry.js +1 -1
  160. package/dist/esm/kol-heading.entry.js +1 -1
  161. package/dist/esm/kol-icon.entry.js +1 -1
  162. package/dist/esm/kol-image.entry.js +1 -1
  163. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  164. package/dist/esm/kol-input-color.entry.js +1 -1
  165. package/dist/esm/kol-input-date.entry.js +1 -1
  166. package/dist/esm/kol-input-email.entry.js +1 -1
  167. package/dist/esm/kol-input-file.entry.js +1 -1
  168. package/dist/esm/kol-input-number.entry.js +1 -1
  169. package/dist/esm/kol-input-password.entry.js +1 -1
  170. package/dist/esm/kol-input-radio.entry.js +1 -1
  171. package/dist/esm/kol-input-range.entry.js +1 -1
  172. package/dist/esm/kol-input-text.entry.js +1 -1
  173. package/dist/esm/kol-kolibri.entry.js +1 -1
  174. package/dist/esm/kol-link-button.entry.js +1 -1
  175. package/dist/esm/kol-link-wc.entry.js +1 -1
  176. package/dist/esm/kol-link.entry.js +1 -1
  177. package/dist/esm/kol-modal.entry.js +1 -1
  178. package/dist/esm/kol-nav.entry.js +1 -1
  179. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  180. package/dist/esm/kol-pagination.entry.js +1 -1
  181. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  182. package/dist/esm/kol-popover-button.entry.js +1 -1
  183. package/dist/esm/kol-popover-wc.entry.js +1 -1
  184. package/dist/esm/kol-progress.entry.js +1 -1
  185. package/dist/esm/kol-quote.entry.js +1 -1
  186. package/dist/esm/kol-select.entry.js +1 -1
  187. package/dist/esm/kol-single-select.entry.js +1 -1
  188. package/dist/esm/kol-skip-nav.entry.js +1 -1
  189. package/dist/esm/kol-spin.entry.js +1 -1
  190. package/dist/esm/kol-split-button.entry.js +1 -1
  191. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  192. package/dist/esm/kol-table-stateful.entry.js +1 -1
  193. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  194. package/dist/esm/kol-table-stateless.entry.js +1 -1
  195. package/dist/esm/kol-tabs.entry.js +1 -1
  196. package/dist/esm/kol-textarea.entry.js +1 -1
  197. package/dist/esm/kol-toast-container.entry.js +1 -1
  198. package/dist/esm/kol-toolbar.entry.js +1 -1
  199. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  200. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  201. package/dist/esm/kol-tree-item.entry.js +1 -1
  202. package/dist/esm/kol-tree-wc.entry.js +1 -1
  203. package/dist/esm/kol-tree.entry.js +1 -1
  204. package/dist/esm/kol-version.entry.js +1 -1
  205. package/dist/esm/kolibri.js +1 -1
  206. package/dist/esm/loader.js +1 -1
  207. package/dist/esm/test-component.entry.js +1 -1
  208. package/dist/kolibri/Alert-DtvOOMUX.js +4 -0
  209. package/dist/{esm/Alert-_tq2FoQ5.js.map → kolibri/Alert-DtvOOMUX.js.map} +1 -1
  210. package/dist/kolibri/{Collapsible-CDwlCzFc.js → Collapsible-BF3IrE6t.js} +1 -1
  211. package/dist/kolibri/{Collapsible-CDwlCzFc.js.map → Collapsible-BF3IrE6t.js.map} +1 -1
  212. package/dist/kolibri/{CustomSuggestionsOptionsGroup-tYcs0PjI.js → CustomSuggestionsOptionsGroup-BXcv2wXg.js} +1 -1
  213. package/dist/kolibri/{CustomSuggestionsOptionsGroup-tYcs0PjI.js.map → CustomSuggestionsOptionsGroup-BXcv2wXg.js.map} +1 -1
  214. package/dist/kolibri/FieldControlStateWrapper-vSHoKkZu.js +4 -0
  215. package/dist/{esm/FieldControlStateWrapper-DPS47DdW.js.map → kolibri/FieldControlStateWrapper-vSHoKkZu.js.map} +1 -1
  216. package/dist/kolibri/{FormFieldStateWrapper-CXX3L-J-.js → FormFieldStateWrapper--mfN3zxB.js} +1 -1
  217. package/dist/kolibri/{FormFieldStateWrapper-CXX3L-J-.js.map → FormFieldStateWrapper--mfN3zxB.js.map} +1 -1
  218. package/dist/kolibri/{Heading-ClMNjISM.js → Heading-CtNjSZvy.js} +1 -1
  219. package/dist/{esm/Heading-ClMNjISM.js.map → kolibri/Heading-CtNjSZvy.js.map} +1 -1
  220. package/dist/kolibri/Icon-C0YAvZYM.js +4 -0
  221. package/dist/kolibri/{Icon-DbAAa0Pk.js.map → Icon-C0YAvZYM.js.map} +1 -1
  222. package/dist/kolibri/Input-uDwRZfTu.js +4 -0
  223. package/dist/kolibri/{Input-BeGyOfuS.js.map → Input-uDwRZfTu.js.map} +1 -1
  224. package/dist/kolibri/{InputStateWrapper-DhEnE4BK.js → InputStateWrapper-DPKOPHLb.js} +1 -1
  225. package/dist/kolibri/{InputStateWrapper-DhEnE4BK.js.map → InputStateWrapper-DPKOPHLb.js.map} +1 -1
  226. package/dist/kolibri/InternalUnderlinedBadgeText-B_K9YhEU.js +4 -0
  227. package/dist/kolibri/{InternalUnderlinedBadgeText-DoYMr6GR.js.map → InternalUnderlinedBadgeText-B_K9YhEU.js.map} +1 -1
  228. package/dist/kolibri/Span-BDnbWXOy.js +4 -0
  229. package/dist/kolibri/{Span-B8GtyhT-.js.map → Span-BDnbWXOy.js.map} +1 -1
  230. package/dist/kolibri/{app-globals-BIPpDlEg.js → app-globals-EjgzIaKw.js} +1 -1
  231. package/dist/kolibri/{app-globals-BIPpDlEg.js.map → app-globals-EjgzIaKw.js.map} +1 -1
  232. package/dist/kolibri/{controller-Cxj0GMIA.js → controller-CzA8VVx0.js} +1 -1
  233. package/dist/kolibri/{controller-Cxj0GMIA.js.map → controller-CzA8VVx0.js.map} +1 -1
  234. package/dist/kolibri/{controller-xTkXmOlE.js → controller-DZi-VgTc.js} +1 -1
  235. package/dist/kolibri/{controller-xTkXmOlE.js.map → controller-DZi-VgTc.js.map} +1 -1
  236. package/dist/kolibri/{controller-DdswdfgO.js → controller-GoVirgjr.js} +1 -1
  237. package/dist/kolibri/{controller-DdswdfgO.js.map → controller-GoVirgjr.js.map} +1 -1
  238. package/dist/kolibri/{controller-icon-DIQMFP0b.js → controller-icon-Os52h8zb.js} +1 -1
  239. package/dist/kolibri/{controller-icon-DIQMFP0b.js.map → controller-icon-Os52h8zb.js.map} +1 -1
  240. package/dist/kolibri/{dev.utils-Cn_6kyQ0.js → dev.utils-CMwuN6qh.js} +1 -1
  241. package/dist/kolibri/{dev.utils-Cn_6kyQ0.js.map → dev.utils-CMwuN6qh.js.map} +1 -1
  242. package/dist/kolibri/{devtools-COtKdu8_.js → devtools-B5bExzS0.js} +1 -1
  243. package/dist/{esm/devtools-COtKdu8_.js.map → kolibri/devtools-B5bExzS0.js.map} +1 -1
  244. package/dist/kolibri/{index-pomHlJYE.js → index-BIF3a06U.js} +1 -1
  245. package/dist/kolibri/{index-pomHlJYE.js.map → index-BIF3a06U.js.map} +1 -1
  246. package/dist/kolibri/kol-abbr.entry.js +1 -1
  247. package/dist/kolibri/kol-accordion.entry.js +1 -1
  248. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  249. package/dist/kolibri/kol-alert.entry.js +1 -1
  250. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  251. package/dist/kolibri/kol-avatar.entry.js +1 -1
  252. package/dist/kolibri/kol-badge.entry.js +1 -1
  253. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  254. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  255. package/dist/kolibri/kol-button-link.entry.js +1 -1
  256. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  257. package/dist/kolibri/kol-button.entry.js +1 -1
  258. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  259. package/dist/kolibri/kol-card.entry.js +1 -1
  260. package/dist/kolibri/kol-combobox.entry.js +1 -1
  261. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  262. package/dist/kolibri/kol-details.entry.js +1 -1
  263. package/dist/kolibri/kol-drawer.entry.js +1 -1
  264. package/dist/kolibri/kol-form.entry.js +1 -1
  265. package/dist/kolibri/kol-heading.entry.js +1 -1
  266. package/dist/kolibri/kol-icon.entry.js +1 -1
  267. package/dist/kolibri/kol-image.entry.js +1 -1
  268. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  269. package/dist/kolibri/kol-input-color.entry.js +1 -1
  270. package/dist/kolibri/kol-input-date.entry.js +1 -1
  271. package/dist/kolibri/kol-input-email.entry.js +1 -1
  272. package/dist/kolibri/kol-input-file.entry.js +1 -1
  273. package/dist/kolibri/kol-input-number.entry.js +1 -1
  274. package/dist/kolibri/kol-input-password.entry.js +1 -1
  275. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  276. package/dist/kolibri/kol-input-range.entry.js +1 -1
  277. package/dist/kolibri/kol-input-text.entry.js +1 -1
  278. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  279. package/dist/kolibri/kol-link-button.entry.js +1 -1
  280. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  281. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  282. package/dist/kolibri/kol-link.entry.js +1 -1
  283. package/dist/kolibri/kol-modal.entry.js +1 -1
  284. package/dist/kolibri/kol-nav.entry.js +1 -1
  285. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  286. package/dist/kolibri/kol-pagination.entry.js +1 -1
  287. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  288. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  289. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  290. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  291. package/dist/kolibri/kol-progress.entry.js +1 -1
  292. package/dist/kolibri/kol-quote.entry.js +1 -1
  293. package/dist/kolibri/kol-select.entry.js +1 -1
  294. package/dist/kolibri/kol-single-select.entry.js +1 -1
  295. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  296. package/dist/kolibri/kol-spin.entry.js +1 -1
  297. package/dist/kolibri/kol-split-button.entry.js +1 -1
  298. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  299. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  300. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  301. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  302. package/dist/kolibri/kol-tabs.entry.js +1 -1
  303. package/dist/kolibri/kol-textarea.entry.js +1 -1
  304. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  305. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  306. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  307. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  308. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  309. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  310. package/dist/kolibri/kol-tree.entry.js +1 -1
  311. package/dist/kolibri/kol-version.entry.js +1 -1
  312. package/dist/kolibri/kolibri.esm.js +1 -1
  313. package/dist/kolibri/test-component.entry.js +1 -1
  314. package/package.json +1 -1
  315. package/dist/cjs/Icon-D4z1Ua5c.js +0 -4
  316. package/dist/esm/Icon-DbAAa0Pk.js +0 -4
  317. package/dist/kolibri/Alert-_tq2FoQ5.js +0 -4
  318. package/dist/kolibri/FieldControlStateWrapper-DPS47DdW.js +0 -4
  319. package/dist/kolibri/Icon-DbAAa0Pk.js +0 -4
  320. package/dist/kolibri/Input-BeGyOfuS.js +0 -4
  321. package/dist/kolibri/InternalUnderlinedBadgeText-DoYMr6GR.js +0 -4
  322. package/dist/kolibri/Span-B8GtyhT-.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t}from"./index-pomHlJYE.js";import{c as e}from"./clsx-eK3rPvPS.js";import{l as o,d as i}from"./component-names-CkE54Ym7.js";import{t as a}from"./i18n-C5ifExT3.js";import"./common-Dd0zJQbD.js";import"./i18n-ZF6JbdVP.js";const s="/* 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}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-popover {\n position: absolute;\n height: 0;\n }\n .kol-popover__content {\n opacity: 0;\n background-color: #fff;\n position: absolute;\n min-width: max-content;\n min-height: max-content;\n }\n .kol-popover__content--visible {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover__content--disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover__arrow {\n rotate: 0.125turn;\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: var(--font-size);\n height: var(--font-size);\n }\n}\n@layer kol-component {\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-split-button {\n display: flex;\n position: relative;\n width: 100%;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n width: 100%;\n align-items: stretch;\n }\n .kol-split-button__button {\n min-width: 0;\n flex: 1 1 auto;\n text-align: left;\n }\n .kol-split-button .kol-popover {\n z-index: 1;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-split-button .kol-popover__arrow {\n display: none;\n }\n}",l=class{constructor(t){n(this,t),this.catchPrimaryRef=n=>{this.primaryButtonWcRef=n},this.clickButtonHandler={onClick:n=>{var t,e;n.stopPropagation(),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)&&(null===(e=this._on)||void 0===e||e.onClick(n,this._value))}},this.clickToggleHandler={onClick:n=>{n.stopPropagation(),this.toggleDropdown()}},this.toggleDropdown=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!this.state._show})},this.handleOnClose=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!1})},this._disabled=!1,this._hideLabel=!1,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_show:!1}}async getValue(){return this._value}async kolFocus(){var n;await(null===(n=this.primaryButtonWcRef)||void 0===n?void 0:n.kolFocus())}render(){const n="kol-split-button-dropdown-label";return t("div",{key:"9a5b6f99df559c2acb2f16adfa505e10901d6e1e",class:"kol-split-button"},t("div",{key:"549976d7b555f3bbeda8fe680fad9db4d92e712f",class:"kol-split-button__root"},t(i,{key:"240c63a254c8853f824da84ac6589d71f22d75d4",class:e("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),ref:this.catchPrimaryRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_id:this._id,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant}),t("div",{key:"51aeab97c09f9392492d6815f0535cbea740a6ba",class:"kol-split-button__horizontal-line"}),t(i,{key:"c7e69de54cad832c9ff2a1ca34c505628f86e4d9",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?a(`${n}-close`):a(`${n}-open`),_on:this.clickToggleHandler})),t(o,{key:"4880bd3fba703eb5aff079a6755cad1dcc6289cc",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"238f03d754c5a8586ca97f06ce9184436398936c"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}};l.style={default:s};export{l as kol_split_button};
4
+ import{r as n,h as t}from"./index-BIF3a06U.js";import{c as e}from"./clsx-eK3rPvPS.js";import{l as o,d as i}from"./component-names-CkE54Ym7.js";import{t as a}from"./i18n-C5ifExT3.js";import"./common-Dd0zJQbD.js";import"./i18n-ZF6JbdVP.js";const s="/* 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}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-popover {\n position: absolute;\n height: 0;\n }\n .kol-popover__content {\n opacity: 0;\n background-color: #fff;\n position: absolute;\n min-width: max-content;\n min-height: max-content;\n }\n .kol-popover__content--visible {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover__content--disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover__arrow {\n rotate: 0.125turn;\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: var(--font-size);\n height: var(--font-size);\n }\n}\n@layer kol-component {\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-split-button {\n display: flex;\n position: relative;\n width: 100%;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n width: 100%;\n align-items: stretch;\n }\n .kol-split-button__button {\n min-width: 0;\n flex: 1 1 auto;\n text-align: left;\n }\n .kol-split-button .kol-popover {\n z-index: 1;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-split-button .kol-popover__arrow {\n display: none;\n }\n}",l=class{constructor(t){n(this,t),this.catchPrimaryRef=n=>{this.primaryButtonWcRef=n},this.clickButtonHandler={onClick:n=>{var t,e;n.stopPropagation(),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)&&(null===(e=this._on)||void 0===e||e.onClick(n,this._value))}},this.clickToggleHandler={onClick:n=>{n.stopPropagation(),this.toggleDropdown()}},this.toggleDropdown=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!this.state._show})},this.handleOnClose=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!1})},this._disabled=!1,this._hideLabel=!1,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_show:!1}}async getValue(){return this._value}async kolFocus(){var n;await(null===(n=this.primaryButtonWcRef)||void 0===n?void 0:n.kolFocus())}render(){const n="kol-split-button-dropdown-label";return t("div",{key:"9a5b6f99df559c2acb2f16adfa505e10901d6e1e",class:"kol-split-button"},t("div",{key:"549976d7b555f3bbeda8fe680fad9db4d92e712f",class:"kol-split-button__root"},t(i,{key:"240c63a254c8853f824da84ac6589d71f22d75d4",class:e("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),ref:this.catchPrimaryRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_id:this._id,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant}),t("div",{key:"51aeab97c09f9392492d6815f0535cbea740a6ba",class:"kol-split-button__horizontal-line"}),t(i,{key:"c7e69de54cad832c9ff2a1ca34c505628f86e4d9",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?a(`${n}-close`):a(`${n}-open`),_on:this.clickToggleHandler})),t(o,{key:"4880bd3fba703eb5aff079a6755cad1dcc6289cc",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"238f03d754c5a8586ca97f06ce9184436398936c"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}};l.style={default:s};export{l as kol_split_button};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as e,h as t,g as s}from"./index-pomHlJYE.js";import{_ as a}from"./tslib.es6-CxX45GIN.js";import{t as l,b as i,u as o,v as n,d as b,j as c}from"./component-names-CkE54Ym7.js";import{t as d}from"./i18n-C5ifExT3.js";import{d as r,K as h}from"./events-9-skLO0f.js";import"./common-Dd0zJQbD.js";import"./i18n-ZF6JbdVP.js";const u=class{constructor(t){e(this,t),this.tableSettings={columns:[]},this.errorMessage=null,this.translateTableSettings=d("kol-table-settings"),this.translateTableSettingsCancel=d("kol-table-settings-cancel"),this.translateTableSettingsApply=d("kol-table-settings-apply"),this.translateErrorAllInvisible=d("kol-table-settings-error-all-invisible"),this.translateColumnNotHidable=d("kol-table-settings-column-not-hidable"),this._tableSettings={columns:[]}}handleTableSettingsChange(e){this.tableSettings=Object.assign(Object.assign({},e),{columns:this.normalizeColumns(Array.isArray(e.columns)?e.columns:[])})}componentWillLoad(){this.handleTableSettingsChange(this._tableSettings)}normalizeColumns(e){return e.map(e=>{var{hidable:t,resizable:s,sortable:l,visible:i}=e,n=a(e,["hidable","resizable","sortable","visible"]);return Object.assign(Object.assign({},n),{hidable:!1!==t,resizable:!1!==s,sortable:!1!==l,visible:!1!==i})})}moveColumn(e,t){const s=[...this.tableSettings.columns],a=s.findIndex(t=>t.key===e),l=s[a],i="up"===t?a-1:a+1,n=s[i];if(a<0||i<0||i>=s.length||!1===(null==l?void 0:l.sortable)||!1===(null==n?void 0:n.sortable))return;const[o]=s.splice(a,1);s.splice(i,0,o),this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:s})}handleVisibilityChange(e,t){this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.tableSettings.columns.map(s=>s.key===e&&!1!==s.hidable?Object.assign(Object.assign({},s),{visible:Boolean(t)}):s)})}handleWidthChange(e,t){this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.tableSettings.columns.map(s=>s.key===e?!1===s.resizable?s:Object.assign(Object.assign({},s),{width:Number(t)}):s)})}handleCancel(){var e;null===(e=this.popoverRef)||void 0===e||e.hidePopover()}handleSubmit(e){var t;e.preventDefault();const s=this.tableSettings.columns.some(e=>e.visible);s?this.host&&(this.errorMessage=null,r(this.host,h.settingsChange,this.tableSettings),null===(t=this.popoverRef)||void 0===t||t.hidePopover()):this.errorMessage=this.translateErrorAllInvisible}render(){const e=this.tableSettings.columns;return t(c,{key:"aa24d8651b56901da47fb399d3b8d195c04e4172",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},t("div",{key:"e2bfa59a2329b8195533c4085d0de0dbcbe3ee2a",class:"kol-table-settings__content"},t(l,{key:"93826dd6a92a059f4b38ae6c2fe5c7be6a9fa53b",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(i,{key:"ffb531d2e598f7beba390759cefeb30f07b34cd5",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"b3efffad1be5c8ff4bca0ba0e0c680e334afeeb3",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"0def6f9d92009689733e3841c822b93b0397a659",class:"kol-table-settings__columns-container"},t("div",{key:"d0a7af6068e909ae91a5fd55cb560724d12edcc4",class:"kol-table-settings__columns"},e.map((s,a)=>{var l,i;return t("div",{key:s.key,class:"kol-table-settings__column"},t(o,{_checked:s.visible,_label:`${s.label}${!1===s.hidable?` (${this.translateColumnNotHidable})`:""}`,_value:!0,_hideLabel:!0,_disabled:!1===s.hidable,_on:{onInput:(e,t)=>this.handleVisibilityChange(s.key,t)},"data-testid":`table-settings-visible-${s.key}`}),t("span",{class:"kol-table-settings__column-label"},s.label),t(n,{_hideLabel:!0,_value:s.width,_label:d("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_disabled:!1===s.resizable,_on:{onInput:(e,t)=>this.handleWidthChange(s.key,t)}}),t(b,{_icons:"codicon codicon-arrow-up",_label:d("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"up")},_disabled:0===a||!1===s.sortable||!1===(null===(l=e[a-1])||void 0===l?void 0:l.sortable),"data-testid":"table-settings-move-up"}),t(b,{_icons:"codicon codicon-arrow-down",_label:d("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"down")},_disabled:a===e.length-1||!1===s.sortable||!1===(null===(i=e[a+1])||void 0===i?void 0:i.sortable),"data-testid":"table-settings-move-down"}))}))),t("div",{key:"ae98c13ffb786564a765d02150e241b624c923c6",class:"kol-table-settings__actions"},t(b,{key:"3a8127b09eb76a55e0beffd508c1dd7e446fdaca",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(b,{key:"19a5e91145eec6caa0460eaea7df20a1275b3962",_label:this.translateTableSettingsApply,_buttonVariant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_tableSettings:["handleTableSettingsChange"]}}};export{u as kol_table_settings_wc};
4
+ import{r as e,h as t,g as s}from"./index-BIF3a06U.js";import{_ as a}from"./tslib.es6-CxX45GIN.js";import{t as l,b as i,u as o,v as n,d as b,j as c}from"./component-names-CkE54Ym7.js";import{t as d}from"./i18n-C5ifExT3.js";import{d as r,K as h}from"./events-9-skLO0f.js";import"./common-Dd0zJQbD.js";import"./i18n-ZF6JbdVP.js";const u=class{constructor(t){e(this,t),this.tableSettings={columns:[]},this.errorMessage=null,this.translateTableSettings=d("kol-table-settings"),this.translateTableSettingsCancel=d("kol-table-settings-cancel"),this.translateTableSettingsApply=d("kol-table-settings-apply"),this.translateErrorAllInvisible=d("kol-table-settings-error-all-invisible"),this.translateColumnNotHidable=d("kol-table-settings-column-not-hidable"),this._tableSettings={columns:[]}}handleTableSettingsChange(e){this.tableSettings=Object.assign(Object.assign({},e),{columns:this.normalizeColumns(Array.isArray(e.columns)?e.columns:[])})}componentWillLoad(){this.handleTableSettingsChange(this._tableSettings)}normalizeColumns(e){return e.map(e=>{var{hidable:t,resizable:s,sortable:l,visible:i}=e,n=a(e,["hidable","resizable","sortable","visible"]);return Object.assign(Object.assign({},n),{hidable:!1!==t,resizable:!1!==s,sortable:!1!==l,visible:!1!==i})})}moveColumn(e,t){const s=[...this.tableSettings.columns],a=s.findIndex(t=>t.key===e),l=s[a],i="up"===t?a-1:a+1,n=s[i];if(a<0||i<0||i>=s.length||!1===(null==l?void 0:l.sortable)||!1===(null==n?void 0:n.sortable))return;const[o]=s.splice(a,1);s.splice(i,0,o),this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:s})}handleVisibilityChange(e,t){this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.tableSettings.columns.map(s=>s.key===e&&!1!==s.hidable?Object.assign(Object.assign({},s),{visible:Boolean(t)}):s)})}handleWidthChange(e,t){this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.tableSettings.columns.map(s=>s.key===e?!1===s.resizable?s:Object.assign(Object.assign({},s),{width:Number(t)}):s)})}handleCancel(){var e;null===(e=this.popoverRef)||void 0===e||e.hidePopover()}handleSubmit(e){var t;e.preventDefault();const s=this.tableSettings.columns.some(e=>e.visible);s?this.host&&(this.errorMessage=null,r(this.host,h.settingsChange,this.tableSettings),null===(t=this.popoverRef)||void 0===t||t.hidePopover()):this.errorMessage=this.translateErrorAllInvisible}render(){const e=this.tableSettings.columns;return t(c,{key:"aa24d8651b56901da47fb399d3b8d195c04e4172",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},t("div",{key:"e2bfa59a2329b8195533c4085d0de0dbcbe3ee2a",class:"kol-table-settings__content"},t(l,{key:"93826dd6a92a059f4b38ae6c2fe5c7be6a9fa53b",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(i,{key:"ffb531d2e598f7beba390759cefeb30f07b34cd5",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"b3efffad1be5c8ff4bca0ba0e0c680e334afeeb3",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"0def6f9d92009689733e3841c822b93b0397a659",class:"kol-table-settings__columns-container"},t("div",{key:"d0a7af6068e909ae91a5fd55cb560724d12edcc4",class:"kol-table-settings__columns"},e.map((s,a)=>{var l,i;return t("div",{key:s.key,class:"kol-table-settings__column"},t(o,{_checked:s.visible,_label:`${s.label}${!1===s.hidable?` (${this.translateColumnNotHidable})`:""}`,_value:!0,_hideLabel:!0,_disabled:!1===s.hidable,_on:{onInput:(e,t)=>this.handleVisibilityChange(s.key,t)},"data-testid":`table-settings-visible-${s.key}`}),t("span",{class:"kol-table-settings__column-label"},s.label),t(n,{_hideLabel:!0,_value:s.width,_label:d("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_disabled:!1===s.resizable,_on:{onInput:(e,t)=>this.handleWidthChange(s.key,t)}}),t(b,{_icons:"codicon codicon-arrow-up",_label:d("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"up")},_disabled:0===a||!1===s.sortable||!1===(null===(l=e[a-1])||void 0===l?void 0:l.sortable),"data-testid":"table-settings-move-up"}),t(b,{_icons:"codicon codicon-arrow-down",_label:d("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"down")},_disabled:a===e.length-1||!1===s.sortable||!1===(null===(i=e[a+1])||void 0===i?void 0:i.sortable),"data-testid":"table-settings-move-down"}))}))),t("div",{key:"ae98c13ffb786564a765d02150e241b624c923c6",class:"kol-table-settings__actions"},t(b,{key:"3a8127b09eb76a55e0beffd508c1dd7e446fdaca",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(b,{key:"19a5e91145eec6caa0460eaea7df20a1275b3962",_label:this.translateTableSettingsApply,_buttonVariant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_tableSettings:["handleTableSettingsChange"]}}};export{u as kol_table_settings_wc};
@@ -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-pomHlJYE.js";import{i as o,m as a}from"./component-names-CkE54Ym7.js";import{t as l}from"./i18n-C5ifExT3.js";import{d as s,w as r,s as d,O as h,e as c,p,o as b,j as u}from"./common-Dd0zJQbD.js";import{v as f,a as m,b as g,c as _,d as k,e as v}from"./table-settings-DxLvhwRE.js";import{v as y}from"./label-Dnmzb2S_.js";import{C as w}from"./keyboard-D6PoWr38.js";import{K as x,d as S}from"./events-9-skLO0f.js";import"./i18n-ZF6JbdVP.js";const z=(t,n,e={})=>{s(t,"_allowMultiSort",n,Object.assign({defaultValue:!1},e))},j=["top","bottom","both"],C=(t,n)=>{r(t,"_paginationPosition",t=>"string"==typeof t&&j.includes(t),new Set([`PaginationPositionPropType {${j.join(", ")}`]),n,{defaultValue:"bottom"})},T='@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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\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 margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\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 width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\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 width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--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 width: calc(var(--a11y-min-size) / 2);\n 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-pagination {\n display: grid;\n gap: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}',D=[10,20,50,100],P=t=>!0===t||""===t||"object"==typeof t&&null!==t,O=class{constructor(t){n(this,t),this.catchRef=t=>{this.tableWcRef=t},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),d(this,"_pageSize",n)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void d(this,"_sortedData",this.state._data);const t=[...this.state._data];this.sortData.length>0&&t.sort((t,n)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],a=i.compareFn(t,n,i.direction);if(0!==a)return"ASC"===i.direction?a:-a}return 0}),d(this,"_sortedData",t)}}validateAllowMultiSort(t){z(this,t,{defaultValue:!1})}validateData(t){f(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){m(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){C(this,t)}validateHasSettingsMenu(t){g(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key===(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex(n=>n.key===t.key);if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){h(t,()=>{b(t,()=>{try{t=p(t)}catch(t){}r(this,"_headers",t=>"object"==typeof t&&null!==t,new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,a;const o=t=>{let n=!1;this.sortData=[],t.forEach(t=>{if("function"==typeof t.compareFn&&!t.key)return void u("[KolTableStateful] A sortable column requires the 'key' property.");const e=t.key;if(!e)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof t.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:e,compareFn:t.compareFn,direction:i}),n=!0)}),n&&setTimeout(()=>this.updateSortedData())},l=t;null===(n=l.horizontal)||void 0===n||n.forEach(o),null===(e=l.vertical)||void 0===e||e.forEach(o),l.horizontal&&l.vertical&&(null===(i=l.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=l.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,u("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(t){y(this,t,{required:!0})}validateMinWidth(t){c(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){_(this,t)}validateOn(t){k(this,t)}validateTableSettings(t){v(this,t)}validatePagination(t){try{t=p(t)}catch(t){}this.showPagination=P(t),r(this,"_pagination",P,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener(x.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(x.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(n){const e=l("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${l(`kol-pagination-position-${n}`)})`}});return t("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},t("span",{role:"status","aria-live":"polite"},l("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),t("div",{class:"kol-table-stateful__pagination-wrapper"},t(o,{class:"test",_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||D,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(t){if(!this.disableSort&&"function"==typeof t.compareFn){if(t.key){const n=this.sortData.find(n=>n.key===t.key);if(null==n?void 0:n.direction)return n.direction}return"NOS"}}handleSort({key:t}){const n=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find(n=>n.key===t);n&&this.changeCellSort(n)}getSelectedData(t){var n;const e=this.state._selection;if(e){const i=null!==(n=e.keyPropertyName)&&void 0!==n?n:"id",a=Array.isArray(t)?t:[t],o=new Set(a.map(String)),l=this.state._sortedData.filter(t=>o.has(String(t[i])));if(!1===(null==e?void 0:e.multiple))return l[0];if(i)return l}return null}handleSelectionChange(t,n){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:Array.isArray(n)?n:[n]})}));const a=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[w.onSelectionChange])&&this.state._on[w.onSelectionChange](t,a),this.host&&S(this.host,x.selectionChange,a)}async getSelection(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)}render(){var n,i,o,l,s,r;const d=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),h="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,c="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(l=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==l?l:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==r?r:[]};return t(e,{key:"aad8c0ccdfadfd33119a96bf4252ca0018a085e9",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&h,t(a,{key:"d551f1ba53397fdb75b184761594d64d28c37b9d",ref:this.catchRef,_data:d,_headerCells:p,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,n)=>{this.handleSort(n)},onSelectionChange:(t,n)=>{this.handleSelectionChange(t,n)}},_selection:this.state._selection,_tableSettings:this.state._tableSettings,_hasSettingsMenu:this.state._hasSettingsMenu}),this.pageEndSlice>0&&this.showPagination&&c)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};O.style={default:T};export{O as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-BIF3a06U.js";import{i as o,m as a}from"./component-names-CkE54Ym7.js";import{t as l}from"./i18n-C5ifExT3.js";import{d as s,w as r,s as d,O as h,e as c,p,o as b,j as u}from"./common-Dd0zJQbD.js";import{v as f,a as m,b as g,c as _,d as k,e as v}from"./table-settings-DxLvhwRE.js";import{v as y}from"./label-Dnmzb2S_.js";import{C as w}from"./keyboard-D6PoWr38.js";import{K as x,d as S}from"./events-9-skLO0f.js";import"./i18n-ZF6JbdVP.js";const z=(t,n,e={})=>{s(t,"_allowMultiSort",n,Object.assign({defaultValue:!1},e))},j=["top","bottom","both"],C=(t,n)=>{r(t,"_paginationPosition",t=>"string"==typeof t&&j.includes(t),new Set([`PaginationPositionPropType {${j.join(", ")}`]),n,{defaultValue:"bottom"})},T='@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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\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 margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\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 width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\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 width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--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 width: calc(var(--a11y-min-size) / 2);\n 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-pagination {\n display: grid;\n gap: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}',D=[10,20,50,100],P=t=>!0===t||""===t||"object"==typeof t&&null!==t,O=class{constructor(t){n(this,t),this.catchRef=t=>{this.tableWcRef=t},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),d(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),d(this,"_pageSize",n)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void d(this,"_sortedData",this.state._data);const t=[...this.state._data];this.sortData.length>0&&t.sort((t,n)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],a=i.compareFn(t,n,i.direction);if(0!==a)return"ASC"===i.direction?a:-a}return 0}),d(this,"_sortedData",t)}}validateAllowMultiSort(t){z(this,t,{defaultValue:!1})}validateData(t){f(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){m(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){C(this,t)}validateHasSettingsMenu(t){g(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key===(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex(n=>n.key===t.key);if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){h(t,()=>{b(t,()=>{try{t=p(t)}catch(t){}r(this,"_headers",t=>"object"==typeof t&&null!==t,new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,a;const o=t=>{let n=!1;this.sortData=[],t.forEach(t=>{if("function"==typeof t.compareFn&&!t.key)return void u("[KolTableStateful] A sortable column requires the 'key' property.");const e=t.key;if(!e)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof t.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:e,compareFn:t.compareFn,direction:i}),n=!0)}),n&&setTimeout(()=>this.updateSortedData())},l=t;null===(n=l.horizontal)||void 0===n||n.forEach(o),null===(e=l.vertical)||void 0===e||e.forEach(o),l.horizontal&&l.vertical&&(null===(i=l.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=l.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,u("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(t){y(this,t,{required:!0})}validateMinWidth(t){c(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){_(this,t)}validateOn(t){k(this,t)}validateTableSettings(t){v(this,t)}validatePagination(t){try{t=p(t)}catch(t){}this.showPagination=P(t),r(this,"_pagination",P,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener(x.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(x.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(n){const e=l("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${l(`kol-pagination-position-${n}`)})`}});return t("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},t("span",{role:"status","aria-live":"polite"},l("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),t("div",{class:"kol-table-stateful__pagination-wrapper"},t(o,{class:"test",_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||D,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:e})))}getHeaderCellSortState(t){if(!this.disableSort&&"function"==typeof t.compareFn){if(t.key){const n=this.sortData.find(n=>n.key===t.key);if(null==n?void 0:n.direction)return n.direction}return"NOS"}}handleSort({key:t}){const n=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find(n=>n.key===t);n&&this.changeCellSort(n)}getSelectedData(t){var n;const e=this.state._selection;if(e){const i=null!==(n=e.keyPropertyName)&&void 0!==n?n:"id",a=Array.isArray(t)?t:[t],o=new Set(a.map(String)),l=this.state._sortedData.filter(t=>o.has(String(t[i])));if(!1===(null==e?void 0:e.multiple))return l[0];if(i)return l}return null}handleSelectionChange(t,n){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:Array.isArray(n)?n:[n]})}));const a=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[w.onSelectionChange])&&this.state._on[w.onSelectionChange](t,a),this.host&&S(this.host,x.selectionChange,a)}async getSelection(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)}render(){var n,i,o,l,s,r;const d=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),h="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,c="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(l=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==l?l:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==r?r:[]};return t(e,{key:"aad8c0ccdfadfd33119a96bf4252ca0018a085e9",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&h,t(a,{key:"d551f1ba53397fdb75b184761594d64d28c37b9d",ref:this.catchRef,_data:d,_headerCells:p,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,n)=>{this.handleSort(n)},onSelectionChange:(t,n)=>{this.handleSelectionChange(t,n)}},_selection:this.state._selection,_tableSettings:this.state._tableSettings,_hasSettingsMenu:this.state._hasSettingsMenu}),this.pageEndSlice>0&&this.showPagination&&c)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};O.style={default:T};export{O 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 n,g as i}from"./index-pomHlJYE.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as a,a as o,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-C5ifExT3.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-Dd0zJQbD.js";import{b,v as _,a as p,f as y,c as k,e as j}from"./table-settings-DxLvhwRE.js";import{v as m}from"./label-Dnmzb2S_.js";import{C as g}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-Cn_6kyQ0.js";import{d as S,K as A}from"./events-9-skLO0f.js";import{i as O,c as $,r as D,a as x,f as C,b as M,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const W=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>"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)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})};var P="[object AsyncFunction]",E="[object Function]",T="[object GeneratorFunction]",z="[object Proxy]";function H(e){if(!O(e))return!1;var t=$(e);return t==E||t==T||t==P||t==z}var K=D["__core-js_shared__"],R=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L(e){return!!R&&R in e}var N=Function.prototype,B=N.toString;function I(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,J=Function.prototype,Q=Object.prototype,Y=J.toString,q=Q.hasOwnProperty,G=RegExp("^"+Y.call(q).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z(e){return!(!O(e)||L(e))&&(H(e)?G:V).test(I(e))}function X(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=X(e,t);return Z(n)?n:void 0}var et=tt(D,"WeakMap"),nt=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function rt(e,t){var n=typeof e;return!!(t=null==t?nt:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t}function at(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function st(e){return null!=e&&lt(e.length)&&!H(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dt="[object Arguments]";function ht(e){return x(e)&&$(e)==dt}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=jt&&jt.exports===kt,gt=mt?D.Buffer:void 0,wt=gt?gt.isBuffer:void 0,St=wt||yt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Dt="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Ft="[object Number]",Wt="[object Object]",Pt="[object RegExp]",Et="[object Set]",Tt="[object String]",zt="[object WeakMap]",Ht="[object ArrayBuffer]",Kt="[object DataView]",Rt="[object Float32Array]",Lt="[object Float64Array]",Nt="[object Int8Array]",Bt="[object Int16Array]",It="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",Qt="[object Uint32Array]",Yt={};function qt(e){return x(e)&&lt(e.length)&&!!Yt[$(e)]}function Gt(e){return function(t){return e(t)}}Yt[Rt]=Yt[Lt]=Yt[Nt]=Yt[Bt]=Yt[It]=Yt[Ut]=Yt[Vt]=Yt[Jt]=Yt[Qt]=!0,Yt[At]=Yt[Ot]=Yt[Ht]=Yt[$t]=Yt[Kt]=Yt[Dt]=Yt[xt]=Yt[Ct]=Yt[Mt]=Yt[Ft]=Yt[Wt]=Yt[Pt]=Yt[Et]=Yt[Tt]=Yt[zt]=!1;var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Xt&&Xt.exports===Zt,ee=te&&C.process,ne=function(){try{var e=Xt&&Xt.require&&Xt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ie=ne&&ne.isTypedArray,re=ie?Gt(ie):qt,ae=Object.prototype,oe=ae.hasOwnProperty;function le(e,t){var n=M(e),r=!n&&pt(e),a=!n&&!r&&St(e),i=!n&&!r&&!a&&re(e),o=n||r||a||i,l=o?ft(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(n){return e(t(n))}}var ce=se(Object.keys,Object),ue=Object.prototype,fe=ue.hasOwnProperty;function de(e){if(!ut(e))return ce(e);var t=[];for(var n in Object(e))fe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function he(e){return st(e)?le(e):de(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,ke=ye.hasOwnProperty;function je(e){var t=this.__data__;if(ve){var n=t[e];return n===pe?void 0:n}return ke.call(t,e)?t[e]:void 0}var me=Object.prototype,ge=me.hasOwnProperty;function we(e){var t=this.__data__;return ve?void 0!==t[e]:ge.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ve&&void 0===t?Se:t,this}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__=[],this.size=0}function De(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=je,Oe.prototype.has=we,Oe.prototype.set=Ae;var xe=Array.prototype,Ce=xe.splice;function Me(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ce.call(t,n,1),--this.size,!0)}function Fe(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]}function We(e){return De(this.__data__,e)>-1}function Pe(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ee.prototype.clear=$e,Ee.prototype.delete=Me,Ee.prototype.get=Fe,Ee.prototype.has=We,Ee.prototype.set=Pe;var Te=tt(D,"Map");function ze(){this.size=0,this.__data__={hash:new Oe,map:new(Te||Ee),string:new Oe}}function He(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ke(e,t){var n=e.__data__;return He(t)?n["string"==typeof t?"string":"hash"]:n.map}function Re(e){var t=Ke(this,e).delete(e);return this.size-=t?1:0,t}function Le(e){return Ke(this,e).get(e)}function Ne(e){return Ke(this,e).has(e)}function Be(e,t){var n=Ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ue(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function Ve(){this.__data__=new Ee,this.size=0}function Je(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Qe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}Ie.prototype.clear=ze,Ie.prototype.delete=Re,Ie.prototype.get=Le,Ie.prototype.has=Ne,Ie.prototype.set=Be;var qe=200;function Ge(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!Te||r.length<qe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this}function Ze(e){var t=this.__data__=new Ee(e);this.size=t.size}function Xe(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}function tn(){return[]}Ze.prototype.clear=Ve,Ze.prototype.delete=Je,Ze.prototype.get=Qe,Ze.prototype.has=Ye,Ze.prototype.set=Ge;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Xe(rn(e),function(t){return nn.call(e,t)}))}:tn;function on(e,t,n){var r=t(e);return M(e)?r:Ue(r,n(e))}function ln(e){return on(e,he,an)}var sn=tt(D,"DataView"),cn=tt(D,"Promise"),un=tt(D,"Set"),fn="[object Map]",dn="[object Object]",hn="[object Promise]",vn="[object Set]",bn="[object WeakMap]",_n="[object DataView]",pn=I(sn),yn=I(Te),kn=I(cn),jn=I(un),mn=I(et),gn=$;(sn&&gn(new sn(new ArrayBuffer(1)))!=_n||Te&&gn(new Te)!=fn||cn&&gn(cn.resolve())!=hn||un&&gn(new un)!=vn||et&&gn(new et)!=bn)&&(gn=function(e){var t=$(e),n=t==dn?e.constructor:void 0,r=n?I(n):"";if(r)switch(r){case pn:return _n;case yn:return fn;case kn:return hn;case jn:return vn;case mn:return bn}return t});var wn=D.Uint8Array,Sn="__lodash_hash_undefined__";function An(e){return this.__data__.set(e,Sn),this}function On(e){return this.__data__.has(e)}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Dn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xn(e,t){return e.has(t)}$n.prototype.add=$n.prototype.push=An,$n.prototype.has=On;var Cn=1,Mn=2;function Fn(e,t,n,r,a,i){var o=n&Cn,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=n&Mn?new $n:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var _=e[d],v=t[d];if(r)var f=o?r(v,_,d,t,e,i):r(_,v,d,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!Dn(t,function(e,t){if(!xn(b,t)&&(_===e||a(_,e,n,r,i)))return b.push(t)})){u=!1;break}}else if(_!==v&&!a(_,v,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Wn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var En=1,Tn=2,zn="[object Boolean]",Hn="[object Date]",Kn="[object Error]",Rn="[object Map]",Ln="[object Number]",Nn="[object RegExp]",Bn="[object Set]",In="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",Jn="[object DataView]",Qn=F?F.prototype:void 0,Yn=Qn?Qn.valueOf:void 0;function qn(e,t,n,r,a,i,o){switch(n){case Jn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case zn:case Hn:case Ln:return at(+e,+t);case Kn:return e.name==t.name&&e.message==t.message;case Nn:case In:return e==t+"";case Rn:var l=Wn;case Bn:var s=r&En;if(l||(l=Pn),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Tn,o.set(e,t);var h=Fn(l(e),l(t),r,a,i,o);return o.delete(e),h;case Un:if(Yn)return Yn.call(e)==Yn.call(t)}return!1}var Gn=1,Zn=Object.prototype,Xn=Zn.hasOwnProperty;function ti(e,t,n,r,a,i){var o=n&Gn,l=ln(e),s=l.length;if(s!=ln(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Xn.call(t,h)))return!1}var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var b=!0;i.set(e,t),i.set(t,e);for(var _=o;++c<s;){var v=e[h=l[c]],f=t[h];if(r)var p=o?r(f,v,h,t,e,i):r(v,f,h,e,t,i);if(!(void 0===p?v===f||a(v,f,n,r,i):p)){b=!1;break}_||(_="constructor"==h)}if(b&&!_){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 i.delete(e),i.delete(t),b}var ei=1,ni="[object Arguments]",ii="[object Array]",ri="[object Object]",ai=Object.prototype,oi=ai.hasOwnProperty;function li(e,t,n,r,a,i){var o=M(e),l=M(t),s=o?ii:gn(e),c=l?ii:gn(t),h=(s=s==ni?ri:s)==ri,d=(c=c==ni?ri:c)==ri,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return i||(i=new Ze),o||re(e)?Fn(e,t,n,r,a,i):qn(e,t,s,n,r,a,i);if(!(n&ei)){var b=h&&oi.call(e,"__wrapped__"),_=d&&oi.call(t,"__wrapped__");if(b||_){var v=b?e.value():e,f=_?t.value():t;return i||(i=new Ze),a(v,f,n,r,i)}}return!!u&&(i||(i=new Ze),ti(e,t,n,r,a,i))}function si(e,t,n,r,a){return e===t||(null==e||null==t||!x(e)&&!x(t)?e!=e&&t!=t:li(e,t,n,r,si,a))}function ci(e,t){return si(e,t)}const ui=/^\d+(\.\d+)?([a-z]+|%)?$/,fi=(e,t,n)=>{h(e,"_minWidth",e=>"string"==typeof e&&ui.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,n)},di=class{constructor(n){t(this,n),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,n,a,i=!1)=>{var o,l;let s=String(n);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:r("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${s}`},this.renderSelectionCell(t,n),t.map((e,t)=>this.renderTableCell(e,n,t,a)))},this.renderTableCell=(t,n,a,i)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${n}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:n}`:l}if(t.headerCell)return this.renderHeadingCell(t,n,a,i);{const n="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":n?"false":void 0,"aria-live":n?"polite":void 0,"aria-relevant":n?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){W(this,e),ci(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){fi(this,e)}validateOn(e){y(this,e)}validateSelection(e){k(this,e)}validateTableSettings(e){j(this,this.normalizeTableSettings(e))}normalizeTableSettings(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e.columns)?e.columns:[];return Object.assign(Object.assign({},e),{columns:t.map(({hidable:e,key:t,label:n,resizable:r,sortable:a,visible:i,width:o})=>({hidable:!1!==e,key:null!=t?t:w(),label:n,resizable:!1!==r,sortable:!1!==a,visible:!1!==i,width:o}))})}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const n=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(n);r>-1&&(e.preventDefault(),"ArrowDown"===e.key?(r=(r+1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()):"ArrowUp"===e.key&&(e.preventDefault(),r=(r+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){v(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,w())}),this.dataToKeyMap.forEach((t,n)=>{e.includes(n)||this.dataToKeyMap.delete(n)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const n=e.render(t,e,e.data,this.state._data);"string"==typeof n&&(t.textContent=n)}})))}getNumberOfCols(e,t){let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.colSpan)&&void 0!==n?n:1}),n<t&&(n=t)}),0===n&&(n=t.length),n}getNumberOfRows(e,t){var n;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.rowSpan)&&void 0!==n?n:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0,r}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,n;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(n=e.vertical)&&void 0!==n?n:[]),r.length>0&&(this.horizontal=!1)),r}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e,n)=>{t.set(e.key,n)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return e.map((e,t)=>({column:e,index:t})).sort((e,n)=>{var r,a,i,o;const l=null!==(a=t.get(null!==(r=e.column.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER,s=null!==(o=t.get(null!==(i=n.column.key)&&void 0!==i?i:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER;return l!==s?l-s:e.index-n.index}).map(({column:e})=>e)}createDataField(e,t,n){var r;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),i=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;n&&(l=o,o+=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=this.sortByColumnPosition(a);for(let r=l;r<o;r++){const a=[];t.vertical.forEach((e,t)=>{let n=0;if(h[t].forEach(e=>n+=e),n<=r){const i=e[r-n+c[t]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{headerCell:!0,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),h[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let n=1;n<i.colSpan;n++)h[t+n].push(e);c[t]++}}});for(let t=0;t<i;t++)if(!0===this.horizontal){const i=n&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof i||null===i||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:i,label:i[d[t].key],rowSpan:void 0}))}else"object"!=typeof d[r]||null===d[r]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[r].key&&"function"!=typeof d[r].render||a.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(a)}if(0===e.length){let e=0,n=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=>{n+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(n,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[g.onSelectionChange])&&this.state._on[g.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map(e=>{var t;return{hidable:!1!==e.hidable,sortable:!1!==e.sortable,resizable:!1!==e.resizable,key:null!==(t=e.key)&&void 0!==t?t:w(),label:e.label,visible:!0}})}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,n){var i;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(i=t[0])||void 0===i?void 0:i.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),_=l.label(c),v={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":_};return e("td",{key:`tbody-${n}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(u?"codicon-check":""),_label:""}),e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},v,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),n=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},v,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,h)}}))),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:_})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find(t=>t.key===e.key)}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 n;const r=null===(n=this.state._selection)||void 0===n?void 0:n.disabledKeys;return!(void 0===r?[]:Array.isArray(r)?r:[r]).some(n=>String(n)===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 n=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[n])),r}getTableMinWidth(){var e,t;const n=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var n;return e+(null!==(n=t.width)&&void 0!==n?n:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${n}ch`:`max(${this.state._minWidth}, ${n}ch)`}renderHeadingSelectionCell(){var t,n;const i=this.state._selection;if(!i)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===i.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(n=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==n?n:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(h?"codicon-remove":s?"codicon-check":""),_label:""}),e("input",{class:r("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(n,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&e("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(t,n,a,i){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";const s=!1!==(null==o?void 0:o.sortable),c="string"==typeof t.sortDirection,h=s&&c;let d="none",u="codicon codicon-fold";if(h&&t.sortDirection)switch(t.sortDirection){case"ASC":u="codicon codicon-chevron-up",d="ascending";break;case"DESC":u="codicon codicon-chevron-down",d="descending";break;default:d="none"}const b=i?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${n}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${d}`]:d}),scope:b,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":d,"data-sort":h&&t.sortDirection?`sort-${t.sortDirection}`:void 0},h&&t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:u},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,n){var a,i;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(i=null==n?void 0:n[0])||void 0===i?void 0:i.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:r("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:r(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}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(){var t;const n=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=null===(t=this.state._headerCells.horizontal)||void 0===t?void 0:t.map(e=>this.sortByColumnPosition(e));return e("div",{key:"1f0adb61afdc857e0d9de0ad655faf448a20be3d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"36b454f962865b55291247f5487b675b16cf88c1",_tableSettings:this.state._tableSettings}),e("div",{key:"29ff06a4ca73b2803504a2e18d68a9f64bc384f1",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"c9de76b0f7de90c3d9504d7e6fd85d1e6df79552",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"cf64871e281a940f51f15c8e40d40c2b91cd472e",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"4a51fd96ca4db200017474f7ee205b7e294ba6ca",class:"kol-table__head"},[r.map((t,n)=>e("tr",{class:"kol-table__head-row",key:`thead-${n}`},this.state._selection&&this.renderHeadingSelectionCell(),0===n&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,n,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"56cc265a667f836f4952946afb4484ebca51fd80",class:"kol-table__body"},n.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return i(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{di as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as n,g as i}from"./index-BIF3a06U.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as a,a as o,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-C5ifExT3.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-Dd0zJQbD.js";import{b,v as _,a as p,f as y,c as k,e as j}from"./table-settings-DxLvhwRE.js";import{v as m}from"./label-Dnmzb2S_.js";import{C as g}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-CMwuN6qh.js";import{d as S,K as A}from"./events-9-skLO0f.js";import{i as O,c as $,r as D,a as x,f as C,b as M,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const W=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>"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)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})};var P="[object AsyncFunction]",E="[object Function]",T="[object GeneratorFunction]",z="[object Proxy]";function K(e){if(!O(e))return!1;var t=$(e);return t==E||t==T||t==P||t==z}var R=D["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L(e){return!!H&&H in e}var N=Function.prototype,B=N.toString;function I(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,q=Function.prototype,J=Object.prototype,G=q.toString,Q=J.hasOwnProperty,Y=RegExp("^"+G.call(Q).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z(e){return!(!O(e)||L(e))&&(K(e)?Y:V).test(I(e))}function X(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=X(e,t);return Z(n)?n:void 0}var et=tt(D,"WeakMap"),nt=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function rt(e,t){var n=typeof e;return!!(t=null==t?nt:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t}function at(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function st(e){return null!=e&&lt(e.length)&&!K(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dt="[object Arguments]";function ht(e){return x(e)&&$(e)==dt}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=jt&&jt.exports===kt,gt=mt?D.Buffer:void 0,wt=gt?gt.isBuffer:void 0,St=wt||yt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Dt="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Ft="[object Number]",Wt="[object Object]",Pt="[object RegExp]",Et="[object Set]",Tt="[object String]",zt="[object WeakMap]",Kt="[object ArrayBuffer]",Rt="[object DataView]",Ht="[object Float32Array]",Lt="[object Float64Array]",Nt="[object Int8Array]",Bt="[object Int16Array]",It="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",qt="[object Uint16Array]",Jt="[object Uint32Array]",Gt={};function Qt(e){return x(e)&&lt(e.length)&&!!Gt[$(e)]}function Yt(e){return function(t){return e(t)}}Gt[Ht]=Gt[Lt]=Gt[Nt]=Gt[Bt]=Gt[It]=Gt[Ut]=Gt[Vt]=Gt[qt]=Gt[Jt]=!0,Gt[At]=Gt[Ot]=Gt[Kt]=Gt[$t]=Gt[Rt]=Gt[Dt]=Gt[xt]=Gt[Ct]=Gt[Mt]=Gt[Ft]=Gt[Wt]=Gt[Pt]=Gt[Et]=Gt[Tt]=Gt[zt]=!1;var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Xt&&Xt.exports===Zt,ee=te&&C.process,ne=function(){try{var e=Xt&&Xt.require&&Xt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ie=ne&&ne.isTypedArray,re=ie?Yt(ie):Qt,ae=Object.prototype,oe=ae.hasOwnProperty;function le(e,t){var n=M(e),r=!n&&pt(e),a=!n&&!r&&St(e),i=!n&&!r&&!a&&re(e),o=n||r||a||i,l=o?ft(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(n){return e(t(n))}}var ce=se(Object.keys,Object),ue=Object.prototype,fe=ue.hasOwnProperty;function de(e){if(!ut(e))return ce(e);var t=[];for(var n in Object(e))fe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function he(e){return st(e)?le(e):de(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,ke=ye.hasOwnProperty;function je(e){var t=this.__data__;if(ve){var n=t[e];return n===pe?void 0:n}return ke.call(t,e)?t[e]:void 0}var me=Object.prototype,ge=me.hasOwnProperty;function we(e){var t=this.__data__;return ve?void 0!==t[e]:ge.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ve&&void 0===t?Se:t,this}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__=[],this.size=0}function De(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=je,Oe.prototype.has=we,Oe.prototype.set=Ae;var xe=Array.prototype,Ce=xe.splice;function Me(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ce.call(t,n,1),--this.size,!0)}function Fe(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]}function We(e){return De(this.__data__,e)>-1}function Pe(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ee.prototype.clear=$e,Ee.prototype.delete=Me,Ee.prototype.get=Fe,Ee.prototype.has=We,Ee.prototype.set=Pe;var Te=tt(D,"Map");function ze(){this.size=0,this.__data__={hash:new Oe,map:new(Te||Ee),string:new Oe}}function Ke(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map}function He(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Le(e){return Re(this,e).get(e)}function Ne(e){return Re(this,e).has(e)}function Be(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ue(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function Ve(){this.__data__=new Ee,this.size=0}function qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Je(e){return this.__data__.get(e)}function Ge(e){return this.__data__.has(e)}Ie.prototype.clear=ze,Ie.prototype.delete=He,Ie.prototype.get=Le,Ie.prototype.has=Ne,Ie.prototype.set=Be;var Qe=200;function Ye(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!Te||r.length<Qe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this}function Ze(e){var t=this.__data__=new Ee(e);this.size=t.size}function Xe(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}function tn(){return[]}Ze.prototype.clear=Ve,Ze.prototype.delete=qe,Ze.prototype.get=Je,Ze.prototype.has=Ge,Ze.prototype.set=Ye;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Xe(rn(e),function(t){return nn.call(e,t)}))}:tn;function on(e,t,n){var r=t(e);return M(e)?r:Ue(r,n(e))}function ln(e){return on(e,he,an)}var sn=tt(D,"DataView"),cn=tt(D,"Promise"),un=tt(D,"Set"),fn="[object Map]",dn="[object Object]",hn="[object Promise]",vn="[object Set]",bn="[object WeakMap]",_n="[object DataView]",pn=I(sn),yn=I(Te),kn=I(cn),jn=I(un),mn=I(et),gn=$;(sn&&gn(new sn(new ArrayBuffer(1)))!=_n||Te&&gn(new Te)!=fn||cn&&gn(cn.resolve())!=hn||un&&gn(new un)!=vn||et&&gn(new et)!=bn)&&(gn=function(e){var t=$(e),n=t==dn?e.constructor:void 0,r=n?I(n):"";if(r)switch(r){case pn:return _n;case yn:return fn;case kn:return hn;case jn:return vn;case mn:return bn}return t});var wn=D.Uint8Array,Sn="__lodash_hash_undefined__";function An(e){return this.__data__.set(e,Sn),this}function On(e){return this.__data__.has(e)}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Dn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xn(e,t){return e.has(t)}$n.prototype.add=$n.prototype.push=An,$n.prototype.has=On;var Cn=1,Mn=2;function Fn(e,t,n,r,a,i){var o=n&Cn,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=n&Mn?new $n:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,i):r(v,_,d,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!Dn(t,function(e,t){if(!xn(b,t)&&(v===e||a(v,e,n,r,i)))return b.push(t)})){u=!1;break}}else if(v!==_&&!a(v,_,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Wn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var En=1,Tn=2,zn="[object Boolean]",Kn="[object Date]",Rn="[object Error]",Hn="[object Map]",Ln="[object Number]",Nn="[object RegExp]",Bn="[object Set]",In="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",qn="[object DataView]",Jn=F?F.prototype:void 0,Gn=Jn?Jn.valueOf:void 0;function Qn(e,t,n,r,a,i,o){switch(n){case qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case zn:case Kn:case Ln:return at(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Nn:case In:return e==t+"";case Hn:var l=Wn;case Bn:var s=r&En;if(l||(l=Pn),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Tn,o.set(e,t);var h=Fn(l(e),l(t),r,a,i,o);return o.delete(e),h;case Un:if(Gn)return Gn.call(e)==Gn.call(t)}return!1}var Yn=1,Zn=Object.prototype,Xn=Zn.hasOwnProperty;function ti(e,t,n,r,a,i){var o=n&Yn,l=ln(e),s=l.length;if(s!=ln(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Xn.call(t,h)))return!1}var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var b=!0;i.set(e,t),i.set(t,e);for(var v=o;++c<s;){var _=e[h=l[c]],f=t[h];if(r)var p=o?r(f,_,h,t,e,i):r(_,f,h,e,t,i);if(!(void 0===p?_===f||a(_,f,n,r,i):p)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){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 i.delete(e),i.delete(t),b}var ei=1,ni="[object Arguments]",ii="[object Array]",ri="[object Object]",ai=Object.prototype,oi=ai.hasOwnProperty;function li(e,t,n,r,a,i){var o=M(e),l=M(t),s=o?ii:gn(e),c=l?ii:gn(t),h=(s=s==ni?ri:s)==ri,d=(c=c==ni?ri:c)==ri,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return i||(i=new Ze),o||re(e)?Fn(e,t,n,r,a,i):Qn(e,t,s,n,r,a,i);if(!(n&ei)){var b=h&&oi.call(e,"__wrapped__"),v=d&&oi.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return i||(i=new Ze),a(_,f,n,r,i)}}return!!u&&(i||(i=new Ze),ti(e,t,n,r,a,i))}function si(e,t,n,r,a){return e===t||(null==e||null==t||!x(e)&&!x(t)?e!=e&&t!=t:li(e,t,n,r,si,a))}function ci(e,t){return si(e,t)}const ui=/^\d+(\.\d+)?([a-z]+|%)?$/,fi=(e,t,n)=>{h(e,"_minWidth",e=>"string"==typeof e&&ui.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,n)},di=class{constructor(n){t(this,n),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,n,a,i=!1)=>{var o,l;let s=String(n);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:r("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${s}`},this.renderSelectionCell(t,n),t.map((e,t)=>this.renderTableCell(e,n,t,a)))},this.renderTableCell=(t,n,a,i)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${n}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:n}`:l}if(t.headerCell)return this.renderHeadingCell(t,n,a,i);{const n="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":n?"false":void 0,"aria-live":n?"polite":void 0,"aria-relevant":n?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){W(this,e),ci(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){fi(this,e)}validateOn(e){y(this,e)}validateSelection(e){k(this,e)}validateTableSettings(e){j(this,this.normalizeTableSettings(e))}normalizeTableSettings(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e.columns)?e.columns:[];return Object.assign(Object.assign({},e),{columns:t.map(({hidable:e,key:t,label:n,resizable:r,sortable:a,visible:i,width:o})=>({hidable:!1!==e,key:null!=t?t:w(),label:n,resizable:!1!==r,sortable:!1!==a,visible:!1!==i,width:o}))})}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const n=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(n);r>-1&&(e.preventDefault(),"ArrowDown"===e.key?(r=(r+1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()):"ArrowUp"===e.key&&(e.preventDefault(),r=(r+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){v(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,w())}),this.dataToKeyMap.forEach((t,n)=>{e.includes(n)||this.dataToKeyMap.delete(n)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const n=e.render(t,e,e.data,this.state._data);"string"==typeof n&&(t.textContent=n)}})))}getNumberOfCols(e,t){let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.colSpan)&&void 0!==n?n:1}),n<t&&(n=t)}),0===n&&(n=t.length),n}getNumberOfRows(e,t){var n;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.rowSpan)&&void 0!==n?n:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0,r}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,n;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(n=e.vertical)&&void 0!==n?n:[]),r.length>0&&(this.horizontal=!1)),r}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e,n)=>{t.set(e.key,n)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return e.map((e,t)=>({column:e,index:t})).sort((e,n)=>{var r,a,i,o;const l=null!==(a=t.get(null!==(r=e.column.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER,s=null!==(o=t.get(null!==(i=n.column.key)&&void 0!==i?i:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER;return l!==s?l-s:e.index-n.index}).map(({column:e})=>e)}createDataField(e,t,n){var r;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),i=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;n&&(l=o,o+=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=this.sortByColumnPosition(a);for(let r=l;r<o;r++){const a=[];t.vertical.forEach((e,t)=>{let n=0;if(h[t].forEach(e=>n+=e),n<=r){const i=e[r-n+c[t]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{headerCell:!0,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),h[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let n=1;n<i.colSpan;n++)h[t+n].push(e);c[t]++}}});for(let t=0;t<i;t++)if(!0===this.horizontal){const i=n&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof i||null===i||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:i,label:i[d[t].key],rowSpan:void 0}))}else"object"!=typeof d[r]||null===d[r]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[r].key&&"function"!=typeof d[r].render||a.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(a)}if(0===e.length){let e=0,n=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=>{n+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(n,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[g.onSelectionChange])&&this.state._on[g.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map(e=>{var t;return{hidable:!1!==e.hidable,sortable:!1!==e.sortable,resizable:!1!==e.resizable,key:null!==(t=e.key)&&void 0!==t?t:w(),label:e.label,visible:!0}})}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,n){var i;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(i=t[0])||void 0===i?void 0:i.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),v=l.label(c),_={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":v};return e("td",{key:`tbody-${n}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(u?"codicon-check":""),_label:""}),e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},_,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),n=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},_,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,h)}}))),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:v})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find(t=>t.key===e.key)}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 n;const r=null===(n=this.state._selection)||void 0===n?void 0:n.disabledKeys;return!(void 0===r?[]:Array.isArray(r)?r:[r]).some(n=>String(n)===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 n=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[n])),r}getTableMinWidth(){var e,t;const n=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var n;return e+(null!==(n=t.width)&&void 0!==n?n:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${n}ch`:`max(${this.state._minWidth}, ${n}ch)`}renderHeadingSelectionCell(){var t,n;const i=this.state._selection;if(!i)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===i.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(n=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==n?n:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(h?"codicon-remove":s?"codicon-check":""),_label:""}),e("input",{class:r("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(n,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&e("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(t,n,a,i){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";const s=!1!==(null==o?void 0:o.sortable),c="string"==typeof t.sortDirection,h=s&&c;let d="none",u="codicon codicon-fold";if(h&&t.sortDirection)switch(t.sortDirection){case"ASC":u="codicon codicon-chevron-up",d="ascending";break;case"DESC":u="codicon codicon-chevron-down",d="descending";break;default:d="none"}const b=i?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${n}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${d}`]:d}),scope:b,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":d,"data-sort":h&&t.sortDirection?`sort-${t.sortDirection}`:void 0},h&&t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:u},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,n){var a,i;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(i=null==n?void 0:n[0])||void 0===i?void 0:i.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:r("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:r(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}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(){var t;const n=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=null===(t=this.state._headerCells.horizontal)||void 0===t?void 0:t.map(e=>this.sortByColumnPosition(e));return e("div",{key:"1f0adb61afdc857e0d9de0ad655faf448a20be3d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"36b454f962865b55291247f5487b675b16cf88c1",_tableSettings:this.state._tableSettings}),e("div",{key:"29ff06a4ca73b2803504a2e18d68a9f64bc384f1",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"c9de76b0f7de90c3d9504d7e6fd85d1e6df79552",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"cf64871e281a940f51f15c8e40d40c2b91cd472e",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"4a51fd96ca4db200017474f7ee205b7e294ba6ca",class:"kol-table__head"},[r.map((t,n)=>e("tr",{class:"kol-table__head-row",key:`thead-${n}`},this.state._selection&&this.renderHeadingSelectionCell(),0===n&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,n,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"56cc265a667f836f4952946afb4484ebca51fd80",class:"kol-table__body"},n.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return i(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{di 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-pomHlJYE.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-Dd0zJQbD.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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\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 margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\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 width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\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 width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--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 width: calc(var(--a11y-min-size) / 2);\n 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:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
4
+ import{r as n,h as e}from"./index-BIF3a06U.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-Dd0zJQbD.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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\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 margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\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 width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\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 width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--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 width: calc(var(--a11y-min-size) / 2);\n 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:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_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 t,h as n,g as e}from"./index-pomHlJYE.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-Dd0zJQbD.js";import{v as c}from"./align-D-ifSKu8.js";import{v as u}from"./label-Dnmzb2S_.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as p}from"./component-names-CkE54Ym7.js";import{t as b}from"./i18n-C5ifExT3.js";import{K as m}from"./keyboard-D6PoWr38.js";import{d as g,K as y}from"./events-9-skLO0f.js";import"./i18n-ZF6JbdVP.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* 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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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-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}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${b("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"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((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.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(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(p,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(p,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("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(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
4
+ import{r as t,h as n,g as e}from"./index-BIF3a06U.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-Dd0zJQbD.js";import{v as c}from"./align-D-ifSKu8.js";import{v as u}from"./label-Dnmzb2S_.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as b}from"./component-names-CkE54Ym7.js";import{t as p}from"./i18n-C5ifExT3.js";import{K as m}from"./keyboard-D6PoWr38.js";import{d as g,K as y}from"./events-9-skLO0f.js";import"./i18n-ZF6JbdVP.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* 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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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-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}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${p("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"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((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.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(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(b,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(b,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("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(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};