@public-ui/components 2.2.0 → 2.2.1-daf78eefb286eb2b5af07293e65a52004723eadc.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 (556) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-1c1aa0a2.js → Alert-c979aa29.js} +1 -1
  3. package/dist/cjs/{Alert-1c1aa0a2.js.map → Alert-c979aa29.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-92c49ec7.js → Collapsible-74fc3020.js} +1 -1
  5. package/dist/cjs/{Collapsible-92c49ec7.js.map → Collapsible-74fc3020.js.map} +1 -1
  6. package/dist/cjs/FormFieldMsg-1d2d0770.js +4 -0
  7. package/dist/cjs/{FormFieldMsg-d80dcd4f.js.map → FormFieldMsg-1d2d0770.js.map} +1 -1
  8. package/dist/cjs/{InternalUnderlinedBadgeText-c0b22e2d.js → InternalUnderlinedBadgeText-3eaff6b8.js} +1 -1
  9. package/dist/cjs/{InternalUnderlinedBadgeText-c0b22e2d.js.map → InternalUnderlinedBadgeText-3eaff6b8.js.map} +1 -1
  10. package/dist/cjs/{access-and-short-key-59c52d82.js → access-and-short-key-aac2937e.js} +1 -1
  11. package/dist/cjs/{access-and-short-key-59c52d82.js.map → access-and-short-key-aac2937e.js.map} +1 -1
  12. package/dist/cjs/{align-7f1af9f0.js → align-f8528b48.js} +1 -1
  13. package/dist/cjs/{align-7f1af9f0.js.map → align-f8528b48.js.map} +1 -1
  14. package/dist/cjs/app-globals-6da7f4b2.js +4 -0
  15. package/dist/cjs/{app-globals-26d718f3.js.map → app-globals-6da7f4b2.js.map} +1 -1
  16. package/dist/cjs/{aria-expanded-10006a18.js → aria-expanded-a51726cf.js} +1 -1
  17. package/dist/cjs/{aria-expanded-10006a18.js.map → aria-expanded-a51726cf.js.map} +1 -1
  18. package/dist/cjs/{associated.controller-77de53f0.js → associated.controller-83255c4a.js} +1 -1
  19. package/dist/cjs/{associated.controller-77de53f0.js.map → associated.controller-83255c4a.js.map} +1 -1
  20. package/dist/cjs/badge-text-a16fc31f.js +4 -0
  21. package/dist/cjs/{badge-text-57022467.js.map → badge-text-a16fc31f.js.map} +1 -1
  22. package/dist/cjs/{color-9b802560.js → color-a418f5a8.js} +1 -1
  23. package/dist/cjs/{color-9b802560.js.map → color-a418f5a8.js.map} +1 -1
  24. package/dist/cjs/{controller-ed980c36.js → controller-48e4c36c.js} +1 -1
  25. package/dist/cjs/{controller-ed980c36.js.map → controller-48e4c36c.js.map} +1 -1
  26. package/dist/cjs/{controller-c000e7ba.js → controller-5d4db72a.js} +1 -1
  27. package/dist/cjs/{controller-c000e7ba.js.map → controller-5d4db72a.js.map} +1 -1
  28. package/dist/cjs/{controller-27c421f2.js → controller-6128cf81.js} +1 -1
  29. package/dist/cjs/{controller-27c421f2.js.map → controller-6128cf81.js.map} +1 -1
  30. package/dist/cjs/{controller-8eca1130.js → controller-ce9d0cf2.js} +1 -1
  31. package/dist/cjs/{controller-8eca1130.js.map → controller-ce9d0cf2.js.map} +1 -1
  32. package/dist/cjs/{controller-2dc232aa.js → controller-fb1042c0.js} +1 -1
  33. package/dist/cjs/{controller-2dc232aa.js.map → controller-fb1042c0.js.map} +1 -1
  34. package/dist/cjs/{controller-icon-abaa43da.js → controller-icon-bd09c894.js} +1 -1
  35. package/dist/cjs/{controller-icon-abaa43da.js.map → controller-icon-bd09c894.js.map} +1 -1
  36. package/dist/cjs/custom-class-91f40a14.js +4 -0
  37. package/dist/cjs/{custom-class-c76ab076.js.map → custom-class-91f40a14.js.map} +1 -1
  38. package/dist/cjs/{dev.utils-af89ffeb.js → dev.utils-de21fdda.js} +1 -1
  39. package/dist/cjs/{dev.utils-af89ffeb.js.map → dev.utils-de21fdda.js.map} +1 -1
  40. package/dist/cjs/{devtools-461138b4.js → devtools-8541e55f.js} +1 -1
  41. package/dist/cjs/{devtools-461138b4.js.map → devtools-8541e55f.js.map} +1 -1
  42. package/dist/cjs/{disabled-622c5d44.js → disabled-28099fb9.js} +1 -1
  43. package/dist/cjs/{disabled-622c5d44.js.map → disabled-28099fb9.js.map} +1 -1
  44. package/dist/cjs/{events-8dfd45ee.js → events-04105678.js} +1 -1
  45. package/dist/cjs/{events-8dfd45ee.js.map → events-04105678.js.map} +1 -1
  46. package/dist/cjs/has-closer-202971cf.js +4 -0
  47. package/dist/cjs/{has-closer-3fd3eec9.js.map → has-closer-202971cf.js.map} +1 -1
  48. package/dist/cjs/has-counter-b05c47ed.js +4 -0
  49. package/dist/cjs/{has-counter-087c240e.js.map → has-counter-b05c47ed.js.map} +1 -1
  50. package/dist/cjs/hide-label-44221dbb.js +4 -0
  51. package/dist/cjs/{hide-label-79400d3a.js.map → hide-label-44221dbb.js.map} +1 -1
  52. package/dist/cjs/href-79ceaacb.js +4 -0
  53. package/dist/cjs/{href-b13ee308.js.map → href-79ceaacb.js.map} +1 -1
  54. package/dist/cjs/{icons-6c7438a8.js → icons-ff6ebf83.js} +1 -1
  55. package/dist/cjs/{icons-6c7438a8.js.map → icons-ff6ebf83.js.map} +1 -1
  56. package/dist/cjs/image-source-231d344b.js +4 -0
  57. package/dist/cjs/{image-source-c99a7661.js.map → image-source-231d344b.js.map} +1 -1
  58. package/dist/cjs/index-0cecacc3.js +4 -0
  59. package/dist/cjs/index-0cecacc3.js.map +1 -0
  60. package/dist/cjs/index-d67d2b82.js +4 -0
  61. package/dist/cjs/index-d67d2b82.js.map +1 -0
  62. package/dist/cjs/index.cjs.js +1 -1
  63. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  122. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  131. package/dist/cjs/kolibri.cjs.js +1 -1
  132. package/dist/cjs/{label-fe6579d9.js → label-4f366933.js} +1 -1
  133. package/dist/cjs/{label-fe6579d9.js.map → label-4f366933.js.map} +1 -1
  134. package/dist/cjs/loader.cjs.js +1 -1
  135. package/dist/cjs/open-23d9618a.js +4 -0
  136. package/dist/cjs/{open-a86a97fa.js.map → open-23d9618a.js.map} +1 -1
  137. package/dist/cjs/{prop.validators-976c1ac1.js → prop.validators-2610b418.js} +1 -1
  138. package/dist/cjs/{prop.validators-976c1ac1.js.map → prop.validators-2610b418.js.map} +1 -1
  139. package/dist/cjs/rows-4703e493.js +4 -0
  140. package/dist/cjs/{rows-b7a0c507.js.map → rows-4703e493.js.map} +1 -1
  141. package/dist/cjs/show-b4a06906.js +4 -0
  142. package/dist/cjs/{show-bf69e208.js.map → show-b4a06906.js.map} +1 -1
  143. package/dist/cjs/{suggestions-15c6bd6b.js → suggestions-02a44a8d.js} +1 -1
  144. package/dist/cjs/{suggestions-15c6bd6b.js.map → suggestions-02a44a8d.js.map} +1 -1
  145. package/dist/cjs/test-component.cjs.entry.js +1 -1
  146. package/dist/cjs/tooltip-align-1fdabbbf.js +4 -0
  147. package/dist/cjs/{tooltip-align-c4050c7a.js.map → tooltip-align-1fdabbbf.js.map} +1 -1
  148. package/dist/cjs/{validation-3f6b17d0.js → validation-06e75113.js} +1 -1
  149. package/dist/cjs/{validation-3f6b17d0.js.map → validation-06e75113.js.map} +1 -1
  150. package/dist/cjs/{validation-06b09cb5.js → validation-7cf1adc1.js} +1 -1
  151. package/dist/cjs/{validation-06b09cb5.js.map → validation-7cf1adc1.js.map} +1 -1
  152. package/dist/components/access-and-short-key.js +1 -1
  153. package/dist/components/aria-expanded.js +1 -1
  154. package/dist/components/associated.controller.js +1 -1
  155. package/dist/components/badge-text.js +1 -1
  156. package/dist/components/color.js +1 -1
  157. package/dist/components/controller.js +1 -1
  158. package/dist/components/controller2.js +1 -1
  159. package/dist/components/controller3.js +1 -1
  160. package/dist/components/controller5.js +1 -1
  161. package/dist/components/custom-class.js +1 -1
  162. package/dist/components/devtools.js +1 -1
  163. package/dist/components/disabled.js +1 -1
  164. package/dist/components/has-closer.js +1 -1
  165. package/dist/components/has-counter.js +1 -1
  166. package/dist/components/hide-label.js +1 -1
  167. package/dist/components/href.js +1 -1
  168. package/dist/components/image-source.js +1 -1
  169. package/dist/components/index.js +1 -1
  170. package/dist/components/kol-alert-wc.js +1 -1
  171. package/dist/components/kol-breadcrumb.js +1 -1
  172. package/dist/components/kol-button-wc.js +1 -1
  173. package/dist/components/kol-combobox.js +1 -1
  174. package/dist/components/kol-drawer.js +1 -1
  175. package/dist/components/kol-form.js +1 -1
  176. package/dist/components/kol-heading-wc.js +1 -1
  177. package/dist/components/kol-icon.js +1 -1
  178. package/dist/components/kol-image.js +1 -1
  179. package/dist/components/kol-input-checkbox.js +1 -1
  180. package/dist/components/kol-input-color.js +1 -1
  181. package/dist/components/kol-input-date.js +1 -1
  182. package/dist/components/kol-input-email.js +1 -1
  183. package/dist/components/kol-input-file.js +1 -1
  184. package/dist/components/kol-input-number.js +1 -1
  185. package/dist/components/kol-input-text.js +1 -1
  186. package/dist/components/kol-kolibri.js +1 -1
  187. package/dist/components/kol-link-wc.js +1 -1
  188. package/dist/components/kol-modal.js +1 -1
  189. package/dist/components/kol-nav.js +1 -1
  190. package/dist/components/kol-progress.js +1 -1
  191. package/dist/components/kol-quote.js +1 -1
  192. package/dist/components/kol-select.js +1 -1
  193. package/dist/components/kol-single-select.js +1 -1
  194. package/dist/components/kol-span-wc.js +1 -1
  195. package/dist/components/kol-symbol.js +1 -1
  196. package/dist/components/kol-table-stateful.js +1 -1
  197. package/dist/components/kol-table-stateless-wc.js +1 -1
  198. package/dist/components/kol-textarea.js +1 -1
  199. package/dist/components/kol-tooltip-wc.js +1 -1
  200. package/dist/components/kol-tree-item-wc.js +1 -1
  201. package/dist/components/open.js +1 -1
  202. package/dist/components/prop.validators.js +1 -1
  203. package/dist/components/prop.validators.js.map +1 -1
  204. package/dist/components/show.js +1 -1
  205. package/dist/esm/{Alert-5662dc3c.js → Alert-ae70cda5.js} +1 -1
  206. package/dist/esm/{Alert-5662dc3c.js.map → Alert-ae70cda5.js.map} +1 -1
  207. package/dist/esm/{Collapsible-e08d6f52.js → Collapsible-88c7f8bb.js} +1 -1
  208. package/dist/esm/{Collapsible-e08d6f52.js.map → Collapsible-88c7f8bb.js.map} +1 -1
  209. package/dist/esm/{FormFieldMsg-3f74273a.js → FormFieldMsg-ddd16a10.js} +1 -1
  210. package/dist/esm/{FormFieldMsg-3f74273a.js.map → FormFieldMsg-ddd16a10.js.map} +1 -1
  211. package/dist/esm/{InternalUnderlinedBadgeText-bccc22ee.js → InternalUnderlinedBadgeText-a4a7abf2.js} +1 -1
  212. package/dist/esm/{InternalUnderlinedBadgeText-bccc22ee.js.map → InternalUnderlinedBadgeText-a4a7abf2.js.map} +1 -1
  213. package/dist/esm/{access-and-short-key-152ce1ef.js → access-and-short-key-9ec48625.js} +1 -1
  214. package/dist/esm/{access-and-short-key-152ce1ef.js.map → access-and-short-key-9ec48625.js.map} +1 -1
  215. package/dist/esm/{align-9ab97987.js → align-ae4737f4.js} +1 -1
  216. package/dist/esm/{align-9ab97987.js.map → align-ae4737f4.js.map} +1 -1
  217. package/dist/esm/app-globals-7ec4e073.js +4 -0
  218. package/dist/esm/{app-globals-d228e5bf.js.map → app-globals-7ec4e073.js.map} +1 -1
  219. package/dist/esm/{aria-expanded-8e67b300.js → aria-expanded-39ad73b1.js} +1 -1
  220. package/dist/esm/{aria-expanded-8e67b300.js.map → aria-expanded-39ad73b1.js.map} +1 -1
  221. package/dist/esm/{associated.controller-1037cac7.js → associated.controller-a936d50e.js} +1 -1
  222. package/dist/esm/{associated.controller-1037cac7.js.map → associated.controller-a936d50e.js.map} +1 -1
  223. package/dist/esm/{badge-text-96a139c4.js → badge-text-2cb46664.js} +1 -1
  224. package/dist/esm/{badge-text-96a139c4.js.map → badge-text-2cb46664.js.map} +1 -1
  225. package/dist/esm/{color-1f72e388.js → color-cc960eba.js} +1 -1
  226. package/dist/esm/{color-1f72e388.js.map → color-cc960eba.js.map} +1 -1
  227. package/dist/esm/{controller-f13259ef.js → controller-7d074c89.js} +1 -1
  228. package/dist/esm/{controller-f13259ef.js.map → controller-7d074c89.js.map} +1 -1
  229. package/dist/esm/{controller-4e654fd8.js → controller-886720ab.js} +1 -1
  230. package/dist/esm/{controller-4e654fd8.js.map → controller-886720ab.js.map} +1 -1
  231. package/dist/esm/{controller-d9e11e4b.js → controller-c4e9f5c7.js} +1 -1
  232. package/dist/esm/{controller-d9e11e4b.js.map → controller-c4e9f5c7.js.map} +1 -1
  233. package/dist/esm/{controller-49695b25.js → controller-e5312c47.js} +1 -1
  234. package/dist/esm/{controller-49695b25.js.map → controller-e5312c47.js.map} +1 -1
  235. package/dist/esm/{controller-bd9a7a74.js → controller-e8656fb7.js} +1 -1
  236. package/dist/esm/{controller-bd9a7a74.js.map → controller-e8656fb7.js.map} +1 -1
  237. package/dist/esm/{controller-icon-ce179ccc.js → controller-icon-9462c444.js} +1 -1
  238. package/dist/esm/{controller-icon-ce179ccc.js.map → controller-icon-9462c444.js.map} +1 -1
  239. package/dist/esm/custom-class-335c45c9.js +4 -0
  240. package/dist/esm/{custom-class-b0ea92e7.js.map → custom-class-335c45c9.js.map} +1 -1
  241. package/dist/esm/{dev.utils-a25f785b.js → dev.utils-4b58b6b1.js} +1 -1
  242. package/dist/esm/{dev.utils-a25f785b.js.map → dev.utils-4b58b6b1.js.map} +1 -1
  243. package/dist/esm/{devtools-dfd69ac6.js → devtools-cf124f7a.js} +1 -1
  244. package/dist/esm/{devtools-dfd69ac6.js.map → devtools-cf124f7a.js.map} +1 -1
  245. package/dist/esm/{disabled-f3f40b67.js → disabled-c478f3c1.js} +1 -1
  246. package/dist/esm/{disabled-f3f40b67.js.map → disabled-c478f3c1.js.map} +1 -1
  247. package/dist/esm/{events-8fd2302d.js → events-cf068a0f.js} +1 -1
  248. package/dist/esm/{events-8fd2302d.js.map → events-cf068a0f.js.map} +1 -1
  249. package/dist/esm/{has-closer-935eb7bd.js → has-closer-85fb3033.js} +1 -1
  250. package/dist/esm/{has-closer-935eb7bd.js.map → has-closer-85fb3033.js.map} +1 -1
  251. package/dist/esm/{has-counter-157bd536.js → has-counter-78647db8.js} +1 -1
  252. package/dist/esm/{has-counter-157bd536.js.map → has-counter-78647db8.js.map} +1 -1
  253. package/dist/esm/{hide-label-b2ccddd2.js → hide-label-b5e3ed1a.js} +1 -1
  254. package/dist/esm/{hide-label-b2ccddd2.js.map → hide-label-b5e3ed1a.js.map} +1 -1
  255. package/dist/esm/{href-271410a7.js → href-c2c70612.js} +1 -1
  256. package/dist/esm/{href-271410a7.js.map → href-c2c70612.js.map} +1 -1
  257. package/dist/esm/{icons-d0a00e6e.js → icons-6a56bde9.js} +1 -1
  258. package/dist/esm/{icons-d0a00e6e.js.map → icons-6a56bde9.js.map} +1 -1
  259. package/dist/esm/{image-source-0d09b7c3.js → image-source-d2fcb054.js} +1 -1
  260. package/dist/esm/{image-source-0d09b7c3.js.map → image-source-d2fcb054.js.map} +1 -1
  261. package/dist/esm/index-31b91a7e.js +4 -0
  262. package/dist/esm/index-31b91a7e.js.map +1 -0
  263. package/dist/esm/index-aa4b49bc.js +4 -0
  264. package/dist/esm/index-aa4b49bc.js.map +1 -0
  265. package/dist/esm/index.js +1 -1
  266. package/dist/esm/kol-abbr.entry.js +1 -1
  267. package/dist/esm/kol-accordion.entry.js +1 -1
  268. package/dist/esm/kol-alert-wc.entry.js +1 -1
  269. package/dist/esm/kol-alert.entry.js +1 -1
  270. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  271. package/dist/esm/kol-avatar.entry.js +1 -1
  272. package/dist/esm/kol-badge.entry.js +1 -1
  273. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  274. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  275. package/dist/esm/kol-button-group.entry.js +1 -1
  276. package/dist/esm/kol-button-link.entry.js +1 -1
  277. package/dist/esm/kol-button-wc.entry.js +1 -1
  278. package/dist/esm/kol-button.entry.js +1 -1
  279. package/dist/esm/kol-card.entry.js +1 -1
  280. package/dist/esm/kol-combobox.entry.js +1 -1
  281. package/dist/esm/kol-details.entry.js +1 -1
  282. package/dist/esm/kol-drawer.entry.js +1 -1
  283. package/dist/esm/kol-form.entry.js +1 -1
  284. package/dist/esm/kol-heading-wc.entry.js +1 -1
  285. package/dist/esm/kol-heading.entry.js +1 -1
  286. package/dist/esm/kol-icon.entry.js +1 -1
  287. package/dist/esm/kol-image.entry.js +1 -1
  288. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  289. package/dist/esm/kol-indented-text.entry.js +1 -1
  290. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  291. package/dist/esm/kol-input-color.entry.js +1 -1
  292. package/dist/esm/kol-input-date.entry.js +1 -1
  293. package/dist/esm/kol-input-email.entry.js +1 -1
  294. package/dist/esm/kol-input-file.entry.js +1 -1
  295. package/dist/esm/kol-input-number.entry.js +1 -1
  296. package/dist/esm/kol-input-password.entry.js +1 -1
  297. package/dist/esm/kol-input-radio.entry.js +1 -1
  298. package/dist/esm/kol-input-range.entry.js +1 -1
  299. package/dist/esm/kol-input-text.entry.js +1 -1
  300. package/dist/esm/kol-input.entry.js +1 -1
  301. package/dist/esm/kol-kolibri.entry.js +1 -1
  302. package/dist/esm/kol-link-button.entry.js +1 -1
  303. package/dist/esm/kol-link-group.entry.js +1 -1
  304. package/dist/esm/kol-link-wc.entry.js +1 -1
  305. package/dist/esm/kol-link.entry.js +1 -1
  306. package/dist/esm/kol-logo.entry.js +1 -1
  307. package/dist/esm/kol-modal.entry.js +1 -1
  308. package/dist/esm/kol-nav.entry.js +1 -1
  309. package/dist/esm/kol-pagination.entry.js +1 -1
  310. package/dist/esm/kol-popover-wc.entry.js +1 -1
  311. package/dist/esm/kol-progress.entry.js +1 -1
  312. package/dist/esm/kol-quote.entry.js +1 -1
  313. package/dist/esm/kol-select.entry.js +1 -1
  314. package/dist/esm/kol-single-select.entry.js +1 -1
  315. package/dist/esm/kol-skip-nav.entry.js +1 -1
  316. package/dist/esm/kol-span-wc.entry.js +1 -1
  317. package/dist/esm/kol-spin.entry.js +1 -1
  318. package/dist/esm/kol-split-button.entry.js +1 -1
  319. package/dist/esm/kol-symbol.entry.js +1 -1
  320. package/dist/esm/kol-table-stateful.entry.js +1 -1
  321. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  322. package/dist/esm/kol-table-stateless.entry.js +1 -1
  323. package/dist/esm/kol-table.entry.js +1 -1
  324. package/dist/esm/kol-tabs.entry.js +1 -1
  325. package/dist/esm/kol-textarea.entry.js +1 -1
  326. package/dist/esm/kol-toast-container.entry.js +1 -1
  327. package/dist/esm/kol-toolbar.entry.js +1 -1
  328. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  329. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  330. package/dist/esm/kol-tree-item.entry.js +1 -1
  331. package/dist/esm/kol-tree-wc.entry.js +1 -1
  332. package/dist/esm/kol-tree.entry.js +1 -1
  333. package/dist/esm/kol-version.entry.js +1 -1
  334. package/dist/esm/kolibri.js +1 -1
  335. package/dist/esm/{label-ec7596fe.js → label-a64b6a7b.js} +1 -1
  336. package/dist/esm/{label-ec7596fe.js.map → label-a64b6a7b.js.map} +1 -1
  337. package/dist/esm/loader.js +1 -1
  338. package/dist/esm/{open-9bcc0f8e.js → open-77de65a3.js} +1 -1
  339. package/dist/esm/{open-9bcc0f8e.js.map → open-77de65a3.js.map} +1 -1
  340. package/dist/esm/{prop.validators-447b6d6f.js → prop.validators-a86a90ab.js} +1 -1
  341. package/dist/esm/{prop.validators-447b6d6f.js.map → prop.validators-a86a90ab.js.map} +1 -1
  342. package/dist/esm/{rows-aef46735.js → rows-7f43888b.js} +1 -1
  343. package/dist/esm/{rows-aef46735.js.map → rows-7f43888b.js.map} +1 -1
  344. package/dist/esm/show-d4099988.js +4 -0
  345. package/dist/esm/{show-13b0f17e.js.map → show-d4099988.js.map} +1 -1
  346. package/dist/esm/{suggestions-7c4f1360.js → suggestions-4dab1555.js} +1 -1
  347. package/dist/esm/{suggestions-7c4f1360.js.map → suggestions-4dab1555.js.map} +1 -1
  348. package/dist/esm/test-component.entry.js +1 -1
  349. package/dist/esm/{tooltip-align-0e8c7391.js → tooltip-align-9dbf1d89.js} +1 -1
  350. package/dist/esm/{tooltip-align-0e8c7391.js.map → tooltip-align-9dbf1d89.js.map} +1 -1
  351. package/dist/esm/{validation-e42ea805.js → validation-450e1895.js} +1 -1
  352. package/dist/esm/{validation-e42ea805.js.map → validation-450e1895.js.map} +1 -1
  353. package/dist/esm/{validation-f3f82897.js → validation-56a3d825.js} +1 -1
  354. package/dist/esm/{validation-f3f82897.js.map → validation-56a3d825.js.map} +1 -1
  355. package/dist/kolibri/{Alert-5662dc3c.js → Alert-ae70cda5.js} +1 -1
  356. package/dist/kolibri/Collapsible-88c7f8bb.js +4 -0
  357. package/dist/kolibri/FormFieldMsg-ddd16a10.js +4 -0
  358. package/dist/kolibri/InternalUnderlinedBadgeText-a4a7abf2.js +4 -0
  359. package/dist/kolibri/{access-and-short-key-152ce1ef.js → access-and-short-key-9ec48625.js} +1 -1
  360. package/dist/kolibri/align-ae4737f4.js +4 -0
  361. package/dist/kolibri/app-globals-7ec4e073.js +4 -0
  362. package/dist/kolibri/{app-globals-d228e5bf.js.map → app-globals-7ec4e073.js.map} +1 -1
  363. package/dist/kolibri/aria-expanded-39ad73b1.js +4 -0
  364. package/dist/kolibri/{associated.controller-1037cac7.js → associated.controller-a936d50e.js} +1 -1
  365. package/dist/kolibri/badge-text-2cb46664.js +4 -0
  366. package/dist/kolibri/{color-1f72e388.js → color-cc960eba.js} +1 -1
  367. package/dist/kolibri/controller-7d074c89.js +4 -0
  368. package/dist/kolibri/{controller-4e654fd8.js → controller-886720ab.js} +1 -1
  369. package/dist/kolibri/{controller-d9e11e4b.js → controller-c4e9f5c7.js} +1 -1
  370. package/dist/kolibri/{controller-49695b25.js → controller-e5312c47.js} +1 -1
  371. package/dist/kolibri/{controller-bd9a7a74.js → controller-e8656fb7.js} +1 -1
  372. package/dist/kolibri/controller-icon-9462c444.js +4 -0
  373. package/dist/kolibri/custom-class-335c45c9.js +4 -0
  374. package/dist/kolibri/{dev.utils-a25f785b.js → dev.utils-4b58b6b1.js} +1 -1
  375. package/dist/kolibri/devtools-cf124f7a.js +4 -0
  376. package/dist/kolibri/{disabled-f3f40b67.js → disabled-c478f3c1.js} +1 -1
  377. package/dist/kolibri/events-cf068a0f.js +4 -0
  378. package/dist/kolibri/{events-8fd2302d.js.map → events-cf068a0f.js.map} +1 -1
  379. package/dist/kolibri/has-closer-85fb3033.js +4 -0
  380. package/dist/kolibri/has-counter-78647db8.js +4 -0
  381. package/dist/kolibri/hide-label-b5e3ed1a.js +4 -0
  382. package/dist/kolibri/href-c2c70612.js +4 -0
  383. package/dist/kolibri/{icons-d0a00e6e.js → icons-6a56bde9.js} +1 -1
  384. package/dist/kolibri/image-source-d2fcb054.js +4 -0
  385. package/dist/kolibri/index-31b91a7e.js +4 -0
  386. package/dist/kolibri/index-31b91a7e.js.map +1 -0
  387. package/dist/kolibri/{index-4e3a1dc7.js → index-aa4b49bc.js} +2 -2
  388. package/dist/kolibri/index-aa4b49bc.js.map +1 -0
  389. package/dist/kolibri/index.esm.js +1 -1
  390. package/dist/kolibri/kol-abbr.entry.js +1 -1
  391. package/dist/kolibri/kol-accordion.entry.js +1 -1
  392. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  393. package/dist/kolibri/kol-alert.entry.js +1 -1
  394. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  395. package/dist/kolibri/kol-avatar.entry.js +1 -1
  396. package/dist/kolibri/kol-badge.entry.js +1 -1
  397. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  398. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  399. package/dist/kolibri/kol-button-group.entry.js +1 -1
  400. package/dist/kolibri/kol-button-link.entry.js +1 -1
  401. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  402. package/dist/kolibri/kol-button.entry.js +1 -1
  403. package/dist/kolibri/kol-card.entry.js +1 -1
  404. package/dist/kolibri/kol-combobox.entry.js +1 -1
  405. package/dist/kolibri/kol-details.entry.js +1 -1
  406. package/dist/kolibri/kol-drawer.entry.js +1 -1
  407. package/dist/kolibri/kol-form.entry.js +1 -1
  408. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  409. package/dist/kolibri/kol-heading.entry.js +1 -1
  410. package/dist/kolibri/kol-icon.entry.js +1 -1
  411. package/dist/kolibri/kol-image.entry.js +1 -1
  412. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  413. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  414. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  415. package/dist/kolibri/kol-input-color.entry.js +1 -1
  416. package/dist/kolibri/kol-input-date.entry.js +1 -1
  417. package/dist/kolibri/kol-input-email.entry.js +1 -1
  418. package/dist/kolibri/kol-input-file.entry.js +1 -1
  419. package/dist/kolibri/kol-input-number.entry.js +1 -1
  420. package/dist/kolibri/kol-input-password.entry.js +1 -1
  421. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  422. package/dist/kolibri/kol-input-range.entry.js +1 -1
  423. package/dist/kolibri/kol-input-text.entry.js +1 -1
  424. package/dist/kolibri/kol-input.entry.js +1 -1
  425. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  426. package/dist/kolibri/kol-link-button.entry.js +1 -1
  427. package/dist/kolibri/kol-link-group.entry.js +1 -1
  428. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  429. package/dist/kolibri/kol-link.entry.js +1 -1
  430. package/dist/kolibri/kol-logo.entry.js +1 -1
  431. package/dist/kolibri/kol-modal.entry.js +1 -1
  432. package/dist/kolibri/kol-nav.entry.js +1 -1
  433. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  434. package/dist/kolibri/kol-pagination.entry.js +1 -1
  435. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  436. package/dist/kolibri/kol-progress.entry.js +1 -1
  437. package/dist/kolibri/kol-quote.entry.js +1 -1
  438. package/dist/kolibri/kol-select.entry.js +1 -1
  439. package/dist/kolibri/kol-single-select.entry.js +1 -1
  440. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  441. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  442. package/dist/kolibri/kol-spin.entry.js +1 -1
  443. package/dist/kolibri/kol-split-button.entry.js +1 -1
  444. package/dist/kolibri/kol-symbol.entry.js +1 -1
  445. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  446. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  447. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  448. package/dist/kolibri/kol-table.entry.js +1 -1
  449. package/dist/kolibri/kol-tabs.entry.js +1 -1
  450. package/dist/kolibri/kol-textarea.entry.js +1 -1
  451. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  452. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  453. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  454. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  455. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  456. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  457. package/dist/kolibri/kol-tree.entry.js +1 -1
  458. package/dist/kolibri/kol-version.entry.js +1 -1
  459. package/dist/kolibri/kolibri.esm.js +1 -1
  460. package/dist/kolibri/{label-ec7596fe.js → label-a64b6a7b.js} +1 -1
  461. package/dist/kolibri/open-77de65a3.js +4 -0
  462. package/dist/kolibri/{prop.validators-447b6d6f.js → prop.validators-a86a90ab.js} +1 -1
  463. package/dist/kolibri/rows-7f43888b.js +4 -0
  464. package/dist/kolibri/show-d4099988.js +4 -0
  465. package/dist/kolibri/{suggestions-7c4f1360.js → suggestions-4dab1555.js} +1 -1
  466. package/dist/kolibri/test-component.entry.js +1 -1
  467. package/dist/kolibri/tooltip-align-9dbf1d89.js +4 -0
  468. package/dist/kolibri/validation-450e1895.js +4 -0
  469. package/dist/kolibri/validation-56a3d825.js +4 -0
  470. package/dist/types/schema/utils/prop.validators.d.ts +1 -1
  471. package/package.json +2 -2
  472. package/dist/cjs/FormFieldMsg-d80dcd4f.js +0 -4
  473. package/dist/cjs/app-globals-26d718f3.js +0 -4
  474. package/dist/cjs/badge-text-57022467.js +0 -4
  475. package/dist/cjs/custom-class-c76ab076.js +0 -4
  476. package/dist/cjs/has-closer-3fd3eec9.js +0 -4
  477. package/dist/cjs/has-counter-087c240e.js +0 -4
  478. package/dist/cjs/hide-label-79400d3a.js +0 -4
  479. package/dist/cjs/href-b13ee308.js +0 -4
  480. package/dist/cjs/image-source-c99a7661.js +0 -4
  481. package/dist/cjs/index-42c7434d.js +0 -4
  482. package/dist/cjs/index-42c7434d.js.map +0 -1
  483. package/dist/cjs/index-431b4ae3.js +0 -4
  484. package/dist/cjs/index-431b4ae3.js.map +0 -1
  485. package/dist/cjs/open-a86a97fa.js +0 -4
  486. package/dist/cjs/rows-b7a0c507.js +0 -4
  487. package/dist/cjs/show-bf69e208.js +0 -4
  488. package/dist/cjs/tooltip-align-c4050c7a.js +0 -4
  489. package/dist/esm/app-globals-d228e5bf.js +0 -4
  490. package/dist/esm/custom-class-b0ea92e7.js +0 -4
  491. package/dist/esm/index-4e3a1dc7.js +0 -4
  492. package/dist/esm/index-4e3a1dc7.js.map +0 -1
  493. package/dist/esm/index-b8f228e7.js +0 -4
  494. package/dist/esm/index-b8f228e7.js.map +0 -1
  495. package/dist/esm/show-13b0f17e.js +0 -4
  496. package/dist/kolibri/Collapsible-e08d6f52.js +0 -4
  497. package/dist/kolibri/FormFieldMsg-3f74273a.js +0 -4
  498. package/dist/kolibri/InternalUnderlinedBadgeText-bccc22ee.js +0 -4
  499. package/dist/kolibri/align-9ab97987.js +0 -4
  500. package/dist/kolibri/app-globals-d228e5bf.js +0 -4
  501. package/dist/kolibri/aria-expanded-8e67b300.js +0 -4
  502. package/dist/kolibri/badge-text-96a139c4.js +0 -4
  503. package/dist/kolibri/controller-f13259ef.js +0 -4
  504. package/dist/kolibri/controller-icon-ce179ccc.js +0 -4
  505. package/dist/kolibri/custom-class-b0ea92e7.js +0 -4
  506. package/dist/kolibri/devtools-dfd69ac6.js +0 -4
  507. package/dist/kolibri/events-8fd2302d.js +0 -4
  508. package/dist/kolibri/has-closer-935eb7bd.js +0 -4
  509. package/dist/kolibri/has-counter-157bd536.js +0 -4
  510. package/dist/kolibri/hide-label-b2ccddd2.js +0 -4
  511. package/dist/kolibri/href-271410a7.js +0 -4
  512. package/dist/kolibri/image-source-0d09b7c3.js +0 -4
  513. package/dist/kolibri/index-4e3a1dc7.js.map +0 -1
  514. package/dist/kolibri/index-b8f228e7.js +0 -4
  515. package/dist/kolibri/index-b8f228e7.js.map +0 -1
  516. package/dist/kolibri/open-9bcc0f8e.js +0 -4
  517. package/dist/kolibri/rows-aef46735.js +0 -4
  518. package/dist/kolibri/show-13b0f17e.js +0 -4
  519. package/dist/kolibri/tooltip-align-0e8c7391.js +0 -4
  520. package/dist/kolibri/validation-e42ea805.js +0 -4
  521. package/dist/kolibri/validation-f3f82897.js +0 -4
  522. /package/dist/kolibri/{Alert-5662dc3c.js.map → Alert-ae70cda5.js.map} +0 -0
  523. /package/dist/kolibri/{Collapsible-e08d6f52.js.map → Collapsible-88c7f8bb.js.map} +0 -0
  524. /package/dist/kolibri/{FormFieldMsg-3f74273a.js.map → FormFieldMsg-ddd16a10.js.map} +0 -0
  525. /package/dist/kolibri/{InternalUnderlinedBadgeText-bccc22ee.js.map → InternalUnderlinedBadgeText-a4a7abf2.js.map} +0 -0
  526. /package/dist/kolibri/{access-and-short-key-152ce1ef.js.map → access-and-short-key-9ec48625.js.map} +0 -0
  527. /package/dist/kolibri/{align-9ab97987.js.map → align-ae4737f4.js.map} +0 -0
  528. /package/dist/kolibri/{aria-expanded-8e67b300.js.map → aria-expanded-39ad73b1.js.map} +0 -0
  529. /package/dist/kolibri/{associated.controller-1037cac7.js.map → associated.controller-a936d50e.js.map} +0 -0
  530. /package/dist/kolibri/{badge-text-96a139c4.js.map → badge-text-2cb46664.js.map} +0 -0
  531. /package/dist/kolibri/{color-1f72e388.js.map → color-cc960eba.js.map} +0 -0
  532. /package/dist/kolibri/{controller-f13259ef.js.map → controller-7d074c89.js.map} +0 -0
  533. /package/dist/kolibri/{controller-4e654fd8.js.map → controller-886720ab.js.map} +0 -0
  534. /package/dist/kolibri/{controller-d9e11e4b.js.map → controller-c4e9f5c7.js.map} +0 -0
  535. /package/dist/kolibri/{controller-49695b25.js.map → controller-e5312c47.js.map} +0 -0
  536. /package/dist/kolibri/{controller-bd9a7a74.js.map → controller-e8656fb7.js.map} +0 -0
  537. /package/dist/kolibri/{controller-icon-ce179ccc.js.map → controller-icon-9462c444.js.map} +0 -0
  538. /package/dist/kolibri/{custom-class-b0ea92e7.js.map → custom-class-335c45c9.js.map} +0 -0
  539. /package/dist/kolibri/{dev.utils-a25f785b.js.map → dev.utils-4b58b6b1.js.map} +0 -0
  540. /package/dist/kolibri/{devtools-dfd69ac6.js.map → devtools-cf124f7a.js.map} +0 -0
  541. /package/dist/kolibri/{disabled-f3f40b67.js.map → disabled-c478f3c1.js.map} +0 -0
  542. /package/dist/kolibri/{has-closer-935eb7bd.js.map → has-closer-85fb3033.js.map} +0 -0
  543. /package/dist/kolibri/{has-counter-157bd536.js.map → has-counter-78647db8.js.map} +0 -0
  544. /package/dist/kolibri/{hide-label-b2ccddd2.js.map → hide-label-b5e3ed1a.js.map} +0 -0
  545. /package/dist/kolibri/{href-271410a7.js.map → href-c2c70612.js.map} +0 -0
  546. /package/dist/kolibri/{icons-d0a00e6e.js.map → icons-6a56bde9.js.map} +0 -0
  547. /package/dist/kolibri/{image-source-0d09b7c3.js.map → image-source-d2fcb054.js.map} +0 -0
  548. /package/dist/kolibri/{label-ec7596fe.js.map → label-a64b6a7b.js.map} +0 -0
  549. /package/dist/kolibri/{open-9bcc0f8e.js.map → open-77de65a3.js.map} +0 -0
  550. /package/dist/kolibri/{prop.validators-447b6d6f.js.map → prop.validators-a86a90ab.js.map} +0 -0
  551. /package/dist/kolibri/{rows-aef46735.js.map → rows-7f43888b.js.map} +0 -0
  552. /package/dist/kolibri/{show-13b0f17e.js.map → show-d4099988.js.map} +0 -0
  553. /package/dist/kolibri/{suggestions-7c4f1360.js.map → suggestions-4dab1555.js.map} +0 -0
  554. /package/dist/kolibri/{tooltip-align-0e8c7391.js.map → tooltip-align-9dbf1d89.js.map} +0 -0
  555. /package/dist/kolibri/{validation-e42ea805.js.map → validation-450e1895.js.map} +0 -0
  556. /package/dist/kolibri/{validation-f3f82897.js.map → validation-56a3d825.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{v as validateLabel}from"./label.js";import{e as watchString}from"./prop.validators.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._label=void 0,this._symbol=void 0,this.state={_label:translate("kol-warning"),_symbol:""}}render(){return h(Host,{key:"03e79e5b3febba7499eab1720069848ec93ddedd",class:"kol-symbol"},h("span",{key:"6f9b348aaa68f84132726e9bbc811a57c2c25a55","aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(e){validateLabel(this,e,{required:!0})}validateSymbol(e){watchString(this,"_symbol",e,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_label:[1],_symbol:[1],state:[32]},void 0,{_label:["validateLabel"],_symbol:["validateSymbol"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((e=>{if("kol-symbol"===e)customElements.get(e)||customElements.define(e,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{v as validateLabel}from"./label.js";import{d as watchString}from"./prop.validators.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._label=void 0,this._symbol=void 0,this.state={_label:translate("kol-warning"),_symbol:""}}render(){return h(Host,{key:"03e79e5b3febba7499eab1720069848ec93ddedd",class:"kol-symbol"},h("span",{key:"6f9b348aaa68f84132726e9bbc811a57c2c25a55","aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(e){validateLabel(this,e,{required:!0})}validateSymbol(e){watchString(this,"_symbol",e,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_label:[1],_symbol:[1],state:[32]},void 0,{_label:["validateLabel"],_symbol:["validateSymbol"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((e=>{if("kol-symbol"===e)customElements.get(e)||customElements.define(e,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{r as KolPaginationTag,t as KolTableStatelessWcTag}from"./component-names.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,b as validateTableSelection,c as validateTableStatefulCallbacks,E as Events}from"./events2.js";import{w as watchValidator,s as setState,A as emptyStringByArrayHandler,e as watchString,p as parseJson,o as objectObjectHandler,t as devHint}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(t,e)=>{watchValidator(t,"_paginationPosition",(t=>"string"==typeof t&&paginationPositionPropTypeOptions.includes(t)),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),e,{defaultValue:"bottom"})},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\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 * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 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}\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatefulDefaultStyle0=defaultStyleCss,PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=t=>!0===t||""===t||"object"==typeof t&&null!==t,KolTableStateful$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.tableWcRef=t},this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const i=this.sortData[n],a=i.compareFn(t,e);if(0!==a)return"ASC"===i.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}setState(this,"_sortedData",e)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){validateTableData(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){validateTableDataFoot(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){validatePaginationPosition(this,t)}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,i,a;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:i}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,i),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:i})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(i=s.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){validateLabel(this,t,{required:!0})}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){validateTableSelection(this,t)}validateOn(t){validateTableStatefulCallbacks(this,t)}validatePagination(t){try{t=parseJson(t)}catch(t){}this.showPagination=paginationValidator(t),watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener("kol-selection-change",this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener("kol-selection-change",this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateOn(this._on)}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return h("div",{class:"pagination"},h("span",null,translate("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),h("div",null,h(KolPaginationTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;const n=this.state._selection;if(n){const i=null!==(e=n.keyPropertyName)&&void 0!==e?e:"id",a=this.state._sortedData.filter((e=>t.includes(e[i])));if(!1===(null==n?void 0:n.multiple))return a[0];if(i)return a}return null}handleSelectionChange(t,e){var n;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof e?e:[e]})}));const a=this.getSelectedData(e);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](t,a)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,n,i;const a=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,s="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,l={horizontal:null===(n=this.state._headers.horizontal)||void 0===n?void 0:n.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(i=this.state._headers.vertical)||void 0===i?void 0:i.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return h(Host,{key:"b1d2e0679c35089d9d648174ac72de0f2a6349f8",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&o,h(KolTableStatelessWcTag,{key:"bd022abcb18d07cc26bebb98ccfcd7e96fb90da7",ref:this.catchRef,_data:a,_headerCells:l,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return this}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}static get style(){return{default:KolTableStatefulDefaultStyle0}}},[33,"kol-table-stateful",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16],state:[32],getSelection:[64]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateful"].forEach((t=>{if("kol-table-stateful"===t)customElements.get(t)||customElements.define(t,KolTableStateful$1)}))}const KolTableStateful=KolTableStateful$1,defineCustomElement=defineCustomElement$1;export{KolTableStateful,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{r as KolPaginationTag,t as KolTableStatelessWcTag}from"./component-names.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{v as validateTableData,a as validateTableDataFoot,b as validateTableSelection,c as validateTableStatefulCallbacks,E as Events}from"./events2.js";import{w as watchValidator,s as setState,A as emptyStringByArrayHandler,d as watchString,p as parseJson,o as objectObjectHandler,t as devHint}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const paginationPositionPropTypeOptions=["top","bottom","both"],validatePaginationPosition=(t,e)=>{watchValidator(t,"_paginationPosition",(t=>"string"==typeof t&&paginationPositionPropTypeOptions.includes(t)),new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),e,{defaultValue:"bottom"})},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\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 * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 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}\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStatefulDefaultStyle0=defaultStyleCss,PAGINATION_OPTIONS=[10,20,50,100],paginationValidator=t=>!0===t||""===t||"object"==typeof t&&null!==t,KolTableStateful$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.tableWcRef=t},this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const i=this.sortData[n],a=i.compareFn(t,e);if(0!==a)return"ASC"===i.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}setState(this,"_sortedData",e)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){validateTableData(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){validateTableDataFoot(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){validatePaginationPosition(this,t)}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,i,a;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:i}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,i),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:i})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(i=s.horizontal)||void 0===i?void 0:i.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){validateLabel(this,t,{required:!0})}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){validateTableSelection(this,t)}validateOn(t){validateTableStatefulCallbacks(this,t)}validatePagination(t){try{t=parseJson(t)}catch(t){}this.showPagination=paginationValidator(t),watchValidator(this,"_pagination",paginationValidator,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener("kol-selection-change",this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener("kol-selection-change",this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateOn(this._on)}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return h("div",{class:"pagination"},h("span",null,translate("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),h("div",null,h(KolPaginationTag,{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;const n=this.state._selection;if(n){const i=null!==(e=n.keyPropertyName)&&void 0!==e?e:"id",a=this.state._sortedData.filter((e=>t.includes(e[i])));if(!1===(null==n?void 0:n.multiple))return a[0];if(i)return a}return null}handleSelectionChange(t,e){var n;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof e?e:[e]})}));const a=this.getSelectedData(e);tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(n=this.state._on)||void 0===n?void 0:n[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](t,a)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,n,i;const a=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,s="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,l={horizontal:null===(n=this.state._headers.horizontal)||void 0===n?void 0:n.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(i=this.state._headers.vertical)||void 0===i?void 0:i.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return h(Host,{key:"b1d2e0679c35089d9d648174ac72de0f2a6349f8",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&o,h(KolTableStatelessWcTag,{key:"bd022abcb18d07cc26bebb98ccfcd7e96fb90da7",ref:this.catchRef,_data:a,_headerCells:l,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&s)}get host(){return this}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}static get style(){return{default:KolTableStatefulDefaultStyle0}}},[33,"kol-table-stateful",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],_paginationPosition:[1,"_pagination-position"],_selection:[1],_on:[16],state:[32],getSelection:[64]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateful"].forEach((t=>{if("kol-table-stateful"===t)customElements.get(t)||customElements.define(t,KolTableStateful$1)}))}const KolTableStateful=KolTableStateful$1,defineCustomElement=defineCustomElement$1;export{KolTableStateful,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as KolIconTag,a as KolTooltipWcTag,c as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{n as nonce}from"./dev.utils2.js";import{A as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,w as watchValidator,e as watchString}from"./prop.validators.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection,E as Events}from"./events2.js";import{v as validateLabel}from"./label.js";const validateTableHeaderCells=(e,t)=>{emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(e){}watchValidator(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},KolTableStateless=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,a)=>{var l,i;let o=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(o=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:o),h("tr",{key:`row-${o}`},this.renderSelectionCell(e,t),e.map(((e,l)=>this.renderTableCell(e,t,l,a))))},this.renderTableCell=(e,t,a,l)=>{let i=`${t}-${a}-${e.label}`;if(e.data){const l=this.getDataKey(e.data);i=l?`${l}-${this.horizontal?a:t}`:i}return!1===e.asTd?this.renderHeadingCell(e,t,a,l):h("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){validateTableDataFoot(this,e)}validateHeaderCells(e){validateTableHeaderCells(this,e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateMinWidth(e){watchString(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){validateTableCallbacks(this,e)}validateSelection(e){validateTableSelection(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(a);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}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,nonce())})),this.dataToKeyMap.forEach(((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)}))}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 a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}}))))}getNumberOfCols(e,t){let a=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1})),a<t&&(a=t)})),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let l=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1})),l<t&&(l=t)})),0===l?l=t.length:l-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,l}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,a;let l=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.filterHeaderKeys(null!==(a=e.vertical)&&void 0!==a?a:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,a){var l;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 i=this.getPrimaryHeader(t),o=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),s=0;a&&(s=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const r=[],c=[],d=[];t.vertical.forEach(((e,t)=>{c[t]=0,d[t]=[]}));for(let l=s;l<n;l++){const n=[];t.vertical.forEach(((e,t)=>{let a=0;if(d[t].forEach((e=>a+=e)),a<=l){const i=e[l-a+c[t]];if("object"==typeof i){n.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),d[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let a=1;a<i.colSpan;a++)d[t+a].push(e);c[t]++}}}));for(let t=0;t<o;t++)if(!0===this.horizontal){const o=a&&this.state._dataFoot?this.state._dataFoot[l-s]:e[l];"object"==typeof i[t]&&null!==i[t]&&"string"==typeof i[t].key&&"object"==typeof o&&null!==o&&n.push(Object.assign(Object.assign({},i[t]),{colSpan:void 0,data:o,label:o[i[t].key],rowSpan:void 0}))}else"object"==typeof i[l]&&null!==i[l]&&"string"==typeof i[l].key&&"object"==typeof e[t]&&null!==e[t]&&n.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));r.push(n)}if(0===e.length){let e=0,a=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=>{a+=e.rowSpan||1})));const l={colSpan:e,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(a,1)};0===r.length?r.push([l]):r[0].push(l)}return r}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)}renderSelectionCell(e,t){var a,l,i;const o=this.state._selection;if(!o)return"";const n=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",s=null===(l=e[0])||void 0===l?void 0:l.data;if(!s)return"";const r=s[n],c=o.multiple||void 0===o.multiple,d=null===(i=null==o?void 0:o.selectedKeys)||void 0===i?void 0:i.includes(r),v=o.label(s),b={name:"selection",checked:d,id:r,"aria-label":v};return h("td",{key:`tbody-${t}-selection`,class:"selection-cell"},h("div",{class:"input "+(d?"checked":"")},c?h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(d?"codicon-check":""),_label:""}),h("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},b,{type:"checkbox",onInput:e=>{var t,a,l;const i=d?null===(a=null==o?void 0:o.selectedKeys)||void 0===a?void 0:a.filter((e=>e!==r)):[...null!==(t=null==o?void 0:o.selectedKeys)&&void 0!==t?t:[],r];tryToDispatchKoliBriEvent("selection-change",this.host,i),"function"==typeof(null===(l=this.state._on)||void 0===l?void 0:l[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,null!=i?i:[])}}))):h("label",{class:"radio-container"},h("input",Object.assign({},b,{type:"radio",onInput:e=>{var t;tryToDispatchKoliBriEvent("selection-change",this.host,r),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,r)}}))),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${r}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!a||!a.multiple&&void 0!==a.multiple)return h("th",{key:"thead-0"});const l=null!==(e=a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,n=0!==i&&!o;let s="kol-table-selection-indeterminate";o&&!n&&(s="kol-table-selection-none"),0===i&&(s="kol-table-selection-all");const r=translate(s);return h("th",{key:"thead-0-selection",class:"selection-cell selection-control"},h("div",{class:"input "+(n?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(n?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!n,"aria-label":r,type:"checkbox",onInput:e=>{var t;const a=o?[]:this.state._data.map((e=>null==e?void 0:e[l]));tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,a)}})),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${s}-label`,_label:r})))}renderHeadingCell(e,t,a,l){let i,o="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":o="codicon codicon-chevron-up",i="ascending";break;case"DESC":o="codicon codicon-chevron-down",i="descending"}const n=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return h("th",{key:`${t}-${a}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:n,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":i,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?h(KolButtonWcTag,{class:"table-sort-button",exportparts:"icon",_icons:{right:o},_label:e.label,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var a;const l=null===(a=null==t?void 0:t[0])||void 0===a?void 0:a.reduce(((e,t)=>e+(t.colSpan||1)),0);return h("tr",{class:`${e}-spacer`,"aria-hidden":"true"},h("td",{colSpan:l}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return h("tfoot",null,[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],h(Host,{key:"215026e1368f66194ebd3269337f796c061fc374",class:"kol-table-stateless-wc"},h("div",{key:"1a63ff928babc2d906287f2e8fbaca897c0a043a",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"6e5e32b75489ef481ba3ea47c548bf2ca7533423",style:{minWidth:this.state._minWidth}},h("div",{key:"578f5e88ece3b1e966c4de611203d5498df3b88a",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),h("caption",{key:"6ee0f0ad7781a77cf9a82ebe8375c088c100888a",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"4dc023f72802e7fa3c1662fbf7b8a2e31879c4dd"},[this.state._headerCells.horizontal.map(((e,t)=>h("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),e.map(((e,a)=>!0===e.asTd?h("td",{key:`thead-${t}-${a}-${e.label}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,a,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"eda54c00f2e690d59a3883f6d470b225d8bdd99a"},e.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return this}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}},[0,"kol-table-stateless-wc",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1],state:[32],tableDivElementHasScrollbar:[32]},[[0,"keydown","handleKeyDown"]],{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless-wc"].forEach((e=>{if("kol-table-stateless-wc"===e)customElements.get(e)||customElements.define(e,KolTableStateless)}))}const KolTableStatelessWc=KolTableStateless,defineCustomElement=defineCustomElement$1;export{KolTableStatelessWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as KolIconTag,a as KolTooltipWcTag,c as KolButtonWcTag}from"./component-names.js";import{t as translate}from"./i18n2.js";import{t as tryToDispatchKoliBriEvent}from"./events.js";import{n as nonce}from"./dev.utils2.js";import{A as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,w as watchValidator,d as watchString}from"./prop.validators.js";import{v as validateTableData,a as validateTableDataFoot,d as validateTableCallbacks,b as validateTableSelection,E as Events}from"./events2.js";import{v as validateLabel}from"./label.js";const validateTableHeaderCells=(e,t)=>{emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(e){}watchValidator(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},KolTableStateless=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,a)=>{var l,i;let o=String(t);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(o=null!==(i=this.getDataKey(e[0].data))&&void 0!==i?i:o),h("tr",{key:`row-${o}`},this.renderSelectionCell(e,t),e.map(((e,l)=>this.renderTableCell(e,t,l,a))))},this.renderTableCell=(e,t,a,l)=>{let i=`${t}-${a}-${e.label}`;if(e.data){const l=this.getDataKey(e.data);i=l?`${l}-${this.horizontal?a:t}`:i}return!1===e.asTd?this.renderHeadingCell(e,t,a,l):h("td",{key:`cell-${i}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){validateTableData(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){validateTableDataFoot(this,e)}validateHeaderCells(e){validateTableHeaderCells(this,e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateMinWidth(e){watchString(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){validateTableCallbacks(this,e)}validateSelection(e){validateTableSelection(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let l=this.checkboxRefs.indexOf(a);l>-1&&(e.preventDefault(),"ArrowDown"===e.key?(l=(l+1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()):"ArrowUp"===e.key&&(e.preventDefault(),l=(l+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[l].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}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,nonce())})),this.dataToKeyMap.forEach(((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)}))}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 a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}}))))}getNumberOfCols(e,t){let a=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1})),a<t&&(a=t)})),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let l=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1})),l<t&&(l=t)})),0===l?l=t.length:l-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,l}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,a;let l=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===l.length&&(l=this.filterHeaderKeys(null!==(a=e.vertical)&&void 0!==a?a:[]),l.length>0&&(this.horizontal=!1)),l}createDataField(e,t,a){var l;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 i=this.getPrimaryHeader(t),o=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),s=0;a&&(s=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const r=[],c=[],d=[];t.vertical.forEach(((e,t)=>{c[t]=0,d[t]=[]}));for(let l=s;l<n;l++){const n=[];t.vertical.forEach(((e,t)=>{let a=0;if(d[t].forEach((e=>a+=e)),a<=l){const i=e[l-a+c[t]];if("object"==typeof i){n.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let e=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(e=i.rowSpan),d[t].push(e),"number"==typeof i.colSpan&&i.colSpan>1)for(let a=1;a<i.colSpan;a++)d[t+a].push(e);c[t]++}}}));for(let t=0;t<o;t++)if(!0===this.horizontal){const o=a&&this.state._dataFoot?this.state._dataFoot[l-s]:e[l];"object"==typeof i[t]&&null!==i[t]&&"string"==typeof i[t].key&&"object"==typeof o&&null!==o&&n.push(Object.assign(Object.assign({},i[t]),{colSpan:void 0,data:o,label:o[i[t].key],rowSpan:void 0}))}else"object"==typeof i[l]&&null!==i[l]&&"string"==typeof i[l].key&&"object"==typeof e[t]&&null!==e[t]&&n.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:e[t],label:e[t][i[l].key],rowSpan:void 0}));r.push(n)}if(0===e.length){let e=0,a=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=>{a+=e.rowSpan||1})));const l={colSpan:e,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(a,1)};0===r.length?r.push([l]):r[0].push(l)}return r}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)}renderSelectionCell(e,t){var a,l,i;const o=this.state._selection;if(!o)return"";const n=null!==(a=o.keyPropertyName)&&void 0!==a?a:"id",s=null===(l=e[0])||void 0===l?void 0:l.data;if(!s)return"";const r=s[n],c=o.multiple||void 0===o.multiple,d=null===(i=null==o?void 0:o.selectedKeys)||void 0===i?void 0:i.includes(r),v=o.label(s),b={name:"selection",checked:d,id:r,"aria-label":v};return h("td",{key:`tbody-${t}-selection`,class:"selection-cell"},h("div",{class:"input "+(d?"checked":"")},c?h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(d?"codicon-check":""),_label:""}),h("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},b,{type:"checkbox",onInput:e=>{var t,a,l;const i=d?null===(a=null==o?void 0:o.selectedKeys)||void 0===a?void 0:a.filter((e=>e!==r)):[...null!==(t=null==o?void 0:o.selectedKeys)&&void 0!==t?t:[],r];tryToDispatchKoliBriEvent("selection-change",this.host,i),"function"==typeof(null===(l=this.state._on)||void 0===l?void 0:l[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,null!=i?i:[])}}))):h("label",{class:"radio-container"},h("input",Object.assign({},b,{type:"radio",onInput:e=>{var t;tryToDispatchKoliBriEvent("selection-change",this.host,r),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,r)}}))),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${r}-label`,_label:v})))}renderHeadingSelectionCell(){var e,t;const a=this.state._selection;if(!a||!a.multiple&&void 0!==a.multiple)return h("th",{key:"thead-0"});const l=null!==(e=a.keyPropertyName)&&void 0!==e?e:"id",i=null===(t=a.selectedKeys)||void 0===t?void 0:t.length,o=i===this.state._data.length,n=0!==i&&!o;let s="kol-table-selection-indeterminate";o&&!n&&(s="kol-table-selection-none"),0===i&&(s="kol-table-selection-all");const r=translate(s);return h("th",{key:"thead-0-selection",class:"selection-cell selection-control"},h("div",{class:"input "+(n?"indeterminate":o?"checked":"")},h("label",{class:"checkbox-container"},h(KolIconTag,{class:"icon",_icons:"codicon "+(n?"codicon-remove":o?"codicon-check":""),_label:""}),h("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:o&&!n,"aria-label":r,type:"checkbox",onInput:e=>{var t;const a=o?[]:this.state._data.map((e=>null==e?void 0:e[l]));tryToDispatchKoliBriEvent("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[Events.onSelectionChange])&&this.state._on[Events.onSelectionChange](e,a)}})),h(KolTooltipWcTag,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${s}-label`,_label:r})))}renderHeadingCell(e,t,a,l){let i,o="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":o="codicon codicon-chevron-up",i="ascending";break;case"DESC":o="codicon codicon-chevron-down",i="descending"}const n=l?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return h("th",{key:`${t}-${a}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:n,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":i,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?h(KolButtonWcTag,{class:"table-sort-button",exportparts:"icon",_icons:{right:o},_label:e.label,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var a;const l=null===(a=null==t?void 0:t[0])||void 0===a?void 0:a.reduce(((e,t)=>e+(t.colSpan||1)),0);return h("tr",{class:`${e}-spacer`,"aria-hidden":"true"},h("td",{colSpan:l}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return h("tfoot",null,[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],h(Host,{key:"215026e1368f66194ebd3269337f796c061fc374",class:"kol-table-stateless-wc"},h("div",{key:"1a63ff928babc2d906287f2e8fbaca897c0a043a",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},h("table",{key:"6e5e32b75489ef481ba3ea47c548bf2ca7533423",style:{minWidth:this.state._minWidth}},h("div",{key:"578f5e88ece3b1e966c4de611203d5498df3b88a",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),h("caption",{key:"6ee0f0ad7781a77cf9a82ebe8375c088c100888a",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&h("thead",{key:"4dc023f72802e7fa3c1662fbf7b8a2e31879c4dd"},[this.state._headerCells.horizontal.map(((e,t)=>h("tr",{key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),e.map(((e,a)=>!0===e.asTd?h("td",{key:`thead-${t}-${a}-${e.label}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,t,a,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),h("tbody",{key:"eda54c00f2e690d59a3883f6d470b225d8bdd99a"},e.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return this}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}},[0,"kol-table-stateless-wc",{_data:[1],_dataFoot:[1,"_data-foot"],_headerCells:[1,"_header-cells"],_label:[1],_minWidth:[1,"_min-width"],_on:[16],_selection:[1],state:[32],tableDivElementHasScrollbar:[32]},[[0,"keydown","handleKeyDown"]],{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table-stateless-wc"].forEach((e=>{if("kol-table-stateless-wc"===e)customElements.get(e)||customElements.define(e,KolTableStateless)}))}const KolTableStatelessWc=KolTableStateless,defineCustomElement=defineCustomElement$1;export{KolTableStatelessWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{n as nonce}from"./dev.utils2.js";import{g as getRenderStates}from"./controller2.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText.js";import{I as InputIconController}from"./controller-icon.js";import{v as validateHasCounter}from"./has-counter.js";import{x as watchNumber,e as watchString,c as watchBoolean,w as watchValidator,s as setState,v as devWarning}from"./prop.validators.js";import{v as validateRows}from"./rows.js";import{k as KolInputTag}from"./component-names.js";import{s as showExpertSlot,b as buildBadgeTextString}from"./reuse.js";const cssResizeOptions=["both","horizontal","vertical","none"];class TextareaController extends InputIconController{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){validateHasCounter(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){watchNumber(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}validateReadOnly(e){watchBoolean(this.component,"_readOnly",e)}validateResize(e){watchValidator(this.component,"_resize",(e=>"string"==typeof e&&cssResizeOptions.includes(e)),new Set(`String {${cssResizeOptions.join(", ")}`),e)}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateValue(e){watchString(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\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 * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 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}\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n .input {\n background-color: white;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolTextareaDefaultStyle0=defaultStyleCss,increaseTextareaHeight=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"beda70f93be9d5c2026295e7a7977753464f5cf7",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"a9e2d11ce5a143e8a8acdbfe3bbaa8179d71ed58",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_currentLength:this.state._currentLength,_disabled:this.state._disabled,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_maxLength:this.state._maxLength,_msg:this.state._msg,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"8b341f3119b180295d53bf05c88b5c313c673702",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey||this.state._shortKey),label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"ed2ff6fea8c88e7ab7bc4583c68bd92eae45be54",slot:"input"},h("textarea",Object.assign({key:"21d45b6e999db7a0e90d62a5276df4a946395bb0",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},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},style:{resize:this.state._resize},value:this.state._value})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(setState(this,"_currentLength",this.textareaRef.value.length),this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new TextareaController(this,"textarea",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(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){"both"!==e&&"horizontal"!==e||devWarning("In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`."),this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(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>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(this.textareaRef):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolTextareaDefaultStyle0}}},[49,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_alert:[1540],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[16],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],inputHasFocus:[32],getValue:[64],focus:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea"].forEach((e=>{if("kol-textarea"===e)customElements.get(e)||customElements.define(e,KolTextarea$1)}))}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{n as nonce}from"./dev.utils2.js";import{g as getRenderStates}from"./controller2.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText.js";import{I as InputIconController}from"./controller-icon.js";import{v as validateHasCounter}from"./has-counter.js";import{x as watchNumber,d as watchString,b as watchBoolean,w as watchValidator,s as setState,v as devWarning}from"./prop.validators.js";import{v as validateRows}from"./rows.js";import{k as KolInputTag}from"./component-names.js";import{s as showExpertSlot,b as buildBadgeTextString}from"./reuse.js";const cssResizeOptions=["both","horizontal","vertical","none"];class TextareaController extends InputIconController{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){validateHasCounter(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){watchNumber(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}validateReadOnly(e){watchBoolean(this.component,"_readOnly",e)}validateResize(e){watchValidator(this.component,"_resize",(e=>"string"==typeof e&&cssResizeOptions.includes(e)),new Set(`String {${cssResizeOptions.join(", ")}`),e)}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateValue(e){watchString(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\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 * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 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}\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n .input {\n background-color: white;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolTextareaDefaultStyle0=defaultStyleCss,increaseTextareaHeight=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"beda70f93be9d5c2026295e7a7977753464f5cf7",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"a9e2d11ce5a143e8a8acdbfe3bbaa8179d71ed58",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_currentLength:this.state._currentLength,_disabled:this.state._disabled,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_maxLength:this.state._maxLength,_msg:this.state._msg,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"8b341f3119b180295d53bf05c88b5c313c673702",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey||this.state._shortKey),label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"ed2ff6fea8c88e7ab7bc4583c68bd92eae45be54",slot:"input"},h("textarea",Object.assign({key:"21d45b6e999db7a0e90d62a5276df4a946395bb0",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},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},style:{resize:this.state._resize},value:this.state._value})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(setState(this,"_currentLength",this.textareaRef.value.length),this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new TextareaController(this,"textarea",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(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){"both"!==e&&"horizontal"!==e||devWarning("In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`."),this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(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>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(this.textareaRef):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolTextareaDefaultStyle0}}},[49,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_alert:[1540],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[16],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],inputHasFocus:[32],getValue:[64],focus:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea"].forEach((e=>{if("kol-textarea"===e)customElements.get(e)||customElements.define(e,KolTextarea$1)}))}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as autoUpdate,a as alignFloatingElements}from"./align-floating-elements.js";import{g as KolSpanWcTag}from"./component-names.js";import{e as watchString}from"./prop.validators.js";import{g as getDocument}from"./dev.utils.js";import{v as validateBadgeText}from"./badge-text.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const KolTooltipWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.hasFocusIn=!1,this.hasMouseIn=!1,this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseleave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)},this._badgeText=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}handleMouseEnter(){this.hasMouseIn=!0,this.showOrHideTooltip()}handleMouseleave(){this.hasMouseIn=!1,this.showOrHideTooltip()}handleFocusIn(){this.hasFocusIn=!0,this.showOrHideTooltip()}handleFocusout(){this.hasFocusIn=!1,this.showOrHideTooltip()}render(){return h(Host,{key:"f006104939dc1f312c1777ba17a5fe403fc66f95",class:"kol-tooltip-wc"},""!==this.state._label&&h("div",{key:"53eeccfeb718c8d3b572eee976554d275faa9fed",class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{key:"e67178dd4b3193b6744222c1f038c64ec523bc08",class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h(KolSpanWcTag,{key:"d1a5b285f4d39e3866b37ba742abdbdb4d4a8ad0",class:"tooltip-area tooltip-content",id:this.state._id,_badgeText:this._badgeText,_label:this.state._label})))}validateBadgeText(t){validateBadgeText(this,t)}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}},[0,"kol-tooltip-wc",{_badgeText:[1,"_badge-text"],_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tooltip-wc"].forEach((t=>{if("kol-tooltip-wc"===t)customElements.get(t)||customElements.define(t,KolTooltipWc$1)}))}const KolTooltipWc=KolTooltipWc$1,defineCustomElement=defineCustomElement$1;export{KolTooltipWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as autoUpdate,a as alignFloatingElements}from"./align-floating-elements.js";import{g as KolSpanWcTag}from"./component-names.js";import{d as watchString}from"./prop.validators.js";import{g as getDocument}from"./dev.utils.js";import{v as validateBadgeText}from"./badge-text.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const KolTooltipWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.hasFocusIn=!1,this.hasMouseIn=!1,this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseleave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)},this._badgeText=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}handleMouseEnter(){this.hasMouseIn=!0,this.showOrHideTooltip()}handleMouseleave(){this.hasMouseIn=!1,this.showOrHideTooltip()}handleFocusIn(){this.hasFocusIn=!0,this.showOrHideTooltip()}handleFocusout(){this.hasFocusIn=!1,this.showOrHideTooltip()}render(){return h(Host,{key:"f006104939dc1f312c1777ba17a5fe403fc66f95",class:"kol-tooltip-wc"},""!==this.state._label&&h("div",{key:"53eeccfeb718c8d3b572eee976554d275faa9fed",class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{key:"e67178dd4b3193b6744222c1f038c64ec523bc08",class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h(KolSpanWcTag,{key:"d1a5b285f4d39e3866b37ba742abdbdb4d4a8ad0",class:"tooltip-area tooltip-content",id:this.state._id,_badgeText:this._badgeText,_label:this.state._label})))}validateBadgeText(t){validateBadgeText(this,t)}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}},[0,"kol-tooltip-wc",{_badgeText:[1,"_badge-text"],_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tooltip-wc"].forEach((t=>{if("kol-tooltip-wc"===t)customElements.get(t)||customElements.define(t,KolTooltipWc$1)}))}const KolTooltipWc=KolTooltipWc$1,defineCustomElement=defineCustomElement$1;export{KolTooltipWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{l as KolLinkWcTag,e as KolIconTag,w as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils2.js";import{c as watchBoolean}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{v as validateHref}from"./href.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.level=void 0,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1},this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}render(){const{_href:e,_active:t,_hasChildren:a,_open:i,_label:l}=this.state;return h(Host,{key:"8e9f6ad50edfe13b82ebe38153bbe5804f7daa32",onSlotchange:this.handleSlotchange.bind(this),class:"kol-tree-item-wc"},h("li",{key:"5f49c0e663040cbf832e462250a1508a188de2db",class:"tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"53726cb8c82f28902e47998ef8cb00ad7a6e7014",class:{"tree-link":!0,"first-level":0===this.level,active:Boolean(t)},_href:e,_label:"",_role:"treeitem",_tabIndex:t?0:-1,_ariaExpanded:a?i:void 0,_ariaOwns:a?this.groupId:void 0,ref:e=>this.linkElement=e},h("span",{key:"9b19718f0b5c2b5e33ae2c8e0b12cc91ea40b894",slot:"expert"},a&&h("span",{key:"8c5696ee48ce513d05351aea728f5c95d27d1b47",class:"toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{key:"904337e39cb2444257ae629575aea4a5e2d6b953",class:"toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""}))," ",l)),h("ul",{key:"0b0f65b582607b772995d16ebd9861798482938f",hidden:!a||!i,role:"group",id:this.groupId},h("slot",{key:"176efec83477a2081a1cf4421ec2070076a3ed0f"}))))}validateActive(e){validateActive(this,e||!1)}validateLabel(e){validateLabel(this,e)}validateOpen(e){validateOpen(this,e)}validateHref(e){validateHref(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==KolTreeTag&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.focus(),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return this}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}},[4,"kol-tree-item-wc",{_active:[4],_label:[1],_open:[4],_href:[1],level:[32],state:[32],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]},void 0,{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item-wc"].forEach((e=>{if("kol-tree-item-wc"===e)customElements.get(e)||customElements.define(e,KolTreeItemWc$1)}))}const KolTreeItemWc=KolTreeItemWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeItemWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{l as KolLinkWcTag,e as KolIconTag,w as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils2.js";import{b as watchBoolean}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{v as validateHref}from"./href.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.level=void 0,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1},this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}render(){const{_href:e,_active:t,_hasChildren:a,_open:i,_label:l}=this.state;return h(Host,{key:"8e9f6ad50edfe13b82ebe38153bbe5804f7daa32",onSlotchange:this.handleSlotchange.bind(this),class:"kol-tree-item-wc"},h("li",{key:"5f49c0e663040cbf832e462250a1508a188de2db",class:"tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"53726cb8c82f28902e47998ef8cb00ad7a6e7014",class:{"tree-link":!0,"first-level":0===this.level,active:Boolean(t)},_href:e,_label:"",_role:"treeitem",_tabIndex:t?0:-1,_ariaExpanded:a?i:void 0,_ariaOwns:a?this.groupId:void 0,ref:e=>this.linkElement=e},h("span",{key:"9b19718f0b5c2b5e33ae2c8e0b12cc91ea40b894",slot:"expert"},a&&h("span",{key:"8c5696ee48ce513d05351aea728f5c95d27d1b47",class:"toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{key:"904337e39cb2444257ae629575aea4a5e2d6b953",class:"toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""}))," ",l)),h("ul",{key:"0b0f65b582607b772995d16ebd9861798482938f",hidden:!a||!i,role:"group",id:this.groupId},h("slot",{key:"176efec83477a2081a1cf4421ec2070076a3ed0f"}))))}validateActive(e){validateActive(this,e||!1)}validateLabel(e){validateLabel(this,e)}validateOpen(e){validateOpen(this,e)}validateHref(e){validateHref(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==KolTreeTag&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.focus(),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return this}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}},[4,"kol-tree-item-wc",{_active:[4],_label:[1],_open:[4],_href:[1],level:[32],state:[32],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]},void 0,{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item-wc"].forEach((e=>{if("kol-tree-item-wc"===e)customElements.get(e)||customElements.define(e,KolTreeItemWc$1)}))}const KolTreeItemWc=KolTreeItemWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeItemWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{c as watchBoolean}from"./prop.validators.js";const validateOpen=(a,o,e)=>{watchBoolean(a,"_open",o,e)};export{validateOpen as v};
4
+ import{b as watchBoolean}from"./prop.validators.js";const validateOpen=(a,o,e)=>{watchBoolean(a,"_open",o,e)};export{validateOpen as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{L as Log,g as getDocument,a as getExperimentalMode}from"./dev.utils.js";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},loglevel={exports:{}};!function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],r={},a=null;function l(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(){for(var o=this.getLevel(),r=0;r<n.length;r++){var a=n[r];this[a]=r<o?e:this.methodFactory(a,o,this.name)}if(this.log=this.debug,typeof console===t&&o<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(s.call(this),this[e].apply(this,arguments))}}function u(n,r,a){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?i:void 0!==console[n]?l(console,n):void 0!==console.log?l(console,"log"):e)}(n)||c.apply(this,arguments)}function d(e,o){var l,i,c,d=this,h="loglevel";function f(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=encodeURIComponent(h),r=o.indexOf(n+"=");-1!==r&&(e=/^([^;]+)/.exec(o.slice(r+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function g(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=o||u,d.getLevel=function(){return null!=c?c:null!=i?i:l},d.setLevel=function(e,o){return c=g(e),!1!==o&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+o+";"}catch(e){}}}(c),s.call(d)},d.setDefaultLevel=function(e){i=g(e),f()||d.setLevel(e,!1)},d.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),s.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(a!==d&&(l=g(a.getLevel())),s.call(d),a===d)for(var e in r)r[e].rebuild()},l=g(a?a.getLevel():"WARN");var m=f();null!=m&&(c=g(m)),s.call(d)}(a=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=r[e];return t||(t=r[e]=new d(e,a.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=h),a},a.getLoggers=function(){return r},a.default=a,a},e.exports?e.exports=o():t.log=o()}(loglevel);const m=loglevel.exports,R=(e,t)=>o=>o(e,t),H=(e,t)=>o=>o(e,t,{append:!1}),M=new Map,Y=[],I=new Map,a$1={A11yUi:{CSS_STYLE_CACHE:M,HYDRATED_HISTORY:Y,STYLING_TASK_QUEUE:I,Themes:{}}};let d=!0,g=!1;const O=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,$=e=>"string"==typeof e&&O.test(e),A=e=>{if(!1===$(e))throw new Error(`[Theming] The theme identifier "${"string"==typeof e?e:""}" (Type: ${typeof e}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},k=(e,t,o,n)=>T(e,t,o,n),T=(e,t,o,n)=>{(n=n??{}).append=n.append??!1,A(e),!0===d&&!1===g&&(g=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.\n\n\timport { register } from 'adopted-style-sheets';\n\timport { defineCustomElements } from '...';\n\timport { THEME } from '...';\n\n\tregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\t// run your app or website\n\t})\n\t.catch(console.warn);`)),("object"!=typeof a$1.A11yUi.Themes[e]||null===a$1.A11yUi.Themes[e])&&(a$1.A11yUi.Themes[e]={}),n.append&&"string"==typeof a$1.A11yUi.Themes[e][t]?a$1.A11yUi.Themes[e][t]+=o:a$1.A11yUi.Themes[e][t]=o},P=(e,t,o,n)=>p(e,t,o,n),p=(e,t,o,n)=>(A(e),"object"==typeof t&&null!==t&&Object.getOwnPropertyNames(t).forEach((r=>{const a=t[r],l=r.toLowerCase(),i="function"!=typeof n?.transformTagName||["GLOBAL","PROPERTIES"].includes(r)?r:n.transformTagName(l);"string"==typeof a&&a.length>0&&T(e,i.toUpperCase(),a,o)})),e),S=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return S(t)}}return null},E=(e={})=>"false"!==e.themeEncroachCss&&"true"!==e.themeReset&&{mode:"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?e.themeEncroachCssMode:"before"},U=()=>"object"==typeof a$1.A11yUi&&null!==a$1.A11yUi&&"object"==typeof a$1.A11yUi.Theme&&null!==a$1.A11yUi.Theme&&"boolean"==typeof a$1.A11yUi.Theme.cache&&"object"==typeof a$1.A11yUi.Theme.encroachCss&&null!==a$1.A11yUi.Theme.encroachCss&&"string"==typeof a$1.A11yUi.Theme.encroachCss.mode&&"string"==typeof a$1.A11yUi.Theme.name,D=()=>!("object"==typeof a$1.A11yUi&&null!==a$1.A11yUi&&"object"==typeof a$1.A11yUi.Theme&&null!==a$1.A11yUi.Theme&&"default"===a$1.A11yUi.Theme.name),b=e=>{if(U())return a$1.A11yUi.Theme;{const t={cache:!0,encroachCss:E(),loglevel:"silent",mode:"csr",name:null},o=S(e);return o instanceof HTMLElement&&(t.cache="false"!==o.dataset.themeCache,t.encroachCss=E(o.dataset),t.loglevel="debug"===o.dataset.themeLoglevel?o.dataset.themeLoglevel:"silent",t.mode="ssr"===o.dataset.themeMode?o.dataset.themeMode:"csr",t.name=o.dataset.theme||null),t}},K=(e,t)=>({cache:!1!==t.cache,detect:"auto"===t.detect?"auto":"fixed",encroachCss:!1!==t.encroachCss&&("object"!=typeof t.encroachCss||null==t.encroachCss||"after"!==t.encroachCss.mode&&"before"!==t.encroachCss.mode?{mode:"before"}:t.encroachCss),loglevel:"debug"===t.loglevel?t.loglevel:"silent",mode:"ssr"===t.mode?t.mode:"csr",name:"string"==typeof t.name?t.name:e}),z=(e,t)=>{!1===U()&&D()&&"object"==typeof t&&null!==t&&("fixed"===(t=K(e,t)).detect?(null===t.name&&"string"==typeof e&&(t.name=e),e===t.name&&(a$1.A11yUi.Theme=t,m.info(`[Theming] Theme "${e}" was set as default theme.`))):m.warn("[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode."))};let C=!1;const F=(e,t,o={})=>{!1===C&&(C=!0,d=!1),"function"==typeof e?e=new Set([e]):Array.isArray(e)&&(e=new Set(e)),e instanceof Set&&e.forEach((e=>{"function"==typeof e&&1===e.length?z(e(((e,t,n)=>p(e,t,n,o))),{cache:o.theme?.cache,detect:o.theme?.detect,encroachCss:o.theme?.encroachCss,mode:o.theme?.mode,name:o.theme?.name}):m.error("[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.")})),d=!0,"function"==typeof t?t=new Set([t]):Array.isArray(t)&&(t=new Set(t));const n=[];return t.forEach((e=>{const t=e();t instanceof Promise&&n.push(t)})),Promise.all(n)},w=new Set,q=/--[^;]+/g,J=/:/,V=(e,t)=>{let o=t.match(q);if(Array.isArray(o)){o=o.filter((e=>J.test(e)));const t=document.createElement("style");t.innerHTML=`.${e} {${o.join(";")}}`,document.querySelector("head")?.appendChild(t)}w.add(e)},y=(e,t)=>"object"==typeof a$1.A11yUi&&null!==a$1.A11yUi&&"object"==typeof a$1.A11yUi.Themes&&null!==a$1.A11yUi.Themes&&"object"==typeof a$1.A11yUi.Themes[e]&&null!==a$1.A11yUi.Themes[e]&&"string"==typeof a$1.A11yUi.Themes[e][t]?a$1.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",W=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLStyleElement&&"STYLE"===t.tagName&&void 0===t.dataset.themingFallback))break;e.removeChild(t)}},X=(e,t)=>{try{if("ssr"===a$1.A11yUi.Theme?.mode)throw new Error("SSR");const o=[];t.forEach((e=>{const t=new CSSStyleSheet;t.replaceSync(e),o.push(t)})),e.adoptedStyleSheets=o}catch{[...t].reverse().forEach(((t,o)=>{if("string"!=typeof t||0===t.length)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",o){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown=""}n.innerHTML=t,e.insertBefore(n,e.firstChild)}))}},Z=(e,t,o)=>{if(!1!==o){const n=[...Array.from(e.childNodes).filter((e=>e instanceof HTMLStyleElement&&"STYLE"===e.tagName))];let r;try{r=[...Array.from(e.adoptedStyleSheets)]}catch{r=[]}"before"===o?.mode?(n.reverse().forEach((e=>t.unshift(e.innerHTML))),r.reverse().forEach((e=>t.unshift(Array.from(e.cssRules).map((e=>e.cssText)).join(""))))):"after"===o?.mode&&(n.forEach((e=>t.push(e.innerHTML))),r.forEach((e=>t.push(Array.from(e.cssRules).map((e=>e.cssText)).join("")))))}},L=(e,t,o)=>{const n=t.name||"default";let r;try{if(null===e.shadowRoot)throw new Error("ShadowRoot is null");r=e.shadowRoot}catch{r=e}if(a$1.A11yUi.CSS_STYLE_CACHE.get(n)?.has(e.tagName))_(e,r,a$1.A11yUi.CSS_STYLE_CACHE.get(n)?.get(e.tagName),o);else{const a=y(n,"PROPERTIES"),l=y(n,"GLOBAL"),i=y(n,e.tagName);!1===w.has(n)&&V(n,l);const s=[a,l,i];Z(r,s,t.encroachCss),"debug"===t.loglevel&&console.log(e.tagName,s),!0===t.cache&&(!1===a$1.A11yUi.CSS_STYLE_CACHE.has(n)&&a$1.A11yUi.CSS_STYLE_CACHE.set(n,new Map),a$1.A11yUi.CSS_STYLE_CACHE.get(n)?.set(e.tagName,s)),_(e,r,s,o)}},_=(e,t,o,n)=>{W(t),X(t,o),e.style.display=n},v=e=>{"debug"===e.loglevel&&a$1.A11yUi.HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:a$1.A11yUi.STYLING_TASK_QUEUE.size})},ee=(e,t)=>{a$1.A11yUi.STYLING_TASK_QUEUE.set(e,{styleDisplay:e.style.display?`${e.style.display}`:null,themeDetails:t})},te=(e,t)=>{ee(e,t),v(t)},se=e=>{a$1.A11yUi.STYLING_TASK_QUEUE.delete(e)},N=(e,t)=>{se(e),v(t)},j=e=>{const t=setTimeout((()=>{if(clearTimeout(t),a$1.A11yUi.STYLING_TASK_QUEUE.has(e)&&e.classList.contains("hydrated")){const{styleDisplay:t,themeDetails:o}=a$1.A11yUi.STYLING_TASK_QUEUE.get(e);L(e,o,t),N(e,o)}else j(e)}),25)},oe=e=>{for(const t of e)if(a$1.A11yUi.STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:e,themeDetails:o}=a$1.A11yUi.STYLING_TASK_QUEUE.get(t.target);L(t.target,o,e),N(t.target,o)}},ae={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1};let f$1;try{f$1=new MutationObserver(oe)}catch{f$1=null}const ne=(e,t)=>{t={...a$1.A11yUi.Theme,...t},te(e,t),f$1?f$1.observe(e,ae):j(e),e.style.display="none"};class re{constructor(e,t,o){this.createTheme=(e,t)=>H(e,t),this.createTranslation=(e,t)=>R(e,t),this.Prefix=e,this.Key=Object.getOwnPropertyNames(t),this.Tag=Object.getOwnPropertyNames(o)}}const a11yCache=new Set,a11yHint=(e,t)=>{(!1===a11yCache.has(e)||(null==t?void 0:t.force))&&(a11yCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"✋ a11y",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #09f"}))},deprecatedCache=new Set,deprecatedHint=(e,t)=>{(!1===deprecatedCache.has(e)||(null==t?void 0:t.force))&&(deprecatedCache.add(e),Log.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"🔥 deprecated",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f00"}))},devCache=new Set,devHint=(e,t)=>{(!1===devCache.has(e)||(null==t?void 0:t.force))&&(devCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"💻 dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},devWarning=(e,t)=>{(!1===devCache.has(e)||(null==t?void 0:t.force))&&(devCache.add(e),Log.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"⚠️ dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},featureCache=new Set,featureHint=(e,t=!1,o)=>{(!1===featureCache.has(e)||(null==o?void 0:o.force))&&(featureCache.add(e),e+=!0===t?" ✅":"",Log.debug([e].concat((null==o?void 0:o.details)||[]),{classifier:"🌟 feature",forceLog:!!(null==o?void 0:o.force),overwriteStyle:"; background-color: #309"}))};devHint("We appreciate any feedback, comments, screenshots, or demo links of an application based on KoliBri (kolibri@itzbund.de). Thank you!");const uiUxCache=new Set,uiUxHint=(e,t)=>{(!1===uiUxCache.has(e)||(null==t?void 0:t.force))&&(uiUxCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"📑 ui/ux",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #060;"}))},a11yHintDisabled=()=>{a11yHint('"Disabled" limits accessibility and visibility. From an accessibility perspective, we recommend using the readonly attribute instead of disabled.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},a11yHintLabelingLandmarks=e=>{"string"==typeof e&&""!==e||a11yHint("Some structural elements, such as the nav tag, can be used multiple times on a webpage. To distinguish between similarly named structural elements, it is necessary to set an ARIA label.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},uiUxHintMillerscheZahl=(e,t=8)=>{t>7&&uiUxHint(`[${e}] Within navigation structures, it is recommended to use no more than 7 menu items.\n\nLink:\n- https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two`)};var n=.2126,r=.7152,t=.0722,e=1/12.92;function u(e){return Math.pow((e+.055)/1.055,2.4)}function a(o){var a=o[0]/255,l=o[1]/255,i=o[2]/255,s=a<=.03928?a*e:u(a),c=l<=.03928?l*e:u(l),d=i<=.03928?i*e:u(i);return s*n+c*r+d*t}function i(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var o=parseInt(e,16);return[o>>16,o>>8&255,255&o,t]}function c(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function o(e,t){return c(a(e),a(t))}function s(e,t){return o(i(e),i(t))}function f(e){return e>=7?"AAA":e>=4.5?"AA":e>=3?"AA Large":"Fail"}var rgbaConvert={exports:{}};function arr(e){var t=parse(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function obj(e){var t=parse(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}}function css(e){var t=parse(e);return 3==t.length&&t.push(255),255==t[3]?"rgb("+t[0]+", "+t[1]+", "+t[2]+")":0==t[3]?"rgba("+t[0]+", "+t[1]+", "+t[2]+", 0)":"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+String(t[3]/255).substr(1)+")"}function hex(e){3==(t=parse(e)).length&&t.push(255);var t,o=255==t[3],n=num2hex(t[0]),r=num2hex(t[1]),a=num2hex(t[2]),l=isshort(n,r,a,t=num2hex(Math.round(t[3])));return o?l?"#"+n.charAt(0)+r.charAt(0)+a.charAt(0):"#"+n+r+a:l?"#"+n.charAt(0)+r.charAt(0)+a.charAt(0)+t.charAt(0):"#"+n+r+a+t}function num(e){var t=parse(e);return 3==t.length?t.push(255):t[3]=Math.round(t[3]),(t[3]<<24>>>0|t[0]<<16|t[1]<<8|t[2])>>>0}function parse(e){return"string"==typeof e?name(e=e.toLowerCase())||hex3(e)||hex6(e)||rgb(e)||rgba(e)||[0,0,0,255]:object(e)||array(e)||number(e)||[0,0,0,255]}function num2hex(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function isshort(e,t,o,n){var r=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=r.indexOf(e)&&-1!=r.indexOf(t)&&-1!=r.indexOf(o)&&-1!=r.indexOf(n)}function name(e){return"red"==e?[255,0,0]:"green"==e?[0,255,0]:"blue"==e?[0,0,255]:"black"==e?[0,0,0]:"white"==e?[255,255,255]:"cyan"==e?[0,255,255]:"gray"==e||"grey"==e?[128,128,128]:"magenta"==e||"pink"==e?[255,0,255]:"yellow"==e?[255,255,0]:void 0}function hex2num(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function hex3(e){var t=e.replace(/^#/,""),o=t.length;if(3==o||4==o){var n=hex2num(t[0]),r=hex2num(t[1]),a=hex2num(t[2]),l=3==o?255:hex2num(t[3]);if(isNaN(n)||isNaN(r)||isNaN(a)||isNaN(l))return;return[n,r,a,l]}}function hex6(e){var t=e.replace(/^#/,""),o=t.length;if(6==o||8==o){var n=hex2num(t.slice(0,2)),r=hex2num(t.slice(2,4)),a=hex2num(t.slice(4,6)),l=6==o?255:hex2num(t.slice(6,8));if(isNaN(n)||isNaN(r)||isNaN(a)||isNaN(l))return;return[n,r,a,l]}}function getnum(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}function object(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=getnum(null!=e.r?e.r:null!=e.red?e.red:0,!0),o=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),n=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),r=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),o=getnum(e[1],!0),n=getnum(e[2],!0),r=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function number(e){if("number"==typeof e&&Math.floor(e)==e&&e<=4294967295&&e>=0)return[e>>16&255,e>>8&255,255&e,e>>24&255]}function rgb(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0);if(-1!=o&&-1!=n&&-1!=r)return[o,n,r,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0),a=getnum(255*t[3]);if(-1!=o&&-1!=n&&-1!=r&&-1!=a)return[o,n,r,a]}}rgbaConvert.exports=arr,rgbaConvert.exports.arr=arr,rgbaConvert.exports.obj=obj,rgbaConvert.exports.css=css,rgbaConvert.exports.hex=hex,rgbaConvert.exports.num=num;const rgba$1=rgbaConvert.exports,pushNodes=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},querySelectorAll=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const o=new Set;pushNodes(o,t.querySelectorAll(e));const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;pushNodes(o,querySelectorAll(e,"object"==typeof r&&null!==r?r:n[t]))}return Array.from(o)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},querySelector=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let o=t.querySelector(e);if(null===o){const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;if(o=querySelector(e,"object"==typeof r&&null!==r?r:n[t]),null!==o)break}}return o}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")},OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTarget=(e,t)=>{getExperimentalMode()&&(Log.debug([e,t]),Log.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,o,n;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,o)=>{var n;const r=t.get("beforePatch");"function"==typeof r&&r(null===(n=e.nextState)||void 0===n?void 0:n.get(o),e.nextState,e,o)})),(null===(o=e.nextState)||void 0===o?void 0:o.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(n=e.nextHooks)||void 0===n||n.forEach(((t,o)=>{const n=t.get("afterPatch");"function"==typeof n&&n(e.state[o],e.state,e,o)}))),delete e.nextHooks},setState=(e,t,o,n={})=>{var r,a;void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map);e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof n.afterPatch&&(null===(r=e.nextHooks.get(t))||void 0===r||r.set("afterPatch",n.afterPatch)),"function"==typeof n.beforePatch&&(null===(a=e.nextHooks.get(t))||void 0===a||a.set("beforePatch",n.beforePatch)),e.nextState.set(t,o),patchState(e)},logWarn=(e,t,o,n)=>{devHint(`[${e.constructor.name}] The property value: (${o}) for '${t}' is not valid. Allowed values are: ${Array.from(n).join(", ")}`)};function watchValidator(e,t,o,n,r,a={}){o(r)?setState(e,t,r,a.hooks):void 0===r&&!0!==a.required&&o(a.defaultValue)?setState(e,t,a.defaultValue,a.hooks):(a.required||n.add(null),logWarn(e,t,r,n))}const watchBoolean=(e,t,o,n)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),o,n)},watchString=(e,t,o,n={})=>{const r="number"==typeof n.minLength?null==n?void 0:n.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=r&&(void 0===(null==n?void 0:n.maxLength)||e.length<=n.maxLength)),new Set(["String"]),o,n)},watchNumber=(e,t,o,n)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==n?void 0:n.min)||"number"==typeof(null==n?void 0:n.min)&&e>=n.min)&&(void 0===(null==n?void 0:n.max)||"number"==typeof(null==n?void 0:n.max)&&e<=n.max)),new Set(["Number"]),o,n)},watchJsonArrayString=(e,t,o,n,r=e=>e==e,a={})=>{emptyStringByArrayHandler(n,(()=>{objectObjectHandler(n,(()=>{void 0===n&&(n=[]);try{try{n=parseJson(n)}catch(e){}if(Array.isArray(n)){const l=n.find((e=>!o(e)));void 0===l&&r(n)?setState(e,t,n,a.hooks):objectObjectHandler(l,(()=>{throw Log.debug(l),new Error("↑ The schema for the property (_options) is not valid. The value will not be changed.")}))}else objectObjectHandler(n,(()=>{throw Log.debug(n),new Error("↑ The schema for the property (_options) is not valid. The value will not be changed.")}))}catch(e){Log.debug(e)}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?(0|[1-9]\d*)$/,FLOAT=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,mapString2Unknown=e=>{const t=typeof e,o=`${e}`;if("string"==typeof e)if(BOOLEAN.test(e))e="true"===e;else if(INTEGER.test(e))e=parseInt(e);else if(FLOAT.test(e))e=parseFloat(e);else if(JSON_CHARS.test(e))try{e=parseJson(e)}catch(e){}return t!==typeof e&&devHint(`You have used a stringified property value (${o} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},stringifyJson=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw Log.warn(["stringifyJson",e]),Log.error("↑ The JSON could not be converted to a string. A stringifiable JSON is expected."),new Error}},JSON_CHARS=/^[{[]/,parseJson=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(JSON_CHARS.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){Log.warn(["parseJson",e]),Log.error("↑ The JSON string could not be parsed. Make sure that single quotes in the text are escaped (&#8216;).")}}throw new Error},mapBoolean2String=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,mapStringOrBoolean2String=e=>"string"==typeof e?e:mapBoolean2String(e),koliBriQuerySelector=(e,t)=>querySelector(e,t||getDocument()),koliBriQuerySelectorAll=(e,t)=>querySelectorAll(e,t||getDocument());let DEFAULT_COLOR_CONTRAST=null;const getDefaultColorContrast=()=>(DEFAULT_COLOR_CONTRAST=DEFAULT_COLOR_CONTRAST||{backgroundColor:"#00000000",color:"#00000000",domNode:getDocument().body,level:"Fail",score:1},DEFAULT_COLOR_CONTRAST),TRANSPARENT_REGEXP=/(\d+, ){3}0\)/,koliBriA11yColorContrast=(e,t=getDefaultColorContrast())=>{const o=getComputedStyle(e),n=TRANSPARENT_REGEXP.test(o.backgroundColor)?t.backgroundColor:rgba$1.hex(o.backgroundColor),r=TRANSPARENT_REGEXP.test(o.color)?t.color:rgba$1.hex(o.color),a=s(n,r),l={backgroundColor:n,color:r,domNode:e,level:f(a),score:a};return a<4.5&&Log.error(["Color-Contrast-Error",{backgroundColor:l.backgroundColor,color:l.color,level:l.level,score:l.score},l.domNode]),l},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const o=t.domNode.querySelector(e);if(null===o){const o=t.domNode.querySelectorAll('[class="hydrated"]');for(let n=0;n<o.length&&(t.domNode=o[n],null===(t=koliBriQuerySelectorColors(e,t)).domNode);n++);return t}return koliBriA11yColorContrast(o,t)};class KoliBriUtils{static queryHtmlElementColors(e,t,o=!1,n=!0){let r=null;if(!0===o||!1===KoliBriUtils.executionLock)if(!1===o&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===n&&Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)r=t;else{const o=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)o.add(e[t])}const n=t.domNode;if("function"==typeof n.assignedNodes){const e=n.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&o.add(e[t])}const a=t.domNode.children;for(let e=0;e<a.length;e++)o.add(a[e]);const l=Array.from(o);for(let o=0;o<l.length;o++){let n=KoliBriUtils.cache.get(l[o]);void 0===n&&(n=koliBriA11yColorContrast(l[o],t)),KoliBriUtils.cache.set(l[o],n);const a=KoliBriUtils.queryHtmlElementColors(e,n,!0,!1);if(null!==a){r=a;break}}}else Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===o&&(!0===n&&Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),r}}KoliBriUtils.executionLock=!1,KoliBriUtils.cache=new Map;class KoliBriDevHelper{}KoliBriDevHelper.getCssStyle=y,KoliBriDevHelper.patchTheme=P,KoliBriDevHelper.patchThemeTag=k,KoliBriDevHelper.querySelector=koliBriQuerySelector,KoliBriDevHelper.querySelectorAll=koliBriQuerySelectorAll,KoliBriDevHelper.stringifyJson=stringifyJson;export{emptyStringByArrayHandler as A,koliBriQuerySelector as B,koliBriA11yColorContrast as C,koliBriQuerySelectorAll as D,koliBriQuerySelectorColors as E,F,KoliBriUtils as G,stringifyJson as H,KoliBriDevHelper as K,a11yHint as a,b,watchBoolean as c,a11yHintDisabled as d,watchString as e,featureHint as f,rgba$1 as g,s as h,a11yHintLabelingLandmarks as i,watchJsonArrayString as j,uiUxHintMillerscheZahl as k,mapStringOrBoolean2String as l,mapBoolean2String as m,ne as n,objectObjectHandler as o,parseJson as p,setEventTarget as q,re as r,setState as s,devHint as t,uiUxHint as u,devWarning as v,watchValidator as w,watchNumber as x,mapString2Unknown as y,deprecatedHint as z};
4
+ import{L as Log,g as getDocument,a as getExperimentalMode}from"./dev.utils.js";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},loglevel={exports:{}};!function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],r={},a=null;function l(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(){for(var o=this.getLevel(),r=0;r<n.length;r++){var a=n[r];this[a]=r<o?e:this.methodFactory(a,o,this.name)}if(this.log=this.debug,typeof console===t&&o<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(s.call(this),this[e].apply(this,arguments))}}function u(n,r,a){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?i:void 0!==console[n]?l(console,n):void 0!==console.log?l(console,"log"):e)}(n)||c.apply(this,arguments)}function d(e,o){var l,i,c,d=this,h="loglevel";function f(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=encodeURIComponent(h),r=o.indexOf(n+"=");-1!==r&&(e=/^([^;]+)/.exec(o.slice(r+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function g(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=o||u,d.getLevel=function(){return null!=c?c:null!=i?i:l},d.setLevel=function(e,o){return c=g(e),!1!==o&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+o+";"}catch(e){}}}(c),s.call(d)},d.setDefaultLevel=function(e){i=g(e),f()||d.setLevel(e,!1)},d.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),s.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(a!==d&&(l=g(a.getLevel())),s.call(d),a===d)for(var e in r)r[e].rebuild()},l=g(a?a.getLevel():"WARN");var m=f();null!=m&&(c=g(m)),s.call(d)}(a=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=r[e];return t||(t=r[e]=new d(e,a.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=h),a},a.getLoggers=function(){return r},a.default=a,a},e.exports?e.exports=o():t.log=o()}(loglevel);const l=loglevel.exports,H=(e,t)=>o=>o(e,t),M=(e,t)=>o=>o(e,t,{append:!1}),Y=new Map,I=[],O=new Map,o$1={A11yUi:{CSS_STYLE_CACHE:Y,HYDRATED_HISTORY:I,STYLING_TASK_QUEUE:O,Themes:{}}};let T,d=!0,A=!1;const $=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,k=e=>"string"==typeof e&&$.test(e),S=e=>{if(!1===k(e))throw new Error(`[Theming] The theme identifier "${"string"==typeof e?e:""}" (Type: ${typeof e}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},P=(e,t,o,n)=>p(e,t,o,n),p=(e,t,o,n)=>{(n=n??{}).append=n.append??!1,S(e),!0===d&&!1===A&&(A=!0,l.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.\n\n\timport { register } from 'adopted-style-sheets';\n\timport { defineCustomElements } from '...';\n\timport { THEME } from '...';\n\n\tregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\t// run your app or website\n\t})\n\t.catch(console.warn);`)),("object"!=typeof o$1.A11yUi.Themes[e]||null===o$1.A11yUi.Themes[e])&&(o$1.A11yUi.Themes[e]={});const r="function"!=typeof T||["GLOBAL","PROPERTIES"].includes(t)?t.toUpperCase():T(t).toUpperCase();n.append&&"string"==typeof o$1.A11yUi.Themes[e][r]?o$1.A11yUi.Themes[e][r]+=o:o$1.A11yUi.Themes[e][r]=o},D=(e,t,o)=>u$1(e,t,o),u$1=(e,t,o)=>(S(e),"object"==typeof t&&null!==t&&Object.getOwnPropertyNames(t).forEach((n=>{const r=t[n];"string"==typeof r&&r.length>0&&p(e,n,r,o)})),e),U=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return U(t)}}return null},E=(e={})=>"false"!==e.themeEncroachCss&&"true"!==e.themeReset&&{mode:"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?e.themeEncroachCssMode:"before"},b=()=>"object"==typeof o$1.A11yUi&&null!==o$1.A11yUi&&"object"==typeof o$1.A11yUi.Theme&&null!==o$1.A11yUi.Theme&&"boolean"==typeof o$1.A11yUi.Theme.cache&&"object"==typeof o$1.A11yUi.Theme.encroachCss&&null!==o$1.A11yUi.Theme.encroachCss&&"string"==typeof o$1.A11yUi.Theme.encroachCss.mode&&"string"==typeof o$1.A11yUi.Theme.name,G=()=>!("object"==typeof o$1.A11yUi&&null!==o$1.A11yUi&&"object"==typeof o$1.A11yUi.Theme&&null!==o$1.A11yUi.Theme&&"default"===o$1.A11yUi.Theme.name),C=e=>{if(b())return o$1.A11yUi.Theme;{const t={cache:!0,encroachCss:E(),loglevel:"silent",mode:"csr",name:null},o=U(e);return o instanceof HTMLElement&&(t.cache="false"!==o.dataset.themeCache,t.encroachCss=E(o.dataset),t.loglevel="debug"===o.dataset.themeLoglevel?o.dataset.themeLoglevel:"silent",t.mode="ssr"===o.dataset.themeMode?o.dataset.themeMode:"csr",t.name=o.dataset.theme||null),t}},z=(e,t)=>({cache:!1!==t.cache,detect:"auto"===t.detect?"auto":"fixed",encroachCss:!1!==t.encroachCss&&("object"!=typeof t.encroachCss||null==t.encroachCss||"after"!==t.encroachCss.mode&&"before"!==t.encroachCss.mode?{mode:"before"}:t.encroachCss),loglevel:"debug"===t.loglevel?t.loglevel:"silent",mode:"ssr"===t.mode?t.mode:"csr",name:"string"==typeof t.name?t.name:e}),Q=(e,t)=>{!1===b()&&G()&&"object"==typeof t&&null!==t&&("fixed"===(t=z(e,t)).detect?(null===t.name&&"string"==typeof e&&(t.name=e),e===t.name&&(o$1.A11yUi.Theme=t,l.info(`[Theming] Theme "${e}" was set as default theme.`))):l.warn("[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode."))};let w=!1;const q=(e,t,o={})=>{!1===w&&(w=!0,d=!1),"function"==typeof e?e=new Set([e]):Array.isArray(e)&&(e=new Set(e)),e instanceof Set&&e.forEach((e=>{"function"==typeof e&&1===e.length?(T=o.transformTagName,Q(e(((e,t,o)=>u$1(e,t,o))),{cache:o.theme?.cache,detect:o.theme?.detect,encroachCss:o.theme?.encroachCss,mode:o.theme?.mode,name:o.theme?.name})):l.error("[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.")})),d=!0,"function"==typeof t?t=new Set([t]):Array.isArray(t)&&(t=new Set(t));const n=[];return t.forEach((e=>{const t=e();t instanceof Promise&&n.push(t)})),Promise.all(n)},L=new Set,J=/--[^;]+/g,V=/:/,W=(e,t)=>{let o=t.match(J);if(Array.isArray(o)){o=o.filter((e=>V.test(e)));const t=document.createElement("style");t.innerHTML=`.${e} {${o.join(";")}}`,document.querySelector("head")?.appendChild(t)}L.add(e)},m=(e,t)=>"object"==typeof o$1.A11yUi&&null!==o$1.A11yUi&&"object"==typeof o$1.A11yUi.Themes&&null!==o$1.A11yUi.Themes&&"object"==typeof o$1.A11yUi.Themes[e]&&null!==o$1.A11yUi.Themes[e]&&"string"==typeof o$1.A11yUi.Themes[e][t]?o$1.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",X=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLStyleElement&&"STYLE"===t.tagName&&void 0===t.dataset.themingFallback))break;e.removeChild(t)}},Z=(e,t)=>{try{if("ssr"===o$1.A11yUi.Theme?.mode)throw new Error("SSR");const o=[];t.forEach((e=>{const t=new CSSStyleSheet;t.replaceSync(e),o.push(t)})),e.adoptedStyleSheets=o}catch{[...t].reverse().forEach(((t,o)=>{if("string"!=typeof t||0===t.length)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",o){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown=""}n.innerHTML=t,e.insertBefore(n,e.firstChild)}))}},ee=(e,t,o)=>{if(!1!==o){const n=[...Array.from(e.childNodes).filter((e=>e instanceof HTMLStyleElement&&"STYLE"===e.tagName))];let r;try{r=[...Array.from(e.adoptedStyleSheets)]}catch{r=[]}"before"===o?.mode?(n.reverse().forEach((e=>t.unshift(e.innerHTML))),r.reverse().forEach((e=>t.unshift(Array.from(e.cssRules).map((e=>e.cssText)).join(""))))):"after"===o?.mode&&(n.forEach((e=>t.push(e.innerHTML))),r.forEach((e=>t.push(Array.from(e.cssRules).map((e=>e.cssText)).join("")))))}},_=(e,t,o)=>{const n=t.name||"default";let r;try{if(null===e.shadowRoot)throw new Error("ShadowRoot is null");r=e.shadowRoot}catch{r=e}if(o$1.A11yUi.CSS_STYLE_CACHE.get(n)?.has(e.tagName))v(e,r,o$1.A11yUi.CSS_STYLE_CACHE.get(n)?.get(e.tagName),o);else{const a=m(n,"PROPERTIES"),l=m(n,"GLOBAL"),i=m(n,e.tagName);!1===L.has(n)&&W(n,l);const s=[a,l,i];ee(r,s,t.encroachCss),"debug"===t.loglevel&&console.log(e.tagName,s),!0===t.cache&&(!1===o$1.A11yUi.CSS_STYLE_CACHE.has(n)&&o$1.A11yUi.CSS_STYLE_CACHE.set(n,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(n)?.set(e.tagName,s)),v(e,r,s,o)}},v=(e,t,o,n)=>{X(t),Z(t,o),e.style.display=n},j=e=>{"debug"===e.loglevel&&o$1.A11yUi.HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:o$1.A11yUi.STYLING_TASK_QUEUE.size})},te=(e,t)=>{o$1.A11yUi.STYLING_TASK_QUEUE.set(e,{styleDisplay:e.style.display?`${e.style.display}`:null,themeDetails:t})},se=(e,t)=>{te(e,t),j(t)},oe=e=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(e)},N=(e,t)=>{oe(e),j(t)},R=e=>{const t=setTimeout((()=>{if(clearTimeout(t),o$1.A11yUi.STYLING_TASK_QUEUE.has(e)&&e.classList.contains("hydrated")){const{styleDisplay:t,themeDetails:o}=o$1.A11yUi.STYLING_TASK_QUEUE.get(e);_(e,o,t),N(e,o)}else R(e)}),25)},ae=e=>{for(const t of e)if(o$1.A11yUi.STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:e,themeDetails:o}=o$1.A11yUi.STYLING_TASK_QUEUE.get(t.target);_(t.target,o,e),N(t.target,o)}},ne={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1};let y;try{y=new MutationObserver(ae)}catch{y=null}const re=(e,t)=>{t={...o$1.A11yUi.Theme,...t},se(e,t),y?y.observe(e,ne):R(e),e.style.display="none"};class ie{constructor(e,t,o){this.createTheme=(e,t)=>M(e,t),this.createTranslation=(e,t)=>H(e,t),this.Prefix=e,this.Key=Object.getOwnPropertyNames(t),this.Tag=Object.getOwnPropertyNames(o)}}const a11yCache=new Set,a11yHint=(e,t)=>{(!1===a11yCache.has(e)||(null==t?void 0:t.force))&&(a11yCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"✋ a11y",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #09f"}))},deprecatedCache=new Set,deprecatedHint=(e,t)=>{(!1===deprecatedCache.has(e)||(null==t?void 0:t.force))&&(deprecatedCache.add(e),Log.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"🔥 deprecated",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f00"}))},devCache=new Set,devHint=(e,t)=>{(!1===devCache.has(e)||(null==t?void 0:t.force))&&(devCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"💻 dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},devWarning=(e,t)=>{(!1===devCache.has(e)||(null==t?void 0:t.force))&&(devCache.add(e),Log.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"⚠️ dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},featureCache=new Set,featureHint=(e,t=!1,o)=>{(!1===featureCache.has(e)||(null==o?void 0:o.force))&&(featureCache.add(e),e+=!0===t?" ✅":"",Log.debug([e].concat((null==o?void 0:o.details)||[]),{classifier:"🌟 feature",forceLog:!!(null==o?void 0:o.force),overwriteStyle:"; background-color: #309"}))};devHint("We appreciate any feedback, comments, screenshots, or demo links of an application based on KoliBri (kolibri@itzbund.de). Thank you!");const uiUxCache=new Set,uiUxHint=(e,t)=>{(!1===uiUxCache.has(e)||(null==t?void 0:t.force))&&(uiUxCache.add(e),Log.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"📑 ui/ux",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #060;"}))},a11yHintDisabled=()=>{a11yHint('"Disabled" limits accessibility and visibility. From an accessibility perspective, we recommend using the readonly attribute instead of disabled.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},a11yHintLabelingLandmarks=e=>{"string"==typeof e&&""!==e||a11yHint("Some structural elements, such as the nav tag, can be used multiple times on a webpage. To distinguish between similarly named structural elements, it is necessary to set an ARIA label.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},uiUxHintMillerscheZahl=(e,t=8)=>{t>7&&uiUxHint(`[${e}] Within navigation structures, it is recommended to use no more than 7 menu items.\n\nLink:\n- https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two`)};var n=.2126,r=.7152,t=.0722,e=1/12.92;function u(e){return Math.pow((e+.055)/1.055,2.4)}function a(o){var a=o[0]/255,l=o[1]/255,i=o[2]/255,s=a<=.03928?a*e:u(a),c=l<=.03928?l*e:u(l),d=i<=.03928?i*e:u(i);return s*n+c*r+d*t}function i(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var o=parseInt(e,16);return[o>>16,o>>8&255,255&o,t]}function c(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function o(e,t){return c(a(e),a(t))}function s(e,t){return o(i(e),i(t))}function f(e){return e>=7?"AAA":e>=4.5?"AA":e>=3?"AA Large":"Fail"}var rgbaConvert={exports:{}};function arr(e){var t=parse(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function obj(e){var t=parse(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}}function css(e){var t=parse(e);return 3==t.length&&t.push(255),255==t[3]?"rgb("+t[0]+", "+t[1]+", "+t[2]+")":0==t[3]?"rgba("+t[0]+", "+t[1]+", "+t[2]+", 0)":"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+String(t[3]/255).substr(1)+")"}function hex(e){3==(t=parse(e)).length&&t.push(255);var t,o=255==t[3],n=num2hex(t[0]),r=num2hex(t[1]),a=num2hex(t[2]),l=isshort(n,r,a,t=num2hex(Math.round(t[3])));return o?l?"#"+n.charAt(0)+r.charAt(0)+a.charAt(0):"#"+n+r+a:l?"#"+n.charAt(0)+r.charAt(0)+a.charAt(0)+t.charAt(0):"#"+n+r+a+t}function num(e){var t=parse(e);return 3==t.length?t.push(255):t[3]=Math.round(t[3]),(t[3]<<24>>>0|t[0]<<16|t[1]<<8|t[2])>>>0}function parse(e){return"string"==typeof e?name(e=e.toLowerCase())||hex3(e)||hex6(e)||rgb(e)||rgba(e)||[0,0,0,255]:object(e)||array(e)||number(e)||[0,0,0,255]}function num2hex(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function isshort(e,t,o,n){var r=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=r.indexOf(e)&&-1!=r.indexOf(t)&&-1!=r.indexOf(o)&&-1!=r.indexOf(n)}function name(e){return"red"==e?[255,0,0]:"green"==e?[0,255,0]:"blue"==e?[0,0,255]:"black"==e?[0,0,0]:"white"==e?[255,255,255]:"cyan"==e?[0,255,255]:"gray"==e||"grey"==e?[128,128,128]:"magenta"==e||"pink"==e?[255,0,255]:"yellow"==e?[255,255,0]:void 0}function hex2num(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function hex3(e){var t=e.replace(/^#/,""),o=t.length;if(3==o||4==o){var n=hex2num(t[0]),r=hex2num(t[1]),a=hex2num(t[2]),l=3==o?255:hex2num(t[3]);if(isNaN(n)||isNaN(r)||isNaN(a)||isNaN(l))return;return[n,r,a,l]}}function hex6(e){var t=e.replace(/^#/,""),o=t.length;if(6==o||8==o){var n=hex2num(t.slice(0,2)),r=hex2num(t.slice(2,4)),a=hex2num(t.slice(4,6)),l=6==o?255:hex2num(t.slice(6,8));if(isNaN(n)||isNaN(r)||isNaN(a)||isNaN(l))return;return[n,r,a,l]}}function getnum(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}function object(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=getnum(null!=e.r?e.r:null!=e.red?e.red:0,!0),o=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),n=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),r=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),o=getnum(e[1],!0),n=getnum(e[2],!0),r=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function number(e){if("number"==typeof e&&Math.floor(e)==e&&e<=4294967295&&e>=0)return[e>>16&255,e>>8&255,255&e,e>>24&255]}function rgb(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0);if(-1!=o&&-1!=n&&-1!=r)return[o,n,r,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0),a=getnum(255*t[3]);if(-1!=o&&-1!=n&&-1!=r&&-1!=a)return[o,n,r,a]}}rgbaConvert.exports=arr,rgbaConvert.exports.arr=arr,rgbaConvert.exports.obj=obj,rgbaConvert.exports.css=css,rgbaConvert.exports.hex=hex,rgbaConvert.exports.num=num;const rgba$1=rgbaConvert.exports,pushNodes=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},querySelectorAll=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const o=new Set;pushNodes(o,t.querySelectorAll(e));const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;pushNodes(o,querySelectorAll(e,"object"==typeof r&&null!==r?r:n[t]))}return Array.from(o)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},querySelector=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let o=t.querySelector(e);if(null===o){const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;if(o=querySelector(e,"object"==typeof r&&null!==r?r:n[t]),null!==o)break}}return o}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")},OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTarget=(e,t)=>{getExperimentalMode()&&(Log.debug([e,t]),Log.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,o,n;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,o)=>{var n;const r=t.get("beforePatch");"function"==typeof r&&r(null===(n=e.nextState)||void 0===n?void 0:n.get(o),e.nextState,e,o)})),(null===(o=e.nextState)||void 0===o?void 0:o.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(n=e.nextHooks)||void 0===n||n.forEach(((t,o)=>{const n=t.get("afterPatch");"function"==typeof n&&n(e.state[o],e.state,e,o)}))),delete e.nextHooks},setState=(e,t,o,n={})=>{var r,a;void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map);e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof n.afterPatch&&(null===(r=e.nextHooks.get(t))||void 0===r||r.set("afterPatch",n.afterPatch)),"function"==typeof n.beforePatch&&(null===(a=e.nextHooks.get(t))||void 0===a||a.set("beforePatch",n.beforePatch)),e.nextState.set(t,o),patchState(e)},logWarn=(e,t,o,n)=>{devHint(`[${e.constructor.name}] The property value: (${o}) for '${t}' is not valid. Allowed values are: ${Array.from(n).join(", ")}`)};function watchValidator(e,t,o,n,r,a={}){o(r)?setState(e,t,r,a.hooks):void 0===r&&!0!==a.required&&o(a.defaultValue)?setState(e,t,a.defaultValue,a.hooks):(a.required||n.add(null),logWarn(e,t,r,n))}const watchBoolean=(e,t,o,n)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),o,n)},watchString=(e,t,o,n={})=>{const r="number"==typeof n.minLength?null==n?void 0:n.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=r&&(void 0===(null==n?void 0:n.maxLength)||e.length<=n.maxLength)),new Set(["String"]),o,n)},watchNumber=(e,t,o,n)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==n?void 0:n.min)||"number"==typeof(null==n?void 0:n.min)&&e>=n.min)&&(void 0===(null==n?void 0:n.max)||"number"==typeof(null==n?void 0:n.max)&&e<=n.max)),new Set(["Number"]),o,n)},watchJsonArrayString=(e,t,o,n,r=e=>e==e,a={})=>{emptyStringByArrayHandler(n,(()=>{objectObjectHandler(n,(()=>{void 0===n&&(n=[]);try{try{n=parseJson(n)}catch(e){}if(Array.isArray(n)){const l=n.find((e=>!o(e)));void 0===l&&r(n)?setState(e,t,n,a.hooks):objectObjectHandler(l,(()=>{throw Log.debug(l),new Error("↑ The schema for the property (_options) is not valid. The value will not be changed.")}))}else objectObjectHandler(n,(()=>{throw Log.debug(n),new Error("↑ The schema for the property (_options) is not valid. The value will not be changed.")}))}catch(e){Log.debug(e)}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?(0|[1-9]\d*)$/,FLOAT=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,mapString2Unknown=e=>{const t=typeof e,o=`${e}`;if("string"==typeof e)if(BOOLEAN.test(e))e="true"===e;else if(INTEGER.test(e))e=parseInt(e);else if(FLOAT.test(e))e=parseFloat(e);else if(JSON_CHARS.test(e))try{e=parseJson(e)}catch(e){}return t!==typeof e&&devHint(`You have used a stringified property value (${o} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},stringifyJson=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw Log.warn(["stringifyJson",e]),Log.error("↑ The JSON could not be converted to a string. A stringifiable JSON is expected."),new Error}},JSON_CHARS=/^[{[]/,parseJson=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(JSON_CHARS.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){Log.warn(["parseJson",e]),Log.error("↑ The JSON string could not be parsed. Make sure that single quotes in the text are escaped (&#8216;).")}}throw new Error},mapBoolean2String=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,mapStringOrBoolean2String=e=>"string"==typeof e?e:mapBoolean2String(e),koliBriQuerySelector=(e,t)=>querySelector(e,t||getDocument()),koliBriQuerySelectorAll=(e,t)=>querySelectorAll(e,t||getDocument());let DEFAULT_COLOR_CONTRAST=null;const getDefaultColorContrast=()=>(DEFAULT_COLOR_CONTRAST=DEFAULT_COLOR_CONTRAST||{backgroundColor:"#00000000",color:"#00000000",domNode:getDocument().body,level:"Fail",score:1},DEFAULT_COLOR_CONTRAST),TRANSPARENT_REGEXP=/(\d+, ){3}0\)/,koliBriA11yColorContrast=(e,t=getDefaultColorContrast())=>{const o=getComputedStyle(e),n=TRANSPARENT_REGEXP.test(o.backgroundColor)?t.backgroundColor:rgba$1.hex(o.backgroundColor),r=TRANSPARENT_REGEXP.test(o.color)?t.color:rgba$1.hex(o.color),a=s(n,r),l={backgroundColor:n,color:r,domNode:e,level:f(a),score:a};return a<4.5&&Log.error(["Color-Contrast-Error",{backgroundColor:l.backgroundColor,color:l.color,level:l.level,score:l.score},l.domNode]),l},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const o=t.domNode.querySelector(e);if(null===o){const o=t.domNode.querySelectorAll('[class="hydrated"]');for(let n=0;n<o.length&&(t.domNode=o[n],null===(t=koliBriQuerySelectorColors(e,t)).domNode);n++);return t}return koliBriA11yColorContrast(o,t)};class KoliBriUtils{static queryHtmlElementColors(e,t,o=!1,n=!0){let r=null;if(!0===o||!1===KoliBriUtils.executionLock)if(!1===o&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===n&&Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)r=t;else{const o=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)o.add(e[t])}const n=t.domNode;if("function"==typeof n.assignedNodes){const e=n.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&o.add(e[t])}const a=t.domNode.children;for(let e=0;e<a.length;e++)o.add(a[e]);const l=Array.from(o);for(let o=0;o<l.length;o++){let n=KoliBriUtils.cache.get(l[o]);void 0===n&&(n=koliBriA11yColorContrast(l[o],t)),KoliBriUtils.cache.set(l[o],n);const a=KoliBriUtils.queryHtmlElementColors(e,n,!0,!1);if(null!==a){r=a;break}}}else Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===o&&(!0===n&&Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),r}}KoliBriUtils.executionLock=!1,KoliBriUtils.cache=new Map;class KoliBriDevHelper{}KoliBriDevHelper.getCssStyle=m,KoliBriDevHelper.patchTheme=D,KoliBriDevHelper.patchThemeTag=P,KoliBriDevHelper.querySelector=koliBriQuerySelector,KoliBriDevHelper.querySelectorAll=koliBriQuerySelectorAll,KoliBriDevHelper.stringifyJson=stringifyJson;export{emptyStringByArrayHandler as A,koliBriQuerySelector as B,C,koliBriA11yColorContrast as D,koliBriQuerySelectorAll as E,koliBriQuerySelectorColors as F,KoliBriUtils as G,stringifyJson as H,KoliBriDevHelper as K,a11yHint as a,watchBoolean as b,a11yHintDisabled as c,watchString as d,rgba$1 as e,featureHint as f,s as g,a11yHintLabelingLandmarks as h,ie as i,watchJsonArrayString as j,uiUxHintMillerscheZahl as k,mapStringOrBoolean2String as l,mapBoolean2String as m,setEventTarget as n,objectObjectHandler as o,parseJson as p,q,re as r,setState as s,devHint as t,uiUxHint as u,devWarning as v,watchValidator as w,watchNumber as x,mapString2Unknown as y,deprecatedHint as z};