@public-ui/components 3.0.4-rc.2 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-Cn__GHrm.js → Alert-cn2Kv0FC.js} +1 -1
  3. package/dist/cjs/{Alert-Cn__GHrm.js.map → Alert-cn2Kv0FC.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-DWSzDd1Q.js → Collapsible-D6Rx6EuQ.js} +1 -1
  5. package/dist/cjs/{Collapsible-DWSzDd1Q.js.map → Collapsible-D6Rx6EuQ.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-BOZ7gyXg.js → CustomSuggestionsToggle-c31ciioQ.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-BOZ7gyXg.js.map → CustomSuggestionsToggle-c31ciioQ.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-BeahuAj_.js → FieldControlStateWrapper-Dvxn9pqq.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-BeahuAj_.js.map → FieldControlStateWrapper-Dvxn9pqq.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-CxVodEer.js → FormFieldStateWrapper-BpKPX_8A.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-CxVodEer.js.map → FormFieldStateWrapper-BpKPX_8A.js.map} +1 -1
  12. package/dist/cjs/{Heading-Bc6J6UAU.js → Heading-CtmpC6WX.js} +1 -1
  13. package/dist/cjs/{Heading-Bc6J6UAU.js.map → Heading-CtmpC6WX.js.map} +1 -1
  14. package/dist/cjs/{Icon-Dg77uirk.js → Icon-D3jAAEmG.js} +1 -1
  15. package/dist/cjs/{Icon-Dg77uirk.js.map → Icon-D3jAAEmG.js.map} +1 -1
  16. package/dist/cjs/Input-CGtUCWlW.js +4 -0
  17. package/dist/cjs/{Input-CPvmrua5.js.map → Input-CGtUCWlW.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-By2JfkJ_.js → InputStateWrapper-GOIpzL9H.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-By2JfkJ_.js.map → InputStateWrapper-GOIpzL9H.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-BbxT_Yo-.js → InternalUnderlinedBadgeText-CXiVmsfF.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-BbxT_Yo-.js.map → InternalUnderlinedBadgeText-CXiVmsfF.js.map} +1 -1
  22. package/dist/cjs/{Span-MNppCFVc.js → Span-SEBNg7Ys.js} +1 -1
  23. package/dist/cjs/{Span-MNppCFVc.js.map → Span-SEBNg7Ys.js.map} +1 -1
  24. package/dist/cjs/{app-globals-C8rtNS_J.js → app-globals-pBuoPDZL.js} +1 -1
  25. package/dist/cjs/{app-globals-C8rtNS_J.js.map → app-globals-pBuoPDZL.js.map} +1 -1
  26. package/dist/cjs/{controller-sflaowcD.js → controller-CWp-nBmW.js} +1 -1
  27. package/dist/cjs/{controller-sflaowcD.js.map → controller-CWp-nBmW.js.map} +1 -1
  28. package/dist/cjs/{controller-Clj3g7Ir.js → controller-V4SgR2qi.js} +1 -1
  29. package/dist/cjs/{controller-Clj3g7Ir.js.map → controller-V4SgR2qi.js.map} +1 -1
  30. package/dist/cjs/{controller-icon-BsFjV1Wt.js → controller-icon-DLwh9hYY.js} +1 -1
  31. package/dist/cjs/{controller-icon-BsFjV1Wt.js.map → controller-icon-DLwh9hYY.js.map} +1 -1
  32. package/dist/cjs/{controller-DVUhQuWI.js → controller-onlXPSoa.js} +1 -1
  33. package/dist/cjs/{controller-DVUhQuWI.js.map → controller-onlXPSoa.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-B6gnx5E0.js → dev.utils-DXEgSGmp.js} +1 -1
  35. package/dist/cjs/{dev.utils-B6gnx5E0.js.map → dev.utils-DXEgSGmp.js.map} +1 -1
  36. package/dist/cjs/{devtools-DrXKZZc4.js → devtools-z-oG8s9h.js} +1 -1
  37. package/dist/cjs/{devtools-DrXKZZc4.js.map → devtools-z-oG8s9h.js.map} +1 -1
  38. package/dist/cjs/index-Dv9GHNjE.js +4 -0
  39. package/dist/cjs/index-Dv9GHNjE.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-alert-wc.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  102. package/dist/cjs/kolibri.cjs.js +1 -1
  103. package/dist/cjs/loader.cjs.js +1 -1
  104. package/dist/cjs/test-component.cjs.entry.js +1 -1
  105. package/dist/esm/{Alert-CSRc8Vlr.js → Alert-BD7M6uRz.js} +1 -1
  106. package/dist/{kolibri/Alert-CSRc8Vlr.js.map → esm/Alert-BD7M6uRz.js.map} +1 -1
  107. package/dist/esm/{Collapsible--TI2kjff.js → Collapsible-Cm151Fs4.js} +1 -1
  108. package/dist/esm/{Collapsible--TI2kjff.js.map → Collapsible-Cm151Fs4.js.map} +1 -1
  109. package/dist/esm/{CustomSuggestionsToggle-uDye4Uns.js → CustomSuggestionsToggle-C-nYEmvT.js} +1 -1
  110. package/dist/{kolibri/CustomSuggestionsToggle-uDye4Uns.js.map → esm/CustomSuggestionsToggle-C-nYEmvT.js.map} +1 -1
  111. package/dist/esm/{FieldControlStateWrapper-CsCnsDKf.js → FieldControlStateWrapper-C1_urHeO.js} +1 -1
  112. package/dist/{kolibri/FieldControlStateWrapper-CsCnsDKf.js.map → esm/FieldControlStateWrapper-C1_urHeO.js.map} +1 -1
  113. package/dist/esm/{FormFieldStateWrapper-JzdOEGUS.js → FormFieldStateWrapper-C90koSDb.js} +1 -1
  114. package/dist/{kolibri/FormFieldStateWrapper-JzdOEGUS.js.map → esm/FormFieldStateWrapper-C90koSDb.js.map} +1 -1
  115. package/dist/esm/{Heading-Bx4SwJcX.js → Heading-K34kz2yJ.js} +1 -1
  116. package/dist/{kolibri/Heading-Bx4SwJcX.js.map → esm/Heading-K34kz2yJ.js.map} +1 -1
  117. package/dist/esm/{Icon-B4HuRse0.js → Icon-FjmG-C5E.js} +1 -1
  118. package/dist/esm/{Icon-B4HuRse0.js.map → Icon-FjmG-C5E.js.map} +1 -1
  119. package/dist/esm/{Input-Bfru3WQI.js → Input-B3EAo7Zn.js} +1 -1
  120. package/dist/{kolibri/Input-Bfru3WQI.js.map → esm/Input-B3EAo7Zn.js.map} +1 -1
  121. package/dist/esm/{InputStateWrapper-DHAUSNAA.js → InputStateWrapper-C5Wdo05z.js} +1 -1
  122. package/dist/esm/{InputStateWrapper-DHAUSNAA.js.map → InputStateWrapper-C5Wdo05z.js.map} +1 -1
  123. package/dist/esm/{InternalUnderlinedBadgeText-uelJXiTq.js → InternalUnderlinedBadgeText-9Tu8seHa.js} +1 -1
  124. package/dist/esm/{InternalUnderlinedBadgeText-uelJXiTq.js.map → InternalUnderlinedBadgeText-9Tu8seHa.js.map} +1 -1
  125. package/dist/esm/{Span-BRnL3F2G.js → Span-BlZWELRP.js} +1 -1
  126. package/dist/esm/{Span-BRnL3F2G.js.map → Span-BlZWELRP.js.map} +1 -1
  127. package/dist/esm/{app-globals-DHfxkIVm.js → app-globals-h0jVpMUb.js} +1 -1
  128. package/dist/esm/{app-globals-DHfxkIVm.js.map → app-globals-h0jVpMUb.js.map} +1 -1
  129. package/dist/esm/{controller-DzWd1W_P.js → controller-BshDxmnY.js} +1 -1
  130. package/dist/esm/{controller-DzWd1W_P.js.map → controller-BshDxmnY.js.map} +1 -1
  131. package/dist/esm/{controller-DYOqWrFp.js → controller-czapbbAQ.js} +1 -1
  132. package/dist/esm/{controller-DYOqWrFp.js.map → controller-czapbbAQ.js.map} +1 -1
  133. package/dist/esm/{controller-icon-BQ1Jj9uA.js → controller-icon-DB58M2Dn.js} +1 -1
  134. package/dist/{kolibri/controller-icon-BQ1Jj9uA.js.map → esm/controller-icon-DB58M2Dn.js.map} +1 -1
  135. package/dist/esm/{controller-B3yN4MUJ.js → controller-vMa681y9.js} +1 -1
  136. package/dist/esm/{controller-B3yN4MUJ.js.map → controller-vMa681y9.js.map} +1 -1
  137. package/dist/esm/{dev.utils-C5gRSnou.js → dev.utils-B8InC9wC.js} +1 -1
  138. package/dist/esm/{dev.utils-C5gRSnou.js.map → dev.utils-B8InC9wC.js.map} +1 -1
  139. package/dist/esm/{devtools-o8Bbxfop.js → devtools-D2tZX5IH.js} +1 -1
  140. package/dist/esm/{devtools-o8Bbxfop.js.map → devtools-D2tZX5IH.js.map} +1 -1
  141. package/dist/esm/index-2YbJq5J3.js +4 -0
  142. package/dist/esm/index-2YbJq5J3.js.map +1 -0
  143. package/dist/esm/kol-abbr.entry.js +1 -1
  144. package/dist/esm/kol-accordion.entry.js +1 -1
  145. package/dist/esm/kol-alert-wc.entry.js +1 -1
  146. package/dist/esm/kol-alert.entry.js +1 -1
  147. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  148. package/dist/esm/kol-avatar.entry.js +1 -1
  149. package/dist/esm/kol-badge.entry.js +1 -1
  150. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  151. package/dist/esm/kol-button-link.entry.js +1 -1
  152. package/dist/esm/kol-button-wc.entry.js +1 -1
  153. package/dist/esm/kol-button.entry.js +1 -1
  154. package/dist/esm/kol-card-wc.entry.js +1 -1
  155. package/dist/esm/kol-card.entry.js +1 -1
  156. package/dist/esm/kol-combobox.entry.js +1 -1
  157. package/dist/esm/kol-details.entry.js +1 -1
  158. package/dist/esm/kol-drawer.entry.js +1 -1
  159. package/dist/esm/kol-form.entry.js +1 -1
  160. package/dist/esm/kol-heading.entry.js +1 -1
  161. package/dist/esm/kol-icon.entry.js +1 -1
  162. package/dist/esm/kol-image.entry.js +1 -1
  163. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  164. package/dist/esm/kol-input-color.entry.js +1 -1
  165. package/dist/esm/kol-input-date.entry.js +1 -1
  166. package/dist/esm/kol-input-email.entry.js +1 -1
  167. package/dist/esm/kol-input-file.entry.js +1 -1
  168. package/dist/esm/kol-input-number.entry.js +1 -1
  169. package/dist/esm/kol-input-password.entry.js +1 -1
  170. package/dist/esm/kol-input-radio.entry.js +1 -1
  171. package/dist/esm/kol-input-range.entry.js +1 -1
  172. package/dist/esm/kol-input-text.entry.js +1 -1
  173. package/dist/esm/kol-kolibri.entry.js +1 -1
  174. package/dist/esm/kol-link-button.entry.js +1 -1
  175. package/dist/esm/kol-link-wc.entry.js +1 -1
  176. package/dist/esm/kol-link.entry.js +1 -1
  177. package/dist/esm/kol-modal.entry.js +1 -1
  178. package/dist/esm/kol-nav.entry.js +1 -1
  179. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  180. package/dist/esm/kol-pagination.entry.js +1 -1
  181. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  182. package/dist/esm/kol-popover-button.entry.js +1 -1
  183. package/dist/esm/kol-popover-wc.entry.js +1 -1
  184. package/dist/esm/kol-progress.entry.js +1 -1
  185. package/dist/esm/kol-quote.entry.js +1 -1
  186. package/dist/esm/kol-select.entry.js +1 -1
  187. package/dist/esm/kol-single-select.entry.js +1 -1
  188. package/dist/esm/kol-skip-nav.entry.js +1 -1
  189. package/dist/esm/kol-spin.entry.js +1 -1
  190. package/dist/esm/kol-split-button.entry.js +1 -1
  191. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  192. package/dist/esm/kol-table-stateful.entry.js +1 -1
  193. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  194. package/dist/esm/kol-table-stateless.entry.js +1 -1
  195. package/dist/esm/kol-tabs.entry.js +1 -1
  196. package/dist/esm/kol-textarea.entry.js +1 -1
  197. package/dist/esm/kol-toast-container.entry.js +1 -1
  198. package/dist/esm/kol-toolbar.entry.js +1 -1
  199. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  200. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  201. package/dist/esm/kol-tree-item.entry.js +1 -1
  202. package/dist/esm/kol-tree-wc.entry.js +1 -1
  203. package/dist/esm/kol-tree.entry.js +1 -1
  204. package/dist/esm/kol-version.entry.js +1 -1
  205. package/dist/esm/kolibri.js +1 -1
  206. package/dist/esm/loader.js +1 -1
  207. package/dist/esm/test-component.entry.js +1 -1
  208. package/dist/kolibri/{Alert-CSRc8Vlr.js → Alert-BD7M6uRz.js} +1 -1
  209. package/dist/{esm/Alert-CSRc8Vlr.js.map → kolibri/Alert-BD7M6uRz.js.map} +1 -1
  210. package/dist/kolibri/Collapsible-Cm151Fs4.js +4 -0
  211. package/dist/kolibri/{Collapsible--TI2kjff.js.map → Collapsible-Cm151Fs4.js.map} +1 -1
  212. package/dist/kolibri/{CustomSuggestionsToggle-uDye4Uns.js → CustomSuggestionsToggle-C-nYEmvT.js} +1 -1
  213. package/dist/{esm/CustomSuggestionsToggle-uDye4Uns.js.map → kolibri/CustomSuggestionsToggle-C-nYEmvT.js.map} +1 -1
  214. package/dist/kolibri/FieldControlStateWrapper-C1_urHeO.js +4 -0
  215. package/dist/{esm/FieldControlStateWrapper-CsCnsDKf.js.map → kolibri/FieldControlStateWrapper-C1_urHeO.js.map} +1 -1
  216. package/dist/kolibri/{FormFieldStateWrapper-JzdOEGUS.js → FormFieldStateWrapper-C90koSDb.js} +1 -1
  217. package/dist/{esm/FormFieldStateWrapper-JzdOEGUS.js.map → kolibri/FormFieldStateWrapper-C90koSDb.js.map} +1 -1
  218. package/dist/kolibri/{Heading-Bx4SwJcX.js → Heading-K34kz2yJ.js} +1 -1
  219. package/dist/{esm/Heading-Bx4SwJcX.js.map → kolibri/Heading-K34kz2yJ.js.map} +1 -1
  220. package/dist/kolibri/Icon-FjmG-C5E.js +4 -0
  221. package/dist/kolibri/{Icon-B4HuRse0.js.map → Icon-FjmG-C5E.js.map} +1 -1
  222. package/dist/kolibri/Input-B3EAo7Zn.js +4 -0
  223. package/dist/{esm/Input-Bfru3WQI.js.map → kolibri/Input-B3EAo7Zn.js.map} +1 -1
  224. package/dist/kolibri/{InputStateWrapper-DHAUSNAA.js → InputStateWrapper-C5Wdo05z.js} +1 -1
  225. package/dist/kolibri/{InputStateWrapper-DHAUSNAA.js.map → InputStateWrapper-C5Wdo05z.js.map} +1 -1
  226. package/dist/kolibri/InternalUnderlinedBadgeText-9Tu8seHa.js +4 -0
  227. package/dist/kolibri/{InternalUnderlinedBadgeText-uelJXiTq.js.map → InternalUnderlinedBadgeText-9Tu8seHa.js.map} +1 -1
  228. package/dist/kolibri/Span-BlZWELRP.js +4 -0
  229. package/dist/kolibri/{Span-BRnL3F2G.js.map → Span-BlZWELRP.js.map} +1 -1
  230. package/dist/kolibri/{app-globals-DHfxkIVm.js → app-globals-h0jVpMUb.js} +1 -1
  231. package/dist/kolibri/{app-globals-DHfxkIVm.js.map → app-globals-h0jVpMUb.js.map} +1 -1
  232. package/dist/kolibri/{controller-DzWd1W_P.js → controller-BshDxmnY.js} +1 -1
  233. package/dist/kolibri/{controller-DzWd1W_P.js.map → controller-BshDxmnY.js.map} +1 -1
  234. package/dist/kolibri/{controller-DYOqWrFp.js → controller-czapbbAQ.js} +1 -1
  235. package/dist/kolibri/{controller-DYOqWrFp.js.map → controller-czapbbAQ.js.map} +1 -1
  236. package/dist/kolibri/{controller-icon-BQ1Jj9uA.js → controller-icon-DB58M2Dn.js} +1 -1
  237. package/dist/{esm/controller-icon-BQ1Jj9uA.js.map → kolibri/controller-icon-DB58M2Dn.js.map} +1 -1
  238. package/dist/kolibri/{controller-B3yN4MUJ.js → controller-vMa681y9.js} +1 -1
  239. package/dist/kolibri/{controller-B3yN4MUJ.js.map → controller-vMa681y9.js.map} +1 -1
  240. package/dist/kolibri/{dev.utils-C5gRSnou.js → dev.utils-B8InC9wC.js} +1 -1
  241. package/dist/kolibri/{dev.utils-C5gRSnou.js.map → dev.utils-B8InC9wC.js.map} +1 -1
  242. package/dist/kolibri/{devtools-o8Bbxfop.js → devtools-D2tZX5IH.js} +1 -1
  243. package/dist/kolibri/{devtools-o8Bbxfop.js.map → devtools-D2tZX5IH.js.map} +1 -1
  244. package/dist/kolibri/{index-DeYD98_2.js → index-2YbJq5J3.js} +2 -2
  245. package/dist/kolibri/index-2YbJq5J3.js.map +1 -0
  246. package/dist/kolibri/kol-abbr.entry.js +1 -1
  247. package/dist/kolibri/kol-accordion.entry.js +1 -1
  248. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  249. package/dist/kolibri/kol-alert.entry.js +1 -1
  250. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  251. package/dist/kolibri/kol-avatar.entry.js +1 -1
  252. package/dist/kolibri/kol-badge.entry.js +1 -1
  253. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  254. package/dist/kolibri/kol-button-link.entry.js +1 -1
  255. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  256. package/dist/kolibri/kol-button.entry.js +1 -1
  257. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  258. package/dist/kolibri/kol-card.entry.js +1 -1
  259. package/dist/kolibri/kol-combobox.entry.js +1 -1
  260. package/dist/kolibri/kol-details.entry.js +1 -1
  261. package/dist/kolibri/kol-drawer.entry.js +1 -1
  262. package/dist/kolibri/kol-form.entry.js +1 -1
  263. package/dist/kolibri/kol-heading.entry.js +1 -1
  264. package/dist/kolibri/kol-icon.entry.js +1 -1
  265. package/dist/kolibri/kol-image.entry.js +1 -1
  266. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  267. package/dist/kolibri/kol-input-color.entry.js +1 -1
  268. package/dist/kolibri/kol-input-date.entry.js +1 -1
  269. package/dist/kolibri/kol-input-email.entry.js +1 -1
  270. package/dist/kolibri/kol-input-file.entry.js +1 -1
  271. package/dist/kolibri/kol-input-number.entry.js +1 -1
  272. package/dist/kolibri/kol-input-password.entry.js +1 -1
  273. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  274. package/dist/kolibri/kol-input-range.entry.js +1 -1
  275. package/dist/kolibri/kol-input-text.entry.js +1 -1
  276. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  277. package/dist/kolibri/kol-link-button.entry.js +1 -1
  278. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  279. package/dist/kolibri/kol-link.entry.js +1 -1
  280. package/dist/kolibri/kol-modal.entry.js +1 -1
  281. package/dist/kolibri/kol-nav.entry.js +1 -1
  282. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  283. package/dist/kolibri/kol-pagination.entry.js +1 -1
  284. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  285. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  286. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  287. package/dist/kolibri/kol-progress.entry.js +1 -1
  288. package/dist/kolibri/kol-quote.entry.js +1 -1
  289. package/dist/kolibri/kol-select.entry.js +1 -1
  290. package/dist/kolibri/kol-single-select.entry.js +1 -1
  291. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  292. package/dist/kolibri/kol-spin.entry.js +1 -1
  293. package/dist/kolibri/kol-split-button.entry.js +1 -1
  294. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  295. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  296. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  297. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  298. package/dist/kolibri/kol-tabs.entry.js +1 -1
  299. package/dist/kolibri/kol-textarea.entry.js +1 -1
  300. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  301. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  302. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  303. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  304. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  305. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  306. package/dist/kolibri/kol-tree.entry.js +1 -1
  307. package/dist/kolibri/kol-version.entry.js +1 -1
  308. package/dist/kolibri/kolibri.esm.js +1 -1
  309. package/dist/kolibri/test-component.entry.js +1 -1
  310. package/package.json +1 -1
  311. package/dist/cjs/Input-CPvmrua5.js +0 -4
  312. package/dist/cjs/index-DNUwdCyW.js +0 -4
  313. package/dist/cjs/index-DNUwdCyW.js.map +0 -1
  314. package/dist/esm/index-DeYD98_2.js +0 -4
  315. package/dist/esm/index-DeYD98_2.js.map +0 -1
  316. package/dist/kolibri/Collapsible--TI2kjff.js +0 -4
  317. package/dist/kolibri/FieldControlStateWrapper-CsCnsDKf.js +0 -4
  318. package/dist/kolibri/Icon-B4HuRse0.js +0 -4
  319. package/dist/kolibri/Input-Bfru3WQI.js +0 -4
  320. package/dist/kolibri/InternalUnderlinedBadgeText-uelJXiTq.js +0 -4
  321. package/dist/kolibri/Span-BRnL3F2G.js +0 -4
  322. package/dist/kolibri/index-DeYD98_2.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as t,r as i,g as e}from"./index-DeYD98_2.js";import{c as n}from"./clsx-eK3rPvPS.js";import{e as s}from"./component-names-CkE54Ym7.js";import{g as o,F as a}from"./FormFieldStateWrapper-JzdOEGUS.js";import{I as l,a as r}from"./controller-icon-BQ1Jj9uA.js";import{I as h}from"./InputStateWrapper-DHAUSNAA.js";import{C as d,a as c,b as u}from"./CustomSuggestionsToggle-uDye4Uns.js";import{t as p}from"./i18n-C7ZsbK5l.js";import{n as f}from"./dev.utils-C5gRSnou.js";import{w as m,d as v,N as b}from"./common-zXZUsQ7l.js";import{f as g,b as k}from"./controller-DYOqWrFp.js";import{v as y}from"./placeholder-CKKvVrmb.js";import{v as _}from"./required-DZ-b_DWV.js";import"./access-and-short-key-CBDgF26-.js";import"./disabled-oePQqAfy.js";import"./hide-label-BmYpplzr.js";import"./label-DGzuU0HV.js";import"./tooltip-align-CmSyNCv5.js";import"./align-BU6S1qiO.js";import"./events-CoPFQEiC.js";import"./associated.controller-BBBKf7S0.js";import"./bootstrap-B_0ftOOI.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./Heading-Bx4SwJcX.js";import"./Alert-CSRc8Vlr.js";import"./bem-DqV0swL_.js";import"./browser-DAVbNx-f.js";import"./InternalUnderlinedBadgeText-uelJXiTq.js";import"./reuse-CX4AQDkS.js";import"./Icon-B4HuRse0.js";import"./icons-CH_AgdgO.js";import"./Input-Bfru3WQI.js";import"./orientation-DdsLYtB3.js";class w extends l{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),g(this.keyOptionMap,n))},this.component=e}validateOptions(e){k(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){_(this.component,e)}validateValue(e){m(this.component,"_value",e=>void 0!==e,new Set(["KoliBriUnknown"]),e)}validatePlaceholder(e){y(this.component,e)}validateHideClearButton(e){v(this.component,"_hideClearButton",e)}validateRows(e){b(this.component,"_rows",e)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHideClearButton(this.component._hideClearButton),this.validateRows(this.component._rows)}}const x="/*\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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\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(1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-custom-suggestions-toggle:not(:disabled) {\n cursor: pointer;\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: white;\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-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete {\n cursor: pointer;\n }\n .kol-single-select__delete--disabled {\n cursor: not-allowed;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2rem / var(--kolibri-root-font-size, 16)) !important;\n }\n}",j=class{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.refInput)||void 0===e||e.focus()}onBlur(){var e,t,n;const i=null===(e=this.state._options)||void 0===e?void 0:e.find(e=>{var t,n;return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});i?this.selectOption(i):(this._inputValue=null===(n=null===(t=this.state._options)||void 0===t?void 0:t.find(e=>e.value===this._value))||void 0===n?void 0:n.label,this._filteredOptions=[...this.state._options]),this._isOpen=!1,this._hasOpened=!1}createEventWithTarget(e,t){const n=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(!(!0===this.state._disabled)){const e=null;this._focusedOptionIndex=-1,this._value=e,this._inputValue="",this._filteredOptions=[...this.state._options];const t=this.createEventWithTarget("input",{name:this.state._name,value:e}),n=this.createEventWithTarget("change",{name:this.state._name,value:e});this.controller.onFacade.onInput(t,!0,{value:e}),this.controller.onFacade.onChange(n,{value:e})}}selectOption(e){var t,n;this._value=e.value,this._inputValue=e.label;const i=this.createEventWithTarget("input",{name:null!==(t=this.state._name)&&void 0!==t?t:"",value:e.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:e.value});this.controller.onFacade.onInput(i,!1,e.value),this.controller.onFacade.onChange(o,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){""===(null==e?void 0:e.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var n,i;return null===(i=null===(n=t.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==e?void 0:e.toLowerCase())}))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e;t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1),this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex)}focusOption(e){if(this.refOptions){const t=this.refOptions[e];null==t||t.focus()}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(e=>e.label.toLowerCase().startsWith(t));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.refInput)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:e}=o(this.state),t=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:t,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){var e;const i=!0===this.state._disabled;return t(a,Object.assign({key:"5bcf2469d697a9b2bdc14028685054a91ca77514"},this.getFormFieldProps()),t(r,{key:"30b4d097ff9112b82008a23c1292a6d03cedfa26",state:this.state},t("div",{key:"f78c6e500d4a1787bf433aaf2abbc6338ff84e7d",class:"kol-single-select__group"},t(h,Object.assign({key:"b3ebaf939b90d90849524af229260f5df0084175"},this.getInputProps())),this._inputValue&&!this.state._hideClearButton&&t(s,{key:"b92fc19fe5d5fd2c179d0749a215382415ca56de",_icons:"codicon codicon-close","data-testid":"single-select-delete",_label:this.translateDeleteSelection,onClick:()=>{var e;this.clearSelection(),null===(e=this.refInput)||void 0===e||e.focus()},class:n("kol-single-select__delete",{"kol-single-select__delete--disabled":i})}),t(d,{key:"973862b8764f9ce57cabc46d1691a01807b28fdf",onClick:this.toggleListbox.bind(this),disabled:i})),this._isOpen&&!i&&t(c,{key:"73254ab590905102c32929045dbc892cc597d855",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`}},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,n)=>t(u,{index:n,option:e.label,searchTerm:this._inputValue,ref:e=>{e&&(this.refOptions[n]=e)},selected:this._value===e.value,onClick:t=>{var n;this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1,this._hasOpened=!1},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=n,this.focusOption(n))},onFocus:()=>{this._focusedOptionIndex=n,this.focusOption(n)},onKeyDown:t=>{var n;"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):t("li",{class:"kol-single-select__no-results-message"},this.translateNoResultsMessage," "))))}handleFocusOut(){setTimeout(()=>{var e;(null===(e=this.host)||void 0===e?void 0:e.contains(document.activeElement))||this.onBlur()},0)}handleWindowBlur(){this.onBlur()}handleKeyDown(e){var t,n;const i=(t,n)=>{var i;e.preventDefault(),void 0!==t&&(this._isOpen=t,t||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(e.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(t=this.refInput)||void 0===t||t.focus());break;case"Esc":case"Escape":this._hasOpened=!1,this._isOpen=!1,i(!1);break;case" ":this._isOpen?Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(e);break;case"NumpadEnter":case"Enter":this.toggleListbox(e),this._hasOpened=!1,this._isOpen=!1;break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(e){i(this,e),this.refOptions=[],this.translateDeleteSelection=p("kol-delete-selection"),this.translateNoResultsMessage=p("kol-no-results-message"),this.catchRef=e=>{this.refInput=e},this.toggleListbox=e=>{var t;null==e||e.preventDefault();if(!(!0===this.state._disabled||this._hasOpened)){this._isOpen=!0,this._hasOpened=!0,null===(t=this.refInput)||void 0===t||t.focus();const e=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(e=>e.label===this._inputValue):-1;this._focusedOptionIndex=e>=0?e:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._hasOpened=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hideClearButton=!1,this.state={_hideMsg:!1,_id:`id-${f()}`,_label:"",_options:[],_hideClearButton:!1},this.inputHasFocus=!1,this.controller=new w(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHideClearButton(e){this.controller.validateHideClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(t=>t.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,n;this.oldValue!==(null===(t=this.refInput)||void 0===t?void 0:t.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(e,this._value)}onClick(e){this.toggleListbox(e),this.controller.onFacade.onClick(e)}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}}};j.style={default:x};export{j as kol_single_select};
4
+ import{h as t,r as i,g as e}from"./index-2YbJq5J3.js";import{c as n}from"./clsx-eK3rPvPS.js";import{e as s}from"./component-names-CkE54Ym7.js";import{g as o,F as a}from"./FormFieldStateWrapper-C90koSDb.js";import{I as l,a as r}from"./controller-icon-DB58M2Dn.js";import{I as h}from"./InputStateWrapper-C5Wdo05z.js";import{C as d,a as c,b as u}from"./CustomSuggestionsToggle-C-nYEmvT.js";import{t as p}from"./i18n-C7ZsbK5l.js";import{n as f}from"./dev.utils-B8InC9wC.js";import{w as m,d as v,N as b}from"./common-zXZUsQ7l.js";import{f as g,b as k}from"./controller-czapbbAQ.js";import{v as y}from"./placeholder-CKKvVrmb.js";import{v as _}from"./required-DZ-b_DWV.js";import"./access-and-short-key-CBDgF26-.js";import"./disabled-oePQqAfy.js";import"./hide-label-BmYpplzr.js";import"./label-DGzuU0HV.js";import"./tooltip-align-CmSyNCv5.js";import"./align-BU6S1qiO.js";import"./events-CoPFQEiC.js";import"./associated.controller-BBBKf7S0.js";import"./bootstrap-B_0ftOOI.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./Heading-K34kz2yJ.js";import"./Alert-BD7M6uRz.js";import"./bem-DqV0swL_.js";import"./browser-DAVbNx-f.js";import"./InternalUnderlinedBadgeText-9Tu8seHa.js";import"./reuse-CX4AQDkS.js";import"./Icon-FjmG-C5E.js";import"./icons-CH_AgdgO.js";import"./Input-B3EAo7Zn.js";import"./orientation-DdsLYtB3.js";class w extends l{constructor(t,e,n){super(t,e,n),this.keyOptionMap=new Map,this.afterPatchOptions=(t,e,n,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const n=e.has("_options")?e.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),g(this.keyOptionMap,n))},this.component=t}validateOptions(t){k(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(t){_(this.component,t)}validateValue(t){m(this.component,"_value",t=>void 0!==t,new Set(["KoliBriUnknown"]),t)}validatePlaceholder(t){y(this.component,t)}validateHideClearButton(t){v(this.component,"_hideClearButton",t)}validateRows(t){b(this.component,"_rows",t)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHideClearButton(this.component._hideClearButton),this.validateRows(this.component._rows)}}const j="/*\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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\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(1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-custom-suggestions-toggle:not(:disabled) {\n cursor: pointer;\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: white;\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-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete {\n cursor: pointer;\n }\n .kol-single-select__delete--disabled {\n cursor: not-allowed;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2rem / var(--kolibri-root-font-size, 16)) !important;\n }\n}",x=class{async getValue(){return this._value}async kolFocus(){var t;null===(t=this.refInput)||void 0===t||t.focus()}onBlur(){var t,e,n;const i=null===(t=this.state._options)||void 0===t?void 0:t.find(t=>{var e,n;return(null===(e=t.label)||void 0===e?void 0:e.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});i?this.selectOption(i):(this._inputValue=null===(n=null===(e=this.state._options)||void 0===e?void 0:e.find(t=>t.value===this._value))||void 0===n?void 0:n.label,this._filteredOptions=[...this.state._options]),this._isOpen=!1,this._hasOpened=!1}createEventWithTarget(t,e){const n=new CustomEvent(t,{bubbles:!0,detail:e});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(!(!0===this.state._disabled)){const t=null;this._focusedOptionIndex=-1,this._value=t,this._inputValue="",this._filteredOptions=[...this.state._options];const e=this.createEventWithTarget("input",{name:this.state._name,value:t}),n=this.createEventWithTarget("change",{name:this.state._name,value:t});this.controller.onFacade.onInput(e,!0,{value:t}),this.controller.onFacade.onChange(n,{value:t})}}selectOption(t){var e,n;this._value=t.value,this._inputValue=t.label;const i=this.createEventWithTarget("input",{name:null!==(e=this.state._name)&&void 0!==e?e:"",value:t.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:t.value});this.controller.onFacade.onInput(i,!1,t.value),this.controller.onFacade.onChange(o,t.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(t){const e=t.target;this._inputValue=e.value,this._isOpen=!0,this.setFilteredOptionsByQuery(e.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(t){1===t.key.length&&/[a-z0-9]/i.test(t.key)&&(t.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(t.key))}setFilteredOptionsByQuery(t){""===(null==t?void 0:t.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&t.length>0&&(this._filteredOptions=this.state._options.filter(e=>{var n,i;return null===(i=null===(n=e.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==t?void 0:t.toLowerCase())}))}moveFocus(t){if(!this._filteredOptions)return;let e=this._focusedOptionIndex+t;e>=this._filteredOptions.length&&(e=0),e<0&&(e=this._filteredOptions.length-1),this._focusedOptionIndex=e,this.focusOption(this._focusedOptionIndex)}focusOption(t){if(this.refOptions){const e=this.refOptions[t];null==e||e.focus()}}focusSuggestionStartingWith(t){const e=t.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(t=>t.label.toLowerCase().startsWith(e));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.refInput)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:t}=o(this.state),e=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:e,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}render(){var e;const i=!0===this.state._disabled;return t(a,Object.assign({key:"5bcf2469d697a9b2bdc14028685054a91ca77514"},this.getFormFieldProps()),t(r,{key:"30b4d097ff9112b82008a23c1292a6d03cedfa26",state:this.state},t("div",{key:"f78c6e500d4a1787bf433aaf2abbc6338ff84e7d",class:"kol-single-select__group"},t(h,Object.assign({key:"b3ebaf939b90d90849524af229260f5df0084175"},this.getInputProps())),this._inputValue&&!this.state._hideClearButton&&t(s,{key:"b92fc19fe5d5fd2c179d0749a215382415ca56de",_icons:"codicon codicon-close","data-testid":"single-select-delete",_label:this.translateDeleteSelection,onClick:()=>{var t;this.clearSelection(),null===(t=this.refInput)||void 0===t||t.focus()},class:n("kol-single-select__delete",{"kol-single-select__delete--disabled":i})}),t(d,{key:"973862b8764f9ce57cabc46d1691a01807b28fdf",onClick:this.toggleListbox.bind(this),disabled:i})),this._isOpen&&!i&&t(c,{key:"73254ab590905102c32929045dbc892cc597d855",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`}},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,n)=>t(u,{index:n,option:e.label,searchTerm:this._inputValue,ref:t=>{t&&(this.refOptions[n]=t)},selected:this._value===e.value,onClick:t=>{var n;this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1,this._hasOpened=!1},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=n,this.focusOption(n))},onFocus:()=>{this._focusedOptionIndex=n,this.focusOption(n)},onKeyDown:t=>{var n;"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):t("li",{class:"kol-single-select__no-results-message"},this.translateNoResultsMessage," "))))}handleFocusOut(){setTimeout(()=>{var t;(null===(t=this.host)||void 0===t?void 0:t.contains(document.activeElement))||this.onBlur()},0)}handleWindowBlur(){this.onBlur()}handleKeyDown(t){var e,n;const i=(e,n)=>{var i;t.preventDefault(),void 0!==e&&(this._isOpen=e,e||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(t.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(e=this.refInput)||void 0===e||e.focus());break;case"Esc":case"Escape":this._hasOpened=!1,this._isOpen=!1,i(!1);break;case" ":this._isOpen?Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(t);break;case"NumpadEnter":case"Enter":this.toggleListbox(t),this._hasOpened=!1,this._isOpen=!1;break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(t){i(this,t),this.refOptions=[],this.translateDeleteSelection=p("kol-delete-selection"),this.translateNoResultsMessage=p("kol-no-results-message"),this.catchRef=t=>{this.refInput=t},this.toggleListbox=t=>{var e;null==t||t.preventDefault();if(!(!0===this.state._disabled||this._hasOpened)){this._isOpen=!0,this._hasOpened=!0,null===(e=this.refInput)||void 0===e||e.focus();const t=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(t=>t.label===this._inputValue):-1;this._focusedOptionIndex=t>=0?t:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._hasOpened=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hideClearButton=!1,this.state={_hideMsg:!1,_id:`id-${f()}`,_label:"",_options:[],_hideClearButton:!1},this.inputHasFocus=!1,this.controller=new w(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateOptions(t){this.controller.validateOptions(t),this._filteredOptions=t,this.updateInputValue(this._value)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t),this.oldValue=t,this.updateInputValue(t)}validateHideClearButton(t){this.controller.validateHideClearButton(t)}validateRows(t){this.controller.validateRows(t)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(t){if(Array.isArray(this._options)){const e=this._options.find(e=>e.value===t);this._inputValue=e?String(e.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(t){var e,n;this.oldValue!==(null===(e=this.refInput)||void 0===e?void 0:e.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(t,this._value)}onClick(t){this.toggleListbox(t),this.controller.onFacade.onClick(t)}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}}};x.style={default:j};export{x as kol_single_select};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e}from"./index-DeYD98_2.js";import"./common-zXZUsQ7l.js";import{v as t}from"./label-DGzuU0HV.js";import{r as i,a as o}from"./unique-nav-labels-Bm9ZvlTf.js";import{w as a}from"./validation-oaGI9Wed.js";import{f as l}from"./component-names-CkE54Ym7.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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: #fff;\n position: unset;\n left: unset;\n }\n}",r=class{constructor(e){n(this,e),this.state={_label:"",_links:[]}}render(){return e("nav",{key:"912f8ac6ce63cddd0fa738db9ef6ff987b2a2db9",class:"kol-skip-nav","aria-label":this.state._label},e("ul",{key:"79991f7d918e9bbf6891d479804f2520356f2a41",class:"kol-skip-nav__list"},this.state._links.map((n,t)=>e("li",{class:"kol-skip-nav__list-item",key:t},e(l,Object.assign({},n))))))}validateLabel(n,e,a=!1){a||i(this.state._label),t(this,n,{required:!0}),o(this.state._label)}validateLinks(n){a("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){i(this.state._label)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}};r.style={default:s};export{r as kol_skip_nav};
4
+ import{r as n,h as e}from"./index-2YbJq5J3.js";import"./common-zXZUsQ7l.js";import{v as t}from"./label-DGzuU0HV.js";import{r as i,a as o}from"./unique-nav-labels-Bm9ZvlTf.js";import{w as a}from"./validation-oaGI9Wed.js";import{f as l}from"./component-names-CkE54Ym7.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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: #fff;\n position: unset;\n left: unset;\n }\n}",r=class{constructor(e){n(this,e),this.state={_label:"",_links:[]}}render(){return e("nav",{key:"912f8ac6ce63cddd0fa738db9ef6ff987b2a2db9",class:"kol-skip-nav","aria-label":this.state._label},e("ul",{key:"79991f7d918e9bbf6891d479804f2520356f2a41",class:"kol-skip-nav__list"},this.state._links.map((n,t)=>e("li",{class:"kol-skip-nav__list-item",key:t},e(l,Object.assign({},n))))))}validateLabel(n,e,a=!1){a||i(this.state._label),t(this,n,{required:!0}),o(this.state._label)}validateLinks(n){a("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){i(this.state._label)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}};r.style={default:s};export{r as kol_skip_nav};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,H as i,F as t}from"./index-DeYD98_2.js";import{w as o}from"./common-zXZUsQ7l.js";import{v as a}from"./label-DGzuU0HV.js";import{v as r}from"./show-D0rlMMpf.js";import{t as s}from"./i18n-C7ZsbK5l.js";import{c as l}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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(48rem / var(--kolibri-root-font-size, 16));\n height: calc(48rem / 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(16rem / 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(48rem / var(--kolibri-root-font-size, 16));\n height: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner-element {\n border-radius: 50%;\n position: absolute;\n top: calc(0.16rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8rem / var(--kolibri-root-font-size, 16));\n height: calc(12.8rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(0.16rem / var(--kolibri-root-font-size, 16)) solid #fff;\n }\n .kol-spin__spinner-element--1 {\n background-color: #000;\n left: calc(0.16rem / 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.16rem / 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.6rem / 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.6rem / 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(2rem / 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(t,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=s("kol-action-running"),this.translateActionDone=s("kol-action-done"),this._show=!1,this._variant="dot",this.state={_variant:"dot",_label:void 0}}render(){var n,t;return e(i,{key:"c93b62db81e8d08c9758963db96b9c493913ea57",class:"kol-spin","aria-live":"polite"},this.state._label&&(this.state._show||this.showToggled)&&e("span",{key:"b4015521e2461e12607aab303be8e86482d826e6",class:"visually-hidden"},this.state._label),this.state._show?e("span",{"aria-busy":"true","aria-label":null!==(n=this.state._label)&&void 0!==n?n:this.translateActionRunning,class:l("kol-spin__spinner",`kol-spin__spinner--${this.state._variant}`),role:"alert"},h(this.state._variant)):this.showToggled&&e("span",{"aria-label":null!==(t=this.state._label)&&void 0!==t?t:this.translateActionDone,"aria-busy":"false",role:"alert"}))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,r(this,n)}validateLabel(n){a(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,H as i,F as t}from"./index-2YbJq5J3.js";import{w as o}from"./common-zXZUsQ7l.js";import{v as a}from"./label-DGzuU0HV.js";import{v as r}from"./show-D0rlMMpf.js";import{t as s}from"./i18n-C7ZsbK5l.js";import{c as l}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.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(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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(48rem / var(--kolibri-root-font-size, 16));\n height: calc(48rem / 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(16rem / 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(48rem / var(--kolibri-root-font-size, 16));\n height: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner-element {\n border-radius: 50%;\n position: absolute;\n top: calc(0.16rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8rem / var(--kolibri-root-font-size, 16));\n height: calc(12.8rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(0.16rem / var(--kolibri-root-font-size, 16)) solid #fff;\n }\n .kol-spin__spinner-element--1 {\n background-color: #000;\n left: calc(0.16rem / 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.16rem / 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.6rem / 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.6rem / 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(2rem / 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(t,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=s("kol-action-running"),this.translateActionDone=s("kol-action-done"),this._show=!1,this._variant="dot",this.state={_variant:"dot",_label:void 0}}render(){var n,t;return e(i,{key:"c93b62db81e8d08c9758963db96b9c493913ea57",class:"kol-spin","aria-live":"polite"},this.state._label&&(this.state._show||this.showToggled)&&e("span",{key:"b4015521e2461e12607aab303be8e86482d826e6",class:"visually-hidden"},this.state._label),this.state._show?e("span",{"aria-busy":"true","aria-label":null!==(n=this.state._label)&&void 0!==n?n:this.translateActionRunning,class:l("kol-spin__spinner",`kol-spin__spinner--${this.state._variant}`),role:"alert"},h(this.state._variant)):this.showToggled&&e("span",{"aria-label":null!==(t=this.state._label)&&void 0!==t?t:this.translateActionDone,"aria-busy":"false",role:"alert"}))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,r(this,n)}validateLabel(n){a(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,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t}from"./index-DeYD98_2.js";import{t as e}from"./i18n-C7ZsbK5l.js";import{l as o,d as i}from"./component-names-CkE54Ym7.js";import{c as a}from"./clsx-eK3rPvPS.js";import"./common-zXZUsQ7l.js";import"./i18n-ZF6JbdVP.js";const s="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n .kol-split-button {\n display: flex;\n position: relative;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n }\n .kol-split-button__button {\n flex-grow: 1;\n text-align: left;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2rem / 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:"5a243be782c854c759a1e649624435137918b698",class:"kol-split-button"},t("div",{key:"98eae8fe12b95afa454c6b788020f7a56d592425",class:"kol-split-button__root"},t(i,{key:"94e45c0da02f8f3e2a1073779ee51d0e2a270c2a",class:a("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:"09f7b0b56c1281bf1030d396a55e158d77904087",class:"kol-split-button__horizontal-line"}),t(i,{key:"58798ef2211f26733b097a8ae30794a3052d8d63",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?e(`${n}-close`):e(`${n}-open`),_on:this.clickToggleHandler})),t(o,{key:"49bfaad22ce73bf285321031f2b797162444f660",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"6632adad72763f17e4178a3faf1e4a5d5cd49661"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}static get delegatesFocus(){return!0}};l.style={default:s};export{l as kol_split_button};
4
+ import{r as n,h as t}from"./index-2YbJq5J3.js";import{t as e}from"./i18n-C7ZsbK5l.js";import{l as o,d as i}from"./component-names-CkE54Ym7.js";import{c as a}from"./clsx-eK3rPvPS.js";import"./common-zXZUsQ7l.js";import"./i18n-ZF6JbdVP.js";const s="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n .kol-split-button {\n display: flex;\n position: relative;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n }\n .kol-split-button__button {\n flex-grow: 1;\n text-align: left;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2rem / 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:"5a243be782c854c759a1e649624435137918b698",class:"kol-split-button"},t("div",{key:"98eae8fe12b95afa454c6b788020f7a56d592425",class:"kol-split-button__root"},t(i,{key:"94e45c0da02f8f3e2a1073779ee51d0e2a270c2a",class:a("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:"09f7b0b56c1281bf1030d396a55e158d77904087",class:"kol-split-button__horizontal-line"}),t(i,{key:"58798ef2211f26733b097a8ae30794a3052d8d63",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?e(`${n}-close`):e(`${n}-open`),_on:this.clickToggleHandler})),t(o,{key:"49bfaad22ce73bf285321031f2b797162444f660",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},t("slot",{key:"6632adad72763f17e4178a3faf1e4a5d5cd49661"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}static get delegatesFocus(){return!0}};l.style={default:s};export{l as kol_split_button};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as e,g as s}from"./index-DeYD98_2.js";import{t as i}from"./i18n-C7ZsbK5l.js";import{t as a,b as l,u as n,v as o,d as b,j as c}from"./component-names-CkE54Ym7.js";import{d,K as h}from"./events-CoPFQEiC.js";import"./common-zXZUsQ7l.js";import"./i18n-ZF6JbdVP.js";const r=class{constructor(e){t(this,e),this.tableSettings={columns:[]},this.errorMessage=null,this.translateTableSettings=i("kol-table-settings"),this.translateTableSettingsCancel=i("kol-table-settings-cancel"),this.translateTableSettingsApply=i("kol-table-settings-apply"),this.translateErrorAllInvisible=i("kol-table-settings-error-all-invisible"),this.translateColumnNotHidable=i("kol-table-settings-column-not-hidable"),this._tableSettings={columns:[]}}handleTableSettingsChange(e){this.tableSettings=Object.assign(Object.assign({},e),{columns:this.sortColumnsByPosition(e.columns)})}componentWillLoad(){this.handleTableSettingsChange(this._tableSettings)}sortColumnsByPosition(e){return[...e].sort((e,t)=>e.position-t.position)}moveColumn(e,t){const s=[...this.tableSettings.columns],i=s.findIndex(t=>t.key===e),a="up"===t?i-1:i+1,n=s[i],l=s[a],o=s.map(e=>e.key===n.key?Object.assign(Object.assign({},e),{position:l.position}):e.key===l.key?Object.assign(Object.assign({},e),{position:n.position}):e);this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.sortColumnsByPosition(o)})}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?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,d(this.host,h.settingsChange,this.tableSettings),null===(t=this.popoverRef)||void 0===t||t.hidePopover()):this.errorMessage=this.translateErrorAllInvisible}render(){const t=[...this.tableSettings.columns].sort((e,t)=>e.position-t.position);return e(c,{key:"ba6964d7d0015211d50a68536b36be024ee0f418",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},e("div",{key:"ee4075b1511fa1bec77a7068ff91e7e6a6f26c67",class:"kol-table-settings__content"},e(a,{key:"63f1aba0d47cfd03725a3d458f0b98d9b739022e",_label:this.translateTableSettings,_level:0}),this.errorMessage&&e(l,{key:"6824b98b2b9b62260330053fe79ca0ee30bc15d7",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),e("form",{key:"2bf2773cacaee3f90007ea3b8b1971732b67b4b5",onSubmit:this.handleSubmit.bind(this)},e("div",{key:"3970a3988ebb05498fda0b485282f134b2fbc513",class:"kol-table-settings__columns-container"},e("div",{key:"3e7e9f1726a3eb9a605563d8cb23966f500c4ec5",class:"kol-table-settings__columns"},t.map((s,a)=>e("div",{key:s.key,class:"kol-table-settings__column"},e(n,{_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)}}),e("span",null,s.label),e(o,{_hideLabel:!0,_value:s.width,_label:i("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_on:{onInput:(e,t)=>this.handleWidthChange(s.key,t)}}),e(b,{_icons:"codicon codicon-arrow-up",_label:i("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"up")},_disabled:0===a,"data-testid":"table-settings-move-up"}),e(b,{_icons:"codicon codicon-arrow-down",_label:i("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"down")},_disabled:a===t.length-1,"data-testid":"table-settings-move-down"}))))),e("div",{key:"f762fa692848ff9161a9a7f8db4e1d4c36d059c8",class:"kol-table-settings__actions"},e(b,{key:"42401475bdf959ddee26b8489d775bb481ce5727",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),e(b,{key:"c24e37a9d6a589d6a395156adfb574f70116c075",_label:this.translateTableSettingsApply,_buttonVariant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_tableSettings:["handleTableSettingsChange"]}}};export{r as kol_table_settings_wc};
4
+ import{r as t,h as e,g as s}from"./index-2YbJq5J3.js";import{t as i}from"./i18n-C7ZsbK5l.js";import{t as a,b as l,u as n,v as o,d as b,j as c}from"./component-names-CkE54Ym7.js";import{d,K as h}from"./events-CoPFQEiC.js";import"./common-zXZUsQ7l.js";import"./i18n-ZF6JbdVP.js";const r=class{constructor(e){t(this,e),this.tableSettings={columns:[]},this.errorMessage=null,this.translateTableSettings=i("kol-table-settings"),this.translateTableSettingsCancel=i("kol-table-settings-cancel"),this.translateTableSettingsApply=i("kol-table-settings-apply"),this.translateErrorAllInvisible=i("kol-table-settings-error-all-invisible"),this.translateColumnNotHidable=i("kol-table-settings-column-not-hidable"),this._tableSettings={columns:[]}}handleTableSettingsChange(e){this.tableSettings=Object.assign(Object.assign({},e),{columns:this.sortColumnsByPosition(e.columns)})}componentWillLoad(){this.handleTableSettingsChange(this._tableSettings)}sortColumnsByPosition(e){return[...e].sort((e,t)=>e.position-t.position)}moveColumn(e,t){const s=[...this.tableSettings.columns],i=s.findIndex(t=>t.key===e),a="up"===t?i-1:i+1,n=s[i],l=s[a],o=s.map(e=>e.key===n.key?Object.assign(Object.assign({},e),{position:l.position}):e.key===l.key?Object.assign(Object.assign({},e),{position:n.position}):e);this.tableSettings=Object.assign(Object.assign({},this.tableSettings),{columns:this.sortColumnsByPosition(o)})}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?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,d(this.host,h.settingsChange,this.tableSettings),null===(t=this.popoverRef)||void 0===t||t.hidePopover()):this.errorMessage=this.translateErrorAllInvisible}render(){const t=[...this.tableSettings.columns].sort((e,t)=>e.position-t.position);return e(c,{key:"ba6964d7d0015211d50a68536b36be024ee0f418",ref:e=>this.popoverRef=e,class:"kol-table-settings",_icons:"codicon codicon-settings-gear",_label:this.translateTableSettings,_popoverAlign:"top",_hideLabel:!0},e("div",{key:"ee4075b1511fa1bec77a7068ff91e7e6a6f26c67",class:"kol-table-settings__content"},e(a,{key:"63f1aba0d47cfd03725a3d458f0b98d9b739022e",_label:this.translateTableSettings,_level:0}),this.errorMessage&&e(l,{key:"6824b98b2b9b62260330053fe79ca0ee30bc15d7",_type:"error",_label:this.errorMessage,_variant:"msg",class:"kol-table-settings__error-message"}),e("form",{key:"2bf2773cacaee3f90007ea3b8b1971732b67b4b5",onSubmit:this.handleSubmit.bind(this)},e("div",{key:"3970a3988ebb05498fda0b485282f134b2fbc513",class:"kol-table-settings__columns-container"},e("div",{key:"3e7e9f1726a3eb9a605563d8cb23966f500c4ec5",class:"kol-table-settings__columns"},t.map((s,a)=>e("div",{key:s.key,class:"kol-table-settings__column"},e(n,{_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)}}),e("span",null,s.label),e(o,{_hideLabel:!0,_value:s.width,_label:i("kol-table-settings-column-width",{placeholders:{column:s.label}}),_min:1,_on:{onInput:(e,t)=>this.handleWidthChange(s.key,t)}}),e(b,{_icons:"codicon codicon-arrow-up",_label:i("kol-table-settings-move-up",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"up")},_disabled:0===a,"data-testid":"table-settings-move-up"}),e(b,{_icons:"codicon codicon-arrow-down",_label:i("kol-table-settings-move-down",{placeholders:{column:s.label}}),_hideLabel:!0,_buttonVariant:"ghost",_on:{onClick:()=>this.moveColumn(s.key,"down")},_disabled:a===t.length-1,"data-testid":"table-settings-move-down"}))))),e("div",{key:"f762fa692848ff9161a9a7f8db4e1d4c36d059c8",class:"kol-table-settings__actions"},e(b,{key:"42401475bdf959ddee26b8489d775bb481ce5727",_label:this.translateTableSettingsCancel,_buttonVariant:"secondary",_on:{onClick:()=>this.handleCancel()},"data-testid":"table-settings-cancel"}),e(b,{key:"c24e37a9d6a589d6a395156adfb574f70116c075",_label:this.translateTableSettingsApply,_buttonVariant:"primary",_type:"submit","data-testid":"table-settings-apply"})))))}get host(){return s(this)}static get watchers(){return{_tableSettings:["handleTableSettingsChange"]}}};export{r 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-DeYD98_2.js";import{i as o,m as a}from"./component-names-CkE54Ym7.js";import{t as l}from"./i18n-C7ZsbK5l.js";import{d as s,w as r,s as d,O as h,e as c,p,o as b,j as u}from"./common-zXZUsQ7l.js";import{v as f}from"./label-DGzuU0HV.js";import{v as m,a as g,b as _,c as k,d as v}from"./table-settings-CF9uiyi4.js";import{C as y}from"./keyboard-D6PoWr38.js";import{K as w,d as x}from"./events-CoPFQEiC.js";import"./i18n-ZF6JbdVP.js";const z=(t,n,e={})=>{s(t,"_allowMultiSort",n,Object.assign({defaultValue:!1},e))},S=["top","bottom","both"],j=(t,n)=>{r(t,"_paginationPosition",t=>"string"==typeof t&&S.includes(t),new Set([`PaginationPositionPropType {${S.join(", ")}`]),n,{defaultValue:"bottom"})},C='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\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(1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n text-align: center;\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 margin: auto;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n overflow: hidden;\n gap: calc(8rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100rem / 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__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\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__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 justify-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n justify-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n justify-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-pagination {\n display: grid;\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}',P=[10,20,50,100],O=t=>!0===t||""===t||"object"==typeof t&&null!==t,D=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"},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);if(0!==a)return"ASC"===i.direction?a:-a}return 0}),d(this,"_sortedData",t)}}validateAllowMultiSort(t){z(this,t,{defaultValue:!1})}validateData(t){m(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){g(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){j(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key===(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex(n=>n.key===t.key);if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){h(t,()=>{b(t,()=>{try{t=p(t)}catch(t){}r(this,"_headers",t=>"object"==typeof t&&null!==t,new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,a;const o=t=>{let n=!1;t.forEach(t=>{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){f(this,t,{required:!0})}validateMinWidth(t){c(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){_(this,t)}validateOn(t){k(this,t)}validateTableSettings(t){v(this,t)}validatePagination(t){try{t=p(t)}catch(t){}this.showPagination=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(w.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(w.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)}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",null,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||P,_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=this.state._sortedData.filter(n=>t.includes(n[i]));if(!1===(null==e?void 0:e.multiple))return a[0];if(i)return a}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:"object"==typeof n?n:[n]})}));const a=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[y.onSelectionChange])&&this.state._on[y.onSelectionChange](t,a),this.host&&x(this.host,w.selectionChange,a)}async getSelection(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)}render(){var n,i,o,l,s,r;const d=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(i=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==i?i:10:this.state._sortedData.length,this.state._pagination._page||1),h="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,c="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(l=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==l?l:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==r?r:[]};return t(e,{key:"f4d7920efb2142e1e0b9c2dd3498490874eb9d80",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&h,t(a,{key:"61746f51c9447486bf9cd17a82128a6078a65fde",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}),this.pageEndSlice>0&&this.showPagination&&c)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};D.style={default:C};export{D as kol_table_stateful};
4
+ import{r as n,h as t,H as e,g as i}from"./index-2YbJq5J3.js";import{i as o,m as a}from"./component-names-CkE54Ym7.js";import{t as l}from"./i18n-C7ZsbK5l.js";import{d as s,w as r,s as d,O as h,e as c,p,o as b,j as u}from"./common-zXZUsQ7l.js";import{v as f}from"./label-DGzuU0HV.js";import{v as m,a as g,b as _,c as k,d as v}from"./table-settings-CF9uiyi4.js";import{C as y}from"./keyboard-D6PoWr38.js";import{K as w,d as x}from"./events-CoPFQEiC.js";import"./i18n-ZF6JbdVP.js";const z=(t,n,e={})=>{s(t,"_allowMultiSort",n,Object.assign({defaultValue:!1},e))},S=["top","bottom","both"],j=(t,n)=>{r(t,"_paginationPosition",t=>"string"==typeof t&&S.includes(t),new Set([`PaginationPositionPropType {${S.join(", ")}`]),n,{defaultValue:"bottom"})},C='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\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 * {\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 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: absolute;\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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n contain: layout;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\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(1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n text-align: center;\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 margin: auto;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n overflow: hidden;\n gap: calc(8rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100rem / 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__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\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__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 justify-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n justify-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n justify-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: "";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-pagination {\n display: grid;\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: "•••";\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}',P=[10,20,50,100],O=t=>!0===t||""===t||"object"==typeof t&&null!==t,T=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"},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);if(0!==a)return"ASC"===i.direction?a:-a}return 0}),d(this,"_sortedData",t)}}validateAllowMultiSort(t){z(this,t,{defaultValue:!1})}validateData(t){m(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){g(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){j(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key===(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex(n=>n.key===t.key);if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){h(t,()=>{b(t,()=>{try{t=p(t)}catch(t){}r(this,"_headers",t=>"object"==typeof t&&null!==t,new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,a;const o=t=>{let n=!1;t.forEach(t=>{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){f(this,t,{required:!0})}validateMinWidth(t){c(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){_(this,t)}validateOn(t){k(this,t)}validateTableSettings(t){v(this,t)}validatePagination(t){try{t=p(t)}catch(t){}this.showPagination=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(w.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(w.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)}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",null,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||P,_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=this.state._sortedData.filter(n=>t.includes(n[i]));if(!1===(null==e?void 0:e.multiple))return a[0];if(i)return a}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:"object"==typeof n?n:[n]})}));const a=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[y.onSelectionChange])&&this.state._on[y.onSelectionChange](t,a),this.host&&x(this.host,w.selectionChange,a)}async getSelection(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)}render(){var n,i,o,l,s,r;const d=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(i=null===(n=this.state._pagination)||void 0===n?void 0:n._pageSize)&&void 0!==i?i:10:this.state._sortedData.length,this.state._pagination._page||1),h="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,c="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,p={horizontal:null!==(l=null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==l?l:[],vertical:null!==(r=null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map(t=>t.map(t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))&&void 0!==r?r:[]};return t(e,{key:"f4d7920efb2142e1e0b9c2dd3498490874eb9d80",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&h,t(a,{key:"61746f51c9447486bf9cd17a82128a6078a65fde",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}),this.pageEndSlice>0&&this.showPagination&&c)}get host(){return i(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};T.style={default:C};export{T as kol_table_stateful};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as e,F as i,g as n}from"./index-DeYD98_2.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as o,a,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-C7ZsbK5l.js";import{O as u,o as d,p as f,w as h,s as v}from"./common-zXZUsQ7l.js";import{v as b}from"./label-DGzuU0HV.js";import{v as _,a as p,e as y,b as j,d as k}from"./table-settings-CF9uiyi4.js";import{C as m}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-C5gRSnou.js";import{d as g,K as S}from"./events-CoPFQEiC.js";import{i as A,c as O,r as $,a as C,f as D,b as x,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const M=(e,t)=>{u(t,()=>{d(t,()=>{try{t=f(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]",W="[object Function]",E="[object GeneratorFunction]",K="[object Proxy]";function R(e){if(!A(e))return!1;var t=O(e);return t==W||t==E||t==P||t==K}var T=$["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z(e){return!!H&&H in e}var U=Function.prototype,N=U.toString;function B(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var I=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,V=Function.prototype,Z=Object.prototype,G=V.toString,Q=Z.hasOwnProperty,Y=RegExp("^"+G.call(Q).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(e){return!(!A(e)||z(e))&&(R(e)?Y:L).test(B(e))}function J(e,t){return null==e?void 0:e[t]}function X(e,t){var i=J(e,t);return q(i)?i:void 0}var tt=X($,"WeakMap"),et=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function nt(e,t){var i=typeof e;return!!(t=null==t?et:t)&&("number"==i||"symbol"!=i&&it.test(e))&&e>-1&&e%1==0&&e<t}function rt(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function at(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function lt(e){return null!=e&&at(e.length)&&!R(e)}var st=Object.prototype;function ct(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ut(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}var dt="[object Arguments]";function ft(e){return C(e)&&O(e)==dt}var ht=Object.prototype,vt=ht.hasOwnProperty,bt=ht.propertyIsEnumerable,_t=ft(function(){return arguments}())?ft:function(e){return C(e)&&vt.call(e,"callee")&&!bt.call(e,"callee")};function pt(){return!1}var yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=yt&&"object"==typeof module&&module&&!module.nodeType&&module,kt=jt&&jt.exports===yt,mt=kt?$.Buffer:void 0,wt=mt?mt.isBuffer:void 0,gt=wt||pt,St="[object Arguments]",At="[object Array]",Ot="[object Boolean]",$t="[object Date]",Ct="[object Error]",Dt="[object Function]",xt="[object Map]",Ft="[object Number]",Mt="[object Object]",Pt="[object RegExp]",Wt="[object Set]",Et="[object String]",Kt="[object WeakMap]",Rt="[object ArrayBuffer]",Tt="[object DataView]",Ht="[object Float32Array]",zt="[object Float64Array]",Ut="[object Int8Array]",Nt="[object Int16Array]",Bt="[object Int32Array]",It="[object Uint8Array]",Lt="[object Uint8ClampedArray]",Vt="[object Uint16Array]",Zt="[object Uint32Array]",Gt={};function Qt(e){return C(e)&&at(e.length)&&!!Gt[O(e)]}function Yt(e){return function(t){return e(t)}}Gt[Ht]=Gt[zt]=Gt[Ut]=Gt[Nt]=Gt[Bt]=Gt[It]=Gt[Lt]=Gt[Vt]=Gt[Zt]=!0,Gt[St]=Gt[At]=Gt[Rt]=Gt[Ot]=Gt[Tt]=Gt[$t]=Gt[Ct]=Gt[Dt]=Gt[xt]=Gt[Ft]=Gt[Mt]=Gt[Pt]=Gt[Wt]=Gt[Et]=Gt[Kt]=!1;var qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Jt&&Jt.exports===qt,te=Xt&&D.process,ee=function(){try{var e=Jt&&Jt.require&&Jt.require("util").types;return e||te&&te.binding&&te.binding("util")}catch(e){}}(),ie=ee&&ee.isTypedArray,ne=ie?Yt(ie):Qt,re=Object.prototype,oe=re.hasOwnProperty;function ae(e,t){var i=x(e),r=!i&&_t(e),a=!i&&!r&&gt(e),n=!i&&!r&&!a&&ne(e),o=i||r||a||n,l=o?ut(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||n&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||nt(c,s))||l.push(c);return l}function le(e,t){return function(i){return e(t(i))}}var se=le(Object.keys,Object),ce=Object.prototype,ue=ce.hasOwnProperty;function de(e){if(!ct(e))return se(e);var t=[];for(var i in Object(e))ue.call(e,i)&&"constructor"!=i&&t.push(i);return t}function fe(e){return lt(e)?ae(e):de(e)}var he=X(Object,"create");function ve(){this.__data__=he?he(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _e="__lodash_hash_undefined__",pe=Object.prototype,ye=pe.hasOwnProperty;function je(e){var t=this.__data__;if(he){var i=t[e];return i===_e?void 0:i}return ye.call(t,e)?t[e]:void 0}var ke=Object.prototype,me=ke.hasOwnProperty;function we(e){var t=this.__data__;return he?void 0!==t[e]:me.call(t,e)}var ge="__lodash_hash_undefined__";function Se(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=he&&void 0===t?ge:t,this}function Ae(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Oe(){this.__data__=[],this.size=0}function $e(e,t){for(var i=e.length;i--;)if(rt(e[i][0],t))return i;return-1}Ae.prototype.clear=ve,Ae.prototype.delete=be,Ae.prototype.get=je,Ae.prototype.has=we,Ae.prototype.set=Se;var Ce=Array.prototype,De=Ce.splice;function xe(e){var t=this.__data__,i=$e(t,e);return!(i<0)&&(i==t.length-1?t.pop():De.call(t,i,1),--this.size,!0)}function Fe(e){var t=this.__data__,i=$e(t,e);return i<0?void 0:t[i][1]}function Me(e){return $e(this.__data__,e)>-1}function Pe(e,t){var i=this.__data__,r=$e(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}function We(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=Oe,We.prototype.delete=xe,We.prototype.get=Fe,We.prototype.has=Me,We.prototype.set=Pe;var Ee=X($,"Map");function Ke(){this.size=0,this.__data__={hash:new Ae,map:new(Ee||We),string:new Ae}}function Re(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Te(e,t){var i=e.__data__;return Re(t)?i["string"==typeof t?"string":"hash"]:i.map}function He(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t}function ze(e){return Te(this,e).get(e)}function Ue(e){return Te(this,e).has(e)}function Ne(e,t){var i=Te(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this}function Be(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Ie(e,t){for(var i=-1,r=t.length,a=e.length;++i<r;)e[a+i]=t[i];return e}function Le(){this.__data__=new We,this.size=0}function Ve(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function Ze(e){return this.__data__.get(e)}function Ge(e){return this.__data__.has(e)}Be.prototype.clear=Ke,Be.prototype.delete=He,Be.prototype.get=ze,Be.prototype.has=Ue,Be.prototype.set=Ne;var Qe=200;function Ye(e,t){var i=this.__data__;if(i instanceof We){var r=i.__data__;if(!Ee||r.length<Qe-1)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Be(r)}return i.set(e,t),this.size=i.size,this}function qe(e){var t=this.__data__=new We(e);this.size=t.size}function Je(e,t){for(var i=-1,r=null==e?0:e.length,a=0,n=[];++i<r;){var o=e[i];t(o,i,e)&&(n[a++]=o)}return n}function Xe(){return[]}qe.prototype.clear=Le,qe.prototype.delete=Ve,qe.prototype.get=Ze,qe.prototype.has=Ge,qe.prototype.set=Ye;var ti=Object.prototype,ei=ti.propertyIsEnumerable,ii=Object.getOwnPropertySymbols,ni=ii?function(e){return null==e?[]:(e=Object(e),Je(ii(e),function(t){return ei.call(e,t)}))}:Xe;function ri(e,t,i){var r=t(e);return x(e)?r:Ie(r,i(e))}function oi(e){return ri(e,fe,ni)}var ai=X($,"DataView"),li=X($,"Promise"),si=X($,"Set"),ci="[object Map]",ui="[object Object]",di="[object Promise]",fi="[object Set]",hi="[object WeakMap]",vi="[object DataView]",bi=B(ai),_i=B(Ee),pi=B(li),yi=B(si),ji=B(tt),ki=O;(ai&&ki(new ai(new ArrayBuffer(1)))!=vi||Ee&&ki(new Ee)!=ci||li&&ki(li.resolve())!=di||si&&ki(new si)!=fi||tt&&ki(new tt)!=hi)&&(ki=function(e){var t=O(e),i=t==ui?e.constructor:void 0,r=i?B(i):"";if(r)switch(r){case bi:return vi;case _i:return ci;case pi:return di;case yi:return fi;case ji:return hi}return t});var mi=$.Uint8Array,wi="__lodash_hash_undefined__";function gi(e){return this.__data__.set(e,wi),this}function Si(e){return this.__data__.has(e)}function Ai(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Be;++t<i;)this.add(e[t])}function Oi(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}function $i(e,t){return e.has(t)}Ai.prototype.add=Ai.prototype.push=gi,Ai.prototype.has=Si;var Ci=1,Di=2;function xi(e,t,i,r,a,n){var o=i&Ci,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=n.get(e),h=n.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=i&Di?new Ai:void 0;for(n.set(e,t),n.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,n):r(v,_,d,e,t,n);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!Oi(t,function(e,t){if(!$i(b,t)&&(v===e||a(v,e,i,r,n)))return b.push(t)})){u=!1;break}}else if(v!==_&&!a(v,_,i,r,n)){u=!1;break}}return n.delete(e),n.delete(t),u}function Fi(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function Mi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Pi=1,Wi=2,Ei="[object Boolean]",Ki="[object Date]",Ri="[object Error]",Ti="[object Map]",Hi="[object Number]",zi="[object RegExp]",Ui="[object Set]",Ni="[object String]",Bi="[object Symbol]",Ii="[object ArrayBuffer]",Li="[object DataView]",Vi=F?F.prototype:void 0,Zi=Vi?Vi.valueOf:void 0;function Gi(e,t,i,r,a,n,o){switch(i){case Li:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ii:return!(e.byteLength!=t.byteLength||!n(new mi(e),new mi(t)));case Ei:case Ki:case Hi:return rt(+e,+t);case Ri:return e.name==t.name&&e.message==t.message;case zi:case Ni:return e==t+"";case Ti:var l=Fi;case Ui:var s=r&Pi;if(l||(l=Mi),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Wi,o.set(e,t);var h=xi(l(e),l(t),r,a,n,o);return o.delete(e),h;case Bi:if(Zi)return Zi.call(e)==Zi.call(t)}return!1}var Qi=1,Yi=Object.prototype,qi=Yi.hasOwnProperty;function Ji(e,t,i,r,a,n){var o=i&Qi,l=oi(e),s=l.length;if(s!=oi(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:qi.call(t,h)))return!1}var d=n.get(e),u=n.get(t);if(d&&u)return d==t&&u==e;var b=!0;n.set(e,t),n.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,n):r(_,f,h,e,t,n);if(!(void 0===p?_===f||a(_,f,i,r,n):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 n.delete(e),n.delete(t),b}var Xi=1,tn="[object Arguments]",en="[object Array]",nn="[object Object]",rn=Object.prototype,on=rn.hasOwnProperty;function an(e,t,i,r,a,n){var o=x(e),l=x(t),s=o?en:ki(e),c=l?en:ki(t),h=(s=s==tn?nn:s)==nn,d=(c=c==tn?nn:c)==nn,u=s==c;if(u&&gt(e)){if(!gt(t))return!1;o=!0,h=!1}if(u&&!h)return n||(n=new qe),o||ne(e)?xi(e,t,i,r,a,n):Gi(e,t,s,i,r,a,n);if(!(i&Xi)){var b=h&&on.call(e,"__wrapped__"),v=d&&on.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return n||(n=new qe),a(_,f,i,r,n)}}return!!u&&(n||(n=new qe),Ji(e,t,i,r,a,n))}function ln(e,t,i,r,a){return e===t||(null==e||null==t||!C(e)&&!C(t)?e!=e&&t!=t:an(e,t,i,r,ln,a))}function sn(e,t){return ln(e,t)}const cn=/^\d+(\.\d+)?([a-z]+|%)?$/,un=(e,t,i)=>{h(e,"_minWidth",e=>"string"==typeof e&&cn.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,i)},dn=class{constructor(i){t(this,i),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto"},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,i,a,n=!1)=>{var o,l;let s=String(i);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":!n,"kol-table__row--footer":n}),key:`row-${s}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,a)))},this.renderTableCell=(t,i,a,n)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${i}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:i}`:l}return t.headerCell?this.renderHeadingCell(t,i,a,n):e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),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:"")}}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){M(this,e),sn(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){b(this,e,{required:!0})}validateMinWidth(e){un(this,e)}validateOn(e){y(this,e)}validateSelection(e){j(this,e)}validateTableSettings(e){k(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const i=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(i);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,i)=>{e.includes(i)||this.dataToKeyMap.delete(i)})}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 i=e.render(t,e,e.data,this.state._data);"string"==typeof i&&(t.textContent=i)}})))}getNumberOfCols(e,t){let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;return t+=null!==(i=e.colSpan)&&void 0!==i?i:1}),i<t&&(i=t)}),0===i&&(i=t.length),i}getNumberOfRows(e,t){var i;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;return t+=null!==(i=e.rowSpan)&&void 0!==i?i:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.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,i;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(i=e.vertical)&&void 0!==i?i:[]),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=>{t.set(e.key,e.position)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return[...e].sort((e,i)=>{var r,a,n,o;return(null!==(a=t.get(null!==(r=e.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER)-(null!==(o=t.get(null!==(n=i.key)&&void 0!==n?n:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER)})}createDataField(e,t,i){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),n=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;i&&(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 i=0;if(h[t].forEach(e=>i+=e),i<=r){const n=e[r-i+c[t]];if("object"==typeof n){a.push(Object.assign(Object.assign({},n),{headerCell:!0,data:{}}));let e=1;if("number"==typeof n.rowSpan&&n.rowSpan>1&&(e=n.rowSpan),h[t].push(e),"number"==typeof n.colSpan&&n.colSpan>1)for(let i=1;i<n.colSpan;i++)h[t+i].push(e);c[t]++}}});for(let t=0;t<n;t++)if(!0===this.horizontal){const n=i&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof n||null===n||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:n,label:n[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,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{i+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(i,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,t),this.host&&g(this.host,S.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,t)=>{var i;return{hidable:!1!==e.hidable,key:null!==(i=e.key)&&void 0!==i?i:w(),label:e.label,position:t,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)}renderSelectionCell(t,i){var n,l,s;const c=this.state._selection;if(!c)return"";const h=this.getSelectionKeyPropertyName(),d=null===(n=t[0])||void 0===n?void 0:n.data;if(!d)return"";const u=d[h],b=c.multiple||void 0===c.multiple,v=null===(l=null==c?void 0:c.selectedKeys)||void 0===l?void 0:l.includes(u),_=null===(s=null==c?void 0:c.disabledKeys)||void 0===s?void 0:s.includes(u),f=c.label(d),p={name:"selection",checked:v,disabled:_,id:u,"aria-label":f};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":v})},b?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":_})},e(o,{class:"kol-table__selection-icon",_icons:"codicon "+(v?"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)},p,{type:"checkbox",onInput:e=>{var t,i;const r=v?null===(i=null==c?void 0:c.selectedKeys)||void 0===i?void 0:i.filter(e=>e!==u):[...null!==(t=null==c?void 0:c.selectedKeys)&&void 0!==t?t:[],u];this.handleSelectionChangeCallbackAndEvent(e,null!=r?r:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},p,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,u)}}))),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${u}-label`,_label:f})))}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 i,r;return!(null===(r=null===(i=this.state._selection)||void 0===i?void 0:i.disabledKeys)||void 0===r?void 0:r.includes(t[e]))})}getSelectedKeysWithoutDisabledKeys(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter(e=>{var t,i;return!(null===(i=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===i?void 0:i.includes(e))})}getSelectedKeysWithDisabledKeysOnly(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter(e=>{var t,i;return null===(i=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===i?void 0:i.includes(e)})}getRevertedSelection(e){var t;const i=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[i])),r}getTableMinWidth(){var e,t;const i=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var i;return e+(null!==(i=t.width)&&void 0!==i?i:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${i}ch`:`max(${this.state._minWidth}, ${i}ch)`}renderHeadingSelectionCell(){var t,i;const n=this.state._selection;if(!n||!n.multiple&&void 0!==n.multiple)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});const l=null!==(i=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==i?i: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"},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(o,{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(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(i,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,i,a,n){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let s="none",c="codicon codicon-fold";if(t.sortDirection)switch(t.sortDirection){case"ASC":c="codicon codicon-chevron-up",s="ascending";break;case"DESC":c="codicon codicon-chevron-down",s="descending";break;default:s="none"}const h=n?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${i}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${s}`]:s}),scope:h,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":s,"data-sort":`sort-${t.sortDirection}`},t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:c},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&g(this.host,S.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,i){var a,n;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n.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 i=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:"9a5961e0b7d62ddd9638239d19d7ff4ab2f228b3",class:"kol-table"},e(s,{key:"2275f945d4ceb256d190ee5a24a3080f6e532394",_tableSettings:this.state._tableSettings}),e("div",{key:"3ab04b967a4f5a372fb4c604c8d12413ecf96df4",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"ac15c574822a18850146efe34364c86031258273",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"82eb5c5eddb8041f4d04c07511c8a05536d9a14f",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:"39b1dfec7459ee236bd02c10505a6032d6b9261c",class:"kol-table__head"},[r.map((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),0===i&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,i,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"ccdf8ac49eed375f5b4c8892bbfed2120a9cda33",class:"kol-table__body"},i.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{dn as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as i,g as n}from"./index-2YbJq5J3.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as o,a,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-C7ZsbK5l.js";import{O as u,o as d,p as f,w as h,s as v}from"./common-zXZUsQ7l.js";import{v as b}from"./label-DGzuU0HV.js";import{v as _,a as p,e as y,b as j,d as k}from"./table-settings-CF9uiyi4.js";import{C as m}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-B8InC9wC.js";import{d as g,K as S}from"./events-CoPFQEiC.js";import{i as A,c as O,r as $,a as C,f as D,b as x,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const M=(e,t)=>{u(t,()=>{d(t,()=>{try{t=f(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]",W="[object Function]",E="[object GeneratorFunction]",K="[object Proxy]";function T(e){if(!A(e))return!1;var t=O(e);return t==W||t==E||t==P||t==K}var R=$["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z(e){return!!H&&H in e}var U=Function.prototype,B=U.toString;function I(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var N=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,V=Function.prototype,J=Object.prototype,Z=V.toString,q=J.hasOwnProperty,G=RegExp("^"+Z.call(q).replace(N,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q(e){return!(!A(e)||z(e))&&(T(e)?G:L).test(I(e))}function Y(e,t){return null==e?void 0:e[t]}function X(e,t){var i=Y(e,t);return Q(i)?i:void 0}var tt=X($,"WeakMap"),et=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function nt(e,t){var i=typeof e;return!!(t=null==t?et:t)&&("number"==i||"symbol"!=i&&it.test(e))&&e>-1&&e%1==0&&e<t}function rt(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function at(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function lt(e){return null!=e&&at(e.length)&&!T(e)}var st=Object.prototype;function ct(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ut(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}var dt="[object Arguments]";function ft(e){return C(e)&&O(e)==dt}var ht=Object.prototype,vt=ht.hasOwnProperty,bt=ht.propertyIsEnumerable,_t=ft(function(){return arguments}())?ft:function(e){return C(e)&&vt.call(e,"callee")&&!bt.call(e,"callee")};function pt(){return!1}var yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=yt&&"object"==typeof module&&module&&!module.nodeType&&module,kt=jt&&jt.exports===yt,mt=kt?$.Buffer:void 0,wt=mt?mt.isBuffer:void 0,gt=wt||pt,St="[object Arguments]",At="[object Array]",Ot="[object Boolean]",$t="[object Date]",Ct="[object Error]",Dt="[object Function]",xt="[object Map]",Ft="[object Number]",Mt="[object Object]",Pt="[object RegExp]",Wt="[object Set]",Et="[object String]",Kt="[object WeakMap]",Tt="[object ArrayBuffer]",Rt="[object DataView]",Ht="[object Float32Array]",zt="[object Float64Array]",Ut="[object Int8Array]",Bt="[object Int16Array]",It="[object Int32Array]",Nt="[object Uint8Array]",Lt="[object Uint8ClampedArray]",Vt="[object Uint16Array]",Jt="[object Uint32Array]",Zt={};function qt(e){return C(e)&&at(e.length)&&!!Zt[O(e)]}function Gt(e){return function(t){return e(t)}}Zt[Ht]=Zt[zt]=Zt[Ut]=Zt[Bt]=Zt[It]=Zt[Nt]=Zt[Lt]=Zt[Vt]=Zt[Jt]=!0,Zt[St]=Zt[At]=Zt[Tt]=Zt[Ot]=Zt[Rt]=Zt[$t]=Zt[Ct]=Zt[Dt]=Zt[xt]=Zt[Ft]=Zt[Mt]=Zt[Pt]=Zt[Wt]=Zt[Et]=Zt[Kt]=!1;var Qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Yt=Qt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Yt&&Yt.exports===Qt,te=Xt&&D.process,ee=function(){try{var e=Yt&&Yt.require&&Yt.require("util").types;return e||te&&te.binding&&te.binding("util")}catch(e){}}(),ie=ee&&ee.isTypedArray,ne=ie?Gt(ie):qt,re=Object.prototype,oe=re.hasOwnProperty;function ae(e,t){var i=x(e),r=!i&&_t(e),a=!i&&!r&&gt(e),n=!i&&!r&&!a&&ne(e),o=i||r||a||n,l=o?ut(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||n&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||nt(c,s))||l.push(c);return l}function le(e,t){return function(i){return e(t(i))}}var se=le(Object.keys,Object),ce=Object.prototype,ue=ce.hasOwnProperty;function de(e){if(!ct(e))return se(e);var t=[];for(var i in Object(e))ue.call(e,i)&&"constructor"!=i&&t.push(i);return t}function fe(e){return lt(e)?ae(e):de(e)}var he=X(Object,"create");function ve(){this.__data__=he?he(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _e="__lodash_hash_undefined__",pe=Object.prototype,ye=pe.hasOwnProperty;function je(e){var t=this.__data__;if(he){var i=t[e];return i===_e?void 0:i}return ye.call(t,e)?t[e]:void 0}var ke=Object.prototype,me=ke.hasOwnProperty;function we(e){var t=this.__data__;return he?void 0!==t[e]:me.call(t,e)}var ge="__lodash_hash_undefined__";function Se(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=he&&void 0===t?ge:t,this}function Ae(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Oe(){this.__data__=[],this.size=0}function $e(e,t){for(var i=e.length;i--;)if(rt(e[i][0],t))return i;return-1}Ae.prototype.clear=ve,Ae.prototype.delete=be,Ae.prototype.get=je,Ae.prototype.has=we,Ae.prototype.set=Se;var Ce=Array.prototype,De=Ce.splice;function xe(e){var t=this.__data__,i=$e(t,e);return!(i<0)&&(i==t.length-1?t.pop():De.call(t,i,1),--this.size,!0)}function Fe(e){var t=this.__data__,i=$e(t,e);return i<0?void 0:t[i][1]}function Me(e){return $e(this.__data__,e)>-1}function Pe(e,t){var i=this.__data__,r=$e(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}function We(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=Oe,We.prototype.delete=xe,We.prototype.get=Fe,We.prototype.has=Me,We.prototype.set=Pe;var Ee=X($,"Map");function Ke(){this.size=0,this.__data__={hash:new Ae,map:new(Ee||We),string:new Ae}}function Te(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var i=e.__data__;return Te(t)?i["string"==typeof t?"string":"hash"]:i.map}function He(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function ze(e){return Re(this,e).get(e)}function Ue(e){return Re(this,e).has(e)}function Be(e,t){var i=Re(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this}function Ie(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Ne(e,t){for(var i=-1,r=t.length,a=e.length;++i<r;)e[a+i]=t[i];return e}function Le(){this.__data__=new We,this.size=0}function Ve(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function Je(e){return this.__data__.get(e)}function Ze(e){return this.__data__.has(e)}Ie.prototype.clear=Ke,Ie.prototype.delete=He,Ie.prototype.get=ze,Ie.prototype.has=Ue,Ie.prototype.set=Be;var qe=200;function Ge(e,t){var i=this.__data__;if(i instanceof We){var r=i.__data__;if(!Ee||r.length<qe-1)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ie(r)}return i.set(e,t),this.size=i.size,this}function Qe(e){var t=this.__data__=new We(e);this.size=t.size}function Ye(e,t){for(var i=-1,r=null==e?0:e.length,a=0,n=[];++i<r;){var o=e[i];t(o,i,e)&&(n[a++]=o)}return n}function Xe(){return[]}Qe.prototype.clear=Le,Qe.prototype.delete=Ve,Qe.prototype.get=Je,Qe.prototype.has=Ze,Qe.prototype.set=Ge;var ti=Object.prototype,ei=ti.propertyIsEnumerable,ii=Object.getOwnPropertySymbols,ni=ii?function(e){return null==e?[]:(e=Object(e),Ye(ii(e),function(t){return ei.call(e,t)}))}:Xe;function ri(e,t,i){var r=t(e);return x(e)?r:Ne(r,i(e))}function oi(e){return ri(e,fe,ni)}var ai=X($,"DataView"),li=X($,"Promise"),si=X($,"Set"),ci="[object Map]",ui="[object Object]",di="[object Promise]",fi="[object Set]",hi="[object WeakMap]",vi="[object DataView]",bi=I(ai),_i=I(Ee),pi=I(li),yi=I(si),ji=I(tt),ki=O;(ai&&ki(new ai(new ArrayBuffer(1)))!=vi||Ee&&ki(new Ee)!=ci||li&&ki(li.resolve())!=di||si&&ki(new si)!=fi||tt&&ki(new tt)!=hi)&&(ki=function(e){var t=O(e),i=t==ui?e.constructor:void 0,r=i?I(i):"";if(r)switch(r){case bi:return vi;case _i:return ci;case pi:return di;case yi:return fi;case ji:return hi}return t});var mi=$.Uint8Array,wi="__lodash_hash_undefined__";function gi(e){return this.__data__.set(e,wi),this}function Si(e){return this.__data__.has(e)}function Ai(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Ie;++t<i;)this.add(e[t])}function Oi(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}function $i(e,t){return e.has(t)}Ai.prototype.add=Ai.prototype.push=gi,Ai.prototype.has=Si;var Ci=1,Di=2;function xi(e,t,i,r,a,n){var o=i&Ci,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=n.get(e),h=n.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=i&Di?new Ai:void 0;for(n.set(e,t),n.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,n):r(v,_,d,e,t,n);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!Oi(t,function(e,t){if(!$i(b,t)&&(v===e||a(v,e,i,r,n)))return b.push(t)})){u=!1;break}}else if(v!==_&&!a(v,_,i,r,n)){u=!1;break}}return n.delete(e),n.delete(t),u}function Fi(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function Mi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Pi=1,Wi=2,Ei="[object Boolean]",Ki="[object Date]",Ti="[object Error]",Ri="[object Map]",Hi="[object Number]",zi="[object RegExp]",Ui="[object Set]",Bi="[object String]",Ii="[object Symbol]",Ni="[object ArrayBuffer]",Li="[object DataView]",Vi=F?F.prototype:void 0,Ji=Vi?Vi.valueOf:void 0;function Zi(e,t,i,r,a,n,o){switch(i){case Li:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ni:return!(e.byteLength!=t.byteLength||!n(new mi(e),new mi(t)));case Ei:case Ki:case Hi:return rt(+e,+t);case Ti:return e.name==t.name&&e.message==t.message;case zi:case Bi:return e==t+"";case Ri:var l=Fi;case Ui:var s=r&Pi;if(l||(l=Mi),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Wi,o.set(e,t);var h=xi(l(e),l(t),r,a,n,o);return o.delete(e),h;case Ii:if(Ji)return Ji.call(e)==Ji.call(t)}return!1}var qi=1,Gi=Object.prototype,Qi=Gi.hasOwnProperty;function Yi(e,t,i,r,a,n){var o=i&qi,l=oi(e),s=l.length;if(s!=oi(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Qi.call(t,h)))return!1}var d=n.get(e),u=n.get(t);if(d&&u)return d==t&&u==e;var b=!0;n.set(e,t),n.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,n):r(_,f,h,e,t,n);if(!(void 0===p?_===f||a(_,f,i,r,n):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 n.delete(e),n.delete(t),b}var Xi=1,tn="[object Arguments]",en="[object Array]",nn="[object Object]",rn=Object.prototype,on=rn.hasOwnProperty;function an(e,t,i,r,a,n){var o=x(e),l=x(t),s=o?en:ki(e),c=l?en:ki(t),h=(s=s==tn?nn:s)==nn,d=(c=c==tn?nn:c)==nn,u=s==c;if(u&&gt(e)){if(!gt(t))return!1;o=!0,h=!1}if(u&&!h)return n||(n=new Qe),o||ne(e)?xi(e,t,i,r,a,n):Zi(e,t,s,i,r,a,n);if(!(i&Xi)){var b=h&&on.call(e,"__wrapped__"),v=d&&on.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return n||(n=new Qe),a(_,f,i,r,n)}}return!!u&&(n||(n=new Qe),Yi(e,t,i,r,a,n))}function ln(e,t,i,r,a){return e===t||(null==e||null==t||!C(e)&&!C(t)?e!=e&&t!=t:an(e,t,i,r,ln,a))}function sn(e,t){return ln(e,t)}const cn=/^\d+(\.\d+)?([a-z]+|%)?$/,un=(e,t,i)=>{h(e,"_minWidth",e=>"string"==typeof e&&cn.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,i)},dn=class{constructor(i){t(this,i),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto"},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,i,a,n=!1)=>{var o,l;let s=String(i);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":!n,"kol-table__row--footer":n}),key:`row-${s}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,a)))},this.renderTableCell=(t,i,a,n)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${i}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:i}`:l}return t.headerCell?this.renderHeadingCell(t,i,a,n):e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),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:"")}}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){M(this,e),sn(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){b(this,e,{required:!0})}validateMinWidth(e){un(this,e)}validateOn(e){y(this,e)}validateSelection(e){j(this,e)}validateTableSettings(e){k(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const i=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(i);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,i)=>{e.includes(i)||this.dataToKeyMap.delete(i)})}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 i=e.render(t,e,e.data,this.state._data);"string"==typeof i&&(t.textContent=i)}})))}getNumberOfCols(e,t){let i=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;return t+=null!==(i=e.colSpan)&&void 0!==i?i:1}),i<t&&(i=t)}),0===i&&(i=t.length),i}getNumberOfRows(e,t){var i;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var i;return t+=null!==(i=e.rowSpan)&&void 0!==i?i:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(i=this.state._dataFoot)||void 0===i?void 0:i.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,i;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(i=e.vertical)&&void 0!==i?i:[]),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=>{t.set(e.key,e.position)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return[...e].sort((e,i)=>{var r,a,n,o;return(null!==(a=t.get(null!==(r=e.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER)-(null!==(o=t.get(null!==(n=i.key)&&void 0!==n?n:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER)})}createDataField(e,t,i){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),n=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;i&&(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 i=0;if(h[t].forEach(e=>i+=e),i<=r){const n=e[r-i+c[t]];if("object"==typeof n){a.push(Object.assign(Object.assign({},n),{headerCell:!0,data:{}}));let e=1;if("number"==typeof n.rowSpan&&n.rowSpan>1&&(e=n.rowSpan),h[t].push(e),"number"==typeof n.colSpan&&n.colSpan>1)for(let i=1;i<n.colSpan;i++)h[t+i].push(e);c[t]++}}});for(let t=0;t<n;t++)if(!0===this.horizontal){const n=i&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof n||null===n||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:n,label:n[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,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{i+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(i,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,t),this.host&&g(this.host,S.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,t)=>{var i;return{hidable:!1!==e.hidable,key:null!==(i=e.key)&&void 0!==i?i:w(),label:e.label,position:t,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)}renderSelectionCell(t,i){var n,l,s;const c=this.state._selection;if(!c)return"";const h=this.getSelectionKeyPropertyName(),d=null===(n=t[0])||void 0===n?void 0:n.data;if(!d)return"";const u=d[h],b=c.multiple||void 0===c.multiple,v=null===(l=null==c?void 0:c.selectedKeys)||void 0===l?void 0:l.includes(u),_=null===(s=null==c?void 0:c.disabledKeys)||void 0===s?void 0:s.includes(u),f=c.label(d),p={name:"selection",checked:v,disabled:_,id:u,"aria-label":f};return e("td",{key:`tbody-${i}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":v})},b?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":_})},e(o,{class:"kol-table__selection-icon",_icons:"codicon "+(v?"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)},p,{type:"checkbox",onInput:e=>{var t,i;const r=v?null===(i=null==c?void 0:c.selectedKeys)||void 0===i?void 0:i.filter(e=>e!==u):[...null!==(t=null==c?void 0:c.selectedKeys)&&void 0!==t?t:[],u];this.handleSelectionChangeCallbackAndEvent(e,null!=r?r:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},p,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,u)}}))),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${u}-label`,_label:f})))}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 i,r;return!(null===(r=null===(i=this.state._selection)||void 0===i?void 0:i.disabledKeys)||void 0===r?void 0:r.includes(t[e]))})}getSelectedKeysWithoutDisabledKeys(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter(e=>{var t,i;return!(null===(i=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===i?void 0:i.includes(e))})}getSelectedKeysWithDisabledKeysOnly(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter(e=>{var t,i;return null===(i=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===i?void 0:i.includes(e)})}getRevertedSelection(e){var t;const i=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[i])),r}getTableMinWidth(){var e,t;const i=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var i;return e+(null!==(i=t.width)&&void 0!==i?i:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${i}ch`:`max(${this.state._minWidth}, ${i}ch)`}renderHeadingSelectionCell(){var t,i;const n=this.state._selection;if(!n||!n.multiple&&void 0!==n.multiple)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});const l=null!==(i=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==i?i: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"},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(o,{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(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(i,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,i,a,n){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let s="none",c="codicon codicon-fold";if(t.sortDirection)switch(t.sortDirection){case"ASC":c="codicon codicon-chevron-up",s="ascending";break;case"DESC":c="codicon codicon-chevron-down",s="descending";break;default:s="none"}const h=n?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${i}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${s}`]:s}),scope:h,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":s,"data-sort":`sort-${t.sortDirection}`},t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:c},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&g(this.host,S.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,i){var a,n;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n.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 i=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:"9a5961e0b7d62ddd9638239d19d7ff4ab2f228b3",class:"kol-table"},e(s,{key:"2275f945d4ceb256d190ee5a24a3080f6e532394",_tableSettings:this.state._tableSettings}),e("div",{key:"3ab04b967a4f5a372fb4c604c8d12413ecf96df4",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"ac15c574822a18850146efe34364c86031258273",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"82eb5c5eddb8041f4d04c07511c8a05536d9a14f",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:"39b1dfec7459ee236bd02c10505a6032d6b9261c",class:"kol-table__head"},[r.map((t,i)=>e("tr",{class:"kol-table__head-row",key:`thead-${i}`},this.state._selection&&this.renderHeadingSelectionCell(),0===i&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,i,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"ccdf8ac49eed375f5b4c8892bbfed2120a9cda33",class:"kol-table__body"},i.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{dn as kol_table_stateless_wc};