@public-ui/components 3.0.6 → 3.0.7-d0e38f2b24188b03316351f07d939c4524a2fd81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/custom-elements.json +19 -1
  2. package/dist/cjs/{Alert-CMxvMn30.js → Alert-DvfeipJE.js} +1 -1
  3. package/dist/cjs/{Alert-CMxvMn30.js.map → Alert-DvfeipJE.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-20txBr-0.js → Collapsible-E0eWmXn2.js} +1 -1
  5. package/dist/cjs/{Collapsible-20txBr-0.js.map → Collapsible-E0eWmXn2.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-CZ98Iejd.js → CustomSuggestionsToggle-DbGV2ZkI.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-CZ98Iejd.js.map → CustomSuggestionsToggle-DbGV2ZkI.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-CP0G8ZHy.js → FieldControlStateWrapper-D6fvsL8U.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-CP0G8ZHy.js.map → FieldControlStateWrapper-D6fvsL8U.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-Di-pdZzN.js → FormFieldStateWrapper-jfw6Co4e.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-Di-pdZzN.js.map → FormFieldStateWrapper-jfw6Co4e.js.map} +1 -1
  12. package/dist/cjs/{Heading-D5CosFd4.js → Heading-BG41fGAb.js} +1 -1
  13. package/dist/cjs/{Heading-D5CosFd4.js.map → Heading-BG41fGAb.js.map} +1 -1
  14. package/dist/cjs/Icon-Io_PDRaI.js +4 -0
  15. package/dist/cjs/{Icon-BFqgSgW-.js.map → Icon-Io_PDRaI.js.map} +1 -1
  16. package/dist/cjs/{Input-BOsVmJrz.js → Input-Corn2DzL.js} +1 -1
  17. package/dist/cjs/{Input-BOsVmJrz.js.map → Input-Corn2DzL.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-BreITcAq.js → InputStateWrapper-CTLKkLjX.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-BreITcAq.js.map → InputStateWrapper-CTLKkLjX.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-zzLmgJIU.js → InternalUnderlinedBadgeText-WlYX4I5I.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-zzLmgJIU.js.map → InternalUnderlinedBadgeText-WlYX4I5I.js.map} +1 -1
  22. package/dist/cjs/{Span-REN_AO7y.js → Span-BblS5Ovj.js} +1 -1
  23. package/dist/cjs/{Span-REN_AO7y.js.map → Span-BblS5Ovj.js.map} +1 -1
  24. package/dist/cjs/{app-globals-DwaQEtoD.js → app-globals-Xn6g2lnN.js} +1 -1
  25. package/dist/cjs/{app-globals-DwaQEtoD.js.map → app-globals-Xn6g2lnN.js.map} +1 -1
  26. package/dist/cjs/{controller-BHC29CMZ.js → controller-BacGsRWV.js} +1 -1
  27. package/dist/cjs/{controller-BHC29CMZ.js.map → controller-BacGsRWV.js.map} +1 -1
  28. package/dist/cjs/{controller-BA5x9imI.js → controller-BfELhnD6.js} +1 -1
  29. package/dist/cjs/{controller-BA5x9imI.js.map → controller-BfELhnD6.js.map} +1 -1
  30. package/dist/cjs/{controller-BGGeczWr.js → controller-DlyID1S-.js} +1 -1
  31. package/dist/cjs/{controller-BGGeczWr.js.map → controller-DlyID1S-.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-BLy-Cg6m.js → controller-icon-CsyY2Y7g.js} +1 -1
  33. package/dist/cjs/{controller-icon-BLy-Cg6m.js.map → controller-icon-CsyY2Y7g.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-DtiQsS5q.js → dev.utils-DMUEnh4U.js} +1 -1
  35. package/dist/cjs/{dev.utils-DtiQsS5q.js.map → dev.utils-DMUEnh4U.js.map} +1 -1
  36. package/dist/cjs/{devtools-D0veQHgg.js → devtools-NqWtZkR6.js} +1 -1
  37. package/dist/cjs/{devtools-D0veQHgg.js.map → devtools-NqWtZkR6.js.map} +1 -1
  38. package/dist/cjs/index-B45suXZe.js +4 -0
  39. package/dist/cjs/index-B45suXZe.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-wc.entry.cjs.js.map +1 -1
  51. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link-button.entry.cjs.js.map +1 -1
  74. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  76. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  78. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  81. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  107. package/dist/cjs/kolibri.cjs.js +1 -1
  108. package/dist/cjs/link-variant-gYtaoJ43.js +4 -0
  109. package/dist/cjs/link-variant-gYtaoJ43.js.map +1 -0
  110. package/dist/cjs/loader.cjs.js +1 -1
  111. package/dist/cjs/test-component.cjs.entry.js +1 -1
  112. package/dist/components/access-and-short-key.js +1 -1
  113. package/dist/components/associated.controller.js +1 -1
  114. package/dist/components/common.js +1 -1
  115. package/dist/components/controller.js +1 -1
  116. package/dist/components/controller2.js +1 -1
  117. package/dist/components/controller5.js +1 -1
  118. package/dist/components/custom-class.js +1 -1
  119. package/dist/components/href.js +1 -1
  120. package/dist/components/image-source.js +1 -1
  121. package/dist/components/kol-button-wc.js +1 -1
  122. package/dist/components/kol-button-wc.js.map +1 -1
  123. package/dist/components/kol-combobox.js +1 -1
  124. package/dist/components/kol-form.js +1 -1
  125. package/dist/components/kol-heading.js +1 -1
  126. package/dist/components/kol-icon.js +1 -1
  127. package/dist/components/kol-image.js +1 -1
  128. package/dist/components/kol-input-color.js +1 -1
  129. package/dist/components/kol-input-file.js +1 -1
  130. package/dist/components/kol-link-button.js +1 -1
  131. package/dist/components/kol-link-button.js.map +1 -1
  132. package/dist/components/kol-link-wc.js +1 -1
  133. package/dist/components/kol-link-wc.js.map +1 -1
  134. package/dist/components/kol-link.js +1 -1
  135. package/dist/components/kol-link.js.map +1 -1
  136. package/dist/components/kol-modal.js +1 -1
  137. package/dist/components/kol-nav.js +1 -1
  138. package/dist/components/kol-nav.js.map +1 -1
  139. package/dist/components/kol-progress.js +1 -1
  140. package/dist/components/kol-quote.js +1 -1
  141. package/dist/components/kol-table-stateful.js +1 -1
  142. package/dist/components/kol-textarea.js +1 -1
  143. package/dist/components/kol-tooltip-wc.js +1 -1
  144. package/dist/components/link-variant.js +1 -1
  145. package/dist/components/link-variant.js.map +1 -1
  146. package/dist/components/placeholder.js +1 -1
  147. package/dist/esm/{Alert-R2nEqfd2.js → Alert-C3ktyZF6.js} +1 -1
  148. package/dist/esm/{Alert-R2nEqfd2.js.map → Alert-C3ktyZF6.js.map} +1 -1
  149. package/dist/esm/{Collapsible-B4WnEb_T.js → Collapsible-DuN5vPyq.js} +1 -1
  150. package/dist/esm/{Collapsible-B4WnEb_T.js.map → Collapsible-DuN5vPyq.js.map} +1 -1
  151. package/dist/esm/{CustomSuggestionsToggle-Dez_Y4wT.js → CustomSuggestionsToggle-Dy5sBs-i.js} +1 -1
  152. package/dist/esm/{CustomSuggestionsToggle-Dez_Y4wT.js.map → CustomSuggestionsToggle-Dy5sBs-i.js.map} +1 -1
  153. package/dist/esm/{FieldControlStateWrapper-CwL8LaZs.js → FieldControlStateWrapper-DC5e0v-Z.js} +1 -1
  154. package/dist/{kolibri/FieldControlStateWrapper-CwL8LaZs.js.map → esm/FieldControlStateWrapper-DC5e0v-Z.js.map} +1 -1
  155. package/dist/esm/{FormFieldStateWrapper-B7PqxuTo.js → FormFieldStateWrapper-CA5QfRbl.js} +1 -1
  156. package/dist/{kolibri/FormFieldStateWrapper-B7PqxuTo.js.map → esm/FormFieldStateWrapper-CA5QfRbl.js.map} +1 -1
  157. package/dist/esm/{Heading-DT8fK42U.js → Heading-CF5mGt3A.js} +1 -1
  158. package/dist/esm/{Heading-DT8fK42U.js.map → Heading-CF5mGt3A.js.map} +1 -1
  159. package/dist/esm/Icon-CZlCqmbX.js +4 -0
  160. package/dist/esm/{Icon-oHNRs_Az.js.map → Icon-CZlCqmbX.js.map} +1 -1
  161. package/dist/esm/{Input-Dfunc1i_.js → Input-mBmTM8GQ.js} +1 -1
  162. package/dist/esm/{Input-Dfunc1i_.js.map → Input-mBmTM8GQ.js.map} +1 -1
  163. package/dist/esm/{InputStateWrapper--oSOR1R1.js → InputStateWrapper-vabMC5ny.js} +1 -1
  164. package/dist/{kolibri/InputStateWrapper--oSOR1R1.js.map → esm/InputStateWrapper-vabMC5ny.js.map} +1 -1
  165. package/dist/esm/{InternalUnderlinedBadgeText-dfa2g8TL.js → InternalUnderlinedBadgeText-BzZpJszE.js} +1 -1
  166. package/dist/esm/{InternalUnderlinedBadgeText-dfa2g8TL.js.map → InternalUnderlinedBadgeText-BzZpJszE.js.map} +1 -1
  167. package/dist/esm/{Span-43sGxXr7.js → Span-DNVnBGCS.js} +1 -1
  168. package/dist/esm/{Span-43sGxXr7.js.map → Span-DNVnBGCS.js.map} +1 -1
  169. package/dist/esm/{app-globals-BGFjV0_b.js → app-globals-BQlSCt2m.js} +1 -1
  170. package/dist/esm/{app-globals-BGFjV0_b.js.map → app-globals-BQlSCt2m.js.map} +1 -1
  171. package/dist/esm/{controller-DspJt0fi.js → controller-BBBqpY6I.js} +1 -1
  172. package/dist/esm/{controller-DspJt0fi.js.map → controller-BBBqpY6I.js.map} +1 -1
  173. package/dist/esm/{controller-CBa44cbK.js → controller-C3khCPNt.js} +1 -1
  174. package/dist/{kolibri/controller-CBa44cbK.js.map → esm/controller-C3khCPNt.js.map} +1 -1
  175. package/dist/esm/{controller-BdRR-y_g.js → controller-Kdma2hex.js} +1 -1
  176. package/dist/esm/{controller-BdRR-y_g.js.map → controller-Kdma2hex.js.map} +1 -1
  177. package/dist/esm/{controller-icon-aakQFHso.js → controller-icon-By46q2Iq.js} +1 -1
  178. package/dist/{kolibri/controller-icon-aakQFHso.js.map → esm/controller-icon-By46q2Iq.js.map} +1 -1
  179. package/dist/esm/{dev.utils-Bbi3sn8s.js → dev.utils-CQdBj8YZ.js} +1 -1
  180. package/dist/esm/{dev.utils-Bbi3sn8s.js.map → dev.utils-CQdBj8YZ.js.map} +1 -1
  181. package/dist/esm/{devtools-D10LWpor.js → devtools-DyBftFpK.js} +1 -1
  182. package/dist/esm/{devtools-D10LWpor.js.map → devtools-DyBftFpK.js.map} +1 -1
  183. package/dist/esm/index-BEYG-0cN.js +4 -0
  184. package/dist/esm/index-BEYG-0cN.js.map +1 -0
  185. package/dist/esm/kol-abbr.entry.js +1 -1
  186. package/dist/esm/kol-accordion.entry.js +1 -1
  187. package/dist/esm/kol-alert-wc.entry.js +1 -1
  188. package/dist/esm/kol-alert.entry.js +1 -1
  189. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  190. package/dist/esm/kol-avatar.entry.js +1 -1
  191. package/dist/esm/kol-badge.entry.js +1 -1
  192. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  193. package/dist/esm/kol-button-link.entry.js +1 -1
  194. package/dist/esm/kol-button-wc.entry.js +1 -1
  195. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  196. package/dist/esm/kol-button.entry.js +1 -1
  197. package/dist/esm/kol-card-wc.entry.js +1 -1
  198. package/dist/esm/kol-card.entry.js +1 -1
  199. package/dist/esm/kol-combobox.entry.js +1 -1
  200. package/dist/esm/kol-details.entry.js +1 -1
  201. package/dist/esm/kol-drawer.entry.js +1 -1
  202. package/dist/esm/kol-form.entry.js +1 -1
  203. package/dist/esm/kol-heading.entry.js +1 -1
  204. package/dist/esm/kol-icon.entry.js +1 -1
  205. package/dist/esm/kol-image.entry.js +1 -1
  206. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  207. package/dist/esm/kol-input-color.entry.js +1 -1
  208. package/dist/esm/kol-input-date.entry.js +1 -1
  209. package/dist/esm/kol-input-email.entry.js +1 -1
  210. package/dist/esm/kol-input-file.entry.js +1 -1
  211. package/dist/esm/kol-input-number.entry.js +1 -1
  212. package/dist/esm/kol-input-password.entry.js +1 -1
  213. package/dist/esm/kol-input-radio.entry.js +1 -1
  214. package/dist/esm/kol-input-range.entry.js +1 -1
  215. package/dist/esm/kol-input-text.entry.js +1 -1
  216. package/dist/esm/kol-kolibri.entry.js +1 -1
  217. package/dist/esm/kol-link-button.entry.js +1 -1
  218. package/dist/esm/kol-link-button.entry.js.map +1 -1
  219. package/dist/esm/kol-link-wc.entry.js +1 -1
  220. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  221. package/dist/esm/kol-link.entry.js +1 -1
  222. package/dist/esm/kol-link.entry.js.map +1 -1
  223. package/dist/esm/kol-modal.entry.js +1 -1
  224. package/dist/esm/kol-nav.entry.js +1 -1
  225. package/dist/esm/kol-nav.entry.js.map +1 -1
  226. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  227. package/dist/esm/kol-pagination.entry.js +1 -1
  228. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  229. package/dist/esm/kol-popover-button.entry.js +1 -1
  230. package/dist/esm/kol-popover-wc.entry.js +1 -1
  231. package/dist/esm/kol-progress.entry.js +1 -1
  232. package/dist/esm/kol-quote.entry.js +1 -1
  233. package/dist/esm/kol-select.entry.js +1 -1
  234. package/dist/esm/kol-single-select.entry.js +1 -1
  235. package/dist/esm/kol-skip-nav.entry.js +1 -1
  236. package/dist/esm/kol-spin.entry.js +1 -1
  237. package/dist/esm/kol-split-button.entry.js +1 -1
  238. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  239. package/dist/esm/kol-table-stateful.entry.js +1 -1
  240. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  241. package/dist/esm/kol-table-stateless.entry.js +1 -1
  242. package/dist/esm/kol-tabs.entry.js +1 -1
  243. package/dist/esm/kol-textarea.entry.js +1 -1
  244. package/dist/esm/kol-toast-container.entry.js +1 -1
  245. package/dist/esm/kol-toolbar.entry.js +1 -1
  246. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  247. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  248. package/dist/esm/kol-tree-item.entry.js +1 -1
  249. package/dist/esm/kol-tree-wc.entry.js +1 -1
  250. package/dist/esm/kol-tree.entry.js +1 -1
  251. package/dist/esm/kol-version.entry.js +1 -1
  252. package/dist/esm/kolibri.js +1 -1
  253. package/dist/esm/link-variant-H9yefO89.js +4 -0
  254. package/dist/esm/link-variant-H9yefO89.js.map +1 -0
  255. package/dist/esm/loader.js +1 -1
  256. package/dist/esm/test-component.entry.js +1 -1
  257. package/dist/kolibri/{Alert-R2nEqfd2.js → Alert-C3ktyZF6.js} +1 -1
  258. package/dist/kolibri/{Alert-R2nEqfd2.js.map → Alert-C3ktyZF6.js.map} +1 -1
  259. package/dist/kolibri/{Collapsible-B4WnEb_T.js → Collapsible-DuN5vPyq.js} +1 -1
  260. package/dist/kolibri/{Collapsible-B4WnEb_T.js.map → Collapsible-DuN5vPyq.js.map} +1 -1
  261. package/dist/kolibri/{CustomSuggestionsToggle-Dez_Y4wT.js → CustomSuggestionsToggle-Dy5sBs-i.js} +1 -1
  262. package/dist/kolibri/{CustomSuggestionsToggle-Dez_Y4wT.js.map → CustomSuggestionsToggle-Dy5sBs-i.js.map} +1 -1
  263. package/dist/kolibri/FieldControlStateWrapper-DC5e0v-Z.js +4 -0
  264. package/dist/{esm/FieldControlStateWrapper-CwL8LaZs.js.map → kolibri/FieldControlStateWrapper-DC5e0v-Z.js.map} +1 -1
  265. package/dist/kolibri/{FormFieldStateWrapper-B7PqxuTo.js → FormFieldStateWrapper-CA5QfRbl.js} +1 -1
  266. package/dist/{esm/FormFieldStateWrapper-B7PqxuTo.js.map → kolibri/FormFieldStateWrapper-CA5QfRbl.js.map} +1 -1
  267. package/dist/kolibri/{Heading-DT8fK42U.js → Heading-CF5mGt3A.js} +1 -1
  268. package/dist/kolibri/{Heading-DT8fK42U.js.map → Heading-CF5mGt3A.js.map} +1 -1
  269. package/dist/kolibri/Icon-CZlCqmbX.js +4 -0
  270. package/dist/kolibri/{Icon-oHNRs_Az.js.map → Icon-CZlCqmbX.js.map} +1 -1
  271. package/dist/kolibri/{Input-Dfunc1i_.js → Input-mBmTM8GQ.js} +1 -1
  272. package/dist/kolibri/{Input-Dfunc1i_.js.map → Input-mBmTM8GQ.js.map} +1 -1
  273. package/dist/kolibri/{InputStateWrapper--oSOR1R1.js → InputStateWrapper-vabMC5ny.js} +1 -1
  274. package/dist/{esm/InputStateWrapper--oSOR1R1.js.map → kolibri/InputStateWrapper-vabMC5ny.js.map} +1 -1
  275. package/dist/kolibri/InternalUnderlinedBadgeText-BzZpJszE.js +4 -0
  276. package/dist/kolibri/{InternalUnderlinedBadgeText-dfa2g8TL.js.map → InternalUnderlinedBadgeText-BzZpJszE.js.map} +1 -1
  277. package/dist/kolibri/Span-DNVnBGCS.js +4 -0
  278. package/dist/kolibri/{Span-43sGxXr7.js.map → Span-DNVnBGCS.js.map} +1 -1
  279. package/dist/kolibri/app-globals-BQlSCt2m.js +4 -0
  280. package/dist/kolibri/{app-globals-BGFjV0_b.js.map → app-globals-BQlSCt2m.js.map} +1 -1
  281. package/dist/kolibri/{controller-DspJt0fi.js → controller-BBBqpY6I.js} +1 -1
  282. package/dist/kolibri/{controller-DspJt0fi.js.map → controller-BBBqpY6I.js.map} +1 -1
  283. package/dist/kolibri/{controller-CBa44cbK.js → controller-C3khCPNt.js} +1 -1
  284. package/dist/{esm/controller-CBa44cbK.js.map → kolibri/controller-C3khCPNt.js.map} +1 -1
  285. package/dist/kolibri/{controller-BdRR-y_g.js → controller-Kdma2hex.js} +1 -1
  286. package/dist/kolibri/{controller-BdRR-y_g.js.map → controller-Kdma2hex.js.map} +1 -1
  287. package/dist/kolibri/{controller-icon-aakQFHso.js → controller-icon-By46q2Iq.js} +1 -1
  288. package/dist/{esm/controller-icon-aakQFHso.js.map → kolibri/controller-icon-By46q2Iq.js.map} +1 -1
  289. package/dist/kolibri/{dev.utils-Bbi3sn8s.js → dev.utils-CQdBj8YZ.js} +1 -1
  290. package/dist/kolibri/{dev.utils-Bbi3sn8s.js.map → dev.utils-CQdBj8YZ.js.map} +1 -1
  291. package/dist/kolibri/{devtools-D10LWpor.js → devtools-DyBftFpK.js} +1 -1
  292. package/dist/kolibri/{devtools-D10LWpor.js.map → devtools-DyBftFpK.js.map} +1 -1
  293. package/dist/kolibri/{index-44UAWlcO.js → index-BEYG-0cN.js} +2 -2
  294. package/dist/kolibri/index-BEYG-0cN.js.map +1 -0
  295. package/dist/kolibri/kol-abbr.entry.js +1 -1
  296. package/dist/kolibri/kol-accordion.entry.js +1 -1
  297. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  298. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  299. package/dist/kolibri/kol-alert.entry.js +1 -1
  300. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  301. package/dist/kolibri/kol-avatar.entry.js +1 -1
  302. package/dist/kolibri/kol-badge.entry.js +1 -1
  303. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  304. package/dist/kolibri/kol-button-link.entry.js +1 -1
  305. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  306. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  307. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  308. package/dist/kolibri/kol-button.entry.js +1 -1
  309. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  310. package/dist/kolibri/kol-card.entry.js +1 -1
  311. package/dist/kolibri/kol-combobox.entry.js +1 -1
  312. package/dist/kolibri/kol-details.entry.js +1 -1
  313. package/dist/kolibri/kol-drawer.entry.js +1 -1
  314. package/dist/kolibri/kol-form.entry.js +1 -1
  315. package/dist/kolibri/kol-heading.entry.js +1 -1
  316. package/dist/kolibri/kol-icon.entry.js +1 -1
  317. package/dist/kolibri/kol-image.entry.js +1 -1
  318. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  319. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  320. package/dist/kolibri/kol-input-color.entry.js +1 -1
  321. package/dist/kolibri/kol-input-date.entry.js +1 -1
  322. package/dist/kolibri/kol-input-email.entry.js +1 -1
  323. package/dist/kolibri/kol-input-file.entry.js +1 -1
  324. package/dist/kolibri/kol-input-number.entry.js +1 -1
  325. package/dist/kolibri/kol-input-password.entry.js +1 -1
  326. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  327. package/dist/kolibri/kol-input-range.entry.js +1 -1
  328. package/dist/kolibri/kol-input-text.entry.js +1 -1
  329. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  330. package/dist/kolibri/kol-link-button.entry.esm.js.map +1 -1
  331. package/dist/kolibri/kol-link-button.entry.js +1 -1
  332. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  333. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  334. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  335. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  336. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  337. package/dist/kolibri/kol-link.entry.js +1 -1
  338. package/dist/kolibri/kol-link.entry.js.map +1 -1
  339. package/dist/kolibri/kol-modal.entry.js +1 -1
  340. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  341. package/dist/kolibri/kol-nav.entry.js +1 -1
  342. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  343. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  344. package/dist/kolibri/kol-pagination.entry.js +1 -1
  345. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  346. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  347. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  348. package/dist/kolibri/kol-progress.entry.js +1 -1
  349. package/dist/kolibri/kol-quote.entry.js +1 -1
  350. package/dist/kolibri/kol-select.entry.js +1 -1
  351. package/dist/kolibri/kol-single-select.entry.js +1 -1
  352. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  353. package/dist/kolibri/kol-spin.entry.js +1 -1
  354. package/dist/kolibri/kol-split-button.entry.js +1 -1
  355. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  356. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  357. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  358. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  359. package/dist/kolibri/kol-tabs.entry.js +1 -1
  360. package/dist/kolibri/kol-textarea.entry.js +1 -1
  361. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  362. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  363. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  364. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  365. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  366. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  367. package/dist/kolibri/kol-tree.entry.js +1 -1
  368. package/dist/kolibri/kol-version.entry.js +1 -1
  369. package/dist/kolibri/kolibri.esm.js +1 -1
  370. package/dist/kolibri/link-variant-H9yefO89.js +4 -0
  371. package/dist/kolibri/link-variant-H9yefO89.js.map +1 -0
  372. package/dist/kolibri/test-component.entry.js +1 -1
  373. package/dist/types/components/link/component.d.ts +2 -0
  374. package/dist/types/components/link/shadow.d.ts +2 -0
  375. package/dist/types/components/link-button/shadow.d.ts +1 -0
  376. package/dist/types/components.d.ts +34 -0
  377. package/dist/types/schema/components/link.d.ts +2 -2
  378. package/doc/link-button.md +1 -0
  379. package/doc/link.md +2 -0
  380. package/package.json +2 -2
  381. package/vscode-custom-data.json +12 -0
  382. package/dist/cjs/Icon-BFqgSgW-.js +0 -4
  383. package/dist/cjs/index-ZYMPgIaJ.js +0 -4
  384. package/dist/cjs/index-ZYMPgIaJ.js.map +0 -1
  385. package/dist/cjs/link-variant-CIRPEZeP.js +0 -4
  386. package/dist/cjs/link-variant-CIRPEZeP.js.map +0 -1
  387. package/dist/esm/Icon-oHNRs_Az.js +0 -4
  388. package/dist/esm/index-44UAWlcO.js +0 -4
  389. package/dist/esm/index-44UAWlcO.js.map +0 -1
  390. package/dist/esm/link-variant-B9BZOLu-.js +0 -4
  391. package/dist/esm/link-variant-B9BZOLu-.js.map +0 -1
  392. package/dist/kolibri/FieldControlStateWrapper-CwL8LaZs.js +0 -4
  393. package/dist/kolibri/Icon-oHNRs_Az.js +0 -4
  394. package/dist/kolibri/InternalUnderlinedBadgeText-dfa2g8TL.js +0 -4
  395. package/dist/kolibri/Span-43sGxXr7.js +0 -4
  396. package/dist/kolibri/app-globals-BGFjV0_b.js +0 -4
  397. package/dist/kolibri/index-44UAWlcO.js.map +0 -1
  398. package/dist/kolibri/link-variant-B9BZOLu-.js +0 -4
  399. package/dist/kolibri/link-variant-B9BZOLu-.js.map +0 -1
@@ -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-44UAWlcO.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-CdSCDnmA.js";import{O as u,o as d,p as f,w as h,s as v}from"./common-8fBdMvJM.js";import{b,v as _,a as p,f as y,c as j,e as k}from"./table-settings-DSZObo-2.js";import{v as m}from"./label-CdtNxOKu.js";import{C as w}from"./keyboard-D6PoWr38.js";import{n as g}from"./dev.utils-Bbi3sn8s.js";import{d as S,K as A}from"./events-CoPFQEiC.js";import{i as O,c as $,r as C,a as D,f as x,b as M,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const W=(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]",E="[object Function]",K="[object GeneratorFunction]",T="[object Proxy]";function H(e){if(!O(e))return!1;var t=$(e);return t==E||t==K||t==P||t==T}var R=C["__core-js_shared__"],B=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N(e){return!!B&&B in e}var U=Function.prototype,z=U.toString;function I(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var L=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,J=Function.prototype,Z=Object.prototype,q=J.toString,G=Z.hasOwnProperty,Q=RegExp("^"+q.call(G).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!O(e)||N(e))&&(H(e)?Q:V).test(I(e))}function X(e,t){return null==e?void 0:e[t]}function tt(e,t){var i=X(e,t);return Y(i)?i:void 0}var et=tt(C,"WeakMap"),it=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;function rt(e,t){var i=typeof e;return!!(t=null==t?it:t)&&("number"==i||"symbol"!=i&&nt.test(e))&&e>-1&&e%1==0&&e<t}function ot(e,t){return e===t||e!=e&&t!=t}var at=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=at}function st(e){return null!=e&&lt(e.length)&&!H(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function dt(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}var ft="[object Arguments]";function ht(e){return D(e)&&$(e)==ft}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return D(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,kt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=kt&&kt.exports===jt,wt=mt?C.Buffer:void 0,gt=wt?wt.isBuffer:void 0,St=gt||yt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Ct="[object Date]",Dt="[object Error]",xt="[object Function]",Mt="[object Map]",Ft="[object Number]",Wt="[object Object]",Pt="[object RegExp]",Et="[object Set]",Kt="[object String]",Tt="[object WeakMap]",Ht="[object ArrayBuffer]",Rt="[object DataView]",Bt="[object Float32Array]",Nt="[object Float64Array]",Ut="[object Int8Array]",zt="[object Int16Array]",It="[object Int32Array]",Lt="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",Zt="[object Uint32Array]",qt={};function Gt(e){return D(e)&&lt(e.length)&&!!qt[$(e)]}function Qt(e){return function(t){return e(t)}}qt[Bt]=qt[Nt]=qt[Ut]=qt[zt]=qt[It]=qt[Lt]=qt[Vt]=qt[Jt]=qt[Zt]=!0,qt[At]=qt[Ot]=qt[Ht]=qt[$t]=qt[Rt]=qt[Ct]=qt[Dt]=qt[xt]=qt[Mt]=qt[Ft]=qt[Wt]=qt[Pt]=qt[Et]=qt[Kt]=qt[Tt]=!1;var Yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Yt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Xt&&Xt.exports===Yt,ee=te&&x.process,ie=function(){try{var e=Xt&&Xt.require&&Xt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ne=ie&&ie.isTypedArray,re=ne?Qt(ne):Gt,oe=Object.prototype,ae=oe.hasOwnProperty;function le(e,t){var i=M(e),r=!i&&pt(e),n=!i&&!r&&St(e),a=!i&&!r&&!n&&re(e),o=i||r||n||a,l=o?dt(e.length,String):[],s=l.length;for(var c in e)!ae.call(e,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(i){return e(t(i))}}var ce=se(Object.keys,Object),ue=Object.prototype,de=ue.hasOwnProperty;function fe(e){if(!ut(e))return ce(e);var t=[];for(var i in Object(e))de.call(e,i)&&"constructor"!=i&&t.push(i);return t}function he(e){return st(e)?le(e):fe(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,je=ye.hasOwnProperty;function ke(e){var t=this.__data__;if(ve){var i=t[e];return i===pe?void 0:i}return je.call(t,e)?t[e]:void 0}var me=Object.prototype,we=me.hasOwnProperty;function ge(e){var t=this.__data__;return ve?void 0!==t[e]:we.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=ve&&void 0===t?Se:t,this}function Oe(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 $e(){this.__data__=[],this.size=0}function Ce(e,t){for(var i=e.length;i--;)if(ot(e[i][0],t))return i;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=ke,Oe.prototype.has=ge,Oe.prototype.set=Ae;var De=Array.prototype,xe=De.splice;function Me(e){var t=this.__data__,i=Ce(t,e);return!(i<0)&&(i==t.length-1?t.pop():xe.call(t,i,1),--this.size,!0)}function Fe(e){var t=this.__data__,i=Ce(t,e);return i<0?void 0:t[i][1]}function We(e){return Ce(this.__data__,e)>-1}function Pe(e,t){var i=this.__data__,r=Ce(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}function Ee(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])}}Ee.prototype.clear=$e,Ee.prototype.delete=Me,Ee.prototype.get=Fe,Ee.prototype.has=We,Ee.prototype.set=Pe;var Ke=tt(C,"Map");function Te(){this.size=0,this.__data__={hash:new Oe,map:new(Ke||Ee),string:new Oe}}function He(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var i=e.__data__;return He(t)?i["string"==typeof t?"string":"hash"]:i.map}function Be(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Ne(e){return Re(this,e).get(e)}function Ue(e){return Re(this,e).has(e)}function ze(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 Le(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}function Ve(){this.__data__=new Ee,this.size=0}function Je(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function Ze(e){return this.__data__.get(e)}function qe(e){return this.__data__.has(e)}Ie.prototype.clear=Te,Ie.prototype.delete=Be,Ie.prototype.get=Ne,Ie.prototype.has=Ue,Ie.prototype.set=ze;var Ge=200;function Qe(e,t){var i=this.__data__;if(i instanceof Ee){var r=i.__data__;if(!Ke||r.length<Ge-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 Ye(e){var t=this.__data__=new Ee(e);this.size=t.size}function Xe(e,t){for(var i=-1,r=null==e?0:e.length,n=0,a=[];++i<r;){var o=e[i];t(o,i,e)&&(a[n++]=o)}return a}function ti(){return[]}Ye.prototype.clear=Ve,Ye.prototype.delete=Je,Ye.prototype.get=Ze,Ye.prototype.has=qe,Ye.prototype.set=Qe;var ei=Object.prototype,ii=ei.propertyIsEnumerable,ni=Object.getOwnPropertySymbols,ri=ni?function(e){return null==e?[]:(e=Object(e),Xe(ni(e),function(t){return ii.call(e,t)}))}:ti;function oi(e,t,i){var r=t(e);return M(e)?r:Le(r,i(e))}function ai(e){return oi(e,he,ri)}var li=tt(C,"DataView"),si=tt(C,"Promise"),ci=tt(C,"Set"),ui="[object Map]",di="[object Object]",fi="[object Promise]",hi="[object Set]",vi="[object WeakMap]",bi="[object DataView]",_i=I(li),pi=I(Ke),yi=I(si),ji=I(ci),ki=I(et),mi=$;(li&&mi(new li(new ArrayBuffer(1)))!=bi||Ke&&mi(new Ke)!=ui||si&&mi(si.resolve())!=fi||ci&&mi(new ci)!=hi||et&&mi(new et)!=vi)&&(mi=function(e){var t=$(e),i=t==di?e.constructor:void 0,r=i?I(i):"";if(r)switch(r){case _i:return bi;case pi:return ui;case yi:return fi;case ji:return hi;case ki:return vi}return t});var wi=C.Uint8Array,gi="__lodash_hash_undefined__";function Si(e){return this.__data__.set(e,gi),this}function Ai(e){return this.__data__.has(e)}function Oi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Ie;++t<i;)this.add(e[t])}function $i(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 Ci(e,t){return e.has(t)}Oi.prototype.add=Oi.prototype.push=Si,Oi.prototype.has=Ai;var Di=1,xi=2;function Mi(e,t,i,r,n,a){var o=i&Di,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=i&xi?new Oi:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,a):r(v,_,d,e,t,a);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!$i(t,function(e,t){if(!Ci(b,t)&&(v===e||n(v,e,i,r,a)))return b.push(t)})){u=!1;break}}else if(v!==_&&!n(v,_,i,r,a)){u=!1;break}}return a.delete(e),a.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 Wi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Pi=1,Ei=2,Ki="[object Boolean]",Ti="[object Date]",Hi="[object Error]",Ri="[object Map]",Bi="[object Number]",Ni="[object RegExp]",Ui="[object Set]",zi="[object String]",Ii="[object Symbol]",Li="[object ArrayBuffer]",Vi="[object DataView]",Ji=F?F.prototype:void 0,Zi=Ji?Ji.valueOf:void 0;function qi(e,t,i,r,n,a,o){switch(i){case Vi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Li:return!(e.byteLength!=t.byteLength||!a(new wi(e),new wi(t)));case Ki:case Ti:case Bi:return ot(+e,+t);case Hi:return e.name==t.name&&e.message==t.message;case Ni:case zi:return e==t+"";case Ri:var l=Fi;case Ui:var s=r&Pi;if(l||(l=Wi),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Ei,o.set(e,t);var h=Mi(l(e),l(t),r,n,a,o);return o.delete(e),h;case Ii:if(Zi)return Zi.call(e)==Zi.call(t)}return!1}var Gi=1,Qi=Object.prototype,Yi=Qi.hasOwnProperty;function Xi(e,t,i,r,n,a){var o=i&Gi,l=ai(e),s=l.length;if(s!=ai(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Yi.call(t,h)))return!1}var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var b=!0;a.set(e,t),a.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,a):r(_,f,h,e,t,a);if(!(void 0===p?_===f||n(_,f,i,r,a):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 a.delete(e),a.delete(t),b}var tn=1,en="[object Arguments]",nn="[object Array]",rn="[object Object]",on=Object.prototype,an=on.hasOwnProperty;function ln(e,t,i,r,n,a){var o=M(e),l=M(t),s=o?nn:mi(e),c=l?nn:mi(t),h=(s=s==en?rn:s)==rn,d=(c=c==en?rn:c)==rn,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return a||(a=new Ye),o||re(e)?Mi(e,t,i,r,n,a):qi(e,t,s,i,r,n,a);if(!(i&tn)){var b=h&&an.call(e,"__wrapped__"),v=d&&an.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return a||(a=new Ye),n(_,f,i,r,a)}}return!!u&&(a||(a=new Ye),Xi(e,t,i,r,n,a))}function sn(e,t,i,r,n){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:ln(e,t,i,r,sn,n))}function cn(e,t){return sn(e,t)}const un=/^\d+(\.\d+)?([a-z]+|%)?$/,dn=(e,t,i)=>{h(e,"_minWidth",e=>"string"==typeof e&&un.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,i)},fn=class{constructor(i){t(this,i),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,i,n,a=!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":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,n)))},this.renderTableCell=(t,i,n,a)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${i}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?n:i}`:l}return t.headerCell?this.renderHeadingCell(t,i,n,a):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:"")}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){W(this,e),cn(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){dn(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,g())}),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,n,a,o;return(null!==(n=t.get(null!==(r=e.key)&&void 0!==r?r:""))&&void 0!==n?n:Number.MAX_SAFE_INTEGER)-(null!==(o=t.get(null!==(a=i.key)&&void 0!==a?a:""))&&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 n=this.getPrimaryHeaders(t),a=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(n);for(let r=l;r<o;r++){const n=[];t.vertical.forEach((e,t)=>{let i=0;if(h[t].forEach(e=>i+=e),i<=r){const a=e[r-i+c[t]];if("object"==typeof a){n.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),h[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let i=1;i<a.colSpan;i++)h[t+i].push(e);c[t]++}}});for(let t=0;t<a;t++)if(!0===this.horizontal){const a=i&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof a||null===a||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||n.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:a,label:a[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||n.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(n)}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[w.onSelectionChange])&&this.state._on[w.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map((e,t)=>{var i;return{hidable:!1!==e.hidable,key:null!==(i=e.key)&&void 0!==i?i:g(),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),this.validateHasSettingsMenu(this._hasSettingsMenu)}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,n,a){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=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${i}-${n}-${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&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,i){var n,a;const o=(null===(n=this.state._headerCells.vertical)||void 0===n?void 0:n.length)||0,l=null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.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:"95a631027258c3156b9b883749d83f03df71769d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"b42585e81106b96cd95218351d330edcebeb97f5",_tableSettings:this.state._tableSettings}),e("div",{key:"bfbee8e8ed5987d303323c303711ce26c93c27c4",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"2474a7a2047a1dd2d32d7291212b0210c233c611",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"6c0e1ec62bd0182789228909b193a17299396510",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:"cf8d26fabb9f23f244ebb249d2d7f19f16938f99",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:"ab8ce7468f2614cd64b8d404463340882101f603",class:"kol-table__body"},i.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{fn as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as i,g as n}from"./index-BEYG-0cN.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-CdSCDnmA.js";import{O as u,o as d,p as f,w as h,s as v}from"./common-8fBdMvJM.js";import{b,v as _,a as p,f as y,c as j,e as k}from"./table-settings-DSZObo-2.js";import{v as m}from"./label-CdtNxOKu.js";import{C as w}from"./keyboard-D6PoWr38.js";import{n as g}from"./dev.utils-CQdBj8YZ.js";import{d as S,K as A}from"./events-CoPFQEiC.js";import{i as O,c as $,r as C,a as D,f as x,b as M,S as F}from"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const P=(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 W="[object AsyncFunction]",E="[object Function]",K="[object GeneratorFunction]",T="[object Proxy]";function H(e){if(!O(e))return!1;var t=$(e);return t==E||t==K||t==W||t==T}var R=C["__core-js_shared__"],B=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N(e){return!!B&&B in e}var z=Function.prototype,I=z.toString;function L(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,Y=Function.prototype,Z=Object.prototype,G=Y.toString,J=Z.hasOwnProperty,Q=RegExp("^"+G.call(J).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(e){return!(!O(e)||N(e))&&(H(e)?Q:V).test(L(e))}function X(e,t){return null==e?void 0:e[t]}function tt(e,t){var i=X(e,t);return q(i)?i:void 0}var et=tt(C,"WeakMap"),it=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;function rt(e,t){var i=typeof e;return!!(t=null==t?it:t)&&("number"==i||"symbol"!=i&&nt.test(e))&&e>-1&&e%1==0&&e<t}function ot(e,t){return e===t||e!=e&&t!=t}var at=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=at}function st(e){return null!=e&&lt(e.length)&&!H(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function dt(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}var ft="[object Arguments]";function ht(e){return D(e)&&$(e)==ft}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return D(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,kt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=kt&&kt.exports===jt,wt=mt?C.Buffer:void 0,gt=wt?wt.isBuffer:void 0,St=gt||yt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Ct="[object Date]",Dt="[object Error]",xt="[object Function]",Mt="[object Map]",Ft="[object Number]",Pt="[object Object]",Wt="[object RegExp]",Et="[object Set]",Kt="[object String]",Tt="[object WeakMap]",Ht="[object ArrayBuffer]",Rt="[object DataView]",Bt="[object Float32Array]",Nt="[object Float64Array]",zt="[object Int8Array]",It="[object Int16Array]",Lt="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Yt="[object Uint16Array]",Zt="[object Uint32Array]",Gt={};function Jt(e){return D(e)&&lt(e.length)&&!!Gt[$(e)]}function Qt(e){return function(t){return e(t)}}Gt[Bt]=Gt[Nt]=Gt[zt]=Gt[It]=Gt[Lt]=Gt[Ut]=Gt[Vt]=Gt[Yt]=Gt[Zt]=!0,Gt[At]=Gt[Ot]=Gt[Ht]=Gt[$t]=Gt[Rt]=Gt[Ct]=Gt[Dt]=Gt[xt]=Gt[Mt]=Gt[Ft]=Gt[Pt]=Gt[Wt]=Gt[Et]=Gt[Kt]=Gt[Tt]=!1;var qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Xt&&Xt.exports===qt,ee=te&&x.process,ie=function(){try{var e=Xt&&Xt.require&&Xt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ne=ie&&ie.isTypedArray,re=ne?Qt(ne):Jt,oe=Object.prototype,ae=oe.hasOwnProperty;function le(e,t){var i=M(e),r=!i&&pt(e),n=!i&&!r&&St(e),a=!i&&!r&&!n&&re(e),o=i||r||n||a,l=o?dt(e.length,String):[],s=l.length;for(var c in e)!ae.call(e,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(i){return e(t(i))}}var ce=se(Object.keys,Object),ue=Object.prototype,de=ue.hasOwnProperty;function fe(e){if(!ut(e))return ce(e);var t=[];for(var i in Object(e))de.call(e,i)&&"constructor"!=i&&t.push(i);return t}function he(e){return st(e)?le(e):fe(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,je=ye.hasOwnProperty;function ke(e){var t=this.__data__;if(ve){var i=t[e];return i===pe?void 0:i}return je.call(t,e)?t[e]:void 0}var me=Object.prototype,we=me.hasOwnProperty;function ge(e){var t=this.__data__;return ve?void 0!==t[e]:we.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=ve&&void 0===t?Se:t,this}function Oe(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 $e(){this.__data__=[],this.size=0}function Ce(e,t){for(var i=e.length;i--;)if(ot(e[i][0],t))return i;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=ke,Oe.prototype.has=ge,Oe.prototype.set=Ae;var De=Array.prototype,xe=De.splice;function Me(e){var t=this.__data__,i=Ce(t,e);return!(i<0)&&(i==t.length-1?t.pop():xe.call(t,i,1),--this.size,!0)}function Fe(e){var t=this.__data__,i=Ce(t,e);return i<0?void 0:t[i][1]}function Pe(e){return Ce(this.__data__,e)>-1}function We(e,t){var i=this.__data__,r=Ce(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}function Ee(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])}}Ee.prototype.clear=$e,Ee.prototype.delete=Me,Ee.prototype.get=Fe,Ee.prototype.has=Pe,Ee.prototype.set=We;var Ke=tt(C,"Map");function Te(){this.size=0,this.__data__={hash:new Oe,map:new(Ke||Ee),string:new Oe}}function He(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var i=e.__data__;return He(t)?i["string"==typeof t?"string":"hash"]:i.map}function Be(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Ne(e){return Re(this,e).get(e)}function ze(e){return Re(this,e).has(e)}function Ie(e,t){var i=Re(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this}function Le(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 Ue(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}function Ve(){this.__data__=new Ee,this.size=0}function Ye(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)}Le.prototype.clear=Te,Le.prototype.delete=Be,Le.prototype.get=Ne,Le.prototype.has=ze,Le.prototype.set=Ie;var Je=200;function Qe(e,t){var i=this.__data__;if(i instanceof Ee){var r=i.__data__;if(!Ke||r.length<Je-1)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Le(r)}return i.set(e,t),this.size=i.size,this}function qe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Xe(e,t){for(var i=-1,r=null==e?0:e.length,n=0,a=[];++i<r;){var o=e[i];t(o,i,e)&&(a[n++]=o)}return a}function ti(){return[]}qe.prototype.clear=Ve,qe.prototype.delete=Ye,qe.prototype.get=Ze,qe.prototype.has=Ge,qe.prototype.set=Qe;var ei=Object.prototype,ii=ei.propertyIsEnumerable,ni=Object.getOwnPropertySymbols,ri=ni?function(e){return null==e?[]:(e=Object(e),Xe(ni(e),function(t){return ii.call(e,t)}))}:ti;function oi(e,t,i){var r=t(e);return M(e)?r:Ue(r,i(e))}function ai(e){return oi(e,he,ri)}var li=tt(C,"DataView"),si=tt(C,"Promise"),ci=tt(C,"Set"),ui="[object Map]",di="[object Object]",fi="[object Promise]",hi="[object Set]",vi="[object WeakMap]",bi="[object DataView]",_i=L(li),pi=L(Ke),yi=L(si),ji=L(ci),ki=L(et),mi=$;(li&&mi(new li(new ArrayBuffer(1)))!=bi||Ke&&mi(new Ke)!=ui||si&&mi(si.resolve())!=fi||ci&&mi(new ci)!=hi||et&&mi(new et)!=vi)&&(mi=function(e){var t=$(e),i=t==di?e.constructor:void 0,r=i?L(i):"";if(r)switch(r){case _i:return bi;case pi:return ui;case yi:return fi;case ji:return hi;case ki:return vi}return t});var wi=C.Uint8Array,gi="__lodash_hash_undefined__";function Si(e){return this.__data__.set(e,gi),this}function Ai(e){return this.__data__.has(e)}function Oi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Le;++t<i;)this.add(e[t])}function $i(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 Ci(e,t){return e.has(t)}Oi.prototype.add=Oi.prototype.push=Si,Oi.prototype.has=Ai;var Di=1,xi=2;function Mi(e,t,i,r,n,a){var o=i&Di,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=i&xi?new Oi:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,a):r(v,_,d,e,t,a);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!$i(t,function(e,t){if(!Ci(b,t)&&(v===e||n(v,e,i,r,a)))return b.push(t)})){u=!1;break}}else if(v!==_&&!n(v,_,i,r,a)){u=!1;break}}return a.delete(e),a.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 Pi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Wi=1,Ei=2,Ki="[object Boolean]",Ti="[object Date]",Hi="[object Error]",Ri="[object Map]",Bi="[object Number]",Ni="[object RegExp]",zi="[object Set]",Ii="[object String]",Li="[object Symbol]",Ui="[object ArrayBuffer]",Vi="[object DataView]",Yi=F?F.prototype:void 0,Zi=Yi?Yi.valueOf:void 0;function Gi(e,t,i,r,n,a,o){switch(i){case Vi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ui:return!(e.byteLength!=t.byteLength||!a(new wi(e),new wi(t)));case Ki:case Ti:case Bi:return ot(+e,+t);case Hi:return e.name==t.name&&e.message==t.message;case Ni:case Ii:return e==t+"";case Ri:var l=Fi;case zi:var s=r&Wi;if(l||(l=Pi),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=Ei,o.set(e,t);var h=Mi(l(e),l(t),r,n,a,o);return o.delete(e),h;case Li:if(Zi)return Zi.call(e)==Zi.call(t)}return!1}var Ji=1,Qi=Object.prototype,qi=Qi.hasOwnProperty;function Xi(e,t,i,r,n,a){var o=i&Ji,l=ai(e),s=l.length;if(s!=ai(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=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var b=!0;a.set(e,t),a.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,a):r(_,f,h,e,t,a);if(!(void 0===p?_===f||n(_,f,i,r,a):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 a.delete(e),a.delete(t),b}var tn=1,en="[object Arguments]",nn="[object Array]",rn="[object Object]",on=Object.prototype,an=on.hasOwnProperty;function ln(e,t,i,r,n,a){var o=M(e),l=M(t),s=o?nn:mi(e),c=l?nn:mi(t),h=(s=s==en?rn:s)==rn,d=(c=c==en?rn:c)==rn,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return a||(a=new qe),o||re(e)?Mi(e,t,i,r,n,a):Gi(e,t,s,i,r,n,a);if(!(i&tn)){var b=h&&an.call(e,"__wrapped__"),v=d&&an.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return a||(a=new qe),n(_,f,i,r,a)}}return!!u&&(a||(a=new qe),Xi(e,t,i,r,n,a))}function sn(e,t,i,r,n){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:ln(e,t,i,r,sn,n))}function cn(e,t){return sn(e,t)}const un=/^\d+(\.\d+)?([a-z]+|%)?$/,dn=(e,t,i)=>{h(e,"_minWidth",e=>"string"==typeof e&&un.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,i)},fn=class{constructor(i){t(this,i),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,i,n,a=!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":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(t,i),t.map((e,t)=>this.renderTableCell(e,i,t,n)))},this.renderTableCell=(t,i,n,a)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${i}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?n:i}`:l}return t.headerCell?this.renderHeadingCell(t,i,n,a):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:"")}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){P(this,e),cn(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){dn(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,g())}),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,n,a,o;return(null!==(n=t.get(null!==(r=e.key)&&void 0!==r?r:""))&&void 0!==n?n:Number.MAX_SAFE_INTEGER)-(null!==(o=t.get(null!==(a=i.key)&&void 0!==a?a:""))&&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 n=this.getPrimaryHeaders(t),a=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(n);for(let r=l;r<o;r++){const n=[];t.vertical.forEach((e,t)=>{let i=0;if(h[t].forEach(e=>i+=e),i<=r){const a=e[r-i+c[t]];if("object"==typeof a){n.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),h[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let i=1;i<a.colSpan;i++)h[t+i].push(e);c[t]++}}});for(let t=0;t<a;t++)if(!0===this.horizontal){const a=i&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof a||null===a||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||n.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:a,label:a[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||n.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(n)}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[w.onSelectionChange])&&this.state._on[w.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map((e,t)=>{var i;return{hidable:!1!==e.hidable,key:null!==(i=e.key)&&void 0!==i?i:g(),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),this.validateHasSettingsMenu(this._hasSettingsMenu)}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,n,a){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=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${i}-${n}-${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&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,i){var n,a;const o=(null===(n=this.state._headerCells.vertical)||void 0===n?void 0:n.length)||0,l=null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.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:"95a631027258c3156b9b883749d83f03df71769d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"b42585e81106b96cd95218351d330edcebeb97f5",_tableSettings:this.state._tableSettings}),e("div",{key:"bfbee8e8ed5987d303323c303711ce26c93c27c4",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"2474a7a2047a1dd2d32d7291212b0210c233c611",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"6c0e1ec62bd0182789228909b193a17299396510",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:"cf8d26fabb9f23f244ebb249d2d7f19f16938f99",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:"ab8ce7468f2614cd64b8d404463340882101f603",class:"kol-table__body"},i.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return n(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{fn as kol_table_stateless_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e}from"./index-44UAWlcO.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const o="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / 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(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n overflow: hidden;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table__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}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"b4fcf0d4f8058f82f2ee64ffb90ae2b78ec1017e",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
4
+ import{r as n,h as e}from"./index-BEYG-0cN.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const o="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / 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(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n overflow: hidden;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table__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}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"b4fcf0d4f8058f82f2ee64ffb90ae2b78ec1017e",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as n,g as e}from"./index-44UAWlcO.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-8fBdMvJM.js";import{v as c}from"./align-CyK0wp7d.js";import{v as u}from"./label-CdtNxOKu.js";import{t as b}from"./i18n-CdSCDnmA.js";import{d as p}from"./component-names-CkE54Ym7.js";import{K as f}from"./keyboard-D6PoWr38.js";import{d as m,K as g}from"./events-CoPFQEiC.js";import{c as v}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";const y=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&y.includes(t),new Set([`KoliBriTabBehavior {${y.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${b("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case f.ArrowRight:this.goToNextTab(t);break;case f.ArrowLeft:this.goToPreviousTab(t);break;case f.Space:case f.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&m(this.host,g.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(p,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(p,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"c90d53464702512863a3483602ed15645a6c0484",ref:t=>{this.tabPanelsElement=t},class:v("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"3e172f4835867233726b1ae2081e3a6729eb3b83",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&m(this.host,g.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
4
+ import{r as t,h as n,g as e}from"./index-BEYG-0cN.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-8fBdMvJM.js";import{v as c}from"./align-CyK0wp7d.js";import{v as u}from"./label-CdtNxOKu.js";import{t as b}from"./i18n-CdSCDnmA.js";import{d as p}from"./component-names-CkE54Ym7.js";import{K as f}from"./keyboard-D6PoWr38.js";import{d as m,K as g}from"./events-CoPFQEiC.js";import{c as v}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";const y=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&y.includes(t),new Set([`KoliBriTabBehavior {${y.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${b("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case f.ArrowRight:this.goToNextTab(t);break;case f.ArrowLeft:this.goToPreviousTab(t);break;case f.Space:case f.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&m(this.host,g.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(p,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(p,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"c90d53464702512863a3483602ed15645a6c0484",ref:t=>{this.tabPanelsElement=t},class:v("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"3e172f4835867233726b1ae2081e3a6729eb3b83",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&m(this.host,g.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e,r as t,g as n}from"./index-44UAWlcO.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,c as o,g as s,F as l}from"./FormFieldStateWrapper-B7PqxuTo.js";import{I as r,a as d}from"./controller-icon-aakQFHso.js";import{_ as h}from"./Heading-DT8fK42U.js";import{w as c,e as m}from"./common-8fBdMvJM.js";import{n as p}from"./dev.utils-Bbi3sn8s.js";import{a as u,v as f,b}from"./max-length-behavior-BmNWss6T.js";import{v}from"./placeholder-6URRds0_.js";import{v as y}from"./read-only-CcRldJ9w.js";import{v as g}from"./required-G86n77y0.js";import{v as k}from"./rows-P4l3PNiA.js";import{v as _}from"./spell-check-DIsLAYgk.js";import"./access-and-short-key-bcID78Ha.js";import"./disabled-BydergHu.js";import"./hide-label-DRunOux4.js";import"./label-CdtNxOKu.js";import"./tooltip-align-_VI7LehI.js";import"./align-CyK0wp7d.js";import"./events-CoPFQEiC.js";import"./associated.controller-BKIODHIT.js";import"./bootstrap-BiRnv4fV.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./Alert-R2nEqfd2.js";import"./i18n-CdSCDnmA.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";import"./InternalUnderlinedBadgeText-dfa2g8TL.js";import"./reuse-CX4AQDkS.js";import"./Icon-oHNRs_Az.js";import"./icons-72ER78AW.js";const w=["vertical","none"],x=e=>"string"==typeof e&&w.includes(e),j=(e,t)=>{c(e,"_resize",x,new Set(w),t,{defaultValue:"vertical"})},z=t=>{const{class:n,msg:l,touched:s,readonly:r,disabled:d,required:c,ariaDescribedBy:m,hideLabel:u,label:p}=t,f=h(t,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),v=o(l,s),b="string"==typeof l?"error":null==l?void 0:l._type,g={"kol-textarea--disabled":Boolean(d),"kol-textarea--required":Boolean(c),"kol-textarea--touched":Boolean(s),"kol-textarea--readonly":Boolean(r),[`kol-textarea--${b||"error"}`]:v},_=Object.assign(Object.assign({class:i("kol-textarea",g,n),required:c,disabled:d,readonly:r},a({ariaDescribedBy:m,hideLabel:u,label:p})),f);return e("textarea",Object.assign({},_))};function L(e,t){var n;const a=[...s(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],i=Object.assign(Object.assign({id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,touched:e._touched,msg:e._msg},t),{ariaDescribedBy:a});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(i.maxLength=e._maxLength),"_shortKey"in e&&(i["aria-keyshortcuts"]=e._shortKey),i}const B=t=>{var{state:n}=t,a=h(t,["state"]);return e(z,Object.assign({},L(n,a)))};class S extends r{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=e}validateHasCounter(e){u(this.component,e)}validateMaxLengthBehavior(e){f(this.component,e)}validateMaxLength(e){b(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){v(this.component,e)}validateReadOnly(e){y(this.component,e)}validateResize(e){j(this.component,e)}validateRequired(e){g(this.component,e)}validateRows(e){k(this.component,e)}validateSpellCheck(e){_(this.component,e)}validateValue(e){m(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateResize(this.component._resize),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const A="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .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-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",O=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},T=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:i("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize},ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(l,Object.assign({key:"a04967ea2fecb1a7c6f238600d52f2d4d4b4cc72"},this.getFormFieldProps()),e(d,{key:"db4f3ed0dfa745c109a3a21346df79722b0f7595",state:this.state},e(B,Object.assign({key:"71376e1ff01a524c589632fff16023da5bb9774b"},this.getTextAreaProps()))))}constructor(e){t(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${p()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=O(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new S(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(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)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>O(this.textareaRef)?this.state._rows:O(this.textareaRef):this._rows||(this._rows=1)},0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};T.style={default:A};export{T as kol_textarea};
4
+ import{h as e,r as t,g as n}from"./index-BEYG-0cN.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,c as o,g as s,F as l}from"./FormFieldStateWrapper-CA5QfRbl.js";import{I as r,a as d}from"./controller-icon-By46q2Iq.js";import{_ as h}from"./Heading-CF5mGt3A.js";import{w as c,e as m}from"./common-8fBdMvJM.js";import{n as p}from"./dev.utils-CQdBj8YZ.js";import{a as u,v as f,b}from"./max-length-behavior-BmNWss6T.js";import{v}from"./placeholder-6URRds0_.js";import{v as y}from"./read-only-CcRldJ9w.js";import{v as g}from"./required-G86n77y0.js";import{v as k}from"./rows-P4l3PNiA.js";import{v as _}from"./spell-check-DIsLAYgk.js";import"./access-and-short-key-bcID78Ha.js";import"./disabled-BydergHu.js";import"./hide-label-DRunOux4.js";import"./label-CdtNxOKu.js";import"./tooltip-align-_VI7LehI.js";import"./align-CyK0wp7d.js";import"./events-CoPFQEiC.js";import"./associated.controller-BKIODHIT.js";import"./bootstrap-BiRnv4fV.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./Alert-C3ktyZF6.js";import"./i18n-CdSCDnmA.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";import"./InternalUnderlinedBadgeText-BzZpJszE.js";import"./reuse-CX4AQDkS.js";import"./Icon-CZlCqmbX.js";import"./icons-72ER78AW.js";const w=["vertical","none"],x=e=>"string"==typeof e&&w.includes(e),j=(e,t)=>{c(e,"_resize",x,new Set(w),t,{defaultValue:"vertical"})},z=t=>{const{class:n,msg:l,touched:s,readonly:r,disabled:d,required:c,ariaDescribedBy:m,hideLabel:u,label:p}=t,v=h(t,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),f=o(l,s),b="string"==typeof l?"error":null==l?void 0:l._type,g={"kol-textarea--disabled":Boolean(d),"kol-textarea--required":Boolean(c),"kol-textarea--touched":Boolean(s),"kol-textarea--readonly":Boolean(r),[`kol-textarea--${b||"error"}`]:f},_=Object.assign(Object.assign({class:i("kol-textarea",g,n),required:c,disabled:d,readonly:r},a({ariaDescribedBy:m,hideLabel:u,label:p})),v);return e("textarea",Object.assign({},_))};function B(e,t){var n;const a=[...s(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],i=Object.assign(Object.assign({id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,touched:e._touched,msg:e._msg},t),{ariaDescribedBy:a});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(i.maxLength=e._maxLength),"_shortKey"in e&&(i["aria-keyshortcuts"]=e._shortKey),i}const L=t=>{var{state:n}=t,a=h(t,["state"]);return e(z,Object.assign({},B(n,a)))};class C extends r{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=e}validateHasCounter(e){u(this.component,e)}validateMaxLengthBehavior(e){f(this.component,e)}validateMaxLength(e){b(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){v(this.component,e)}validateReadOnly(e){y(this.component,e)}validateResize(e){j(this.component,e)}validateRequired(e){g(this.component,e)}validateRows(e){k(this.component,e)}validateSpellCheck(e){_(this.component,e)}validateValue(e){m(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateResize(this.component._resize),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const S="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .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-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",A=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},O=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:i("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize},ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(l,Object.assign({key:"a04967ea2fecb1a7c6f238600d52f2d4d4b4cc72"},this.getFormFieldProps()),e(d,{key:"db4f3ed0dfa745c109a3a21346df79722b0f7595",state:this.state},e(L,Object.assign({key:"71376e1ff01a524c589632fff16023da5bb9774b"},this.getTextAreaProps()))))}constructor(e){t(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${p()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=A(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new C(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(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)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>A(this.textareaRef)?this.state._rows:A(this.textareaRef):this._rows||(this._rows=1)},0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};O.style={default:S};export{O as kol_textarea};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,H as e}from"./index-44UAWlcO.js";import{t as o}from"./i18n-CdSCDnmA.js";import{n as i}from"./dev.utils-Bbi3sn8s.js";import{n as s}from"./component-names-CkE54Ym7.js";import{K as a}from"./Alert-R2nEqfd2.js";import"./common-8fBdMvJM.js";import"./markdown-DL-PkOqb.js";import{_ as l}from"./Heading-DT8fK42U.js";import{c as r}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";const d=t=>{var{status:e,toast:o,onClose:s}=t,i=l(t,["status","toast","onClose"]);const{type:d,label:c,description:h,variant:m}=o;return n("div",{class:r("kol-toast-item",`kol-toast-item--${e}`)},n(a,{class:"kol-toast-item__alert",alert:!0,label:c,level:0,hasCloser:!0,type:d,variant:m||"card",onCloserClick:s},n("div",Object.assign({},i),h)))},c="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",h=300,m=class{constructor(n){t(this,n),this.state={_toastStates:[]},this.translateToastCloseAll=o("kol-toast-close-all"),this.knownRenderFunctions=new Set}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t)})},h),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(n=>(n.id===t.id&&(n.status="removing"),n))}),setTimeout(()=>{var n,e;this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>n.id!==t.id)}),null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)},h)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map(t=>Object.assign(Object.assign({},t),{status:"removing"}))}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>t.every(t=>t.id!==n.id))}),t.forEach(t=>{var n,e;null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)})},h)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return n(e,{key:"e6841e1a26bc8c24de441ed1d444175021f8d7b5",class:"kol-toast-container"},this.state._toastStates.length>1&&n(s,{key:"938ab38123fd91e356eb63b4c315d1884eb37197",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>n(d,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}};m.style={default:c};export{m as kol_toast_container};
4
+ import{h as n,r as t,H as e}from"./index-BEYG-0cN.js";import{t as o}from"./i18n-CdSCDnmA.js";import{n as i}from"./dev.utils-CQdBj8YZ.js";import{n as s}from"./component-names-CkE54Ym7.js";import{K as a}from"./Alert-C3ktyZF6.js";import"./common-8fBdMvJM.js";import"./markdown-DL-PkOqb.js";import{_ as l}from"./Heading-CF5mGt3A.js";import{c as r}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";const d=t=>{var{status:e,toast:o,onClose:s}=t,i=l(t,["status","toast","onClose"]);const{type:d,label:c,description:h,variant:m}=o;return n("div",{class:r("kol-toast-item",`kol-toast-item--${e}`)},n(a,{class:"kol-toast-item__alert",alert:!0,label:c,level:0,hasCloser:!0,type:d,variant:m||"card",onCloserClick:s},n("div",Object.assign({},i),h)))},c="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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 }\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",h=300,m=class{constructor(n){t(this,n),this.state={_toastStates:[]},this.translateToastCloseAll=o("kol-toast-close-all"),this.knownRenderFunctions=new Set}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t)})},h),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(n=>(n.id===t.id&&(n.status="removing"),n))}),setTimeout(()=>{var n,e;this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>n.id!==t.id)}),null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)},h)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map(t=>Object.assign(Object.assign({},t),{status:"removing"}))}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>t.every(t=>t.id!==n.id))}),t.forEach(t=>{var n,e;null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)})},h)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return n(e,{key:"e6841e1a26bc8c24de441ed1d444175021f8d7b5",class:"kol-toast-container"},this.state._toastStates.length>1&&n(s,{key:"938ab38123fd91e356eb63b4c315d1884eb37197",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>n(d,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}};m.style={default:c};export{m as kol_toast_container};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,g as t}from"./index-44UAWlcO.js";import{O as i,o,p as a,s as l}from"./common-8fBdMvJM.js";import{v as s}from"./label-CdtNxOKu.js";import{f as r,d}from"./component-names-CkE54Ym7.js";import{v as c}from"./orientation-5kQWqijN.js";import{K as h}from"./keyboard-D6PoWr38.js";const m=(n,e)=>{i(e,()=>{o(e,()=>{void 0===e&&(e=[]);try{e=a(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&l(n,"_items",e)})})},p="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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-tooltip {\n display: contents;\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-align: center;\n text-decoration-line: none;\n }\n .kol-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-link__text {\n width: 100%;\n margin: auto;\n }\n .kol-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n .kol-toolbar--orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",f=class{constructor(t){n(this,t),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,t)=>{const i=t!==this.currentIndex||(null==n?void 0:n._disabled)?-1:0,o={key:t,class:"button normal kol-toolbar__item",_tabIndex:i},a=n=>{n&&this.indexToElement.set(t,n)};return e("_href"in n?r:d,Object.assign({},n,o,{ref:a}))}}render(){return e("div",{key:"2b79702bb51922cea9ae81435bfce227b1c4ce5a",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){s(this,n)}validateItems(n){m(this,n)}validateOrientation(n){c(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex(n=>!n._disabled)}handleKeyDown(n){var e,t;const i=n.code;if(![h.ArrowUp,h.ArrowDown,h.ArrowRight,h.ArrowLeft].includes(i))return;n.preventDefault();const o=(null===(e=this._items)||void 0===e?void 0:e.length)-1,a=this.currentIndex;let l=0;switch(i){case h.ArrowUp:case h.ArrowLeft:l=a!==l?a-1:o;break;case h.ArrowDown:case h.ArrowRight:o!==a&&(l=a+1)}a!==l&&(this.currentIndex=l,null===(t=this.getCurrentToolbarItem(l))||void 0===t||t.kolFocus())}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return t(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};f.style={default:p};export{f as kol_toolbar};
4
+ import{r as n,h as e,g as t}from"./index-BEYG-0cN.js";import{O as i,o,p as a,s as l}from"./common-8fBdMvJM.js";import{v as s}from"./label-CdtNxOKu.js";import{f as r,d}from"./component-names-CkE54Ym7.js";import{v as c}from"./orientation-5kQWqijN.js";import{K as h}from"./keyboard-D6PoWr38.js";const m=(n,e)=>{i(e,()=>{o(e,()=>{void 0===e&&(e=[]);try{e=a(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&l(n,"_items",e)})})},p="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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-tooltip {\n display: contents;\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(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-align: center;\n text-decoration-line: none;\n }\n .kol-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-link__text {\n width: 100%;\n margin: auto;\n }\n .kol-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n .kol-toolbar--orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",f=class{constructor(t){n(this,t),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,t)=>{const i=t!==this.currentIndex||(null==n?void 0:n._disabled)?-1:0,o={key:t,class:"button normal kol-toolbar__item",_tabIndex:i},a=n=>{n&&this.indexToElement.set(t,n)};return e("_href"in n?r:d,Object.assign({},n,o,{ref:a}))}}render(){return e("div",{key:"2b79702bb51922cea9ae81435bfce227b1c4ce5a",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){s(this,n)}validateItems(n){m(this,n)}validateOrientation(n){c(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex(n=>!n._disabled)}handleKeyDown(n){var e,t;const i=n.code;if(![h.ArrowUp,h.ArrowDown,h.ArrowRight,h.ArrowLeft].includes(i))return;n.preventDefault();const o=(null===(e=this._items)||void 0===e?void 0:e.length)-1,a=this.currentIndex;let l=0;switch(i){case h.ArrowUp:case h.ArrowLeft:l=a!==l?a-1:o;break;case h.ArrowDown:case h.ArrowRight:o!==a&&(l=a+1)}a!==l&&(this.currentIndex=l,null===(t=this.getCurrentToolbarItem(l))||void 0===t||t.kolFocus())}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return t(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};f.style={default:p};export{f as kol_toolbar};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as s,g as e}from"./index-44UAWlcO.js";import{b as h,a as o}from"./align-floating-elements-Bx4ukVlr.js";import{e as a,A as n}from"./common-8fBdMvJM.js";import{v as l}from"./align-CyK0wp7d.js";import{v as r}from"./label-CdtNxOKu.js";import"./Alert-R2nEqfd2.js";import{K as d}from"./Span-43sGxXr7.js";import"./i18n-CdSCDnmA.js";import"./Heading-DT8fK42U.js";import"./clsx-eK3rPvPS.js";import"./component-names-CkE54Ym7.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";import"./Icon-oHNRs_Az.js";import"./reuse-CX4AQDkS.js";import"./markdown-DL-PkOqb.js";import"./InternalUnderlinedBadgeText-dfa2g8TL.js";import"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const c=(t,e)=>{a(t,"_badgeText",e)},m=(t,e)=>{a(t,"_id",e)},f=new Set;function p(t){f.forEach(t=>{t.style.setProperty("z-index","999")}),f.add(t),t.style.setProperty("z-index","1000")}function u(t){if(f.delete(t),f.size>0){const t=Array.from(f).pop();t&&t.style.setProperty("z-index","1000")}}const b=300,v=class{constructor(e){t(this,e),this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){p(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),n().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=h(t,e,()=>{this.alignTooltip()})}},this.showTooltipWithDelay=()=>{clearTimeout(this.hideTooltipTimeout),clearTimeout(this.showTooltipTimeout),this.showTooltipTimeout=setTimeout(()=>{this.showTooltip()},b)},this.hideTooltipWithDelay=()=>{clearTimeout(this.hideTooltipTimeout),this.hideTooltipTimeout=setTimeout(()=>{this.hideTooltip()},b)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseleave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){clearTimeout(this.showTooltipTimeout),this.tooltipElement&&(u(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),n().removeEventListener("keyup",this.hideTooltipByEscape)}handleMouseEnter(){this.showTooltipWithDelay()}handleMouseleave(){this.hideTooltipWithDelay()}handleFocusIn(){this.showTooltipWithDelay()}handleFocusout(){this.hideTooltipWithDelay()}render(){return i(s,{key:"60be1bd258bc5ae2b0ecce9374607d11476071b1",class:"kol-tooltip"},""!==this.state._label&&i("div",{key:"2af044756ca7d87c5b789181da84556a517c0ee4",class:"kol-tooltip__floating",ref:this.catchTooltipElement},i("div",{key:"057fc2de5c87f0f82e9477568992048bf3918e77",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),i(d,{key:"1ba456fb877c04c0dc1e93431f90db07f2e90b47",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(t){c(this,t)}validateAlign(t){l(this,t)}validateId(t){m(this,t)}validateLabel(t){r(this,t,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return e(this)}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};export{v as kol_tooltip_wc};
4
+ import{r as t,h as i,H as s,g as e}from"./index-BEYG-0cN.js";import{b as h,a as o}from"./align-floating-elements-Bx4ukVlr.js";import{e as a,A as n}from"./common-8fBdMvJM.js";import{v as l}from"./align-CyK0wp7d.js";import{v as r}from"./label-CdtNxOKu.js";import"./Alert-C3ktyZF6.js";import{K as d}from"./Span-DNVnBGCS.js";import"./i18n-CdSCDnmA.js";import"./Heading-CF5mGt3A.js";import"./clsx-eK3rPvPS.js";import"./component-names-CkE54Ym7.js";import"./bem-DhwfdDrM.js";import"./browser-DeS_gcJV.js";import"./Icon-CZlCqmbX.js";import"./reuse-CX4AQDkS.js";import"./markdown-DL-PkOqb.js";import"./InternalUnderlinedBadgeText-BzZpJszE.js";import"./isObject-DvSELytj.js";import"./i18n-ZF6JbdVP.js";const c=(t,e)=>{a(t,"_badgeText",e)},m=(t,e)=>{a(t,"_id",e)},f=new Set;function p(t){f.forEach(t=>{t.style.setProperty("z-index","999")}),f.add(t),t.style.setProperty("z-index","1000")}function u(t){if(f.delete(t),f.size>0){const t=Array.from(f).pop();t&&t.style.setProperty("z-index","1000")}}const b=300,v=class{constructor(e){t(this,e),this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){p(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),n().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=h(t,e,()=>{this.alignTooltip()})}},this.showTooltipWithDelay=()=>{clearTimeout(this.hideTooltipTimeout),clearTimeout(this.showTooltipTimeout),this.showTooltipTimeout=setTimeout(()=>{this.showTooltip()},b)},this.hideTooltipWithDelay=()=>{clearTimeout(this.hideTooltipTimeout),this.hideTooltipTimeout=setTimeout(()=>{this.hideTooltip()},b)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseleave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){clearTimeout(this.showTooltipTimeout),this.tooltipElement&&(u(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),n().removeEventListener("keyup",this.hideTooltipByEscape)}handleMouseEnter(){this.showTooltipWithDelay()}handleMouseleave(){this.hideTooltipWithDelay()}handleFocusIn(){this.showTooltipWithDelay()}handleFocusout(){this.hideTooltipWithDelay()}render(){return i(s,{key:"60be1bd258bc5ae2b0ecce9374607d11476071b1",class:"kol-tooltip"},""!==this.state._label&&i("div",{key:"2af044756ca7d87c5b789181da84556a517c0ee4",class:"kol-tooltip__floating",ref:this.catchTooltipElement},i("div",{key:"057fc2de5c87f0f82e9477568992048bf3918e77",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),i(d,{key:"1ba456fb877c04c0dc1e93431f90db07f2e90b47",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(t){c(this,t)}validateAlign(t){l(this,t)}validateId(t){m(this,t)}validateLabel(t){r(this,t,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return e(this)}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};export{v as kol_tooltip_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as e,h as t,H as i,g as s}from"./index-44UAWlcO.js";import{d as a}from"./common-8fBdMvJM.js";import{v as l}from"./href-zZq6HYWf.js";import{v as o}from"./label-CdtNxOKu.js";import{v as n}from"./open-D9q98v46.js";import{f as r,e as c,x as h}from"./component-names-CkE54Ym7.js";import{n as d}from"./dev.utils-Bbi3sn8s.js";import{c as f}from"./clsx-eK3rPvPS.js";const _=(e,t,s)=>{a(e,"_active",t,s)},m=class{constructor(t){e(this,t),this.groupId=`tree-group-${d()}`,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1}}render(){const{_href:e,_active:a,_hasChildren:s,_open:l,_label:n}=this.state;return t(i,{key:"e8cebee52ed0f115c3aa30e82e2e3ccf5d09e626",onSlotchange:this.handleSlotchange.bind(this)},t("li",{key:"c4b1d56ae69f55ca57ad8d863df02fe0d7ff4f00",class:"kol-tree-item",style:{"--level":`${this.level}`}},t(r,{key:"8e87e00dae2d0e6dcad5602e28b5642bc31702f5",class:f("kol-tree-item__link",{"kol-tree-item__link--first-level":0===this.level,"kol-tree-item__link--active":a}),_href:e,_label:"",_role:"treeitem",_tabIndex:a?0:-1,_ariaExpanded:s?l:void 0,_ariaOwns:s?this.groupId:void 0,ref:e=>this.linkElement=e},t("span",{key:"2375f5ff6abe59419b5d4ef28e5e0f104034fef3",class:"kol-tree-item__link-inner",slot:"expert"},s?t("span",{class:"kol-tree-item__toggle-button",onClick:e=>l?void this.handleCollapseClick(e):void this.handleExpandClick(e)},t(c,{class:"kol-tree-item__toggle-button-icon",_icons:"codicon codicon-"+(l?"chevron-down":"chevron-right"),_label:""})):t("span",{class:"kol-tree-item__toggle-button-placeholder"}),t("span",{key:"39c07661723143bfafcc6ee8e96e51bd88daa940",class:"kol-tree-item__text"},n))),t("ul",{key:"2bd2e3a880b4d1946f00e46784f476e69508441b",class:"kol-tree-item__children",hidden:!s||!l,role:"group",id:this.groupId},t("slot",{key:"472cc53e288b84a99a0190a82be67e04ce851f99"}))))}validateActive(e){_(this,e||!1)}validateLabel(e){o(this,e)}validateOpen(e){n(this,e)}validateHref(e){l(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==h&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.focus(),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return s(this)}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}};export{m as kol_tree_item_wc};
4
+ import{r as e,h as t,H as i,g as s}from"./index-BEYG-0cN.js";import{d as a}from"./common-8fBdMvJM.js";import{v as l}from"./href-zZq6HYWf.js";import{v as o}from"./label-CdtNxOKu.js";import{v as n}from"./open-D9q98v46.js";import{f as r,e as c,x as h}from"./component-names-CkE54Ym7.js";import{n as d}from"./dev.utils-CQdBj8YZ.js";import{c as f}from"./clsx-eK3rPvPS.js";const _=(e,t,s)=>{a(e,"_active",t,s)},m=class{constructor(t){e(this,t),this.groupId=`tree-group-${d()}`,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1}}render(){const{_href:e,_active:a,_hasChildren:s,_open:l,_label:n}=this.state;return t(i,{key:"e8cebee52ed0f115c3aa30e82e2e3ccf5d09e626",onSlotchange:this.handleSlotchange.bind(this)},t("li",{key:"c4b1d56ae69f55ca57ad8d863df02fe0d7ff4f00",class:"kol-tree-item",style:{"--level":`${this.level}`}},t(r,{key:"8e87e00dae2d0e6dcad5602e28b5642bc31702f5",class:f("kol-tree-item__link",{"kol-tree-item__link--first-level":0===this.level,"kol-tree-item__link--active":a}),_href:e,_label:"",_role:"treeitem",_tabIndex:a?0:-1,_ariaExpanded:s?l:void 0,_ariaOwns:s?this.groupId:void 0,ref:e=>this.linkElement=e},t("span",{key:"2375f5ff6abe59419b5d4ef28e5e0f104034fef3",class:"kol-tree-item__link-inner",slot:"expert"},s?t("span",{class:"kol-tree-item__toggle-button",onClick:e=>l?void this.handleCollapseClick(e):void this.handleExpandClick(e)},t(c,{class:"kol-tree-item__toggle-button-icon",_icons:"codicon codicon-"+(l?"chevron-down":"chevron-right"),_label:""})):t("span",{class:"kol-tree-item__toggle-button-placeholder"}),t("span",{key:"39c07661723143bfafcc6ee8e96e51bd88daa940",class:"kol-tree-item__text"},n))),t("ul",{key:"2bd2e3a880b4d1946f00e46784f476e69508441b",class:"kol-tree-item__children",hidden:!s||!l,role:"group",id:this.groupId},t("slot",{key:"472cc53e288b84a99a0190a82be67e04ce851f99"}))))}validateActive(e){_(this,e||!1)}validateLabel(e){o(this,e)}validateOpen(e){n(this,e)}validateHref(e){l(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==h&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.focus(),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return s(this)}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}};export{m as kol_tree_item_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e}from"./index-44UAWlcO.js";import{p as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const i="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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-tree-item {\n --indentation: var(--tree-item-indentation, calc(10 * 1rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-right: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n padding-left: max(var(--indentation) * var(--level) + 8 * 1rem / var(--kolibri-root-font-size, 16), 8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n display: inline-flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",o=class{constructor(e){n(this,e)}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var n,e;return null!==(e=await(null===(n=this.element)||void 0===n?void 0:n.isOpen()))&&void 0!==e&&e}render(){return e(t,{key:"7bb3a408013bea8c9d87e7911df20651f5230f10",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:n=>this.element=n},e("slot",{key:"f7e7f98c562a887973733fd19268d7c8efdda8d8"}))}};o.style={default:i};export{o as kol_tree_item};
4
+ import{r as n,h as e}from"./index-BEYG-0cN.js";import{p as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const i="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\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: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: 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-tree-item {\n --indentation: var(--tree-item-indentation, calc(10 * 1rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-right: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n padding-left: max(var(--indentation) * var(--level) + 8 * 1rem / var(--kolibri-root-font-size, 16), 8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n display: inline-flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",o=class{constructor(e){n(this,e)}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var n,e;return null!==(e=await(null===(n=this.element)||void 0===n?void 0:n.isOpen()))&&void 0!==e&&e}render(){return e(t,{key:"7bb3a408013bea8c9d87e7911df20651f5230f10",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:n=>this.element=n},e("slot",{key:"f7e7f98c562a887973733fd19268d7c8efdda8d8"}))}};o.style={default:i};export{o as kol_tree_item};