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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. package/custom-elements.json +44 -9
  2. package/dist/cjs/{Alert-DZLoSL2F.js → Alert-YyX7oZ-4.js} +1 -1
  3. package/dist/cjs/{Alert-DZLoSL2F.js.map → Alert-YyX7oZ-4.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-D4nrLRBH.js → Collapsible-Ng9RgeoV.js} +1 -1
  5. package/dist/cjs/{Collapsible-D4nrLRBH.js.map → Collapsible-Ng9RgeoV.js.map} +1 -1
  6. package/dist/cjs/CustomSuggestionsOptionsGroup-DX6g2gwY.js +4 -0
  7. package/dist/cjs/CustomSuggestionsOptionsGroup-DX6g2gwY.js.map +1 -0
  8. package/dist/cjs/{FieldControlStateWrapper-Dmo6-ZAO.js → FieldControlStateWrapper-IFqvqB6P.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-Dmo6-ZAO.js.map → FieldControlStateWrapper-IFqvqB6P.js.map} +1 -1
  10. package/dist/cjs/FormFieldStateWrapper-CYYDVEV_.js +4 -0
  11. package/dist/cjs/FormFieldStateWrapper-CYYDVEV_.js.map +1 -0
  12. package/dist/cjs/{Heading-BNM6aWv8.js → Heading-XP-A0CiF.js} +1 -1
  13. package/dist/cjs/{Heading-BNM6aWv8.js.map → Heading-XP-A0CiF.js.map} +1 -1
  14. package/dist/cjs/{Icon-mX90LQ7b.js → Icon-Dki2uAx9.js} +1 -1
  15. package/dist/cjs/{Icon-mX90LQ7b.js.map → Icon-Dki2uAx9.js.map} +1 -1
  16. package/dist/cjs/{Input-CudeGJgg.js → Input-BJp499jt.js} +1 -1
  17. package/dist/cjs/{Input-CudeGJgg.js.map → Input-BJp499jt.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-D5lVQdsm.js → InputStateWrapper-BFZVUeaF.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-D5lVQdsm.js.map → InputStateWrapper-BFZVUeaF.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-BxQRGWfc.js → InternalUnderlinedBadgeText-onB2Pg8p.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-BxQRGWfc.js.map → InternalUnderlinedBadgeText-onB2Pg8p.js.map} +1 -1
  22. package/dist/cjs/{Span-Dz1q9ehy.js → Span-CiMAKtJ2.js} +1 -1
  23. package/dist/cjs/{Span-Dz1q9ehy.js.map → Span-CiMAKtJ2.js.map} +1 -1
  24. package/dist/cjs/{app-globals-DhxP4h0h.js → app-globals-BKyLcLDy.js} +1 -1
  25. package/dist/cjs/{app-globals-DhxP4h0h.js.map → app-globals-BKyLcLDy.js.map} +1 -1
  26. package/dist/cjs/{associated.controller-BOxMEHC7.js → associated.controller-Cynm_2ua.js} +1 -1
  27. package/dist/cjs/{associated.controller-BOxMEHC7.js.map → associated.controller-Cynm_2ua.js.map} +1 -1
  28. package/dist/cjs/{bootstrap-MHrRA1xR.js → bootstrap-LNQK8lTS.js} +1 -1
  29. package/dist/cjs/{bootstrap-MHrRA1xR.js.map → bootstrap-LNQK8lTS.js.map} +1 -1
  30. package/dist/cjs/{link-variant-gYtaoJ43.js → button-variant-Dc6H5OWB.js} +1 -1
  31. package/dist/cjs/button-variant-Dc6H5OWB.js.map +1 -0
  32. package/dist/cjs/{controller-DQLZ-fas.js → controller-BGA1AkAf.js} +1 -1
  33. package/dist/cjs/{controller-DQLZ-fas.js.map → controller-BGA1AkAf.js.map} +1 -1
  34. package/dist/cjs/{controller-BerGkwqk.js → controller-CEoJ3_2U.js} +1 -1
  35. package/dist/cjs/{controller-BerGkwqk.js.map → controller-CEoJ3_2U.js.map} +1 -1
  36. package/dist/cjs/{controller-Btedzuuf.js → controller-EceR4U4c.js} +1 -1
  37. package/dist/cjs/{controller-Btedzuuf.js.map → controller-EceR4U4c.js.map} +1 -1
  38. package/dist/cjs/{controller-icon-CN8gz6Ac.js → controller-icon-Bm3hShtF.js} +1 -1
  39. package/dist/cjs/{controller-icon-CN8gz6Ac.js.map → controller-icon-Bm3hShtF.js.map} +1 -1
  40. package/dist/cjs/{dev.utils-Cab8I2kA.js → dev.utils-Dyrn28Yc.js} +1 -1
  41. package/dist/cjs/{dev.utils-Cab8I2kA.js.map → dev.utils-Dyrn28Yc.js.map} +1 -1
  42. package/dist/cjs/{devtools--2Nks8a8.js → devtools-BMrqWRJ2.js} +1 -1
  43. package/dist/cjs/{devtools--2Nks8a8.js.map → devtools-BMrqWRJ2.js.map} +1 -1
  44. package/dist/cjs/i18n-DUdQy9mr.js +4 -0
  45. package/dist/cjs/i18n-DUdQy9mr.js.map +1 -0
  46. package/dist/cjs/{i18n-Ch_xy25P.js → i18n-kG_Llc8c.js} +1 -1
  47. package/dist/cjs/{i18n-Ch_xy25P.js.map → i18n-kG_Llc8c.js.map} +1 -1
  48. package/dist/cjs/index-D3DJ0h3x.js +4 -0
  49. package/dist/cjs/index-D3DJ0h3x.js.map +1 -0
  50. package/dist/cjs/index.cjs.js +1 -1
  51. package/dist/cjs/inline-CGvu_CRs.js +4 -0
  52. package/dist/cjs/inline-CGvu_CRs.js.map +1 -0
  53. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-badge.entry.cjs.js.map +1 -1
  61. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-breadcrumb.entry.cjs.js.map +1 -1
  63. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-button-link.entry.cjs.js.map +1 -1
  65. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  67. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-button.entry.cjs.js.map +1 -1
  69. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-combobox.entry.cjs.js.map +1 -1
  73. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  93. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  95. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  98. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-popover-button-wc.entry.cjs.js.map +1 -1
  102. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-popover-button.entry.cjs.js.map +1 -1
  104. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-single-select.entry.cjs.js.map +1 -1
  110. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
  116. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
  119. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  122. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  129. package/dist/cjs/kolibri.cjs.js +1 -1
  130. package/dist/cjs/loader.cjs.js +1 -1
  131. package/dist/cjs/test-component.cjs.entry.js +1 -1
  132. package/dist/components/CustomSuggestionsOptionsGroup.js +1 -1
  133. package/dist/components/CustomSuggestionsOptionsGroup.js.map +1 -1
  134. package/dist/components/button-variant.js +4 -0
  135. package/dist/components/button-variant.js.map +1 -0
  136. package/dist/components/controller2.js +1 -1
  137. package/dist/components/controller2.js.map +1 -1
  138. package/dist/components/i18n2.js +1 -1
  139. package/dist/components/i18n2.js.map +1 -1
  140. package/dist/components/inline.js +4 -0
  141. package/dist/components/inline.js.map +1 -0
  142. package/dist/components/kol-badge.js +1 -1
  143. package/dist/components/kol-badge.js.map +1 -1
  144. package/dist/components/kol-breadcrumb.js +1 -1
  145. package/dist/components/kol-breadcrumb.js.map +1 -1
  146. package/dist/components/kol-button-link.js +1 -1
  147. package/dist/components/kol-button-link.js.map +1 -1
  148. package/dist/components/kol-button-wc.js +1 -1
  149. package/dist/components/kol-button-wc.js.map +1 -1
  150. package/dist/components/kol-button.js +1 -1
  151. package/dist/components/kol-button.js.map +1 -1
  152. package/dist/components/kol-combobox.js +1 -1
  153. package/dist/components/kol-combobox.js.map +1 -1
  154. package/dist/components/kol-link-wc.js +1 -1
  155. package/dist/components/kol-link-wc.js.map +1 -1
  156. package/dist/components/kol-link.js +1 -1
  157. package/dist/components/kol-link.js.map +1 -1
  158. package/dist/components/kol-nav.js +1 -1
  159. package/dist/components/kol-nav.js.map +1 -1
  160. package/dist/components/kol-popover-button-wc.js +1 -1
  161. package/dist/components/kol-popover-button-wc.js.map +1 -1
  162. package/dist/components/kol-popover-button.js +1 -1
  163. package/dist/components/kol-popover-button.js.map +1 -1
  164. package/dist/components/kol-single-select.js +1 -1
  165. package/dist/components/kol-single-select.js.map +1 -1
  166. package/dist/components/kol-table-stateful.js +1 -1
  167. package/dist/components/kol-table-stateful.js.map +1 -1
  168. package/dist/components/kol-table-stateless.js +1 -1
  169. package/dist/components/kol-table-stateless.js.map +1 -1
  170. package/dist/esm/{Alert-0I-ZziZw.js → Alert-yh1U7yri.js} +1 -1
  171. package/dist/{kolibri/Alert-0I-ZziZw.js.map → esm/Alert-yh1U7yri.js.map} +1 -1
  172. package/dist/esm/{Collapsible-80QdoVLM.js → Collapsible-CKHfAT0T.js} +1 -1
  173. package/dist/esm/{Collapsible-80QdoVLM.js.map → Collapsible-CKHfAT0T.js.map} +1 -1
  174. package/dist/esm/CustomSuggestionsOptionsGroup-BArp3X7e.js +4 -0
  175. package/dist/esm/CustomSuggestionsOptionsGroup-BArp3X7e.js.map +1 -0
  176. package/dist/esm/{FieldControlStateWrapper-D0kSDP5n.js → FieldControlStateWrapper-DnqwZd8K.js} +1 -1
  177. package/dist/{kolibri/FieldControlStateWrapper-D0kSDP5n.js.map → esm/FieldControlStateWrapper-DnqwZd8K.js.map} +1 -1
  178. package/dist/esm/FormFieldStateWrapper-lwPu0sgn.js +4 -0
  179. package/dist/esm/FormFieldStateWrapper-lwPu0sgn.js.map +1 -0
  180. package/dist/esm/{Heading-ChPbtLqo.js → Heading-Dv85ZVTV.js} +1 -1
  181. package/dist/{kolibri/Heading-ChPbtLqo.js.map → esm/Heading-Dv85ZVTV.js.map} +1 -1
  182. package/dist/esm/Icon-xy_Rmoip.js +4 -0
  183. package/dist/esm/{Icon-DaIG3Pub.js.map → Icon-xy_Rmoip.js.map} +1 -1
  184. package/dist/esm/Input-B1smWiSv.js +4 -0
  185. package/dist/esm/{Input-DzHTOabd.js.map → Input-B1smWiSv.js.map} +1 -1
  186. package/dist/esm/{InputStateWrapper-CE9apMQ_.js → InputStateWrapper-Dc3Indo-.js} +1 -1
  187. package/dist/esm/{InputStateWrapper-CE9apMQ_.js.map → InputStateWrapper-Dc3Indo-.js.map} +1 -1
  188. package/dist/esm/{InternalUnderlinedBadgeText-ClWrrSuG.js → InternalUnderlinedBadgeText-CFo7EUUG.js} +1 -1
  189. package/dist/esm/{InternalUnderlinedBadgeText-ClWrrSuG.js.map → InternalUnderlinedBadgeText-CFo7EUUG.js.map} +1 -1
  190. package/dist/esm/{Span-qWR_z3O4.js → Span-D4Wz9_Wp.js} +1 -1
  191. package/dist/esm/{Span-qWR_z3O4.js.map → Span-D4Wz9_Wp.js.map} +1 -1
  192. package/dist/esm/{app-globals-Cqsn_iU9.js → app-globals-BomKQhAd.js} +1 -1
  193. package/dist/esm/{app-globals-Cqsn_iU9.js.map → app-globals-BomKQhAd.js.map} +1 -1
  194. package/dist/esm/{associated.controller-CKSywYuL.js → associated.controller-XZkiMy1Z.js} +1 -1
  195. package/dist/{kolibri/associated.controller-CKSywYuL.js.map → esm/associated.controller-XZkiMy1Z.js.map} +1 -1
  196. package/dist/esm/{bootstrap-DiYNsmQ4.js → bootstrap-CB4ow_3r.js} +1 -1
  197. package/dist/esm/{bootstrap-DiYNsmQ4.js.map → bootstrap-CB4ow_3r.js.map} +1 -1
  198. package/dist/esm/button-variant-_wL6MroY.js +4 -0
  199. package/dist/esm/button-variant-_wL6MroY.js.map +1 -0
  200. package/dist/esm/{controller-ksklDRuo.js → controller-B9EwuvT_.js} +1 -1
  201. package/dist/esm/{controller-ksklDRuo.js.map → controller-B9EwuvT_.js.map} +1 -1
  202. package/dist/esm/{controller-DGqthGHx.js → controller-CRUcaYjm.js} +1 -1
  203. package/dist/esm/{controller-DGqthGHx.js.map → controller-CRUcaYjm.js.map} +1 -1
  204. package/dist/esm/{controller-B2TvjuCs.js → controller-DxFQvdMh.js} +1 -1
  205. package/dist/{kolibri/controller-B2TvjuCs.js.map → esm/controller-DxFQvdMh.js.map} +1 -1
  206. package/dist/esm/{controller-icon-CSsrsnsy.js → controller-icon-lzjOgj-3.js} +1 -1
  207. package/dist/esm/{controller-icon-CSsrsnsy.js.map → controller-icon-lzjOgj-3.js.map} +1 -1
  208. package/dist/esm/{dev.utils-DrdCaiDj.js → dev.utils-DA2D8UKW.js} +1 -1
  209. package/dist/{kolibri/dev.utils-DrdCaiDj.js.map → esm/dev.utils-DA2D8UKW.js.map} +1 -1
  210. package/dist/esm/{devtools-yjjH7ttp.js → devtools-CNOVq_9J.js} +1 -1
  211. package/dist/esm/{devtools-yjjH7ttp.js.map → devtools-CNOVq_9J.js.map} +1 -1
  212. package/dist/esm/{i18n-BzQ08vD6.js → i18n-BDORFCAj.js} +1 -1
  213. package/dist/esm/{i18n-BzQ08vD6.js.map → i18n-BDORFCAj.js.map} +1 -1
  214. package/dist/esm/i18n-Bqrkf471.js +4 -0
  215. package/dist/esm/i18n-Bqrkf471.js.map +1 -0
  216. package/dist/esm/index-B6b8O-Tx.js +4 -0
  217. package/dist/esm/index-B6b8O-Tx.js.map +1 -0
  218. package/dist/esm/index.js +1 -1
  219. package/dist/esm/inline-cDaqwSfK.js +4 -0
  220. package/dist/esm/inline-cDaqwSfK.js.map +1 -0
  221. package/dist/esm/kol-abbr.entry.js +1 -1
  222. package/dist/esm/kol-accordion.entry.js +1 -1
  223. package/dist/esm/kol-alert-wc.entry.js +1 -1
  224. package/dist/esm/kol-alert.entry.js +1 -1
  225. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  226. package/dist/esm/kol-avatar.entry.js +1 -1
  227. package/dist/esm/kol-badge.entry.js +1 -1
  228. package/dist/esm/kol-badge.entry.js.map +1 -1
  229. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  230. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  231. package/dist/esm/kol-button-link.entry.js +1 -1
  232. package/dist/esm/kol-button-link.entry.js.map +1 -1
  233. package/dist/esm/kol-button-wc.entry.js +1 -1
  234. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  235. package/dist/esm/kol-button.entry.js +1 -1
  236. package/dist/esm/kol-button.entry.js.map +1 -1
  237. package/dist/esm/kol-card-wc.entry.js +1 -1
  238. package/dist/esm/kol-card.entry.js +1 -1
  239. package/dist/esm/kol-combobox.entry.js +1 -1
  240. package/dist/esm/kol-combobox.entry.js.map +1 -1
  241. package/dist/esm/kol-details.entry.js +1 -1
  242. package/dist/esm/kol-drawer.entry.js +1 -1
  243. package/dist/esm/kol-form.entry.js +1 -1
  244. package/dist/esm/kol-heading.entry.js +1 -1
  245. package/dist/esm/kol-icon.entry.js +1 -1
  246. package/dist/esm/kol-image.entry.js +1 -1
  247. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  248. package/dist/esm/kol-input-color.entry.js +1 -1
  249. package/dist/esm/kol-input-date.entry.js +1 -1
  250. package/dist/esm/kol-input-email.entry.js +1 -1
  251. package/dist/esm/kol-input-file.entry.js +1 -1
  252. package/dist/esm/kol-input-number.entry.js +1 -1
  253. package/dist/esm/kol-input-password.entry.js +1 -1
  254. package/dist/esm/kol-input-radio.entry.js +1 -1
  255. package/dist/esm/kol-input-range.entry.js +1 -1
  256. package/dist/esm/kol-input-text.entry.js +1 -1
  257. package/dist/esm/kol-kolibri.entry.js +1 -1
  258. package/dist/esm/kol-link-button.entry.js +1 -1
  259. package/dist/esm/kol-link-wc.entry.js +1 -1
  260. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  261. package/dist/esm/kol-link.entry.js +1 -1
  262. package/dist/esm/kol-link.entry.js.map +1 -1
  263. package/dist/esm/kol-modal.entry.js +1 -1
  264. package/dist/esm/kol-nav.entry.js +1 -1
  265. package/dist/esm/kol-nav.entry.js.map +1 -1
  266. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  267. package/dist/esm/kol-pagination.entry.js +1 -1
  268. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  269. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  270. package/dist/esm/kol-popover-button.entry.js +1 -1
  271. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  272. package/dist/esm/kol-popover-wc.entry.js +1 -1
  273. package/dist/esm/kol-progress.entry.js +1 -1
  274. package/dist/esm/kol-quote.entry.js +1 -1
  275. package/dist/esm/kol-select.entry.js +1 -1
  276. package/dist/esm/kol-single-select.entry.js +1 -1
  277. package/dist/esm/kol-single-select.entry.js.map +1 -1
  278. package/dist/esm/kol-skip-nav.entry.js +1 -1
  279. package/dist/esm/kol-spin.entry.js +1 -1
  280. package/dist/esm/kol-split-button.entry.js +1 -1
  281. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  282. package/dist/esm/kol-table-stateful.entry.js +1 -1
  283. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  284. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  285. package/dist/esm/kol-table-stateless.entry.js +1 -1
  286. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  287. package/dist/esm/kol-tabs.entry.js +1 -1
  288. package/dist/esm/kol-textarea.entry.js +1 -1
  289. package/dist/esm/kol-toast-container.entry.js +1 -1
  290. package/dist/esm/kol-toolbar.entry.js +1 -1
  291. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  292. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  293. package/dist/esm/kol-tree-item.entry.js +1 -1
  294. package/dist/esm/kol-tree-wc.entry.js +1 -1
  295. package/dist/esm/kol-tree.entry.js +1 -1
  296. package/dist/esm/kol-version.entry.js +1 -1
  297. package/dist/esm/kolibri.js +1 -1
  298. package/dist/esm/loader.js +1 -1
  299. package/dist/esm/test-component.entry.js +1 -1
  300. package/dist/kolibri/Alert-yh1U7yri.js +4 -0
  301. package/dist/{esm/Alert-0I-ZziZw.js.map → kolibri/Alert-yh1U7yri.js.map} +1 -1
  302. package/dist/kolibri/{Collapsible-80QdoVLM.js → Collapsible-CKHfAT0T.js} +1 -1
  303. package/dist/kolibri/{Collapsible-80QdoVLM.js.map → Collapsible-CKHfAT0T.js.map} +1 -1
  304. package/dist/kolibri/CustomSuggestionsOptionsGroup-BArp3X7e.js +4 -0
  305. package/dist/kolibri/CustomSuggestionsOptionsGroup-BArp3X7e.js.map +1 -0
  306. package/dist/kolibri/FieldControlStateWrapper-DnqwZd8K.js +4 -0
  307. package/dist/{esm/FieldControlStateWrapper-D0kSDP5n.js.map → kolibri/FieldControlStateWrapper-DnqwZd8K.js.map} +1 -1
  308. package/dist/kolibri/FormFieldStateWrapper-lwPu0sgn.js +4 -0
  309. package/dist/kolibri/FormFieldStateWrapper-lwPu0sgn.js.map +1 -0
  310. package/dist/kolibri/{Heading-ChPbtLqo.js → Heading-Dv85ZVTV.js} +1 -1
  311. package/dist/{esm/Heading-ChPbtLqo.js.map → kolibri/Heading-Dv85ZVTV.js.map} +1 -1
  312. package/dist/kolibri/Icon-xy_Rmoip.js +4 -0
  313. package/dist/kolibri/{Icon-DaIG3Pub.js.map → Icon-xy_Rmoip.js.map} +1 -1
  314. package/dist/kolibri/Input-B1smWiSv.js +4 -0
  315. package/dist/kolibri/{Input-DzHTOabd.js.map → Input-B1smWiSv.js.map} +1 -1
  316. package/dist/kolibri/{InputStateWrapper-CE9apMQ_.js → InputStateWrapper-Dc3Indo-.js} +1 -1
  317. package/dist/kolibri/{InputStateWrapper-CE9apMQ_.js.map → InputStateWrapper-Dc3Indo-.js.map} +1 -1
  318. package/dist/kolibri/InternalUnderlinedBadgeText-CFo7EUUG.js +4 -0
  319. package/dist/kolibri/{InternalUnderlinedBadgeText-ClWrrSuG.js.map → InternalUnderlinedBadgeText-CFo7EUUG.js.map} +1 -1
  320. package/dist/kolibri/Span-D4Wz9_Wp.js +4 -0
  321. package/dist/kolibri/{Span-qWR_z3O4.js.map → Span-D4Wz9_Wp.js.map} +1 -1
  322. package/dist/kolibri/{app-globals-Cqsn_iU9.js → app-globals-BomKQhAd.js} +1 -1
  323. package/dist/kolibri/{app-globals-Cqsn_iU9.js.map → app-globals-BomKQhAd.js.map} +1 -1
  324. package/dist/kolibri/{associated.controller-CKSywYuL.js → associated.controller-XZkiMy1Z.js} +1 -1
  325. package/dist/{esm/associated.controller-CKSywYuL.js.map → kolibri/associated.controller-XZkiMy1Z.js.map} +1 -1
  326. package/dist/kolibri/{bootstrap-DiYNsmQ4.js → bootstrap-CB4ow_3r.js} +1 -1
  327. package/dist/kolibri/{bootstrap-DiYNsmQ4.js.map → bootstrap-CB4ow_3r.js.map} +1 -1
  328. package/dist/kolibri/button-variant-_wL6MroY.js +4 -0
  329. package/dist/kolibri/button-variant-_wL6MroY.js.map +1 -0
  330. package/dist/kolibri/controller-B9EwuvT_.js +4 -0
  331. package/dist/kolibri/{controller-ksklDRuo.js.map → controller-B9EwuvT_.js.map} +1 -1
  332. package/dist/kolibri/{controller-DGqthGHx.js → controller-CRUcaYjm.js} +1 -1
  333. package/dist/kolibri/{controller-DGqthGHx.js.map → controller-CRUcaYjm.js.map} +1 -1
  334. package/dist/kolibri/{controller-B2TvjuCs.js → controller-DxFQvdMh.js} +1 -1
  335. package/dist/{esm/controller-B2TvjuCs.js.map → kolibri/controller-DxFQvdMh.js.map} +1 -1
  336. package/dist/kolibri/{controller-icon-CSsrsnsy.js → controller-icon-lzjOgj-3.js} +1 -1
  337. package/dist/kolibri/{controller-icon-CSsrsnsy.js.map → controller-icon-lzjOgj-3.js.map} +1 -1
  338. package/dist/kolibri/{dev.utils-DrdCaiDj.js → dev.utils-DA2D8UKW.js} +1 -1
  339. package/dist/{esm/dev.utils-DrdCaiDj.js.map → kolibri/dev.utils-DA2D8UKW.js.map} +1 -1
  340. package/dist/kolibri/{devtools-yjjH7ttp.js → devtools-CNOVq_9J.js} +1 -1
  341. package/dist/kolibri/{devtools-yjjH7ttp.js.map → devtools-CNOVq_9J.js.map} +1 -1
  342. package/dist/kolibri/i18n-BDORFCAj.js +4 -0
  343. package/dist/kolibri/{i18n-BzQ08vD6.js.map → i18n-BDORFCAj.js.map} +1 -1
  344. package/dist/kolibri/i18n-Bqrkf471.js +4 -0
  345. package/dist/kolibri/i18n-Bqrkf471.js.map +1 -0
  346. package/dist/kolibri/{index-CgbjDjlu.js → index-B6b8O-Tx.js} +1 -1
  347. package/dist/kolibri/index-B6b8O-Tx.js.map +1 -0
  348. package/dist/kolibri/index.esm.js +1 -1
  349. package/dist/kolibri/inline-cDaqwSfK.js +4 -0
  350. package/dist/kolibri/inline-cDaqwSfK.js.map +1 -0
  351. package/dist/kolibri/kol-abbr.entry.js +1 -1
  352. package/dist/kolibri/kol-accordion.entry.js +1 -1
  353. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  354. package/dist/kolibri/kol-alert.entry.js +1 -1
  355. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  356. package/dist/kolibri/kol-avatar.entry.js +1 -1
  357. package/dist/kolibri/kol-badge.entry.esm.js.map +1 -1
  358. package/dist/kolibri/kol-badge.entry.js +1 -1
  359. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  360. package/dist/kolibri/kol-breadcrumb.entry.esm.js.map +1 -1
  361. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  362. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  363. package/dist/kolibri/kol-button-link.entry.esm.js.map +1 -1
  364. package/dist/kolibri/kol-button-link.entry.js +1 -1
  365. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  366. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  367. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  368. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  369. package/dist/kolibri/kol-button.entry.esm.js.map +1 -1
  370. package/dist/kolibri/kol-button.entry.js +1 -1
  371. package/dist/kolibri/kol-button.entry.js.map +1 -1
  372. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  373. package/dist/kolibri/kol-card.entry.js +1 -1
  374. package/dist/kolibri/kol-combobox.entry.esm.js.map +1 -1
  375. package/dist/kolibri/kol-combobox.entry.js +1 -1
  376. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  377. package/dist/kolibri/kol-details.entry.js +1 -1
  378. package/dist/kolibri/kol-drawer.entry.js +1 -1
  379. package/dist/kolibri/kol-form.entry.js +1 -1
  380. package/dist/kolibri/kol-heading.entry.js +1 -1
  381. package/dist/kolibri/kol-icon.entry.js +1 -1
  382. package/dist/kolibri/kol-image.entry.js +1 -1
  383. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  384. package/dist/kolibri/kol-input-color.entry.js +1 -1
  385. package/dist/kolibri/kol-input-date.entry.js +1 -1
  386. package/dist/kolibri/kol-input-email.entry.js +1 -1
  387. package/dist/kolibri/kol-input-file.entry.js +1 -1
  388. package/dist/kolibri/kol-input-number.entry.js +1 -1
  389. package/dist/kolibri/kol-input-password.entry.js +1 -1
  390. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  391. package/dist/kolibri/kol-input-range.entry.js +1 -1
  392. package/dist/kolibri/kol-input-text.entry.js +1 -1
  393. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  394. package/dist/kolibri/kol-link-button.entry.js +1 -1
  395. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  396. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  397. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  398. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  399. package/dist/kolibri/kol-link.entry.js +1 -1
  400. package/dist/kolibri/kol-link.entry.js.map +1 -1
  401. package/dist/kolibri/kol-modal.entry.js +1 -1
  402. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  403. package/dist/kolibri/kol-nav.entry.js +1 -1
  404. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  405. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  406. package/dist/kolibri/kol-pagination.entry.js +1 -1
  407. package/dist/kolibri/kol-popover-button-wc.entry.esm.js.map +1 -1
  408. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  409. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  410. package/dist/kolibri/kol-popover-button.entry.esm.js.map +1 -1
  411. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  412. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  413. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  414. package/dist/kolibri/kol-progress.entry.js +1 -1
  415. package/dist/kolibri/kol-quote.entry.js +1 -1
  416. package/dist/kolibri/kol-select.entry.js +1 -1
  417. package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
  418. package/dist/kolibri/kol-single-select.entry.js +1 -1
  419. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  420. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  421. package/dist/kolibri/kol-spin.entry.js +1 -1
  422. package/dist/kolibri/kol-split-button.entry.js +1 -1
  423. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  424. package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
  425. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  426. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  427. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  428. package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
  429. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  430. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  431. package/dist/kolibri/kol-tabs.entry.js +1 -1
  432. package/dist/kolibri/kol-textarea.entry.js +1 -1
  433. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  434. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  435. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  436. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  437. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  438. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  439. package/dist/kolibri/kol-tree.entry.js +1 -1
  440. package/dist/kolibri/kol-version.entry.js +1 -1
  441. package/dist/kolibri/kolibri.esm.js +1 -1
  442. package/dist/kolibri/test-component.entry.js +1 -1
  443. package/dist/types/components/button/component.d.ts +3 -3
  444. package/dist/types/components/button/shadow.d.ts +2 -1
  445. package/dist/types/components/button-link/shadow.d.ts +2 -1
  446. package/dist/types/components/link/component.d.ts +3 -3
  447. package/dist/types/components/link/shadow.d.ts +2 -1
  448. package/dist/types/components/popover-button/component.d.ts +3 -1
  449. package/dist/types/components/popover-button/shadow.d.ts +2 -1
  450. package/dist/types/components.d.ts +78 -12
  451. package/dist/types/functional-component-wrappers/_helpers/getRenderStates.d.ts +1 -0
  452. package/dist/types/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.d.ts +1 -0
  453. package/dist/types/functional-components/FormField/FormField.d.ts +2 -1
  454. package/dist/types/functional-components/FormFieldCounter/FormFieldCounter.d.ts +2 -1
  455. package/dist/types/schema/components/button-link.d.ts +2 -2
  456. package/dist/types/schema/components/button.d.ts +3 -4
  457. package/dist/types/schema/components/link-button.d.ts +2 -2
  458. package/dist/types/schema/components/link.d.ts +2 -3
  459. package/dist/types/schema/components/popover-button.d.ts +3 -3
  460. package/dist/types/schema/props/index.d.ts +1 -1
  461. package/dist/types/schema/props/inline.d.ts +7 -0
  462. package/dist/types/schema/props/link-variant.d.ts +0 -5
  463. package/doc/badge.md +6 -6
  464. package/doc/button-link.md +2 -1
  465. package/doc/button.md +1 -0
  466. package/doc/input-color.md +20 -20
  467. package/doc/input-date.md +26 -26
  468. package/doc/input-email.md +28 -28
  469. package/doc/input-file.md +20 -20
  470. package/doc/input-number.md +26 -26
  471. package/doc/input-password.md +27 -27
  472. package/doc/input-text.md +29 -29
  473. package/doc/link.md +2 -1
  474. package/doc/nav.md +9 -9
  475. package/doc/popover-button.md +1 -0
  476. package/package.json +1 -1
  477. package/vscode-custom-data.json +20 -0
  478. package/dist/cjs/CustomSuggestionsOptionsGroup-YbYNP5tM.js +0 -4
  479. package/dist/cjs/CustomSuggestionsOptionsGroup-YbYNP5tM.js.map +0 -1
  480. package/dist/cjs/FormFieldStateWrapper-kNnICFwR.js +0 -4
  481. package/dist/cjs/FormFieldStateWrapper-kNnICFwR.js.map +0 -1
  482. package/dist/cjs/i18n-DwU4rpIc.js +0 -4
  483. package/dist/cjs/i18n-DwU4rpIc.js.map +0 -1
  484. package/dist/cjs/index-XEsNI6Yw.js +0 -4
  485. package/dist/cjs/index-XEsNI6Yw.js.map +0 -1
  486. package/dist/cjs/link-variant-gYtaoJ43.js.map +0 -1
  487. package/dist/components/link-variant.js +0 -4
  488. package/dist/components/link-variant.js.map +0 -1
  489. package/dist/esm/CustomSuggestionsOptionsGroup-CKDN7qNT.js +0 -4
  490. package/dist/esm/CustomSuggestionsOptionsGroup-CKDN7qNT.js.map +0 -1
  491. package/dist/esm/FormFieldStateWrapper-DMwiqUtB.js +0 -4
  492. package/dist/esm/FormFieldStateWrapper-DMwiqUtB.js.map +0 -1
  493. package/dist/esm/Icon-DaIG3Pub.js +0 -4
  494. package/dist/esm/Input-DzHTOabd.js +0 -4
  495. package/dist/esm/i18n-Bt8vh0qY.js +0 -4
  496. package/dist/esm/i18n-Bt8vh0qY.js.map +0 -1
  497. package/dist/esm/index-CgbjDjlu.js +0 -4
  498. package/dist/esm/index-CgbjDjlu.js.map +0 -1
  499. package/dist/esm/link-variant-DQEKOyAU.js +0 -4
  500. package/dist/esm/link-variant-DQEKOyAU.js.map +0 -1
  501. package/dist/kolibri/Alert-0I-ZziZw.js +0 -4
  502. package/dist/kolibri/CustomSuggestionsOptionsGroup-CKDN7qNT.js +0 -4
  503. package/dist/kolibri/CustomSuggestionsOptionsGroup-CKDN7qNT.js.map +0 -1
  504. package/dist/kolibri/FieldControlStateWrapper-D0kSDP5n.js +0 -4
  505. package/dist/kolibri/FormFieldStateWrapper-DMwiqUtB.js +0 -4
  506. package/dist/kolibri/FormFieldStateWrapper-DMwiqUtB.js.map +0 -1
  507. package/dist/kolibri/Icon-DaIG3Pub.js +0 -4
  508. package/dist/kolibri/Input-DzHTOabd.js +0 -4
  509. package/dist/kolibri/InternalUnderlinedBadgeText-ClWrrSuG.js +0 -4
  510. package/dist/kolibri/Span-qWR_z3O4.js +0 -4
  511. package/dist/kolibri/controller-ksklDRuo.js +0 -4
  512. package/dist/kolibri/i18n-Bt8vh0qY.js +0 -4
  513. package/dist/kolibri/i18n-Bt8vh0qY.js.map +0 -1
  514. package/dist/kolibri/i18n-BzQ08vD6.js +0 -4
  515. package/dist/kolibri/index-CgbjDjlu.js.map +0 -1
  516. package/dist/kolibri/link-variant-DQEKOyAU.js +0 -4
  517. package/dist/kolibri/link-variant-DQEKOyAU.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 n,g as i}from"./index-CgbjDjlu.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as a,a as o,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-BzQ08vD6.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-Dd0zJQbD.js";import{b,v as _,a as p,f as y,c as j,e as k}from"./table-settings-DxLvhwRE.js";import{v as m}from"./label-Dnmzb2S_.js";import{C as g}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-DrdCaiDj.js";import{d as S,K as A}from"./events-9-skLO0f.js";import{i as O,c as D,r as $,a as x,f as C,b as M,S as W}from"./isObject-DvSELytj.js";import"./i18n-Bt8vh0qY.js";const F=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})};var P="[object AsyncFunction]",z="[object Function]",E="[object GeneratorFunction]",T="[object Proxy]";function K(e){if(!O(e))return!1;var t=D(e);return t==z||t==E||t==P||t==T}var R=$["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B(e){return!!H&&H in e}var L=Function.prototype,N=L.toString;function I(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,q=Function.prototype,Q=Object.prototype,Y=q.toString,G=Q.hasOwnProperty,J=RegExp("^"+Y.call(G).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X(e){return!(!O(e)||B(e))&&(K(e)?J:V).test(I(e))}function Z(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=Z(e,t);return X(n)?n:void 0}var et=tt($,"WeakMap"),nt=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function rt(e,t){var n=typeof e;return!!(t=null==t?nt:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t}function at(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function st(e){return null!=e&&lt(e.length)&&!K(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dt="[object Arguments]";function ht(e){return x(e)&&D(e)==dt}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,kt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=kt&&kt.exports===jt,gt=mt?$.Buffer:void 0,wt=gt?gt.isBuffer:void 0,St=wt||yt,At="[object Arguments]",Ot="[object Array]",Dt="[object Boolean]",$t="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Wt="[object Number]",Ft="[object Object]",Pt="[object RegExp]",zt="[object Set]",Et="[object String]",Tt="[object WeakMap]",Kt="[object ArrayBuffer]",Rt="[object DataView]",Ht="[object Float32Array]",Bt="[object Float64Array]",Lt="[object Int8Array]",Nt="[object Int16Array]",It="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",qt="[object Uint16Array]",Qt="[object Uint32Array]",Yt={};function Gt(e){return x(e)&&lt(e.length)&&!!Yt[D(e)]}function Jt(e){return function(t){return e(t)}}Yt[Ht]=Yt[Bt]=Yt[Lt]=Yt[Nt]=Yt[It]=Yt[Ut]=Yt[Vt]=Yt[qt]=Yt[Qt]=!0,Yt[At]=Yt[Ot]=Yt[Kt]=Yt[Dt]=Yt[Rt]=Yt[$t]=Yt[xt]=Yt[Ct]=Yt[Mt]=Yt[Wt]=Yt[Ft]=Yt[Pt]=Yt[zt]=Yt[Et]=Yt[Tt]=!1;var Xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Xt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Zt&&Zt.exports===Xt,ee=te&&C.process,ne=function(){try{var e=Zt&&Zt.require&&Zt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ie=ne&&ne.isTypedArray,re=ie?Jt(ie):Gt,ae=Object.prototype,oe=ae.hasOwnProperty;function le(e,t){var n=M(e),r=!n&&pt(e),a=!n&&!r&&St(e),i=!n&&!r&&!a&&re(e),o=n||r||a||i,l=o?ft(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(n){return e(t(n))}}var ce=se(Object.keys,Object),ue=Object.prototype,fe=ue.hasOwnProperty;function de(e){if(!ut(e))return ce(e);var t=[];for(var n in Object(e))fe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function he(e){return st(e)?le(e):de(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,je=ye.hasOwnProperty;function ke(e){var t=this.__data__;if(ve){var n=t[e];return n===pe?void 0:n}return je.call(t,e)?t[e]:void 0}var me=Object.prototype,ge=me.hasOwnProperty;function we(e){var t=this.__data__;return ve?void 0!==t[e]:ge.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ve&&void 0===t?Se:t,this}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(){this.__data__=[],this.size=0}function $e(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=ke,Oe.prototype.has=we,Oe.prototype.set=Ae;var xe=Array.prototype,Ce=xe.splice;function Me(e){var t=this.__data__,n=$e(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ce.call(t,n,1),--this.size,!0)}function We(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]}function Fe(e){return $e(this.__data__,e)>-1}function Pe(e,t){var n=this.__data__,r=$e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ze.prototype.clear=De,ze.prototype.delete=Me,ze.prototype.get=We,ze.prototype.has=Fe,ze.prototype.set=Pe;var Ee=tt($,"Map");function Te(){this.size=0,this.__data__={hash:new Oe,map:new(Ee||ze),string:new Oe}}function Ke(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map}function He(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Be(e){return Re(this,e).get(e)}function Le(e){return Re(this,e).has(e)}function Ne(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ue(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function Ve(){this.__data__=new ze,this.size=0}function qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Qe(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}Ie.prototype.clear=Te,Ie.prototype.delete=He,Ie.prototype.get=Be,Ie.prototype.has=Le,Ie.prototype.set=Ne;var Ge=200;function Je(e,t){var n=this.__data__;if(n instanceof ze){var r=n.__data__;if(!Ee||r.length<Ge-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this}function Xe(e){var t=this.__data__=new ze(e);this.size=t.size}function Ze(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}function tn(){return[]}Xe.prototype.clear=Ve,Xe.prototype.delete=qe,Xe.prototype.get=Qe,Xe.prototype.has=Ye,Xe.prototype.set=Je;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Ze(rn(e),function(t){return nn.call(e,t)}))}:tn;function on(e,t,n){var r=t(e);return M(e)?r:Ue(r,n(e))}function ln(e){return on(e,he,an)}var sn=tt($,"DataView"),cn=tt($,"Promise"),un=tt($,"Set"),fn="[object Map]",dn="[object Object]",hn="[object Promise]",vn="[object Set]",bn="[object WeakMap]",_n="[object DataView]",pn=I(sn),yn=I(Ee),jn=I(cn),kn=I(un),mn=I(et),gn=D;(sn&&gn(new sn(new ArrayBuffer(1)))!=_n||Ee&&gn(new Ee)!=fn||cn&&gn(cn.resolve())!=hn||un&&gn(new un)!=vn||et&&gn(new et)!=bn)&&(gn=function(e){var t=D(e),n=t==dn?e.constructor:void 0,r=n?I(n):"";if(r)switch(r){case pn:return _n;case yn:return fn;case jn:return hn;case kn:return vn;case mn:return bn}return t});var wn=$.Uint8Array,Sn="__lodash_hash_undefined__";function An(e){return this.__data__.set(e,Sn),this}function On(e){return this.__data__.has(e)}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function $n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xn(e,t){return e.has(t)}Dn.prototype.add=Dn.prototype.push=An,Dn.prototype.has=On;var Cn=1,Mn=2;function Wn(e,t,n,r,a,i){var o=n&Cn,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=n&Mn?new Dn:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,i):r(v,_,d,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!$n(t,function(e,t){if(!xn(b,t)&&(v===e||a(v,e,n,r,i)))return b.push(t)})){u=!1;break}}else if(v!==_&&!a(v,_,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Fn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var zn=1,En=2,Tn="[object Boolean]",Kn="[object Date]",Rn="[object Error]",Hn="[object Map]",Bn="[object Number]",Ln="[object RegExp]",Nn="[object Set]",In="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",qn="[object DataView]",Qn=W?W.prototype:void 0,Yn=Qn?Qn.valueOf:void 0;function Gn(e,t,n,r,a,i,o){switch(n){case qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case Tn:case Kn:case Bn:return at(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Ln:case In:return e==t+"";case Hn:var l=Fn;case Nn:var s=r&zn;if(l||(l=Pn),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=En,o.set(e,t);var h=Wn(l(e),l(t),r,a,i,o);return o.delete(e),h;case Un:if(Yn)return Yn.call(e)==Yn.call(t)}return!1}var Jn=1,Xn=Object.prototype,Zn=Xn.hasOwnProperty;function ti(e,t,n,r,a,i){var o=n&Jn,l=ln(e),s=l.length;if(s!=ln(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Zn.call(t,h)))return!1}var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var b=!0;i.set(e,t),i.set(t,e);for(var v=o;++c<s;){var _=e[h=l[c]],f=t[h];if(r)var p=o?r(f,_,h,t,e,i):r(_,f,h,e,t,i);if(!(void 0===p?_===f||a(_,f,n,r,i):p)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return i.delete(e),i.delete(t),b}var ei=1,ni="[object Arguments]",ii="[object Array]",ri="[object Object]",ai=Object.prototype,oi=ai.hasOwnProperty;function li(e,t,n,r,a,i){var o=M(e),l=M(t),s=o?ii:gn(e),c=l?ii:gn(t),h=(s=s==ni?ri:s)==ri,d=(c=c==ni?ri:c)==ri,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return i||(i=new Xe),o||re(e)?Wn(e,t,n,r,a,i):Gn(e,t,s,n,r,a,i);if(!(n&ei)){var b=h&&oi.call(e,"__wrapped__"),v=d&&oi.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return i||(i=new Xe),a(_,f,n,r,i)}}return!!u&&(i||(i=new Xe),ti(e,t,n,r,a,i))}function si(e,t,n,r,a){return e===t||(null==e||null==t||!x(e)&&!x(t)?e!=e&&t!=t:li(e,t,n,r,si,a))}function ci(e,t){return si(e,t)}const ui=/^\d+(\.\d+)?([a-z]+|%)?$/,fi=(e,t,n)=>{h(e,"_minWidth",e=>"string"==typeof e&&ui.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,n)},di=class{constructor(n){t(this,n),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,n,a,i=!1)=>{var o,l;let s=String(n);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:r("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${s}`},this.renderSelectionCell(t,n),t.map((e,t)=>this.renderTableCell(e,n,t,a)))},this.renderTableCell=(t,n,a,i)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${n}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:n}`:l}if(t.headerCell)return this.renderHeadingCell(t,n,a,i);{const n="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":n?"false":void 0,"aria-live":n?"polite":void 0,"aria-relevant":n?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){F(this,e),ci(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){fi(this,e)}validateOn(e){y(this,e)}validateSelection(e){j(this,e)}validateTableSettings(e){k(this,this.normalizeTableSettings(e))}normalizeTableSettings(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e.columns)?e.columns:[];return Object.assign(Object.assign({},e),{columns:t.map(({hidable:e,key:t,label:n,resizable:r,sortable:a,visible:i,width:o})=>({hidable:!1!==e,key:null!=t?t:w(),label:n,resizable:!1!==r,sortable:!1!==a,visible:!1!==i,width:o}))})}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const n=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(n);r>-1&&(e.preventDefault(),"ArrowDown"===e.key?(r=(r+1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()):"ArrowUp"===e.key&&(e.preventDefault(),r=(r+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){v(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,w())}),this.dataToKeyMap.forEach((t,n)=>{e.includes(n)||this.dataToKeyMap.delete(n)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const n=e.render(t,e,e.data,this.state._data);"string"==typeof n&&(t.textContent=n)}})))}getNumberOfCols(e,t){let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.colSpan)&&void 0!==n?n:1}),n<t&&(n=t)}),0===n&&(n=t.length),n}getNumberOfRows(e,t){var n;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.rowSpan)&&void 0!==n?n:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0,r}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,n;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(n=e.vertical)&&void 0!==n?n:[]),r.length>0&&(this.horizontal=!1)),r}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e,n)=>{t.set(e.key,n)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return e.map((e,t)=>({column:e,index:t})).sort((e,n)=>{var r,a,i,o;const l=null!==(a=t.get(null!==(r=e.column.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER,s=null!==(o=t.get(null!==(i=n.column.key)&&void 0!==i?i:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER;return l!==s?l-s:e.index-n.index}).map(({column:e})=>e)}createDataField(e,t,n){var r;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),i=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;n&&(l=o,o+=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=this.sortByColumnPosition(a);for(let r=l;r<o;r++){const a=[];t.vertical.forEach((e,t)=>{let n=0;if(h[t].forEach(e=>n+=e),n<=r){const i=e[r-n+c[t]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{headerCell:!0,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),h[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let n=1;n<i.colSpan;n++)h[t+n].push(e);c[t]++}}});for(let t=0;t<i;t++)if(!0===this.horizontal){const i=n&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof i||null===i||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:i,label:i[d[t].key],rowSpan:void 0}))}else"object"!=typeof d[r]||null===d[r]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[r].key&&"function"!=typeof d[r].render||a.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(a)}if(0===e.length){let e=0,n=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{n+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(n,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[g.onSelectionChange])&&this.state._on[g.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map(e=>{var t;return{hidable:!1!==e.hidable,sortable:!1!==e.sortable,resizable:!1!==e.resizable,key:null!==(t=e.key)&&void 0!==t?t:w(),label:e.label,visible:!0}})}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,n){var i;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(i=t[0])||void 0===i?void 0:i.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),v=l.label(c),_={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":v};return e("td",{key:`tbody-${n}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(u?"codicon-check":""),_label:""}),e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},_,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),n=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},_,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,h)}}))),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:v})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find(t=>t.key===e.key)}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var n;const r=null===(n=this.state._selection)||void 0===n?void 0:n.disabledKeys;return!(void 0===r?[]:Array.isArray(r)?r:[r]).some(n=>String(n)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const n=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[n])),r}getTableMinWidth(){var e,t;const n=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var n;return e+(null!==(n=t.width)&&void 0!==n?n:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${n}ch`:`max(${this.state._minWidth}, ${n}ch)`}renderHeadingSelectionCell(){var t,n;const i=this.state._selection;if(!i)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===i.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(n=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==n?n:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(h?"codicon-remove":s?"codicon-check":""),_label:""}),e("input",{class:r("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(n,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&e("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(t,n,a,i){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";const s=!1!==(null==o?void 0:o.sortable),c="string"==typeof t.sortDirection,h=s&&c;let d="none",u="codicon codicon-fold";if(h&&t.sortDirection)switch(t.sortDirection){case"ASC":u="codicon codicon-chevron-up",d="ascending";break;case"DESC":u="codicon codicon-chevron-down",d="descending";break;default:d="none"}const b=i?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${n}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${d}`]:d}),scope:b,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":d,"data-sort":h&&t.sortDirection?`sort-${t.sortDirection}`:void 0},h&&t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:u},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,n){var a,i;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(i=null==n?void 0:n[0])||void 0===i?void 0:i.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:r("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:r(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){var t;const n=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=null===(t=this.state._headerCells.horizontal)||void 0===t?void 0:t.map(e=>this.sortByColumnPosition(e));return e("div",{key:"1f0adb61afdc857e0d9de0ad655faf448a20be3d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"36b454f962865b55291247f5487b675b16cf88c1",_tableSettings:this.state._tableSettings}),e("div",{key:"29ff06a4ca73b2803504a2e18d68a9f64bc384f1",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"c9de76b0f7de90c3d9504d7e6fd85d1e6df79552",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"cf64871e281a940f51f15c8e40d40c2b91cd472e",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"4a51fd96ca4db200017474f7ee205b7e294ba6ca",class:"kol-table__head"},[r.map((t,n)=>e("tr",{class:"kol-table__head-row",key:`thead-${n}`},this.state._selection&&this.renderHeadingSelectionCell(),0===n&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,n,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"56cc265a667f836f4952946afb4484ebca51fd80",class:"kol-table__body"},n.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return i(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{di as kol_table_stateless_wc};
4
+ import{r as t,h as e,F as n,g as i}from"./index-B6b8O-Tx.js";import{c as r}from"./clsx-eK3rPvPS.js";import{e as a,a as o,d as l,w as s}from"./component-names-CkE54Ym7.js";import{t as c}from"./i18n-BDORFCAj.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-Dd0zJQbD.js";import{b,v as _,a as p,f as y,c as k,e as j}from"./table-settings-DxLvhwRE.js";import{v as m}from"./label-Dnmzb2S_.js";import{C as g}from"./keyboard-D6PoWr38.js";import{n as w}from"./dev.utils-DA2D8UKW.js";import{d as S,K as A}from"./events-9-skLO0f.js";import{i as O,c as $,r as D,a as x,f as C,b as M,S as W}from"./isObject-DvSELytj.js";import"./i18n-Bqrkf471.js";const F=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&!0,new Set(["TableHeaderCellsPropType"]),t)})})};var P="[object AsyncFunction]",T="[object Function]",z="[object GeneratorFunction]",E="[object Proxy]";function K(e){if(!O(e))return!1;var t=$(e);return t==T||t==z||t==P||t==E}var R=D["__core-js_shared__"],H=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B(e){return!!H&&H in e}var L=Function.prototype,N=L.toString;function U(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var I=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,q=Function.prototype,G=Object.prototype,J=q.toString,Q=G.hasOwnProperty,Y=RegExp("^"+J.call(Q).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X(e){return!(!O(e)||B(e))&&(K(e)?Y:V).test(U(e))}function Z(e,t){return null==e?void 0:e[t]}function tt(e,t){var n=Z(e,t);return X(n)?n:void 0}var et=tt(D,"WeakMap"),nt=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function rt(e,t){var n=typeof e;return!!(t=null==t?nt:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t}function at(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function st(e){return null!=e&&lt(e.length)&&!K(e)}var ct=Object.prototype;function ut(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ct)}function ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dt="[object Arguments]";function ht(e){return x(e)&&$(e)==dt}var vt=Object.prototype,bt=vt.hasOwnProperty,_t=vt.propertyIsEnumerable,pt=ht(function(){return arguments}())?ht:function(e){return x(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};function yt(){return!1}var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=jt&&jt.exports===kt,gt=mt?D.Buffer:void 0,wt=gt?gt.isBuffer:void 0,St=wt||yt,At="[object Arguments]",Ot="[object Array]",$t="[object Boolean]",Dt="[object Date]",xt="[object Error]",Ct="[object Function]",Mt="[object Map]",Wt="[object Number]",Ft="[object Object]",Pt="[object RegExp]",Tt="[object Set]",zt="[object String]",Et="[object WeakMap]",Kt="[object ArrayBuffer]",Rt="[object DataView]",Ht="[object Float32Array]",Bt="[object Float64Array]",Lt="[object Int8Array]",Nt="[object Int16Array]",Ut="[object Int32Array]",It="[object Uint8Array]",Vt="[object Uint8ClampedArray]",qt="[object Uint16Array]",Gt="[object Uint32Array]",Jt={};function Qt(e){return x(e)&&lt(e.length)&&!!Jt[$(e)]}function Yt(e){return function(t){return e(t)}}Jt[Ht]=Jt[Bt]=Jt[Lt]=Jt[Nt]=Jt[Ut]=Jt[It]=Jt[Vt]=Jt[qt]=Jt[Gt]=!0,Jt[At]=Jt[Ot]=Jt[Kt]=Jt[$t]=Jt[Rt]=Jt[Dt]=Jt[xt]=Jt[Ct]=Jt[Mt]=Jt[Wt]=Jt[Ft]=Jt[Pt]=Jt[Tt]=Jt[zt]=Jt[Et]=!1;var Xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Xt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Zt&&Zt.exports===Xt,ee=te&&C.process,ne=function(){try{var e=Zt&&Zt.require&&Zt.require("util").types;return e||ee&&ee.binding&&ee.binding("util")}catch(e){}}(),ie=ne&&ne.isTypedArray,re=ie?Yt(ie):Qt,ae=Object.prototype,oe=ae.hasOwnProperty;function le(e,t){var n=M(e),r=!n&&pt(e),a=!n&&!r&&St(e),i=!n&&!r&&!a&&re(e),o=n||r||a||i,l=o?ft(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function se(e,t){return function(n){return e(t(n))}}var ce=se(Object.keys,Object),ue=Object.prototype,fe=ue.hasOwnProperty;function de(e){if(!ut(e))return ce(e);var t=[];for(var n in Object(e))fe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function he(e){return st(e)?le(e):de(e)}var ve=tt(Object,"create");function be(){this.__data__=ve?ve(null):{},this.size=0}function _e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pe="__lodash_hash_undefined__",ye=Object.prototype,ke=ye.hasOwnProperty;function je(e){var t=this.__data__;if(ve){var n=t[e];return n===pe?void 0:n}return ke.call(t,e)?t[e]:void 0}var me=Object.prototype,ge=me.hasOwnProperty;function we(e){var t=this.__data__;return ve?void 0!==t[e]:ge.call(t,e)}var Se="__lodash_hash_undefined__";function Ae(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ve&&void 0===t?Se:t,this}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__=[],this.size=0}function De(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}Oe.prototype.clear=be,Oe.prototype.delete=_e,Oe.prototype.get=je,Oe.prototype.has=we,Oe.prototype.set=Ae;var xe=Array.prototype,Ce=xe.splice;function Me(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ce.call(t,n,1),--this.size,!0)}function We(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]}function Fe(e){return De(this.__data__,e)>-1}function Pe(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Te.prototype.clear=$e,Te.prototype.delete=Me,Te.prototype.get=We,Te.prototype.has=Fe,Te.prototype.set=Pe;var ze=tt(D,"Map");function Ee(){this.size=0,this.__data__={hash:new Oe,map:new(ze||Te),string:new Oe}}function Ke(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map}function He(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Be(e){return Re(this,e).get(e)}function Le(e){return Re(this,e).has(e)}function Ne(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ue(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function Ve(){this.__data__=new Te,this.size=0}function qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ge(e){return this.__data__.get(e)}function Je(e){return this.__data__.has(e)}Ue.prototype.clear=Ee,Ue.prototype.delete=He,Ue.prototype.get=Be,Ue.prototype.has=Le,Ue.prototype.set=Ne;var Qe=200;function Ye(e,t){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!ze||r.length<Qe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ue(r)}return n.set(e,t),this.size=n.size,this}function Xe(e){var t=this.__data__=new Te(e);this.size=t.size}function Ze(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}function tn(){return[]}Xe.prototype.clear=Ve,Xe.prototype.delete=qe,Xe.prototype.get=Ge,Xe.prototype.has=Je,Xe.prototype.set=Ye;var en=Object.prototype,nn=en.propertyIsEnumerable,rn=Object.getOwnPropertySymbols,an=rn?function(e){return null==e?[]:(e=Object(e),Ze(rn(e),function(t){return nn.call(e,t)}))}:tn;function on(e,t,n){var r=t(e);return M(e)?r:Ie(r,n(e))}function ln(e){return on(e,he,an)}var sn=tt(D,"DataView"),cn=tt(D,"Promise"),un=tt(D,"Set"),fn="[object Map]",dn="[object Object]",hn="[object Promise]",vn="[object Set]",bn="[object WeakMap]",_n="[object DataView]",pn=U(sn),yn=U(ze),kn=U(cn),jn=U(un),mn=U(et),gn=$;(sn&&gn(new sn(new ArrayBuffer(1)))!=_n||ze&&gn(new ze)!=fn||cn&&gn(cn.resolve())!=hn||un&&gn(new un)!=vn||et&&gn(new et)!=bn)&&(gn=function(e){var t=$(e),n=t==dn?e.constructor:void 0,r=n?U(n):"";if(r)switch(r){case pn:return _n;case yn:return fn;case kn:return hn;case jn:return vn;case mn:return bn}return t});var wn=D.Uint8Array,Sn="__lodash_hash_undefined__";function An(e){return this.__data__.set(e,Sn),this}function On(e){return this.__data__.has(e)}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ue;++t<n;)this.add(e[t])}function Dn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xn(e,t){return e.has(t)}$n.prototype.add=$n.prototype.push=An,$n.prototype.has=On;var Cn=1,Mn=2;function Wn(e,t,n,r,a,i){var o=n&Cn,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=n&Mn?new $n:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var v=e[d],_=t[d];if(r)var f=o?r(_,v,d,t,e,i):r(v,_,d,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(b){if(!Dn(t,function(e,t){if(!xn(b,t)&&(v===e||a(v,e,n,r,i)))return b.push(t)})){u=!1;break}}else if(v!==_&&!a(v,_,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Fn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Tn=1,zn=2,En="[object Boolean]",Kn="[object Date]",Rn="[object Error]",Hn="[object Map]",Bn="[object Number]",Ln="[object RegExp]",Nn="[object Set]",Un="[object String]",In="[object Symbol]",Vn="[object ArrayBuffer]",qn="[object DataView]",Gn=W?W.prototype:void 0,Jn=Gn?Gn.valueOf:void 0;function Qn(e,t,n,r,a,i,o){switch(n){case qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case En:case Kn:case Bn:return at(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Ln:case Un:return e==t+"";case Hn:var l=Fn;case Nn:var s=r&Tn;if(l||(l=Pn),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=zn,o.set(e,t);var h=Wn(l(e),l(t),r,a,i,o);return o.delete(e),h;case In:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}var Yn=1,Xn=Object.prototype,Zn=Xn.hasOwnProperty;function ti(e,t,n,r,a,i){var o=n&Yn,l=ln(e),s=l.length;if(s!=ln(t).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in t:Zn.call(t,h)))return!1}var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var b=!0;i.set(e,t),i.set(t,e);for(var v=o;++c<s;){var _=e[h=l[c]],f=t[h];if(r)var p=o?r(f,_,h,t,e,i):r(_,f,h,e,t,i);if(!(void 0===p?_===f||a(_,f,n,r,i):p)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return i.delete(e),i.delete(t),b}var ei=1,ni="[object Arguments]",ii="[object Array]",ri="[object Object]",ai=Object.prototype,oi=ai.hasOwnProperty;function li(e,t,n,r,a,i){var o=M(e),l=M(t),s=o?ii:gn(e),c=l?ii:gn(t),h=(s=s==ni?ri:s)==ri,d=(c=c==ni?ri:c)==ri,u=s==c;if(u&&St(e)){if(!St(t))return!1;o=!0,h=!1}if(u&&!h)return i||(i=new Xe),o||re(e)?Wn(e,t,n,r,a,i):Qn(e,t,s,n,r,a,i);if(!(n&ei)){var b=h&&oi.call(e,"__wrapped__"),v=d&&oi.call(t,"__wrapped__");if(b||v){var _=b?e.value():e,f=v?t.value():t;return i||(i=new Xe),a(_,f,n,r,i)}}return!!u&&(i||(i=new Xe),ti(e,t,n,r,a,i))}function si(e,t,n,r,a){return e===t||(null==e||null==t||!x(e)&&!x(t)?e!=e&&t!=t:li(e,t,n,r,si,a))}function ci(e,t){return si(e,t)}const ui=/^\d+(\.\d+)?([a-z]+|%)?$/,fi=(e,t,n)=>{h(e,"_minWidth",e=>"string"==typeof e&&ui.test(e),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,n)},di=class{constructor(n){t(this,n),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,n,a,i=!1)=>{var o,l;let s=String(n);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:r("kol-table__row",{"kol-table__row--body":!i,"kol-table__row--footer":i}),key:`row-${s}`},this.renderSelectionCell(t,n),t.map((e,t)=>this.renderTableCell(e,n,t,a)))},this.renderTableCell=(t,n,a,i)=>{const o=this.getColumnSettings(t);if(o&&!o.visible)return"";let l=`${n}-${a}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=e?`${e}-${this.horizontal?a:n}`:l}if(t.headerCell)return this.renderHeadingCell(t,n,a,i);{const n="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${l}`,class:r("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":n?"false":void 0,"aria-live":n?"polite":void 0,"aria-relevant":n?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){F(this,e),ci(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){m(this,e,{required:!0})}validateMinWidth(e){fi(this,e)}validateOn(e){y(this,e)}validateSelection(e){k(this,e)}validateTableSettings(e){j(this,this.normalizeTableSettings(e))}normalizeTableSettings(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e.columns)?e.columns:[];return Object.assign(Object.assign({},e),{columns:t.map(({hidable:e,key:t,label:n,resizable:r,sortable:a,visible:i,width:o})=>({hidable:!1!==e,key:null!=t?t:w(),label:n,resizable:!1!==r,sortable:!1!==a,visible:!1!==i,width:o}))})}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const n=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let r=this.checkboxRefs.indexOf(n);r>-1&&(e.preventDefault(),"ArrowDown"===e.key?(r=(r+1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()):"ArrowUp"===e.key&&(e.preventDefault(),r=(r+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[r].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){v(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,w())}),this.dataToKeyMap.forEach((t,n)=>{e.includes(n)||this.dataToKeyMap.delete(n)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const n=e.render(t,e,e.data,this.state._data);"string"==typeof n&&(t.textContent=n)}})))}getNumberOfCols(e,t){let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.colSpan)&&void 0!==n?n:1}),n<t&&(n=t)}),0===n&&(n=t.length),n}getNumberOfRows(e,t){var n;let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var n;return t+=null!==(n=e.rowSpan)&&void 0!==n?n:1}),r<t&&(r=t)}),0===r?r=t.length:r-=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0,r}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,n;let r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===r.length&&(r=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(n=e.vertical)&&void 0!==n?n:[]),r.length>0&&(this.horizontal=!1)),r}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e,n)=>{t.set(e.key,n)}),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return e.map((e,t)=>({column:e,index:t})).sort((e,n)=>{var r,a,i,o;const l=null!==(a=t.get(null!==(r=e.column.key)&&void 0!==r?r:""))&&void 0!==a?a:Number.MAX_SAFE_INTEGER,s=null!==(o=t.get(null!==(i=n.column.key)&&void 0!==i?i:""))&&void 0!==o?o:Number.MAX_SAFE_INTEGER;return l!==s?l-s:e.index-n.index}).map(({column:e})=>e)}createDataField(e,t,n){var r;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),i=this.getNumberOfCols(t.horizontal,e);let o=this.getNumberOfRows(t.vertical,e),l=0;n&&(l=o,o+=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=this.sortByColumnPosition(a);for(let r=l;r<o;r++){const a=[];t.vertical.forEach((e,t)=>{let n=0;if(h[t].forEach(e=>n+=e),n<=r){const i=e[r-n+c[t]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{headerCell:!0,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),h[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let n=1;n<i.colSpan;n++)h[t+n].push(e);c[t]++}}});for(let t=0;t<i;t++)if(!0===this.horizontal){const i=n&&this.state._dataFoot?this.state._dataFoot[r-l]:e[r];"object"!=typeof d[t]||null===d[t]||"object"!=typeof i||null===i||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,data:i,label:i[d[t].key],rowSpan:void 0}))}else"object"!=typeof d[r]||null===d[r]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[r].key&&"function"!=typeof d[r].render||a.push(Object.assign(Object.assign({},d[r]),{colSpan:void 0,data:e[t],label:e[t][d[r].key],rowSpan:void 0}));s.push(a)}if(0===e.length){let e=0,n=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{n+=e.rowSpan||1}));const r={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(n,1)};0===s.length?s.push([r]):s[0].push(r)}return s}handleSelectionChangeCallbackAndEvent(e,t){var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[g.onSelectionChange])&&this.state._on[g.onSelectionChange](e,t),this.host&&S(this.host,A.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter(e=>e.key).map(e=>{var t;return{hidable:!1!==e.hidable,sortable:!1!==e.sortable,resizable:!1!==e.resizable,key:null!==(t=e.key)&&void 0!==t?t:w(),label:e.label,visible:!0}})}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,n){var i;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(i=t[0])||void 0===i?void 0:i.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),v=l.label(c),_={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":v};return e("td",{key:`tbody-${n}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:r("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(u?"codicon-check":""),_label:""}),e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},_,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),n=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:r("kol-table__selection-input kol-table__selection-input--radio")},_,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,h)}}))),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:v})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find(t=>t.key===e.key)}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var n;const r=null===(n=this.state._selection)||void 0===n?void 0:n.disabledKeys;return!(void 0===r?[]:Array.isArray(r)?r:[r]).some(n=>String(n)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const n=this.getSelectionKeyPropertyName(),r=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&r.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[n])),r}getTableMinWidth(){var e,t;const n=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter(e=>e.visible).reduce((e,t)=>{var n;return e+(null!==(n=t.width)&&void 0!==n?n:0)},0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${n}ch`:`max(${this.state._minWidth}, ${n}ch)`}renderHeadingSelectionCell(){var t,n;const i=this.state._selection;if(!i)return e("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===i.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(n=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==n?n:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:r("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(a,{class:"kol-table__selection-icon",_icons:"codicon "+(h?"codicon-remove":s?"codicon-check":""),_label:""}),e("input",{class:r("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(o,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){return e(n,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&e("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(t,n,a,i){const o=this.getColumnSettings(t);if(o&&!o.visible)return"";const s=!1!==(null==o?void 0:o.sortable),c="string"==typeof t.sortDirection,h=s&&c;let d="none",u="codicon codicon-fold";if(h&&t.sortDirection)switch(t.sortDirection){case"ASC":u="codicon codicon-chevron-up",d="ascending";break;case"DESC":u="codicon codicon-chevron-down",d="descending";break;default:d="none"}const b=i?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${n}-${a}-${t.label}`,class:r("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${d}`]:d}),scope:b,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:(null==o?void 0:o.width)?`${o.width}ch`:t.width},"aria-sort":d,"data-sort":h&&t.sortDirection?`sort-${t.sortDirection}`:void 0},h&&t.sortDirection?e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:u},_label:t.label,_ariaDescription:this.translateSort,_on:{onClick:e=>{var n;"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&S(this.host,A.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderSpacer(t,n){var a,i;const o=(null===(a=this.state._headerCells.vertical)||void 0===a?void 0:a.length)||0,l=null===(i=null==n?void 0:n[0])||void 0===i?void 0:i.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:r("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:r(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){var t;const n=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=null===(t=this.state._headerCells.horizontal)||void 0===t?void 0:t.map(e=>this.sortByColumnPosition(e));return e("div",{key:"1f0adb61afdc857e0d9de0ad655faf448a20be3d",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"36b454f962865b55291247f5487b675b16cf88c1",_tableSettings:this.state._tableSettings}),e("div",{key:"29ff06a4ca73b2803504a2e18d68a9f64bc384f1",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"c9de76b0f7de90c3d9504d7e6fd85d1e6df79552",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"cf64871e281a940f51f15c8e40d40c2b91cd472e",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"4a51fd96ca4db200017474f7ee205b7e294ba6ca",class:"kol-table__head"},[r.map((t,n)=>e("tr",{class:"kol-table__head-row",key:`thead-${n}`},this.state._selection&&this.renderHeadingSelectionCell(),0===n&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,n,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"56cc265a667f836f4952946afb4484ebca51fd80",class:"kol-table__body"},n.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return i(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}};export{di as kol_table_stateless_wc};
@@ -1 +1 @@
1
- {"version":3,"file":"kol-table-stateless.entry.esm.js","sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n\t@include kol-table-stateless-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tHasSettingsMenuPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessProps,\n} from '../../schema';\nimport type { MinWidthPropType } from '../../schema/props/min-width';\nimport type { TableSettingsPropType } from '../../schema/props/table-settings';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width (CSS width values).\n\t */\n\t@Prop() public _minWidth!: MinWidthPropType;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t/**\n\t * Defines the table settings including column visibility, order and width.\n\t */\n\t@Prop() public _tableSettings?: TableSettingsPropType;\n\n\t/**\n\t * Enables the settings menu if true (default: false).\n\t */\n\t@Prop() public _hasSettingsMenu?: HasSettingsMenuPropType;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolTableStatelessWcTag\n\t\t\t\t_data={this._data}\n\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t_label={this._label}\n\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t_on={this._on}\n\t\t\t\t_selection={this._selection}\n\t\t\t\t_tableSettings={this._tableSettings}\n\t\t\t\t_hasSettingsMenu={this._hasSettingsMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,2vXAA2vX;;MCsBtwX,iBAAiB,GAAA,MAAA;;;;IA8CtB,MAAM,GAAA;AACZ,QAAA,QACC,CAAC,CAAA,sBAAsB,EACtB,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACtC,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"kol-table-stateless.entry.esm.js","sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n\t@include kol-table-stateless-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tHasSettingsMenuPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessProps,\n} from '../../schema';\nimport type { MinWidthPropType } from '../../schema/props/min-width';\nimport type { TableSettingsPropType } from '../../schema/props/table-settings';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width (CSS width values).\n\t */\n\t@Prop() public _minWidth!: MinWidthPropType;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t/**\n\t * Defines the table settings including column visibility, order and width.\n\t */\n\t@Prop() public _tableSettings?: TableSettingsPropType;\n\n\t/**\n\t * Enables the settings menu if true (default: false).\n\t */\n\t@Prop() public _hasSettingsMenu?: HasSettingsMenuPropType;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolTableStatelessWcTag\n\t\t\t\t_data={this._data}\n\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t_label={this._label}\n\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t_on={this._on}\n\t\t\t\t_selection={this._selection}\n\t\t\t\t_tableSettings={this._tableSettings}\n\t\t\t\t_hasSettingsMenu={this._hasSettingsMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,m1XAAm1X;;MCsB91X,iBAAiB,GAAA,MAAA;;;;IA8CtB,MAAM,GAAA;AACZ,QAAA,QACC,CAAC,CAAA,sBAAsB,EACtB,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACtC,CAAA;;;;;;;;;"}
@@ -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-CgbjDjlu.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-Dd0zJQbD.js";const o="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-button__text {\n width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
4
+ import{r as n,h as e}from"./index-B6b8O-Tx.js";import{m as t}from"./component-names-CkE54Ym7.js";import"./common-Dd0zJQbD.js";const o="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-button__text {\n width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
@@ -1 +1 @@
1
- {"version":3,"names":["registerInstance","h","KolTableStatelessWcTag","defaultStyleCss","KolTableStateless","constructor","hostRef","this","render","key","_data","_dataFoot","_headerCells","_label","_minWidth","_on","_selection","_tableSettings","_hasSettingsMenu","style","default"],"sources":["0"],"mappings":";;;YAGcA,OAAkBC,MAAS,kCAC3BC,MAA8B,sCACrC,uBAEP,MAAMC,EAAkB,4vXAExB,MAAMC,EAAoB,MACtB,WAAAC,CAAYC,GACRN,EAAiBO,KAAMD,EAC3B,CACA,MAAAE,GACI,OAAQP,EAAEC,EAAwB,CAAEO,IAAK,2CAA4CC,MAAOH,KAAKG,MAAOC,UAAWJ,KAAKI,UAAWC,aAAcL,KAAKK,aAAcC,OAAQN,KAAKM,OAAQC,UAAWP,KAAKO,UAAWC,IAAKR,KAAKQ,IAAKC,WAAYT,KAAKS,WAAYC,eAAgBV,KAAKU,eAAgBC,iBAAkBX,KAAKW,kBAChU,GAEJd,EAAkBe,MAAQ,CACtBC,QAASjB,UAGJC","ignoreList":[]}
1
+ {"version":3,"names":["registerInstance","h","KolTableStatelessWcTag","defaultStyleCss","KolTableStateless","constructor","hostRef","this","render","key","_data","_dataFoot","_headerCells","_label","_minWidth","_on","_selection","_tableSettings","_hasSettingsMenu","style","default"],"sources":["0"],"mappings":";;;YAGcA,OAAkBC,MAAS,kCAC3BC,MAA8B,sCACrC,uBAEP,MAAMC,EAAkB,o1XAExB,MAAMC,EAAoB,MACtB,WAAAC,CAAYC,GACRN,EAAiBO,KAAMD,EAC3B,CACA,MAAAE,GACI,OAAQP,EAAEC,EAAwB,CAAEO,IAAK,2CAA4CC,MAAOH,KAAKG,MAAOC,UAAWJ,KAAKI,UAAWC,aAAcL,KAAKK,aAAcC,OAAQN,KAAKM,OAAQC,UAAWP,KAAKO,UAAWC,IAAKR,KAAKQ,IAAKC,WAAYT,KAAKS,WAAYC,eAAgBV,KAAKU,eAAgBC,iBAAkBX,KAAKW,kBAChU,GAEJd,EAAkBe,MAAQ,CACtBC,QAASjB,UAGJC","ignoreList":[]}
@@ -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-CgbjDjlu.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-Dd0zJQbD.js";import{v as c}from"./align-D-ifSKu8.js";import{v as u}from"./label-Dnmzb2S_.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as b}from"./component-names-CkE54Ym7.js";import{t as p}from"./i18n-BzQ08vD6.js";import{K as m}from"./keyboard-D6PoWr38.js";import{d as g,K as y}from"./events-9-skLO0f.js";import"./i18n-Bt8vh0qY.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${p("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(b,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(b,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
4
+ import{r as t,h as n,g as e}from"./index-B6b8O-Tx.js";import{w as i,d as o,j as s,s as a,N as l,H as r,I as d,P as h}from"./common-Dd0zJQbD.js";import{v as c}from"./align-D-ifSKu8.js";import{v as u}from"./label-Dnmzb2S_.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as b}from"./component-names-CkE54Ym7.js";import{t as p}from"./i18n-BDORFCAj.js";import{K as m}from"./keyboard-D6PoWr38.js";import{d as g,K as y}from"./events-9-skLO0f.js";import"./i18n-Bqrkf471.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${p("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);s("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(b,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(b,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),a(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
@@ -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-CgbjDjlu.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,c as o,g as s,F as l}from"./FormFieldStateWrapper-DMwiqUtB.js";import{I as r,a as d}from"./controller-icon-CSsrsnsy.js";import{_ as h}from"./tslib.es6-CxX45GIN.js";import{w as c,e as m}from"./common-Dd0zJQbD.js";import{n as p}from"./dev.utils-DrdCaiDj.js";import{a as u,v as f,b}from"./max-length-behavior-nTw1Zuyf.js";import{v}from"./placeholder-BVhy3BzI.js";import{v as y}from"./read-only-BetTuumR.js";import{v as g}from"./required-CnTTpFCN.js";import{v as k}from"./rows-DtS-0sp9.js";import{v as _}from"./spell-check-B9ot-4t-.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-CKSywYuL.js";import"./bootstrap-DiYNsmQ4.js";import"./component-names-CkE54Ym7.js";import"./i18n-Bt8vh0qY.js";import"./isObject-DvSELytj.js";import"./reuse-CX4AQDkS.js";import"./i18n-BzQ08vD6.js";import"./InternalUnderlinedBadgeText-ClWrrSuG.js";import"./Alert-0I-ZziZw.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-ChPbtLqo.js";import"./Icon-DaIG3Pub.js";import"./icons-B5i9zwjJ.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 B(e,t){var n;const i=[...s(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],a=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:i});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(a.maxLength=e._maxLength),"_shortKey"in e&&(a["aria-keyshortcuts"]=e._shortKey),a}const S=t=>{var{state:n}=t,i=h(t,["state"]);return e(z,Object.assign({},B(n,i)))};class L 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 T='/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}',C=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const i=Math.round(e.scrollHeight/n);return e.rows=t,i},D=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,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:"c076b1045358547d15574bfb7d4fbd82ec63984d"},this.getFormFieldProps()),e(d,{key:"320aa1104bb568da2c2f09660792f4be5de05a33",state:this.state},e(S,Object.assign({key:"e5ab010f74cc7d2ed882121bc4373ee15dd70593"},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=C(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new L(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>C(this.textareaRef)?this.state._rows:C(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)}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"]}}};D.style={default:T};export{D as kol_textarea};
4
+ import{h as e,r as t,g as n}from"./index-B6b8O-Tx.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,c as o,g as s,F as l}from"./FormFieldStateWrapper-lwPu0sgn.js";import{I as r,a as d}from"./controller-icon-lzjOgj-3.js";import{_ as h}from"./tslib.es6-CxX45GIN.js";import{w as c,e as m}from"./common-Dd0zJQbD.js";import{n as p}from"./dev.utils-DA2D8UKW.js";import{a as f,v as u,b}from"./max-length-behavior-nTw1Zuyf.js";import{v}from"./placeholder-BVhy3BzI.js";import{v as y}from"./read-only-BetTuumR.js";import{v as g}from"./required-CnTTpFCN.js";import{v as k}from"./rows-DtS-0sp9.js";import{v as _}from"./spell-check-B9ot-4t-.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-XZkiMy1Z.js";import"./bootstrap-CB4ow_3r.js";import"./component-names-CkE54Ym7.js";import"./i18n-Bqrkf471.js";import"./isObject-DvSELytj.js";import"./reuse-CX4AQDkS.js";import"./i18n-BDORFCAj.js";import"./InternalUnderlinedBadgeText-CFo7EUUG.js";import"./Alert-yh1U7yri.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-Dv85ZVTV.js";import"./Icon-xy_Rmoip.js";import"./icons-B5i9zwjJ.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:p,label:u}=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:p,label:u})),f);return e("textarea",Object.assign({},_))};function B(e,t){var n;const i=[...s(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],a=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:i});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(a.maxLength=e._maxLength),"_shortKey"in e&&(a["aria-keyshortcuts"]=e._shortKey),a}const L=t=>{var{state:n}=t,i=h(t,["state"]);return e(z,Object.assign({},B(n,i)))};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){f(this.component,e)}validateMaxLengthBehavior(e){u(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 T='/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}',C=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const i=Math.round(e.scrollHeight/n);return e.rows=t,i},D=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,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:"c076b1045358547d15574bfb7d4fbd82ec63984d"},this.getFormFieldProps()),e(d,{key:"320aa1104bb568da2c2f09660792f4be5de05a33",state:this.state},e(L,Object.assign({key:"e5ab010f74cc7d2ed882121bc4373ee15dd70593"},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=C(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>C(this.textareaRef)?this.state._rows:C(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)}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"]}}};D.style={default:T};export{D 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-CgbjDjlu.js";import{t as o}from"./i18n-BzQ08vD6.js";import{n as i}from"./dev.utils-DrdCaiDj.js";import{n as a}from"./component-names-CkE54Ym7.js";import{K as s}from"./Alert-0I-ZziZw.js";import"./common-Dd0zJQbD.js";import"./markdown-BSkXjaSn.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{c as r}from"./clsx-eK3rPvPS.js";import"./i18n-Bt8vh0qY.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-ChPbtLqo.js";const d=t=>{var{status:e,toast:o,onClose:i}=t,a=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(s,{class:"kol-toast-item__alert",alert:!0,label:c,level:0,hasCloser:!0,type:d,variant:m||"card",onCloserClick:i},n("div",Object.assign({},a),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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: 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:Object.assign(Object.assign({},t),{variant:"card"}),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:"59038f1cc016df1fb76b2436b4ad4598700e66a9",class:"kol-toast-container"},this.state._toastStates.length>1&&n(a,{key:"d2aea02a378c5631da3d47e8ab947e81eaa4174b",_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-B6b8O-Tx.js";import{t as o}from"./i18n-BDORFCAj.js";import{n as i}from"./dev.utils-DA2D8UKW.js";import{n as a}from"./component-names-CkE54Ym7.js";import{K as s}from"./Alert-yh1U7yri.js";import"./common-Dd0zJQbD.js";import"./markdown-BSkXjaSn.js";import{_ as l}from"./tslib.es6-CxX45GIN.js";import{c as r}from"./clsx-eK3rPvPS.js";import"./i18n-Bqrkf471.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-Dv85ZVTV.js";const d=t=>{var{status:e,toast:o,onClose:i}=t,a=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(s,{class:"kol-toast-item__alert",alert:!0,label:c,level:0,hasCloser:!0,type:d,variant:m||"card",onCloserClick:i},n("div",Object.assign({},a),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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: 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:Object.assign(Object.assign({},t),{variant:"card"}),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:"59038f1cc016df1fb76b2436b4ad4598700e66a9",class:"kol-toast-container"},this.state._toastStates.length>1&&n(a,{key:"d2aea02a378c5631da3d47e8ab947e81eaa4174b",_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 t,g as e}from"./index-CgbjDjlu.js";import{_ as o}from"./tslib.es6-CxX45GIN.js";import{f as i,d as a}from"./component-names-CkE54Ym7.js";import{O as l,o as s,p as r,s as d}from"./common-Dd0zJQbD.js";import{v as h}from"./label-Dnmzb2S_.js";import{K as c}from"./keyboard-D6PoWr38.js";import{v as m}from"./orientation-eCMt8CD1.js";const f=(n,e)=>{l(e,()=>{s(e,()=>{void 0===e&&(e=[]);try{e=r(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&d(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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\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 }\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--orientation-vertical .kol-span {\n align-items: flex-start;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",b=class{constructor(e){n(this,e),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,e)=>{const o=this.normalizeItem(n),l=e!==this.currentIndex||(null==o?void 0:o._disabled)?-1:0,r={key:e,class:"button normal kol-toolbar__item",_tabIndex:l},s=n=>{n&&this.indexToElement.set(e,n)};return t("_href"in o?i:a,Object.assign({},o,r,{ref:s}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,i=o(n,["_icons","_disabled"]);return Object.assign(Object.assign({},i),{_icons:e,_disabled:t})}render(){return t("div",{key:"21d9f22b65a5da8bf4467287754233720e9de61d",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){h(this,n)}validateItems(n){f(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){m(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,o,i,a;const l=n.code;if(![c.ArrowUp,c.ArrowDown,c.ArrowRight,c.ArrowLeft].includes(l))return;n.preventDefault();const r=(null!==(t=null===(e=this._items)||void 0===e?void 0:e.length)&&void 0!==t?t:0)-1;if(r<0)return;const s=this.currentIndex;let d=s;switch(l){case c.ArrowUp:case c.ArrowLeft:d=s>0?s-1:r;break;case c.ArrowDown:case c.ArrowRight:d=s<r?s+1:0}s!==d&&((null===(i=null===(o=this.state._items)||void 0===o?void 0:o[d])||void 0===i?void 0:i._disabled)||(this.currentIndex=d,null===(a=this.getCurrentToolbarItem(d))||void 0===a||a.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 e(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};b.style={default:p};export{b as kol_toolbar};
4
+ import{r as n,h as t,g as e}from"./index-B6b8O-Tx.js";import{_ as o}from"./tslib.es6-CxX45GIN.js";import{f as i,d as a}from"./component-names-CkE54Ym7.js";import{O as l,o as s,p as r,s as d}from"./common-Dd0zJQbD.js";import{v as h}from"./label-Dnmzb2S_.js";import{K as c}from"./keyboard-D6PoWr38.js";import{v as m}from"./orientation-eCMt8CD1.js";const f=(n,e)=>{l(e,()=>{s(e,()=>{void 0===e&&(e=[]);try{e=r(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&d(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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\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 }\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--orientation-vertical .kol-span {\n align-items: flex-start;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",b=class{constructor(e){n(this,e),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,e)=>{const o=this.normalizeItem(n),l=e!==this.currentIndex||(null==o?void 0:o._disabled)?-1:0,r={key:e,class:"button normal kol-toolbar__item",_tabIndex:l},s=n=>{n&&this.indexToElement.set(e,n)};return t("_href"in o?i:a,Object.assign({},o,r,{ref:s}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,i=o(n,["_icons","_disabled"]);return Object.assign(Object.assign({},i),{_icons:e,_disabled:t})}render(){return t("div",{key:"21d9f22b65a5da8bf4467287754233720e9de61d",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){h(this,n)}validateItems(n){f(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){m(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,o,i,a;const l=n.code;if(![c.ArrowUp,c.ArrowDown,c.ArrowRight,c.ArrowLeft].includes(l))return;n.preventDefault();const r=(null!==(t=null===(e=this._items)||void 0===e?void 0:e.length)&&void 0!==t?t:0)-1;if(r<0)return;const s=this.currentIndex;let d=s;switch(l){case c.ArrowUp:case c.ArrowLeft:d=s>0?s-1:r;break;case c.ArrowDown:case c.ArrowRight:d=s<r?s+1:0}s!==d&&((null===(i=null===(o=this.state._items)||void 0===o?void 0:o[d])||void 0===i?void 0:i._disabled)||(this.currentIndex=d,null===(a=this.getCurrentToolbarItem(d))||void 0===a||a.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 e(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};b.style={default:p};export{b 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-CgbjDjlu.js";import{b as h,a as o}from"./align-floating-elements-BkpeqvtE.js";import{e as a,t as l}from"./common-Dd0zJQbD.js";import{v as n}from"./align-D-ifSKu8.js";import{v as r}from"./label-Dnmzb2S_.js";import"./Alert-0I-ZziZw.js";import"./i18n-BzQ08vD6.js";import{K as d}from"./Span-qWR_z3O4.js";import{t as c,a as f}from"./tooltip-open-tracking-rBbBgPWP.js";import"./tslib.es6-CxX45GIN.js";import"./clsx-eK3rPvPS.js";import"./component-names-CkE54Ym7.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-ChPbtLqo.js";import"./i18n-Bt8vh0qY.js";import"./Icon-DaIG3Pub.js";import"./reuse-CX4AQDkS.js";import"./markdown-BSkXjaSn.js";import"./InternalUnderlinedBadgeText-ClWrrSuG.js";import"./isObject-DvSELytj.js";const m=(t,i)=>{a(t,"_badgeText",i)},u=(t,i)=>{a(t,"_id",i)},p=new Set;function b(t){p.forEach(t=>{t.style.setProperty("z-index","999")}),p.add(t),t.style.setProperty("z-index","1000")}function v(t){if(p.delete(t),p.size>0){const t=Array.from(p).pop();t&&t.style.setProperty("z-index","1000")}}const j=class{constructor(i){t(this,i),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.resetHideFlag=()=>{this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)},this.showTooltip=()=>{if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){b(this.tooltipElement),c(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),l().addEventListener("keyup",this.hideTooltipByEscape,{once:!0});const t=this.previousSibling,i=this.tooltipElement;this.cleanupAutoPositioning=h(t,i,()=>{this.alignTooltip()})}},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseleave=t=>{var i,e;this.hasMouseIn=null!==(e=null===(i=this.tooltipElement)||void 0===i?void 0:i.contains(t.relatedTarget))&&void 0!==e&&e,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusout=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter),t.addEventListener("mouseleave",this.handleMouseleave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusout)},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter),t.removeEventListener("mouseleave",this.handleMouseleave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusout)},this.resyncListeners=(t,i,e=!1)=>{t&&this.removeListeners(t),i&&(e&&(this.previousSibling=i),this.addListeners(i))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_label:""},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(v(this.tooltipElement),f(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),l().removeEventListener("keyup",this.hideTooltipByEscape)}render(){return i(s,{key:"7a998733dae6a2c928b4107d885c19f5988fa24a",class:"kol-tooltip"},""!==this.state._label&&i("div",{key:"6b53ddaa12ca15d4822a4d4945d823f699d76510",class:"kol-tooltip__floating",ref:this.catchTooltipElement},i("div",{key:"0b48b4b9938ac6830b84c7731b9b5df89cbf9da7",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),i(d,{key:"0531c8d02198e37b81b9110cc683852730caa5fb",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(t){m(this,t)}validateAlign(t){n(this,t)}validateId(t){u(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,i;const e=null!==(i=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling)&&void 0!==i?i:null;this.resyncListeners(this.previousSibling,e,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t,i;this.previousSibling=null!==(i=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling)&&void 0!==i?i:null}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{j as kol_tooltip_wc};
4
+ import{r as i,h as t,H as s,g as e}from"./index-B6b8O-Tx.js";import{b as h,a as o}from"./align-floating-elements-BkpeqvtE.js";import{e as a,t as l}from"./common-Dd0zJQbD.js";import{v as n}from"./align-D-ifSKu8.js";import{v as r}from"./label-Dnmzb2S_.js";import"./Alert-yh1U7yri.js";import"./i18n-BDORFCAj.js";import{K as d}from"./Span-D4Wz9_Wp.js";import{t as c,a as f}from"./tooltip-open-tracking-rBbBgPWP.js";import"./tslib.es6-CxX45GIN.js";import"./clsx-eK3rPvPS.js";import"./component-names-CkE54Ym7.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-Dv85ZVTV.js";import"./i18n-Bqrkf471.js";import"./Icon-xy_Rmoip.js";import"./reuse-CX4AQDkS.js";import"./markdown-BSkXjaSn.js";import"./InternalUnderlinedBadgeText-CFo7EUUG.js";import"./isObject-DvSELytj.js";const m=(t,i)=>{a(t,"_badgeText",i)},p=(t,i)=>{a(t,"_id",i)},u=new Set;function v(t){u.forEach(t=>{t.style.setProperty("z-index","999")}),u.add(t),t.style.setProperty("z-index","1000")}function b(t){if(u.delete(t),u.size>0){const t=Array.from(u).pop();t&&t.style.setProperty("z-index","1000")}}const j=class{constructor(t){i(this,t),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.resetHideFlag=()=>{this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)},this.showTooltip=()=>{if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){v(this.tooltipElement),c(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),l().addEventListener("keyup",this.hideTooltipByEscape,{once:!0});const t=this.previousSibling,i=this.tooltipElement;this.cleanupAutoPositioning=h(t,i,()=>{this.alignTooltip()})}},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseleave=t=>{var i,e;this.hasMouseIn=null!==(e=null===(i=this.tooltipElement)||void 0===i?void 0:i.contains(t.relatedTarget))&&void 0!==e&&e,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusout=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter),t.addEventListener("mouseleave",this.handleMouseleave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusout)},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter),t.removeEventListener("mouseleave",this.handleMouseleave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusout)},this.resyncListeners=(t,i,e=!1)=>{t&&this.removeListeners(t),i&&(e&&(this.previousSibling=i),this.addListeners(i))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_label:""},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(b(this.tooltipElement),f(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),l().removeEventListener("keyup",this.hideTooltipByEscape)}render(){return t(s,{key:"7a998733dae6a2c928b4107d885c19f5988fa24a",class:"kol-tooltip"},""!==this.state._label&&t("div",{key:"6b53ddaa12ca15d4822a4d4945d823f699d76510",class:"kol-tooltip__floating",ref:this.catchTooltipElement},t("div",{key:"0b48b4b9938ac6830b84c7731b9b5df89cbf9da7",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),t(d,{key:"0531c8d02198e37b81b9110cc683852730caa5fb",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(t){m(this,t)}validateAlign(t){n(this,t)}validateId(t){p(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,i;const e=null!==(i=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling)&&void 0!==i?i:null;this.resyncListeners(this.previousSibling,e,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t,i;this.previousSibling=null!==(i=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling)&&void 0!==i?i:null}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{j as kol_tooltip_wc};