@public-ui/components 3.0.9 → 3.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/custom-elements.json +198 -58
  2. package/dist/cjs/{Alert-yK5O3Czw.js → Alert-Bj1BTIEj.js} +1 -1
  3. package/dist/cjs/{Alert-yK5O3Czw.js.map → Alert-Bj1BTIEj.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-D7cLN0gZ.js → Collapsible-aA771eR4.js} +1 -1
  5. package/dist/cjs/{Collapsible-D7cLN0gZ.js.map → Collapsible-aA771eR4.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsOptionsGroup-C9tnqFEC.js → CustomSuggestionsOptionsGroup-cTHRZeAc.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-C9tnqFEC.js.map → CustomSuggestionsOptionsGroup-cTHRZeAc.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-BndGLHWe.js → FieldControlStateWrapper-Cyr_zzt3.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-BndGLHWe.js.map → FieldControlStateWrapper-Cyr_zzt3.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-Ci-xqnPO.js → FormFieldStateWrapper-B2LPpMpo.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-Ci-xqnPO.js.map → FormFieldStateWrapper-B2LPpMpo.js.map} +1 -1
  12. package/dist/cjs/{Heading-CqQULYGY.js → Heading-BZTrj6_i.js} +1 -1
  13. package/dist/cjs/{Heading-CqQULYGY.js.map → Heading-BZTrj6_i.js.map} +1 -1
  14. package/dist/cjs/Icon-B9T-4CsE.js +4 -0
  15. package/dist/cjs/{Icon-B7eZlK-8.js.map → Icon-B9T-4CsE.js.map} +1 -1
  16. package/dist/cjs/Input-BCYP3Fc4.js +4 -0
  17. package/dist/cjs/{Input-mtjTLTjx.js.map → Input-BCYP3Fc4.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-BIdMwlc6.js → InputStateWrapper-uvFi_BbH.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-BIdMwlc6.js.map → InputStateWrapper-uvFi_BbH.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-LsIWMiab.js → InternalUnderlinedBadgeText-uCh_T5VD.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-LsIWMiab.js.map → InternalUnderlinedBadgeText-uCh_T5VD.js.map} +1 -1
  22. package/dist/cjs/{Span-DTJLZZaX.js → Span-BkNklKcs.js} +1 -1
  23. package/dist/cjs/{Span-DTJLZZaX.js.map → Span-BkNklKcs.js.map} +1 -1
  24. package/dist/cjs/{app-globals-D_CB5fBM.js → app-globals-CXoEHCxk.js} +1 -1
  25. package/dist/cjs/{app-globals-D_CB5fBM.js.map → app-globals-CXoEHCxk.js.map} +1 -1
  26. package/dist/cjs/{controller-J4uWpItR.js → controller-DLwQQPHC.js} +1 -1
  27. package/dist/cjs/{controller-J4uWpItR.js.map → controller-DLwQQPHC.js.map} +1 -1
  28. package/dist/cjs/{controller-MB5hkl-U.js → controller-DmfL38P4.js} +1 -1
  29. package/dist/cjs/{controller-MB5hkl-U.js.map → controller-DmfL38P4.js.map} +1 -1
  30. package/dist/cjs/{controller-01_8sWT5.js → controller-LxYfXuho.js} +1 -1
  31. package/dist/cjs/{controller-01_8sWT5.js.map → controller-LxYfXuho.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-CAY0twi1.js → controller-icon-9udvsM5R.js} +1 -1
  33. package/dist/cjs/{controller-icon-CAY0twi1.js.map → controller-icon-9udvsM5R.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-L6CxXgBo.js → dev.utils-fZEgoGGu.js} +1 -1
  35. package/dist/cjs/{dev.utils-L6CxXgBo.js.map → dev.utils-fZEgoGGu.js.map} +1 -1
  36. package/dist/cjs/{devtools-Dog2hvvL.js → devtools-yltf149z.js} +1 -1
  37. package/dist/cjs/{devtools-Dog2hvvL.js.map → devtools-yltf149z.js.map} +1 -1
  38. package/dist/cjs/index-uT47A9Jc.js +4 -0
  39. package/dist/cjs/index-uT47A9Jc.js.map +1 -0
  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-accordion.entry.cjs.js.map +1 -1
  43. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-badge.entry.cjs.js.map +1 -1
  49. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-button-link.entry.cjs.js.map +1 -1
  52. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  54. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-button.entry.cjs.js.map +1 -1
  56. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-combobox.entry.cjs.js.map +1 -1
  60. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-details.entry.cjs.js.map +1 -1
  62. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
  69. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-color.entry.cjs.js.map +1 -1
  71. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-date.entry.cjs.js.map +1 -1
  73. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-email.entry.cjs.js.map +1 -1
  75. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-file.entry.cjs.js.map +1 -1
  77. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-number.entry.cjs.js.map +1 -1
  79. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-password.entry.cjs.js.map +1 -1
  81. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-radio.entry.cjs.js.map +1 -1
  83. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-range.entry.cjs.js.map +1 -1
  85. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-input-text.entry.cjs.js.map +1 -1
  87. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-button.entry.cjs.js.map +1 -1
  90. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  92. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  94. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-popover-button-wc.entry.cjs.js.map +1 -1
  100. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-popover-button.entry.cjs.js.map +1 -1
  102. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-select-wc.entry.cjs.js.map +1 -1
  107. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-select.entry.cjs.js.map +1 -1
  109. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-single-select.entry.cjs.js.map +1 -1
  111. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-skip-nav.entry.cjs.js.map +1 -1
  113. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-split-button.entry.cjs.js.map +1 -1
  116. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  122. package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
  123. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-toolbar.entry.cjs.js.map +1 -1
  126. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tooltip-wc.entry.cjs.js.map +1 -1
  128. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-tree-item-wc.entry.cjs.js.map +1 -1
  130. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-tree-item.entry.cjs.js.map +1 -1
  132. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-tree-wc.entry.cjs.js.map +1 -1
  134. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  135. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  136. package/dist/cjs/kolibri.cjs.js +1 -1
  137. package/dist/cjs/loader.cjs.js +1 -1
  138. package/dist/cjs/test-component.cjs.entry.js +1 -1
  139. package/dist/components/kol-accordion.js +1 -1
  140. package/dist/components/kol-accordion.js.map +1 -1
  141. package/dist/components/kol-badge.js +1 -1
  142. package/dist/components/kol-badge.js.map +1 -1
  143. package/dist/components/kol-button-link.js +1 -1
  144. package/dist/components/kol-button-link.js.map +1 -1
  145. package/dist/components/kol-button-wc.js +1 -1
  146. package/dist/components/kol-button-wc.js.map +1 -1
  147. package/dist/components/kol-button.js +1 -1
  148. package/dist/components/kol-button.js.map +1 -1
  149. package/dist/components/kol-combobox.js +1 -1
  150. package/dist/components/kol-combobox.js.map +1 -1
  151. package/dist/components/kol-details.js +1 -1
  152. package/dist/components/kol-details.js.map +1 -1
  153. package/dist/components/kol-input-checkbox.js +1 -1
  154. package/dist/components/kol-input-checkbox.js.map +1 -1
  155. package/dist/components/kol-input-color.js +1 -1
  156. package/dist/components/kol-input-color.js.map +1 -1
  157. package/dist/components/kol-input-date.js +1 -1
  158. package/dist/components/kol-input-date.js.map +1 -1
  159. package/dist/components/kol-input-email.js +1 -1
  160. package/dist/components/kol-input-email.js.map +1 -1
  161. package/dist/components/kol-input-file.js +1 -1
  162. package/dist/components/kol-input-file.js.map +1 -1
  163. package/dist/components/kol-input-number.js +1 -1
  164. package/dist/components/kol-input-number.js.map +1 -1
  165. package/dist/components/kol-input-password.js +1 -1
  166. package/dist/components/kol-input-password.js.map +1 -1
  167. package/dist/components/kol-input-radio.js +1 -1
  168. package/dist/components/kol-input-radio.js.map +1 -1
  169. package/dist/components/kol-input-range.js +1 -1
  170. package/dist/components/kol-input-range.js.map +1 -1
  171. package/dist/components/kol-input-text.js +1 -1
  172. package/dist/components/kol-input-text.js.map +1 -1
  173. package/dist/components/kol-link-button.js +1 -1
  174. package/dist/components/kol-link-button.js.map +1 -1
  175. package/dist/components/kol-link-wc.js +1 -1
  176. package/dist/components/kol-link-wc.js.map +1 -1
  177. package/dist/components/kol-link.js +1 -1
  178. package/dist/components/kol-link.js.map +1 -1
  179. package/dist/components/kol-popover-button-wc.js +1 -1
  180. package/dist/components/kol-popover-button-wc.js.map +1 -1
  181. package/dist/components/kol-popover-button.js +1 -1
  182. package/dist/components/kol-popover-button.js.map +1 -1
  183. package/dist/components/kol-select-wc.js +1 -1
  184. package/dist/components/kol-select-wc.js.map +1 -1
  185. package/dist/components/kol-select.js +1 -1
  186. package/dist/components/kol-select.js.map +1 -1
  187. package/dist/components/kol-single-select.js +1 -1
  188. package/dist/components/kol-single-select.js.map +1 -1
  189. package/dist/components/kol-skip-nav.js +1 -1
  190. package/dist/components/kol-skip-nav.js.map +1 -1
  191. package/dist/components/kol-split-button.js +1 -1
  192. package/dist/components/kol-split-button.js.map +1 -1
  193. package/dist/components/kol-textarea.js +1 -1
  194. package/dist/components/kol-textarea.js.map +1 -1
  195. package/dist/components/kol-toolbar.js +1 -1
  196. package/dist/components/kol-toolbar.js.map +1 -1
  197. package/dist/components/kol-tooltip-wc.js.map +1 -1
  198. package/dist/components/kol-tree-item-wc.js +1 -1
  199. package/dist/components/kol-tree-item-wc.js.map +1 -1
  200. package/dist/components/kol-tree-item.js +1 -1
  201. package/dist/components/kol-tree-item.js.map +1 -1
  202. package/dist/components/kol-tree-wc.js +1 -1
  203. package/dist/components/kol-tree-wc.js.map +1 -1
  204. package/dist/esm/{Alert-CTUp0cq0.js → Alert-DFxK42_b.js} +1 -1
  205. package/dist/{kolibri/Alert-CTUp0cq0.js.map → esm/Alert-DFxK42_b.js.map} +1 -1
  206. package/dist/esm/{Collapsible-Ba8Es2h0.js → Collapsible-CaNCj17a.js} +1 -1
  207. package/dist/esm/{Collapsible-Ba8Es2h0.js.map → Collapsible-CaNCj17a.js.map} +1 -1
  208. package/dist/esm/{CustomSuggestionsOptionsGroup-reBf5IMI.js → CustomSuggestionsOptionsGroup-BElrEzPg.js} +1 -1
  209. package/dist/{kolibri/CustomSuggestionsOptionsGroup-reBf5IMI.js.map → esm/CustomSuggestionsOptionsGroup-BElrEzPg.js.map} +1 -1
  210. package/dist/esm/{FieldControlStateWrapper-eQU8K11B.js → FieldControlStateWrapper-BQEssIZt.js} +1 -1
  211. package/dist/{kolibri/FieldControlStateWrapper-eQU8K11B.js.map → esm/FieldControlStateWrapper-BQEssIZt.js.map} +1 -1
  212. package/dist/esm/{FormFieldStateWrapper-BJBSoSm4.js → FormFieldStateWrapper-Bs6adxNw.js} +1 -1
  213. package/dist/esm/{FormFieldStateWrapper-BJBSoSm4.js.map → FormFieldStateWrapper-Bs6adxNw.js.map} +1 -1
  214. package/dist/esm/{Heading-CNBuBGfU.js → Heading-DqCQ4tvo.js} +1 -1
  215. package/dist/{kolibri/Heading-CNBuBGfU.js.map → esm/Heading-DqCQ4tvo.js.map} +1 -1
  216. package/dist/esm/{Icon-BIONJyds.js → Icon-qDQ9VVcv.js} +1 -1
  217. package/dist/esm/{Icon-BIONJyds.js.map → Icon-qDQ9VVcv.js.map} +1 -1
  218. package/dist/esm/{Input-ADoBQY-0.js → Input-WOVJOXlM.js} +1 -1
  219. package/dist/esm/{Input-ADoBQY-0.js.map → Input-WOVJOXlM.js.map} +1 -1
  220. package/dist/esm/{InputStateWrapper-B4faUnuS.js → InputStateWrapper-C9u4kUR_.js} +1 -1
  221. package/dist/esm/{InputStateWrapper-B4faUnuS.js.map → InputStateWrapper-C9u4kUR_.js.map} +1 -1
  222. package/dist/esm/{InternalUnderlinedBadgeText-CZdqjm5O.js → InternalUnderlinedBadgeText-CNjTZsLo.js} +1 -1
  223. package/dist/esm/{InternalUnderlinedBadgeText-CZdqjm5O.js.map → InternalUnderlinedBadgeText-CNjTZsLo.js.map} +1 -1
  224. package/dist/esm/{Span-BJ04za7v.js → Span-CgBP4Uo5.js} +1 -1
  225. package/dist/{kolibri/Span-BJ04za7v.js.map → esm/Span-CgBP4Uo5.js.map} +1 -1
  226. package/dist/esm/{app-globals-CcbjA63Q.js → app-globals-C1JBLIBF.js} +1 -1
  227. package/dist/esm/{app-globals-CcbjA63Q.js.map → app-globals-C1JBLIBF.js.map} +1 -1
  228. package/dist/esm/{controller-BzHt83jm.js → controller-CHfpEwXt.js} +1 -1
  229. package/dist/esm/{controller-BzHt83jm.js.map → controller-CHfpEwXt.js.map} +1 -1
  230. package/dist/esm/{controller-BlzuPA1_.js → controller-D3181HNj.js} +1 -1
  231. package/dist/esm/{controller-BlzuPA1_.js.map → controller-D3181HNj.js.map} +1 -1
  232. package/dist/esm/{controller-B6f-1ZRp.js → controller-XsiwUqFk.js} +1 -1
  233. package/dist/esm/{controller-B6f-1ZRp.js.map → controller-XsiwUqFk.js.map} +1 -1
  234. package/dist/esm/{controller-icon-BO9NOQnm.js → controller-icon-s2Mrr-X3.js} +1 -1
  235. package/dist/esm/{controller-icon-BO9NOQnm.js.map → controller-icon-s2Mrr-X3.js.map} +1 -1
  236. package/dist/esm/{dev.utils-Dg5aYzVg.js → dev.utils-Bl9mUZR6.js} +1 -1
  237. package/dist/{kolibri/dev.utils-Dg5aYzVg.js.map → esm/dev.utils-Bl9mUZR6.js.map} +1 -1
  238. package/dist/esm/{devtools-c0YYBtbu.js → devtools-DfvAaTZM.js} +1 -1
  239. package/dist/esm/{devtools-c0YYBtbu.js.map → devtools-DfvAaTZM.js.map} +1 -1
  240. package/dist/esm/index-BuVNvMVh.js +4 -0
  241. package/dist/esm/index-BuVNvMVh.js.map +1 -0
  242. package/dist/esm/kol-abbr.entry.js +1 -1
  243. package/dist/esm/kol-accordion.entry.js +1 -1
  244. package/dist/esm/kol-accordion.entry.js.map +1 -1
  245. package/dist/esm/kol-alert-wc.entry.js +1 -1
  246. package/dist/esm/kol-alert.entry.js +1 -1
  247. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  248. package/dist/esm/kol-avatar.entry.js +1 -1
  249. package/dist/esm/kol-badge.entry.js +1 -1
  250. package/dist/esm/kol-badge.entry.js.map +1 -1
  251. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  252. package/dist/esm/kol-button-link.entry.js +1 -1
  253. package/dist/esm/kol-button-link.entry.js.map +1 -1
  254. package/dist/esm/kol-button-wc.entry.js +1 -1
  255. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  256. package/dist/esm/kol-button.entry.js +1 -1
  257. package/dist/esm/kol-button.entry.js.map +1 -1
  258. package/dist/esm/kol-card-wc.entry.js +1 -1
  259. package/dist/esm/kol-card.entry.js +1 -1
  260. package/dist/esm/kol-combobox.entry.js +1 -1
  261. package/dist/esm/kol-combobox.entry.js.map +1 -1
  262. package/dist/esm/kol-details.entry.js +1 -1
  263. package/dist/esm/kol-details.entry.js.map +1 -1
  264. package/dist/esm/kol-drawer.entry.js +1 -1
  265. package/dist/esm/kol-form.entry.js +1 -1
  266. package/dist/esm/kol-heading.entry.js +1 -1
  267. package/dist/esm/kol-icon.entry.js +1 -1
  268. package/dist/esm/kol-image.entry.js +1 -1
  269. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  270. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  271. package/dist/esm/kol-input-color.entry.js +1 -1
  272. package/dist/esm/kol-input-color.entry.js.map +1 -1
  273. package/dist/esm/kol-input-date.entry.js +1 -1
  274. package/dist/esm/kol-input-date.entry.js.map +1 -1
  275. package/dist/esm/kol-input-email.entry.js +1 -1
  276. package/dist/esm/kol-input-email.entry.js.map +1 -1
  277. package/dist/esm/kol-input-file.entry.js +1 -1
  278. package/dist/esm/kol-input-file.entry.js.map +1 -1
  279. package/dist/esm/kol-input-number.entry.js +1 -1
  280. package/dist/esm/kol-input-number.entry.js.map +1 -1
  281. package/dist/esm/kol-input-password.entry.js +1 -1
  282. package/dist/esm/kol-input-password.entry.js.map +1 -1
  283. package/dist/esm/kol-input-radio.entry.js +1 -1
  284. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  285. package/dist/esm/kol-input-range.entry.js +1 -1
  286. package/dist/esm/kol-input-range.entry.js.map +1 -1
  287. package/dist/esm/kol-input-text.entry.js +1 -1
  288. package/dist/esm/kol-input-text.entry.js.map +1 -1
  289. package/dist/esm/kol-kolibri.entry.js +1 -1
  290. package/dist/esm/kol-link-button.entry.js +1 -1
  291. package/dist/esm/kol-link-button.entry.js.map +1 -1
  292. package/dist/esm/kol-link-wc.entry.js +1 -1
  293. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  294. package/dist/esm/kol-link.entry.js +1 -1
  295. package/dist/esm/kol-link.entry.js.map +1 -1
  296. package/dist/esm/kol-modal.entry.js +1 -1
  297. package/dist/esm/kol-nav.entry.js +1 -1
  298. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  299. package/dist/esm/kol-pagination.entry.js +1 -1
  300. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  301. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  302. package/dist/esm/kol-popover-button.entry.js +1 -1
  303. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  304. package/dist/esm/kol-popover-wc.entry.js +1 -1
  305. package/dist/esm/kol-progress.entry.js +1 -1
  306. package/dist/esm/kol-quote.entry.js +1 -1
  307. package/dist/esm/kol-select-wc.entry.js +1 -1
  308. package/dist/esm/kol-select-wc.entry.js.map +1 -1
  309. package/dist/esm/kol-select.entry.js +1 -1
  310. package/dist/esm/kol-select.entry.js.map +1 -1
  311. package/dist/esm/kol-single-select.entry.js +1 -1
  312. package/dist/esm/kol-single-select.entry.js.map +1 -1
  313. package/dist/esm/kol-skip-nav.entry.js +1 -1
  314. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  315. package/dist/esm/kol-spin.entry.js +1 -1
  316. package/dist/esm/kol-split-button.entry.js +1 -1
  317. package/dist/esm/kol-split-button.entry.js.map +1 -1
  318. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  319. package/dist/esm/kol-table-stateful.entry.js +1 -1
  320. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  321. package/dist/esm/kol-table-stateless.entry.js +1 -1
  322. package/dist/esm/kol-tabs.entry.js +1 -1
  323. package/dist/esm/kol-textarea.entry.js +1 -1
  324. package/dist/esm/kol-textarea.entry.js.map +1 -1
  325. package/dist/esm/kol-toast-container.entry.js +1 -1
  326. package/dist/esm/kol-toolbar.entry.js +1 -1
  327. package/dist/esm/kol-toolbar.entry.js.map +1 -1
  328. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  329. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  330. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  331. package/dist/esm/kol-tree-item-wc.entry.js.map +1 -1
  332. package/dist/esm/kol-tree-item.entry.js +1 -1
  333. package/dist/esm/kol-tree-item.entry.js.map +1 -1
  334. package/dist/esm/kol-tree-wc.entry.js +1 -1
  335. package/dist/esm/kol-tree-wc.entry.js.map +1 -1
  336. package/dist/esm/kol-tree.entry.js +1 -1
  337. package/dist/esm/kol-version.entry.js +1 -1
  338. package/dist/esm/kolibri.js +1 -1
  339. package/dist/esm/loader.js +1 -1
  340. package/dist/esm/test-component.entry.js +1 -1
  341. package/dist/kolibri/Alert-DFxK42_b.js +4 -0
  342. package/dist/{esm/Alert-CTUp0cq0.js.map → kolibri/Alert-DFxK42_b.js.map} +1 -1
  343. package/dist/kolibri/Collapsible-CaNCj17a.js +4 -0
  344. package/dist/kolibri/{Collapsible-Ba8Es2h0.js.map → Collapsible-CaNCj17a.js.map} +1 -1
  345. package/dist/kolibri/{CustomSuggestionsOptionsGroup-reBf5IMI.js → CustomSuggestionsOptionsGroup-BElrEzPg.js} +1 -1
  346. package/dist/{esm/CustomSuggestionsOptionsGroup-reBf5IMI.js.map → kolibri/CustomSuggestionsOptionsGroup-BElrEzPg.js.map} +1 -1
  347. package/dist/kolibri/FieldControlStateWrapper-BQEssIZt.js +4 -0
  348. package/dist/{esm/FieldControlStateWrapper-eQU8K11B.js.map → kolibri/FieldControlStateWrapper-BQEssIZt.js.map} +1 -1
  349. package/dist/kolibri/{FormFieldStateWrapper-BJBSoSm4.js → FormFieldStateWrapper-Bs6adxNw.js} +1 -1
  350. package/dist/kolibri/{FormFieldStateWrapper-BJBSoSm4.js.map → FormFieldStateWrapper-Bs6adxNw.js.map} +1 -1
  351. package/dist/kolibri/{Heading-CNBuBGfU.js → Heading-DqCQ4tvo.js} +1 -1
  352. package/dist/{esm/Heading-CNBuBGfU.js.map → kolibri/Heading-DqCQ4tvo.js.map} +1 -1
  353. package/dist/kolibri/{Icon-BIONJyds.js → Icon-qDQ9VVcv.js} +1 -1
  354. package/dist/kolibri/{Icon-BIONJyds.js.map → Icon-qDQ9VVcv.js.map} +1 -1
  355. package/dist/kolibri/Input-WOVJOXlM.js +4 -0
  356. package/dist/kolibri/{Input-ADoBQY-0.js.map → Input-WOVJOXlM.js.map} +1 -1
  357. package/dist/kolibri/InputStateWrapper-C9u4kUR_.js +4 -0
  358. package/dist/kolibri/{InputStateWrapper-B4faUnuS.js.map → InputStateWrapper-C9u4kUR_.js.map} +1 -1
  359. package/dist/kolibri/InternalUnderlinedBadgeText-CNjTZsLo.js +4 -0
  360. package/dist/kolibri/{InternalUnderlinedBadgeText-CZdqjm5O.js.map → InternalUnderlinedBadgeText-CNjTZsLo.js.map} +1 -1
  361. package/dist/kolibri/{Span-BJ04za7v.js → Span-CgBP4Uo5.js} +1 -1
  362. package/dist/{esm/Span-BJ04za7v.js.map → kolibri/Span-CgBP4Uo5.js.map} +1 -1
  363. package/dist/kolibri/{app-globals-CcbjA63Q.js → app-globals-C1JBLIBF.js} +1 -1
  364. package/dist/kolibri/{app-globals-CcbjA63Q.js.map → app-globals-C1JBLIBF.js.map} +1 -1
  365. package/dist/kolibri/{controller-BzHt83jm.js → controller-CHfpEwXt.js} +1 -1
  366. package/dist/kolibri/{controller-BzHt83jm.js.map → controller-CHfpEwXt.js.map} +1 -1
  367. package/dist/kolibri/{controller-BlzuPA1_.js → controller-D3181HNj.js} +1 -1
  368. package/dist/kolibri/{controller-BlzuPA1_.js.map → controller-D3181HNj.js.map} +1 -1
  369. package/dist/kolibri/controller-XsiwUqFk.js +4 -0
  370. package/dist/kolibri/{controller-B6f-1ZRp.js.map → controller-XsiwUqFk.js.map} +1 -1
  371. package/dist/kolibri/{controller-icon-BO9NOQnm.js → controller-icon-s2Mrr-X3.js} +1 -1
  372. package/dist/kolibri/{controller-icon-BO9NOQnm.js.map → controller-icon-s2Mrr-X3.js.map} +1 -1
  373. package/dist/kolibri/{dev.utils-Dg5aYzVg.js → dev.utils-Bl9mUZR6.js} +1 -1
  374. package/dist/{esm/dev.utils-Dg5aYzVg.js.map → kolibri/dev.utils-Bl9mUZR6.js.map} +1 -1
  375. package/dist/kolibri/{devtools-c0YYBtbu.js → devtools-DfvAaTZM.js} +1 -1
  376. package/dist/kolibri/{devtools-c0YYBtbu.js.map → devtools-DfvAaTZM.js.map} +1 -1
  377. package/dist/kolibri/{index-Biu4X4Y_.js → index-BuVNvMVh.js} +1 -1
  378. package/dist/kolibri/index-BuVNvMVh.js.map +1 -0
  379. package/dist/kolibri/kol-abbr.entry.js +1 -1
  380. package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
  381. package/dist/kolibri/kol-accordion.entry.js +1 -1
  382. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  383. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  384. package/dist/kolibri/kol-alert.entry.js +1 -1
  385. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  386. package/dist/kolibri/kol-avatar.entry.js +1 -1
  387. package/dist/kolibri/kol-badge.entry.esm.js.map +1 -1
  388. package/dist/kolibri/kol-badge.entry.js +1 -1
  389. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  390. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  391. package/dist/kolibri/kol-button-link.entry.esm.js.map +1 -1
  392. package/dist/kolibri/kol-button-link.entry.js +1 -1
  393. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  394. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  395. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  396. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  397. package/dist/kolibri/kol-button.entry.esm.js.map +1 -1
  398. package/dist/kolibri/kol-button.entry.js +1 -1
  399. package/dist/kolibri/kol-button.entry.js.map +1 -1
  400. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  401. package/dist/kolibri/kol-card.entry.js +1 -1
  402. package/dist/kolibri/kol-combobox.entry.esm.js.map +1 -1
  403. package/dist/kolibri/kol-combobox.entry.js +1 -1
  404. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  405. package/dist/kolibri/kol-details.entry.esm.js.map +1 -1
  406. package/dist/kolibri/kol-details.entry.js +1 -1
  407. package/dist/kolibri/kol-details.entry.js.map +1 -1
  408. package/dist/kolibri/kol-drawer.entry.js +1 -1
  409. package/dist/kolibri/kol-form.entry.js +1 -1
  410. package/dist/kolibri/kol-heading.entry.js +1 -1
  411. package/dist/kolibri/kol-icon.entry.js +1 -1
  412. package/dist/kolibri/kol-image.entry.js +1 -1
  413. package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
  414. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  415. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  416. package/dist/kolibri/kol-input-color.entry.esm.js.map +1 -1
  417. package/dist/kolibri/kol-input-color.entry.js +1 -1
  418. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  419. package/dist/kolibri/kol-input-date.entry.esm.js.map +1 -1
  420. package/dist/kolibri/kol-input-date.entry.js +1 -1
  421. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  422. package/dist/kolibri/kol-input-email.entry.esm.js.map +1 -1
  423. package/dist/kolibri/kol-input-email.entry.js +1 -1
  424. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  425. package/dist/kolibri/kol-input-file.entry.esm.js.map +1 -1
  426. package/dist/kolibri/kol-input-file.entry.js +1 -1
  427. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  428. package/dist/kolibri/kol-input-number.entry.esm.js.map +1 -1
  429. package/dist/kolibri/kol-input-number.entry.js +1 -1
  430. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  431. package/dist/kolibri/kol-input-password.entry.esm.js.map +1 -1
  432. package/dist/kolibri/kol-input-password.entry.js +1 -1
  433. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  434. package/dist/kolibri/kol-input-radio.entry.esm.js.map +1 -1
  435. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  436. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  437. package/dist/kolibri/kol-input-range.entry.esm.js.map +1 -1
  438. package/dist/kolibri/kol-input-range.entry.js +1 -1
  439. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  440. package/dist/kolibri/kol-input-text.entry.esm.js.map +1 -1
  441. package/dist/kolibri/kol-input-text.entry.js +1 -1
  442. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  443. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  444. package/dist/kolibri/kol-link-button.entry.esm.js.map +1 -1
  445. package/dist/kolibri/kol-link-button.entry.js +1 -1
  446. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  447. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  448. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  449. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  450. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  451. package/dist/kolibri/kol-link.entry.js +1 -1
  452. package/dist/kolibri/kol-link.entry.js.map +1 -1
  453. package/dist/kolibri/kol-modal.entry.js +1 -1
  454. package/dist/kolibri/kol-nav.entry.js +1 -1
  455. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  456. package/dist/kolibri/kol-pagination.entry.js +1 -1
  457. package/dist/kolibri/kol-popover-button-wc.entry.esm.js.map +1 -1
  458. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  459. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  460. package/dist/kolibri/kol-popover-button.entry.esm.js.map +1 -1
  461. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  462. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  463. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  464. package/dist/kolibri/kol-progress.entry.js +1 -1
  465. package/dist/kolibri/kol-quote.entry.js +1 -1
  466. package/dist/kolibri/kol-select-wc.entry.esm.js.map +1 -1
  467. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  468. package/dist/kolibri/kol-select-wc.entry.js.map +1 -1
  469. package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
  470. package/dist/kolibri/kol-select.entry.js +1 -1
  471. package/dist/kolibri/kol-select.entry.js.map +1 -1
  472. package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
  473. package/dist/kolibri/kol-single-select.entry.js +1 -1
  474. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  475. package/dist/kolibri/kol-skip-nav.entry.esm.js.map +1 -1
  476. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  477. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  478. package/dist/kolibri/kol-spin.entry.js +1 -1
  479. package/dist/kolibri/kol-split-button.entry.esm.js.map +1 -1
  480. package/dist/kolibri/kol-split-button.entry.js +1 -1
  481. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  482. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  483. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  484. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  485. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  486. package/dist/kolibri/kol-tabs.entry.js +1 -1
  487. package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
  488. package/dist/kolibri/kol-textarea.entry.js +1 -1
  489. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  490. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  491. package/dist/kolibri/kol-toolbar.entry.esm.js.map +1 -1
  492. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  493. package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
  494. package/dist/kolibri/kol-tooltip-wc.entry.esm.js.map +1 -1
  495. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  496. package/dist/kolibri/kol-tree-item-wc.entry.esm.js.map +1 -1
  497. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  498. package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
  499. package/dist/kolibri/kol-tree-item.entry.esm.js.map +1 -1
  500. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  501. package/dist/kolibri/kol-tree-item.entry.js.map +1 -1
  502. package/dist/kolibri/kol-tree-wc.entry.esm.js.map +1 -1
  503. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  504. package/dist/kolibri/kol-tree-wc.entry.js.map +1 -1
  505. package/dist/kolibri/kol-tree.entry.js +1 -1
  506. package/dist/kolibri/kol-version.entry.js +1 -1
  507. package/dist/kolibri/kolibri.esm.js +1 -1
  508. package/dist/kolibri/test-component.entry.js +1 -1
  509. package/dist/types/components/accordion/shadow.d.ts +2 -1
  510. package/dist/types/components/badge/shadow.d.ts +2 -1
  511. package/dist/types/components/button/component.d.ts +2 -1
  512. package/dist/types/components/button/shadow.d.ts +2 -1
  513. package/dist/types/components/button-link/shadow.d.ts +2 -1
  514. package/dist/types/components/combobox/shadow.d.ts +2 -1
  515. package/dist/types/components/details/shadow.d.ts +2 -1
  516. package/dist/types/components/input-checkbox/shadow.d.ts +2 -1
  517. package/dist/types/components/input-color/shadow.d.ts +2 -1
  518. package/dist/types/components/input-date/shadow.d.ts +2 -1
  519. package/dist/types/components/input-email/shadow.d.ts +2 -1
  520. package/dist/types/components/input-file/shadow.d.ts +2 -1
  521. package/dist/types/components/input-number/shadow.d.ts +2 -1
  522. package/dist/types/components/input-password/shadow.d.ts +2 -1
  523. package/dist/types/components/input-radio/shadow.d.ts +2 -1
  524. package/dist/types/components/input-range/shadow.d.ts +2 -1
  525. package/dist/types/components/input-text/shadow.d.ts +2 -1
  526. package/dist/types/components/link/component.d.ts +2 -1
  527. package/dist/types/components/link/shadow.d.ts +2 -1
  528. package/dist/types/components/link-button/shadow.d.ts +2 -1
  529. package/dist/types/components/popover-button/component.d.ts +2 -1
  530. package/dist/types/components/popover-button/shadow.d.ts +2 -1
  531. package/dist/types/components/select/component.d.ts +2 -1
  532. package/dist/types/components/select/shadow.d.ts +2 -1
  533. package/dist/types/components/single-select/shadow.d.ts +2 -1
  534. package/dist/types/components/skip-nav/shadow.d.ts +2 -1
  535. package/dist/types/components/split-button/shadow.d.ts +2 -1
  536. package/dist/types/components/textarea/shadow.d.ts +2 -1
  537. package/dist/types/components/tooltip/component.d.ts +1 -1
  538. package/dist/types/components/tree-item/component.d.ts +3 -2
  539. package/dist/types/components/tree-item/shadow.d.ts +4 -3
  540. package/dist/types/components.d.ts +325 -82
  541. package/dist/types/schema/interfaces/FocusableElement.d.ts +2 -1
  542. package/doc/accordion.md +12 -2
  543. package/doc/badge.md +12 -2
  544. package/doc/button-link.md +13 -3
  545. package/doc/button.md +13 -3
  546. package/doc/combobox.md +13 -3
  547. package/doc/details.md +12 -2
  548. package/doc/input-checkbox.md +13 -3
  549. package/doc/input-color.md +13 -3
  550. package/doc/input-date.md +13 -3
  551. package/doc/input-email.md +13 -3
  552. package/doc/input-file.md +13 -3
  553. package/doc/input-number.md +13 -3
  554. package/doc/input-password.md +13 -3
  555. package/doc/input-radio.md +13 -3
  556. package/doc/input-range.md +13 -3
  557. package/doc/input-text.md +13 -3
  558. package/doc/link-button.md +12 -2
  559. package/doc/link.md +12 -2
  560. package/doc/popover-button.md +13 -3
  561. package/doc/select.md +13 -3
  562. package/doc/single-select.md +13 -3
  563. package/doc/skip-nav.md +12 -2
  564. package/doc/split-button.md +13 -3
  565. package/doc/textarea.md +13 -3
  566. package/doc/tree-item.md +12 -2
  567. package/package.json +1 -1
  568. package/dist/cjs/Icon-B7eZlK-8.js +0 -4
  569. package/dist/cjs/Input-mtjTLTjx.js +0 -4
  570. package/dist/cjs/index-C4Loo2IH.js +0 -4
  571. package/dist/cjs/index-C4Loo2IH.js.map +0 -1
  572. package/dist/esm/index-Biu4X4Y_.js +0 -4
  573. package/dist/esm/index-Biu4X4Y_.js.map +0 -1
  574. package/dist/kolibri/Alert-CTUp0cq0.js +0 -4
  575. package/dist/kolibri/Collapsible-Ba8Es2h0.js +0 -4
  576. package/dist/kolibri/FieldControlStateWrapper-eQU8K11B.js +0 -4
  577. package/dist/kolibri/Input-ADoBQY-0.js +0 -4
  578. package/dist/kolibri/InputStateWrapper-B4faUnuS.js +0 -4
  579. package/dist/kolibri/InternalUnderlinedBadgeText-CZdqjm5O.js +0 -4
  580. package/dist/kolibri/controller-B6f-1ZRp.js +0 -4
  581. package/dist/kolibri/index-Biu4X4Y_.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,F as i,H as t}from"./index-Biu4X4Y_.js";import{w as o}from"./common-Dd0zJQbD.js";import{v as r}from"./label-Dnmzb2S_.js";import{v as a}from"./show-DdPK3aM7.js";import{t as l}from"./i18n-LBpyQ66X.js";import{c as s}from"./clsx-eK3rPvPS.js";import"./i18n-CfLoIZ8T.js";const d=["cycle","dot","none"],c=(n,e)=>{o(n,"_variant",n=>"string"==typeof n&&d.includes(n),new Set(d),e)},p="/* 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 rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes prixClipFix {\n 0% {\n border-color: #fff;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n border-color: #666;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__loader {\n animation-duration: 4s;\n }\n .kol-spin__loader::before {\n animation-duration: 6s;\n }\n }\n .kol-spin__spinner--cycle {\n width: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__loader {\n border-radius: 50%;\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n animation: 2s linear infinite rotate;\n }\n .kol-spin__loader::before {\n border-radius: 50%;\n position: absolute;\n inset: 0;\n content: \"\";\n animation: 3s linear infinite prixClipFix;\n border: 5px solid #333;\n }\n}\n@layer kol-component {\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(16 * 1rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__spinner-element {\n animation-duration: 2s;\n }\n }\n .kol-spin__spinner--dot {\n width: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner-element {\n border-radius: 50%;\n position: absolute;\n top: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(12.8 * 1rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16)) solid #fff;\n }\n .kol-spin__spinner-element--1 {\n background-color: #000;\n left: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin1;\n }\n .kol-spin__spinner-element--2 {\n background-color: #000;\n left: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner-element--3 {\n background-color: #000;\n left: calc(17.6 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner-element--neutral {\n background-color: #666;\n left: calc(33.6 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin3;\n }\n}\n@layer kol-component {\n .kol-spin__spinner {\n display: block;\n position: relative;\n padding: calc(2 * 1rem / var(--kolibri-root-font-size, 16));\n }\n}";function h(n){switch(n){case"cycle":return e("span",{class:"kol-spin__loader"});case"none":return e("slot",{name:"expert"});default:return e(i,null,e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--1"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--2"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--3"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--neutral"}))}}const m=class{constructor(e){n(this,e),this.showToggled=!1,this.translateActionRunning=l("kol-action-running"),this.translateActionDone=l("kol-action-done"),this._show=!1,this._variant="dot",this.state={_variant:"dot",_label:void 0}}render(){var n,o;return e(t,{key:"e9c150c633c0a718053c4aa1aeb737d88b7b4183",class:"kol-spin"},this.state._show?e(i,null,e("span",{class:s("kol-spin__spinner",`kol-spin__spinner--${this.state._variant}`)},h(this.state._variant)),e("span",{"aria-busy":"true",class:"visually-hidden",role:"alert"},null!==(n=this.state._label)&&void 0!==n?n:this.translateActionRunning)):this.showToggled&&e("span",{"aria-busy":"false",class:"visually-hidden",role:"alert"},null!==(o=this.state._label)&&void 0!==o?o:this.translateActionDone))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,a(this,n)}validateLabel(n){r(this,n)}validateVariant(n){c(this,n)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant),this.validateLabel(this._label)}static get watchers(){return{_show:["validateShow"],_label:["validateLabel"],_variant:["validateVariant"]}}};m.style={default:p};export{m as kol_spin};
4
+ import{r as n,h as e,F as i,H as t}from"./index-BuVNvMVh.js";import{w as o}from"./common-Dd0zJQbD.js";import{v as r}from"./label-Dnmzb2S_.js";import{v as a}from"./show-DdPK3aM7.js";import{t as l}from"./i18n-LBpyQ66X.js";import{c as s}from"./clsx-eK3rPvPS.js";import"./i18n-CfLoIZ8T.js";const d=["cycle","dot","none"],c=(n,e)=>{o(n,"_variant",n=>"string"==typeof n&&d.includes(n),new Set(d),e)},p="/* 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 rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes prixClipFix {\n 0% {\n border-color: #fff;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n border-color: #666;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__loader {\n animation-duration: 4s;\n }\n .kol-spin__loader::before {\n animation-duration: 6s;\n }\n }\n .kol-spin__spinner--cycle {\n width: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__loader {\n border-radius: 50%;\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n animation: 2s linear infinite rotate;\n }\n .kol-spin__loader::before {\n border-radius: 50%;\n position: absolute;\n inset: 0;\n content: \"\";\n animation: 3s linear infinite prixClipFix;\n border: 5px solid #333;\n }\n}\n@layer kol-component {\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(16 * 1rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__spinner-element {\n animation-duration: 2s;\n }\n }\n .kol-spin__spinner--dot {\n width: calc(48 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner-element {\n border-radius: 50%;\n position: absolute;\n top: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(12.8 * 1rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16)) solid #fff;\n }\n .kol-spin__spinner-element--1 {\n background-color: #000;\n left: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin1;\n }\n .kol-spin__spinner-element--2 {\n background-color: #000;\n left: calc(0.16 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner-element--3 {\n background-color: #000;\n left: calc(17.6 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner-element--neutral {\n background-color: #666;\n left: calc(33.6 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin3;\n }\n}\n@layer kol-component {\n .kol-spin__spinner {\n display: block;\n position: relative;\n padding: calc(2 * 1rem / var(--kolibri-root-font-size, 16));\n }\n}";function h(n){switch(n){case"cycle":return e("span",{class:"kol-spin__loader"});case"none":return e("slot",{name:"expert"});default:return e(i,null,e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--1"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--2"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--3"}),e("span",{class:"kol-spin__spinner-element kol-spin__spinner-element--neutral"}))}}const m=class{constructor(e){n(this,e),this.showToggled=!1,this.translateActionRunning=l("kol-action-running"),this.translateActionDone=l("kol-action-done"),this._show=!1,this._variant="dot",this.state={_variant:"dot",_label:void 0}}render(){var n,o;return e(t,{key:"e9c150c633c0a718053c4aa1aeb737d88b7b4183",class:"kol-spin"},this.state._show?e(i,null,e("span",{class:s("kol-spin__spinner",`kol-spin__spinner--${this.state._variant}`)},h(this.state._variant)),e("span",{"aria-busy":"true",class:"visually-hidden",role:"alert"},null!==(n=this.state._label)&&void 0!==n?n:this.translateActionRunning)):this.showToggled&&e("span",{"aria-busy":"false",class:"visually-hidden",role:"alert"},null!==(o=this.state._label)&&void 0!==o?o:this.translateActionDone))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,a(this,n)}validateLabel(n){r(this,n)}validateVariant(n){c(this,n)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant),this.validateLabel(this._label)}static get watchers(){return{_show:["validateShow"],_label:["validateLabel"],_variant:["validateVariant"]}}};m.style={default:p};export{m as kol_spin};
@@ -1 +1 @@
1
- {"version":3,"file":"kol-split-button.entry.esm.js","sources":["src/components/split-button/style.scss?tag=kol-split-button&mode=default&encapsulation=shadow","src/components/split-button/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../popover/style.scss' as *;\n@use '../tooltip/style.scss' as *;\n\n@layer kol-component {\n\t.kol-split-button {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\t&__root {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\talign-items: stretch;\n\t\t}\n\t\t&__button {\n\t\t\tmin-width: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t.kol-popover {\n\t\t\tz-index: 1;\n\n\t\t\t&__content {\n\t\t\t\tmargin-top: to-rem(2);\n\t\t\t}\n\n\t\t\t&__arrow {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State } from '@stencil/core';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tShortKeyPropType,\n\tSplitButtonProps,\n\tSplitButtonStates,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport clsx from 'clsx';\nimport { KolButtonWcTag, KolPopoverWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\n\n/**\n * @slot - Ermöglicht das Einfügen beliebigen HTMLs in das dropdown.\n */\n@Component({\n\ttag: 'kol-split-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSplitButton implements SplitButtonProps /*, SplitButtonAPI*/ {\n\tprivate primaryButtonWcRef?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchPrimaryRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.primaryButtonWcRef = ref;\n\t};\n\n\t/**\n\t * Returns the current value.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Sets focus on the internal element.\n\t */\n\t@Method()\n\tpublic async kolFocus() {\n\t\tawait this.primaryButtonWcRef?.kolFocus();\n\t}\n\n\tprivate readonly clickButtonHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\n\t\t\tif (typeof this._on?.onClick === 'function') {\n\t\t\t\t// TODO: this._on is not validated\n\t\t\t\tthis._on?.onClick(event, this._value);\n\t\t\t}\n\t\t},\n\t};\n\tprivate readonly clickToggleHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\t\t\tthis.toggleDropdown();\n\t\t},\n\t};\n\n\tprivate readonly toggleDropdown = () => {\n\t\tthis.state = { ...this.state, _show: !this.state._show };\n\t};\n\n\tprivate readonly handleOnClose = () => {\n\t\tthis.state = { ...this.state, _show: false };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst i18nDropdownLabel = 'kol-split-button-dropdown-label';\n\t\treturn (\n\t\t\t<div class=\"kol-split-button\">\n\t\t\t\t<div class=\"kol-split-button__root\">\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={clsx('kol-split-button__button', {\n\t\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tref={this.catchPrimaryRef}\n\t\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t\t_id={this._id}\n\t\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t\t_name={this._name}\n\t\t\t\t\t\t_on={this.clickButtonHandler}\n\t\t\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t_type={this._type}\n\t\t\t\t\t\t_value={this._value}\n\t\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t<div class=\"kol-split-button__horizontal-line\"></div>\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"kol-split-button__secondary-button\"\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons=\"codicon codicon-triangle-down\"\n\t\t\t\t\t\t_label={this.state._show ? translate(`${i18nDropdownLabel}-close`) : translate(`${i18nDropdownLabel}-open`)}\n\t\t\t\t\t\t_on={this.clickToggleHandler}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t</div>\n\t\t\t\t<KolPopoverWcTag _show={this.state._show} _on={{ onClose: this.handleOnClose }} _align=\"bottom\">\n\t\t\t\t\t<slot />\n\t\t\t\t</KolPopoverWcTag>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t/**\n\t * Closes the dropdown.\n\t */\n\t@Method()\n\tpublic async closePopup() {\n\t\tthis.handleOnClose();\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component’s interactive element.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t *\n\t * @deprecated We prefer the semantic role of the HTML element and do not allow for customization. We will remove this prop in the future.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value of the element.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: SplitButtonStates = {\n\t\t_show: false,\n\t};\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"kol-split-button.entry.esm.js","sources":["src/components/split-button/style.scss?tag=kol-split-button&mode=default&encapsulation=shadow","src/components/split-button/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../popover/style.scss' as *;\n@use '../tooltip/style.scss' as *;\n\n@layer kol-component {\n\t.kol-split-button {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\t&__root {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\talign-items: stretch;\n\t\t}\n\t\t&__button {\n\t\t\tmin-width: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t.kol-popover {\n\t\t\tz-index: 1;\n\n\t\t\t&__content {\n\t\t\t\tmargin-top: to-rem(2);\n\t\t\t}\n\n\t\t\t&__arrow {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State } from '@stencil/core';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tShortKeyPropType,\n\tSplitButtonProps,\n\tSplitButtonStates,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport clsx from 'clsx';\nimport { KolButtonWcTag, KolPopoverWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\n\n/**\n * @slot - Ermöglicht das Einfügen beliebigen HTMLs in das dropdown.\n */\n@Component({\n\ttag: 'kol-split-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSplitButton implements SplitButtonProps /*, SplitButtonAPI*/ {\n\tprivate primaryButtonWcRef?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchPrimaryRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.primaryButtonWcRef = ref;\n\t};\n\n\t/**\n\t * Returns the current value.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Sets focus on the internal element.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\treturn Promise.resolve(this.primaryButtonWcRef?.focus());\n\t}\n\n\t/**\n\t * @deprecated Use {@link focus} instead.\n\t */\n\t@Method()\n\tpublic async kolFocus() {\n\t\treturn this.focus();\n\t}\n\n\tprivate readonly clickButtonHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\n\t\t\tif (typeof this._on?.onClick === 'function') {\n\t\t\t\t// TODO: this._on is not validated\n\t\t\t\tthis._on?.onClick(event, this._value);\n\t\t\t}\n\t\t},\n\t};\n\tprivate readonly clickToggleHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\t\t\tthis.toggleDropdown();\n\t\t},\n\t};\n\n\tprivate readonly toggleDropdown = () => {\n\t\tthis.state = { ...this.state, _show: !this.state._show };\n\t};\n\n\tprivate readonly handleOnClose = () => {\n\t\tthis.state = { ...this.state, _show: false };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst i18nDropdownLabel = 'kol-split-button-dropdown-label';\n\t\treturn (\n\t\t\t<div class=\"kol-split-button\">\n\t\t\t\t<div class=\"kol-split-button__root\">\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={clsx('kol-split-button__button', {\n\t\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tref={this.catchPrimaryRef}\n\t\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t\t_id={this._id}\n\t\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t\t_name={this._name}\n\t\t\t\t\t\t_on={this.clickButtonHandler}\n\t\t\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t_type={this._type}\n\t\t\t\t\t\t_value={this._value}\n\t\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t<div class=\"kol-split-button__horizontal-line\"></div>\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"kol-split-button__secondary-button\"\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons=\"codicon codicon-triangle-down\"\n\t\t\t\t\t\t_label={this.state._show ? translate(`${i18nDropdownLabel}-close`) : translate(`${i18nDropdownLabel}-open`)}\n\t\t\t\t\t\t_on={this.clickToggleHandler}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t</div>\n\t\t\t\t<KolPopoverWcTag _show={this.state._show} _on={{ onClose: this.handleOnClose }} _align=\"bottom\">\n\t\t\t\t\t<slot />\n\t\t\t\t</KolPopoverWcTag>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t/**\n\t * Closes the dropdown.\n\t */\n\t@Method()\n\tpublic async closePopup() {\n\t\tthis.handleOnClose();\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component’s interactive element.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t *\n\t * @deprecated We prefer the semantic role of the HTML element and do not allow for customization. We will remove this prop in the future.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value of the element.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: SplitButtonStates = {\n\t\t_show: false,\n\t};\n}\n"],"names":[],"mappings":"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"}
@@ -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-Biu4X4Y_.js";import{c as e}from"./clsx-eK3rPvPS.js";import{m as o,d as i}from"./component-names-C3fyby67.js";import{t as a}from"./i18n-LBpyQ66X.js";import"./common-Dd0zJQbD.js";import"./i18n-CfLoIZ8T.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:"156668962e6ff2011625d1128a20a9dba6e24a9b",class:"kol-split-button"},t("div",{key:"a273dc653d3c0a1efb5e3c83bd0e5f2ee2478e79",class:"kol-split-button__root"},t(i,{key:"88f61eecb6fdce911538179e721eae5af2c41c0f",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:"609e38bd0f8c2c80e831b0f933cec91d8d590d93",class:"kol-split-button__horizontal-line"}),t(i,{key:"95da68081863776d4ea3ae7f67cc4752b6299d72",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:"b8ca42df85abdfbd34c9df79c416b78aada35a56",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"3af62ecf99ccdd770b926535d51f875426408103"})))}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-BuVNvMVh.js";import{c as e}from"./clsx-eK3rPvPS.js";import{m as o,d as i}from"./component-names-C3fyby67.js";import{t as a}from"./i18n-LBpyQ66X.js";import"./common-Dd0zJQbD.js";import"./i18n-CfLoIZ8T.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 focus(){var n;return Promise.resolve(null===(n=this.primaryButtonWcRef)||void 0===n?void 0:n.focus())}async kolFocus(){return this.focus()}render(){const n="kol-split-button-dropdown-label";return t("div",{key:"fd28aa257b89ec88249c2f7eb4f1178abd5b70f1",class:"kol-split-button"},t("div",{key:"7abb8684272b4cb0145124cfb74189f1f4d2e06c",class:"kol-split-button__root"},t(i,{key:"808d218153cb14a95b7640fe0312f9386922168e",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:"1f4dec3081093baf3435447615be0f466fa47890",class:"kol-split-button__horizontal-line"}),t(i,{key:"e0545b6a2565cecb3e65e79635771ebcac12c1cc",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:"af16aee240137561a45847448a8144de33a100f5",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"0c2ffbeaf67e040c2c101829332b90df397200fa"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}};l.style={default:s};export{l as kol_split_button};
@@ -1 +1 @@
1
- {"version":3,"names":["registerInstance","h","clsx","KolPopoverWcTag","KolButtonWcTag","translate","defaultStyleCss","KolSplitButton","constructor","hostRef","this","catchPrimaryRef","ref","primaryButtonWcRef","clickButtonHandler","onClick","event","_a","_b","stopPropagation","_on","_value","clickToggleHandler","toggleDropdown","state","Object","assign","_show","handleOnClose","_disabled","_hideLabel","_tooltipAlign","_type","_variant","getValue","kolFocus","render","i18nDropdownLabel","key","class","_customClass","length","_accessKey","_ariaControls","_ariaDescription","_ariaExpanded","_ariaSelected","_icons","_id","_label","_name","_shortKey","_syncValueBySelector","_buttonVariant","onClose","_align","closePopup","Promise","resolve","style","default"],"sources":["0"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["registerInstance","h","clsx","KolPopoverWcTag","KolButtonWcTag","translate","defaultStyleCss","KolSplitButton","constructor","hostRef","this","catchPrimaryRef","ref","primaryButtonWcRef","clickButtonHandler","onClick","event","_a","_b","stopPropagation","_on","_value","clickToggleHandler","toggleDropdown","state","Object","assign","_show","handleOnClose","_disabled","_hideLabel","_tooltipAlign","_type","_variant","getValue","focus","Promise","resolve","kolFocus","render","i18nDropdownLabel","key","class","_customClass","length","_accessKey","_ariaControls","_ariaDescription","_ariaExpanded","_ariaSelected","_icons","_id","_label","_name","_shortKey","_syncValueBySelector","_buttonVariant","onClose","_align","closePopup","style","default"],"sources":["0"],"mappings":"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","ignoreList":[]}
@@ -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-Biu4X4Y_.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{t as i,b as a,u as o,v as n,d as c,j as b}from"./component-names-C3fyby67.js";import{t as d}from"./i18n-LBpyQ66X.js";import{d as r,K as h}from"./events-9-skLO0f.js";import"./common-Dd0zJQbD.js";import"./i18n-CfLoIZ8T.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:a,visible:i}=e,n=l(e,["hidable","resizable","sortable","visible"]);return Object.assign(Object.assign({},n),{hidable:!1!==t,resizable:!1!==s,sortable:!1!==a,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(b,{key:"77db05412c9011fe8e0e2dfc7499dbcadede5521",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},t("div",{key:"1ad57a28bceee8b4c10c8c818b4fd6f0001809c4",class:"kol-table-settings__content"},t(i,{key:"d019a6cbe836283c6c2ccdf319c92090802382be",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(a,{key:"3c53e407297bd21a00bb94ac9cec1e913728f246",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"14e649882dc3c590ab1431837ca1e9223e332ebc",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"3546aca5566c7148effa4ac3b6c6c6c80df499c4",class:"kol-table-settings__columns-container"},t("div",{key:"e5ba799f10556c2ff15321984bf06d26474162d1",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(c,{_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(c,{_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:"b31183c5e2b855b21944864e0897c632c30bd55e",class:"kol-table-settings__actions"},t(c,{key:"9a741d4fe161684a31a335877ed81bd1e200848a",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(c,{key:"67ebec227e4a82cec363431b1b755d757974f50c",_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-BuVNvMVh.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{t as i,b as a,u as o,v as n,d as c,j as b}from"./component-names-C3fyby67.js";import{t as d}from"./i18n-LBpyQ66X.js";import{d as r,K as h}from"./events-9-skLO0f.js";import"./common-Dd0zJQbD.js";import"./i18n-CfLoIZ8T.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:a,visible:i}=e,n=l(e,["hidable","resizable","sortable","visible"]);return Object.assign(Object.assign({},n),{hidable:!1!==t,resizable:!1!==s,sortable:!1!==a,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(b,{key:"77db05412c9011fe8e0e2dfc7499dbcadede5521",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},t("div",{key:"1ad57a28bceee8b4c10c8c818b4fd6f0001809c4",class:"kol-table-settings__content"},t(i,{key:"d019a6cbe836283c6c2ccdf319c92090802382be",_label:this.translateTableSettings,_level:0}),this.errorMessage&&t(a,{key:"3c53e407297bd21a00bb94ac9cec1e913728f246",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),t("form",{key:"14e649882dc3c590ab1431837ca1e9223e332ebc",onSubmit:this.handleSubmit.bind(this)},t("div",{key:"3546aca5566c7148effa4ac3b6c6c6c80df499c4",class:"kol-table-settings__columns-container"},t("div",{key:"e5ba799f10556c2ff15321984bf06d26474162d1",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(c,{_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(c,{_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:"b31183c5e2b855b21944864e0897c632c30bd55e",class:"kol-table-settings__actions"},t(c,{key:"9a741d4fe161684a31a335877ed81bd1e200848a",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),t(c,{key:"67ebec227e4a82cec363431b1b755d757974f50c",_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-Biu4X4Y_.js";import{i as o,n as a}from"./component-names-C3fyby67.js";import{t as l}from"./i18n-LBpyQ66X.js";import{d as s,w as r,s as d,O as c,e as h,p,o as f,j as u}from"./common-Dd0zJQbD.js";import{v as b,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 z}from"./events-9-skLO0f.js";import"./i18n-CfLoIZ8T.js";const S=(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-popover-button--inline .kol-popover-button__button {\n display: inline;\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-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n .kol-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-pagination__page-size-select .kol-form-field-select {\n align-items: center;\n grid-template-columns: 1fr max-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],O=t=>!0===t||""===t||"object"==typeof t&&null!==t,P=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){S(this,t,{defaultValue:!1})}validateData(t){b(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){c(t,()=>{f(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){h(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=O(t),r(this,"_pagination",O,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&&z(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),c="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,h="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:"5ab8ff5b83647e809cddeccf2245696887bd12b4",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&c,t(a,{key:"a508c9984294f4be4f37b43ea4b8d5f7417c0818",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&&h)}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"]}}};P.style={default:T};export{P as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-BuVNvMVh.js";import{i as o,n as a}from"./component-names-C3fyby67.js";import{t as l}from"./i18n-LBpyQ66X.js";import{d as s,w as r,s as d,O as c,e as h,p,o as f,j as u}from"./common-Dd0zJQbD.js";import{v as b,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 z}from"./events-9-skLO0f.js";import"./i18n-CfLoIZ8T.js";const S=(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-popover-button--inline .kol-popover-button__button {\n display: inline;\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-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n .kol-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-pagination__page-size-select .kol-form-field-select {\n align-items: center;\n grid-template-columns: 1fr max-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],O=t=>!0===t||""===t||"object"==typeof t&&null!==t,P=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){S(this,t,{defaultValue:!1})}validateData(t){b(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){c(t,()=>{f(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){h(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=O(t),r(this,"_pagination",O,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&&z(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),c="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,h="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:"5ab8ff5b83647e809cddeccf2245696887bd12b4",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&c,t(a,{key:"a508c9984294f4be4f37b43ea4b8d5f7417c0818",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&&h)}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"]}}};P.style={default:T};export{P 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-Biu4X4Y_.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-C3fyby67.js";import{t as c}from"./i18n-LBpyQ66X.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 y,f as p,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-Dg5aYzVg.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 W}from"./isObject-DvSELytj.js";import"./i18n-CfLoIZ8T.js";const F=(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]",z="[object Function]",T="[object GeneratorFunction]",E="[object Proxy]";function K(e){if(!O(e))return!1;var t=$(e);return t==z||t==T||t==P||t==E}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 B=Function.prototype,I=B.toString;function N(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,Q=Function.prototype,X=Object.prototype,Y=Q.toString,q=X.hasOwnProperty,G=RegExp("^"+Y.call(q).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function J(e){return!(!O(e)||L(e))&&(K(e)?G:V).test(N(e))}function Z(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=Z(e,t);return J(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,yt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function pt(){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||pt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Dt="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Wt="[object Number]",Ft="[object Object]",Pt="[object RegExp]",zt="[object Set]",Tt="[object String]",Et="[object WeakMap]",Kt="[object ArrayBuffer]",Rt="[object DataView]",Ht="[object Float32Array]",Lt="[object Float64Array]",Bt="[object Int8Array]",It="[object Int16Array]",Nt="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Qt="[object Uint16Array]",Xt="[object Uint32Array]",Yt={};function qt(e){return x(e)&&lt(e.length)&&!!Yt[$(e)]}function Gt(e){return function(t){return e(t)}}Yt[Ht]=Yt[Lt]=Yt[Bt]=Yt[It]=Yt[Nt]=Yt[Ut]=Yt[Vt]=Yt[Qt]=Yt[Xt]=!0,Yt[At]=Yt[Ot]=Yt[Kt]=Yt[$t]=Yt[Rt]=Yt[Dt]=Yt[xt]=Yt[Ct]=Yt[Mt]=Yt[Wt]=Yt[Ft]=Yt[Pt]=Yt[zt]=Yt[Tt]=Yt[Et]=!1;var Jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Jt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Zt&&Zt.exports===Jt,ee=te&&C.process,ne=function(){try{var e=Zt&&Zt.require&&Zt.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&&yt(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 ye="__lodash_hash_undefined__",pe=Object.prototype,ke=pe.hasOwnProperty;function je(e){var t=this.__data__;if(ve){var n=t[e];return n===ye?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 We(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]}function Fe(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 ze(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])}}ze.prototype.clear=$e,ze.prototype.delete=Me,ze.prototype.get=We,ze.prototype.has=Fe,ze.prototype.set=Pe;var Te=tt(D,"Map");function Ee(){this.size=0,this.__data__={hash:new Oe,map:new(Te||ze),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 Be(e){return Re(this,e).has(e)}function Ie(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ne(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 ze,this.size=0}function Qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}Ne.prototype.clear=Ee,Ne.prototype.delete=He,Ne.prototype.get=Le,Ne.prototype.has=Be,Ne.prototype.set=Ie;var qe=200;function Ge(e,t){var n=this.__data__;if(n instanceof ze){var r=n.__data__;if(!Te||r.length<qe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(e,t),this.size=n.size,this}function Je(e){var t=this.__data__=new ze(e);this.size=t.size}function Ze(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[]}Je.prototype.clear=Ve,Je.prototype.delete=Qe,Je.prototype.get=Xe,Je.prototype.has=Ye,Je.prototype.set=Ge;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Ze(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]",yn=N(sn),pn=N(Te),kn=N(cn),jn=N(un),mn=N(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?N(n):"";if(r)switch(r){case yn:return _n;case pn: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 Ne;++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 Wn(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 Fn(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 zn=1,Tn=2,En="[object Boolean]",Kn="[object Date]",Rn="[object Error]",Hn="[object Map]",Ln="[object Number]",Bn="[object RegExp]",In="[object Set]",Nn="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",Qn="[object DataView]",Xn=W?W.prototype:void 0,Yn=Xn?Xn.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 En:case Kn:case Ln:return at(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Bn:case Nn:return e==t+"";case Hn:var l=Fn;case In:var s=r&zn;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=Wn(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,Jn=Object.prototype,Zn=Jn.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:Zn.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 Je),o||re(e)?Wn(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 Je),a(v,f,n,r,i)}}return!!u&&(i||(i=new Je),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){y(this,e)}validateHeaderCells(e){F(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){p(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:"a66eb9f22e8267d1bfcc00b2429b8234e07beb51",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"8c5bfcc3f01813773d07912fcf2fa78455efac06",_tableSettings:this.state._tableSettings}),e("div",{key:"6f9ac777bae4c27c80052aeeae5678ddff56a6bc",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"89710649cdcd7fcca523656de8f8b13fc3d9509f",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"0f5550f8377daed2043a18de8c2cdb5b6e45f554",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:"83577b101b26b8ee80bc81ccd12526fb78f576c4",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:"6fe763adb26ca11ebea14f035200df42c970d5cd",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-BuVNvMVh.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-C3fyby67.js";import{t as c}from"./i18n-LBpyQ66X.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 y,f as p,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-Bl9mUZR6.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 W}from"./isObject-DvSELytj.js";import"./i18n-CfLoIZ8T.js";const F=(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]",T="[object Function]",z="[object GeneratorFunction]",R="[object Proxy]";function E(e){if(!O(e))return!1;var t=$(e);return t==T||t==z||t==P||t==R}var K=D["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L(e){return!!H&&H in e}var B=Function.prototype,N=B.toString;function I(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,Q=Function.prototype,Z=Object.prototype,q=Q.toString,G=Z.hasOwnProperty,J=RegExp("^"+q.call(G).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X(e){return!(!O(e)||L(e))&&(E(e)?J:V).test(I(e))}function Y(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=Y(e,t);return X(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)&&!E(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,yt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function pt(){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||pt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Dt="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Wt="[object Number]",Ft="[object Object]",Pt="[object RegExp]",Tt="[object Set]",zt="[object String]",Rt="[object WeakMap]",Et="[object ArrayBuffer]",Kt="[object DataView]",Ht="[object Float32Array]",Lt="[object Float64Array]",Bt="[object Int8Array]",Nt="[object Int16Array]",It="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Qt="[object Uint16Array]",Zt="[object Uint32Array]",qt={};function Gt(e){return x(e)&&lt(e.length)&&!!qt[$(e)]}function Jt(e){return function(t){return e(t)}}qt[Ht]=qt[Lt]=qt[Bt]=qt[Nt]=qt[It]=qt[Ut]=qt[Vt]=qt[Qt]=qt[Zt]=!0,qt[At]=qt[Ot]=qt[Et]=qt[$t]=qt[Kt]=qt[Dt]=qt[xt]=qt[Ct]=qt[Mt]=qt[Wt]=qt[Ft]=qt[Pt]=qt[Tt]=qt[zt]=qt[Rt]=!1;var Xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Yt=Xt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Yt&&Yt.exports===Xt,ee=te&&C.process,ne=function(){try{var e=Yt&&Yt.require&&Yt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ie=ne&&ne.isTypedArray,re=ie?Jt(ie):Gt,ae=Object.prototype,oe=ae.hasOwnProperty;function le(e,t){var n=M(e),r=!n&&yt(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 ye="__lodash_hash_undefined__",pe=Object.prototype,ke=pe.hasOwnProperty;function je(e){var t=this.__data__;if(ve){var n=t[e];return n===ye?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 We(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]}function Fe(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 Te(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])}}Te.prototype.clear=$e,Te.prototype.delete=Me,Te.prototype.get=We,Te.prototype.has=Fe,Te.prototype.set=Pe;var ze=tt(D,"Map");function Re(){this.size=0,this.__data__={hash:new Oe,map:new(ze||Te),string:new Oe}}function Ee(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 Ee(t)?n["string"==typeof t?"string":"hash"]:n.map}function He(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 Be(e){return Ke(this,e).has(e)}function Ne(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 Te,this.size=0}function Qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ze(e){return this.__data__.get(e)}function qe(e){return this.__data__.has(e)}Ie.prototype.clear=Re,Ie.prototype.delete=He,Ie.prototype.get=Le,Ie.prototype.has=Be,Ie.prototype.set=Ne;var Ge=200;function Je(e,t){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!ze||r.length<Ge-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 Xe(e){var t=this.__data__=new Te(e);this.size=t.size}function Ye(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[]}Xe.prototype.clear=Ve,Xe.prototype.delete=Qe,Xe.prototype.get=Ze,Xe.prototype.has=qe,Xe.prototype.set=Je;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Ye(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]",yn=I(sn),pn=I(ze),kn=I(cn),jn=I(un),mn=I(et),gn=$;(sn&&gn(new sn(new ArrayBuffer(1)))!=_n||ze&&gn(new ze)!=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 yn:return _n;case pn: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 Wn(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 Fn(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 Tn=1,zn=2,Rn="[object Boolean]",En="[object Date]",Kn="[object Error]",Hn="[object Map]",Ln="[object Number]",Bn="[object RegExp]",Nn="[object Set]",In="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",Qn="[object DataView]",Zn=W?W.prototype:void 0,qn=Zn?Zn.valueOf:void 0;function Gn(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 Rn:case En:case Ln:return at(+e,+t);case Kn:return e.name==t.name&&e.message==t.message;case Bn:case In:return e==t+"";case Hn:var l=Fn;case Nn:var s=r&Tn;if(l||(l=Pn),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=zn,o.set(e,t);var h=Wn(l(e),l(t),r,a,i,o);return o.delete(e),h;case Un:if(qn)return qn.call(e)==qn.call(t)}return!1}var Jn=1,Xn=Object.prototype,Yn=Xn.hasOwnProperty;function ti(e,t,n,r,a,i){var o=n&Jn,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:Yn.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 Xe),o||re(e)?Wn(e,t,n,r,a,i):Gn(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 Xe),a(_,f,n,r,i)}}return!!u&&(i||(i=new Xe),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){y(this,e)}validateHeaderCells(e){F(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){p(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:"a66eb9f22e8267d1bfcc00b2429b8234e07beb51",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"8c5bfcc3f01813773d07912fcf2fa78455efac06",_tableSettings:this.state._tableSettings}),e("div",{key:"6f9ac777bae4c27c80052aeeae5678ddff56a6bc",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"89710649cdcd7fcca523656de8f8b13fc3d9509f",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"0f5550f8377daed2043a18de8c2cdb5b6e45f554",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:"83577b101b26b8ee80bc81ccd12526fb78f576c4",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:"6fe763adb26ca11ebea14f035200df42c970d5cd",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};