@public-ui/components 3.0.1 → 3.0.2-1e1d8522b9f6826d286c64e7859e0ac6d14b13a9.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 (544) hide show
  1. package/README.md +58 -8
  2. package/custom-elements.json +149 -1
  3. package/dist/cjs/Alert-95d222c3.js +4 -0
  4. package/dist/cjs/Alert-95d222c3.js.map +1 -0
  5. package/dist/cjs/{Collapsible-5aa541cb.js → Collapsible-27685355.js} +1 -1
  6. package/dist/cjs/{Collapsible-5aa541cb.js.map → Collapsible-27685355.js.map} +1 -1
  7. package/dist/cjs/CustomSuggestionsOptionsGroup-faff6757.js +4 -0
  8. package/dist/cjs/CustomSuggestionsOptionsGroup-faff6757.js.map +1 -0
  9. package/dist/cjs/{FieldControlStateWrapper-18976ee0.js → FieldControlStateWrapper-1f9f63c3.js} +1 -1
  10. package/dist/cjs/{FieldControlStateWrapper-18976ee0.js.map → FieldControlStateWrapper-1f9f63c3.js.map} +1 -1
  11. package/dist/cjs/{Heading-90ce384c.js → Heading-9f8e6122.js} +1 -1
  12. package/dist/cjs/{Heading-90ce384c.js.map → Heading-9f8e6122.js.map} +1 -1
  13. package/dist/cjs/Icon-363ceed6.js +4 -0
  14. package/dist/cjs/{Icon-add098ba.js.map → Icon-363ceed6.js.map} +1 -1
  15. package/dist/cjs/{Input-4af8f547.js → Input-2cae1c79.js} +1 -1
  16. package/dist/cjs/{Input-4af8f547.js.map → Input-2cae1c79.js.map} +1 -1
  17. package/dist/cjs/{InputStateWrapper-587d58dd.js → InputStateWrapper-e5f8a125.js} +1 -1
  18. package/dist/cjs/{InputStateWrapper-587d58dd.js.map → InputStateWrapper-e5f8a125.js.map} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js → InternalUnderlinedBadgeText-fae7644a.js} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js.map → InternalUnderlinedBadgeText-fae7644a.js.map} +1 -1
  21. package/dist/cjs/{Span-cd26b541.js → Span-e67cc75c.js} +1 -1
  22. package/dist/cjs/{Span-cd26b541.js.map → Span-e67cc75c.js.map} +1 -1
  23. package/dist/cjs/align-floating-elements-8ddb8593.js +4 -0
  24. package/dist/cjs/align-floating-elements-8ddb8593.js.map +1 -0
  25. package/dist/cjs/{app-globals-81f95eac.js → app-globals-9ceafddc.js} +1 -1
  26. package/dist/cjs/{app-globals-81f95eac.js.map → app-globals-9ceafddc.js.map} +1 -1
  27. package/dist/cjs/{associated.controller-03ae298d.js → associated.controller-7b651bde.js} +1 -1
  28. package/dist/cjs/{associated.controller-03ae298d.js.map → associated.controller-7b651bde.js.map} +1 -1
  29. package/dist/cjs/{bootstrap-e11bb4f7.js → bootstrap-0ea93cf5.js} +1 -1
  30. package/dist/cjs/{bootstrap-e11bb4f7.js.map → bootstrap-0ea93cf5.js.map} +1 -1
  31. package/dist/cjs/component-names-1cb5b7ce.js +4 -0
  32. package/dist/cjs/component-names-1cb5b7ce.js.map +1 -0
  33. package/dist/cjs/{controller-ead08764.js → controller-2ac6da6b.js} +1 -1
  34. package/dist/cjs/{controller-ead08764.js.map → controller-2ac6da6b.js.map} +1 -1
  35. package/dist/cjs/{controller-61f2f5b4.js → controller-58d062d3.js} +1 -1
  36. package/dist/cjs/{controller-61f2f5b4.js.map → controller-58d062d3.js.map} +1 -1
  37. package/dist/cjs/{controller-cb68b652.js → controller-75a14bc0.js} +1 -1
  38. package/dist/cjs/{controller-cb68b652.js.map → controller-75a14bc0.js.map} +1 -1
  39. package/dist/cjs/{controller-b2da8abe.js → controller-e1671afc.js} +1 -1
  40. package/dist/cjs/{controller-b2da8abe.js.map → controller-e1671afc.js.map} +1 -1
  41. package/dist/cjs/{controller-icon-429a5f31.js → controller-icon-570b1854.js} +1 -1
  42. package/dist/cjs/{controller-icon-429a5f31.js.map → controller-icon-570b1854.js.map} +1 -1
  43. package/dist/cjs/{dev.utils-6759aaf5.js → dev.utils-dcfea774.js} +1 -1
  44. package/dist/cjs/{dev.utils-6759aaf5.js.map → dev.utils-dcfea774.js.map} +1 -1
  45. package/dist/cjs/{devtools-3485dda6.js → devtools-65916bdb.js} +1 -1
  46. package/dist/cjs/{devtools-3485dda6.js.map → devtools-65916bdb.js.map} +1 -1
  47. package/dist/cjs/{getRenderStates-8372d842.js → getRenderStates-d82906ff.js} +1 -1
  48. package/dist/cjs/{getRenderStates-8372d842.js.map → getRenderStates-d82906ff.js.map} +1 -1
  49. package/dist/cjs/index-77bc3aef.js +4 -0
  50. package/dist/cjs/index-77bc3aef.js.map +1 -0
  51. package/dist/cjs/index.cjs.js +1 -1
  52. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  64. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-card-wc.cjs.entry.js +4 -0
  66. package/dist/cjs/kol-card-wc.cjs.entry.js.map +1 -0
  67. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-drawer.cjs.entry.js.map +1 -1
  74. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-pagination-wc.cjs.entry.js +4 -0
  98. package/dist/cjs/kol-pagination-wc.cjs.entry.js.map +1 -0
  99. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  101. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-popover-button-wc.cjs.entry.js.map +1 -1
  103. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-popover-button.cjs.entry.js.map +1 -1
  105. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  111. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  115. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-table-stateful.cjs.entry.js.map +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-stateless.cjs.entry.js.map +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-tooltip-wc.cjs.entry.js.map +1 -1
  127. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  132. package/dist/cjs/kolibri.cjs.js +1 -1
  133. package/dist/cjs/loader.cjs.js +1 -1
  134. package/dist/cjs/test-component.cjs.entry.js +1 -1
  135. package/dist/components/Alert.js +1 -1
  136. package/dist/components/Alert.js.map +1 -1
  137. package/dist/components/CustomSuggestionsOptionsGroup.js +1 -1
  138. package/dist/components/CustomSuggestionsOptionsGroup.js.map +1 -1
  139. package/dist/components/align-floating-elements.js +1 -1
  140. package/dist/components/align-floating-elements.js.map +1 -1
  141. package/dist/components/component-names.js +1 -1
  142. package/dist/components/component-names.js.map +1 -1
  143. package/dist/components/kol-alert-wc.js +1 -1
  144. package/dist/components/kol-alert-wc.js.map +1 -1
  145. package/dist/components/kol-button-wc.js +1 -1
  146. package/dist/components/kol-button-wc.js.map +1 -1
  147. package/dist/components/kol-card-wc.d.ts +11 -0
  148. package/dist/components/kol-card-wc.js +4 -0
  149. package/dist/components/kol-card-wc.js.map +1 -0
  150. package/dist/components/kol-card.js +1 -1
  151. package/dist/components/kol-card.js.map +1 -1
  152. package/dist/components/kol-combobox.js +1 -1
  153. package/dist/components/kol-combobox.js.map +1 -1
  154. package/dist/components/kol-details.js +1 -1
  155. package/dist/components/kol-drawer.js +1 -1
  156. package/dist/components/kol-drawer.js.map +1 -1
  157. package/dist/components/kol-form.js +1 -1
  158. package/dist/components/kol-heading.js +1 -1
  159. package/dist/components/kol-icon.js +1 -1
  160. package/dist/components/kol-icon.js.map +1 -1
  161. package/dist/components/kol-image.js +1 -1
  162. package/dist/components/kol-image.js.map +1 -1
  163. package/dist/components/kol-input-checkbox.js +1 -1
  164. package/dist/components/kol-input-color.js +1 -1
  165. package/dist/components/kol-input-date.js +1 -1
  166. package/dist/components/kol-input-email.js +1 -1
  167. package/dist/components/kol-input-file.js +1 -1
  168. package/dist/components/kol-input-number.js +1 -1
  169. package/dist/components/kol-input-password.js +1 -1
  170. package/dist/components/kol-input-radio.js +1 -1
  171. package/dist/components/kol-input-range.js +1 -1
  172. package/dist/components/kol-input-text.js +1 -1
  173. package/dist/components/kol-kolibri.js +1 -1
  174. package/dist/components/kol-link-button.js +1 -1
  175. package/dist/components/kol-link-wc.js +1 -1
  176. package/dist/components/kol-link.js +1 -1
  177. package/dist/components/kol-modal.js +1 -1
  178. package/dist/components/kol-nav.js +1 -1
  179. package/dist/components/kol-nav.js.map +1 -1
  180. package/dist/components/kol-pagination-wc.d.ts +11 -0
  181. package/dist/components/kol-pagination-wc.js +4 -0
  182. package/dist/components/kol-pagination-wc.js.map +1 -0
  183. package/dist/components/kol-pagination.js +1 -1
  184. package/dist/components/kol-pagination.js.map +1 -1
  185. package/dist/components/kol-popover-button-wc.js +1 -1
  186. package/dist/components/kol-popover-button-wc.js.map +1 -1
  187. package/dist/components/kol-popover-button.js +1 -1
  188. package/dist/components/kol-popover-button.js.map +1 -1
  189. package/dist/components/kol-popover-wc.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-single-select.js.map +1 -1
  195. package/dist/components/kol-skip-nav.js +1 -1
  196. package/dist/components/kol-spin.js +1 -1
  197. package/dist/components/kol-split-button.js +1 -1
  198. package/dist/components/kol-split-button.js.map +1 -1
  199. package/dist/components/kol-table-settings-wc.js +1 -1
  200. package/dist/components/kol-table-stateful.js +1 -1
  201. package/dist/components/kol-table-stateful.js.map +1 -1
  202. package/dist/components/kol-table-stateless-wc.js +1 -1
  203. package/dist/components/kol-table-stateless.js +1 -1
  204. package/dist/components/kol-table-stateless.js.map +1 -1
  205. package/dist/components/kol-tabs.js +1 -1
  206. package/dist/components/kol-textarea.js +1 -1
  207. package/dist/components/kol-toast-container.js +1 -1
  208. package/dist/components/kol-toolbar.js +1 -1
  209. package/dist/components/kol-tooltip-wc.js +1 -1
  210. package/dist/components/kol-tooltip-wc.js.map +1 -1
  211. package/dist/components/kol-tree-item-wc.js +1 -1
  212. package/dist/components/kol-tree-item.js +1 -1
  213. package/dist/components/kol-tree-wc.js +1 -1
  214. package/dist/components/kol-tree.js +1 -1
  215. package/dist/components/kol-version.js +1 -1
  216. package/dist/esm/Alert-e58cf301.js +4 -0
  217. package/dist/esm/Alert-e58cf301.js.map +1 -0
  218. package/dist/esm/{Collapsible-af548d40.js → Collapsible-556bd10b.js} +1 -1
  219. package/dist/esm/{Collapsible-af548d40.js.map → Collapsible-556bd10b.js.map} +1 -1
  220. package/dist/esm/CustomSuggestionsOptionsGroup-72c6ff70.js +4 -0
  221. package/dist/esm/CustomSuggestionsOptionsGroup-72c6ff70.js.map +1 -0
  222. package/dist/esm/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-0cd044eb.js} +1 -1
  223. package/dist/esm/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-0cd044eb.js.map} +1 -1
  224. package/dist/esm/{Heading-733c8dda.js → Heading-dcf25cb6.js} +1 -1
  225. package/dist/esm/{Heading-733c8dda.js.map → Heading-dcf25cb6.js.map} +1 -1
  226. package/dist/esm/Icon-cd576310.js +4 -0
  227. package/dist/esm/{Icon-446dff9e.js.map → Icon-cd576310.js.map} +1 -1
  228. package/dist/esm/{Input-8502a991.js → Input-673592ef.js} +1 -1
  229. package/dist/esm/{Input-8502a991.js.map → Input-673592ef.js.map} +1 -1
  230. package/dist/esm/{InputStateWrapper-9b8419a8.js → InputStateWrapper-c166c7ed.js} +1 -1
  231. package/dist/esm/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-c166c7ed.js.map} +1 -1
  232. package/dist/esm/InternalUnderlinedBadgeText-2223c9c3.js +4 -0
  233. package/dist/esm/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-2223c9c3.js.map} +1 -1
  234. package/dist/esm/{Span-d15a3ea1.js → Span-0d93e5fa.js} +1 -1
  235. package/dist/esm/{Span-d15a3ea1.js.map → Span-0d93e5fa.js.map} +1 -1
  236. package/dist/esm/align-floating-elements-9459ccc3.js +4 -0
  237. package/dist/esm/align-floating-elements-9459ccc3.js.map +1 -0
  238. package/dist/esm/{app-globals-081a982f.js → app-globals-4a4a31c2.js} +1 -1
  239. package/dist/esm/{app-globals-081a982f.js.map → app-globals-4a4a31c2.js.map} +1 -1
  240. package/dist/esm/{associated.controller-92af2554.js → associated.controller-4237c28d.js} +1 -1
  241. package/dist/esm/{associated.controller-92af2554.js.map → associated.controller-4237c28d.js.map} +1 -1
  242. package/dist/esm/{bootstrap-93c7a706.js → bootstrap-53ed580c.js} +1 -1
  243. package/dist/esm/{bootstrap-93c7a706.js.map → bootstrap-53ed580c.js.map} +1 -1
  244. package/dist/esm/component-names-0657b355.js +4 -0
  245. package/dist/esm/component-names-0657b355.js.map +1 -0
  246. package/dist/esm/{controller-91a4c3ba.js → controller-235b6c3b.js} +1 -1
  247. package/dist/esm/{controller-91a4c3ba.js.map → controller-235b6c3b.js.map} +1 -1
  248. package/dist/esm/{controller-912bda08.js → controller-31137f06.js} +1 -1
  249. package/dist/esm/{controller-912bda08.js.map → controller-31137f06.js.map} +1 -1
  250. package/dist/esm/{controller-f5a335ce.js → controller-c152770e.js} +1 -1
  251. package/dist/esm/{controller-f5a335ce.js.map → controller-c152770e.js.map} +1 -1
  252. package/dist/esm/{controller-ce246aad.js → controller-d70d121a.js} +1 -1
  253. package/dist/esm/{controller-ce246aad.js.map → controller-d70d121a.js.map} +1 -1
  254. package/dist/esm/{controller-icon-de12de48.js → controller-icon-14c213a2.js} +1 -1
  255. package/dist/esm/{controller-icon-de12de48.js.map → controller-icon-14c213a2.js.map} +1 -1
  256. package/dist/esm/{dev.utils-cb61837d.js → dev.utils-300c83a4.js} +1 -1
  257. package/dist/esm/{dev.utils-cb61837d.js.map → dev.utils-300c83a4.js.map} +1 -1
  258. package/dist/esm/{devtools-90d0e710.js → devtools-ca41eeaf.js} +1 -1
  259. package/dist/esm/{devtools-90d0e710.js.map → devtools-ca41eeaf.js.map} +1 -1
  260. package/dist/esm/{getRenderStates-c4b5c6cb.js → getRenderStates-d5b07576.js} +1 -1
  261. package/dist/esm/{getRenderStates-c4b5c6cb.js.map → getRenderStates-d5b07576.js.map} +1 -1
  262. package/dist/esm/index-aa2635d0.js +4 -0
  263. package/dist/esm/index-aa2635d0.js.map +1 -0
  264. package/dist/esm/index.js +1 -1
  265. package/dist/esm/kol-abbr.entry.js +1 -1
  266. package/dist/esm/kol-accordion.entry.js +1 -1
  267. package/dist/esm/kol-alert-wc.entry.js +1 -1
  268. package/dist/esm/kol-alert-wc.entry.js.map +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-link.entry.js +1 -1
  275. package/dist/esm/kol-button-wc.entry.js +1 -1
  276. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  277. package/dist/esm/kol-button.entry.js +1 -1
  278. package/dist/esm/kol-card-wc.entry.js +4 -0
  279. package/dist/esm/kol-card-wc.entry.js.map +1 -0
  280. package/dist/esm/kol-card.entry.js +1 -1
  281. package/dist/esm/kol-card.entry.js.map +1 -1
  282. package/dist/esm/kol-combobox.entry.js +1 -1
  283. package/dist/esm/kol-combobox.entry.js.map +1 -1
  284. package/dist/esm/kol-details.entry.js +1 -1
  285. package/dist/esm/kol-drawer.entry.js +1 -1
  286. package/dist/esm/kol-drawer.entry.js.map +1 -1
  287. package/dist/esm/kol-form.entry.js +1 -1
  288. package/dist/esm/kol-heading.entry.js +1 -1
  289. package/dist/esm/kol-icon.entry.js +1 -1
  290. package/dist/esm/kol-icon.entry.js.map +1 -1
  291. package/dist/esm/kol-image.entry.js +1 -1
  292. package/dist/esm/kol-image.entry.js.map +1 -1
  293. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  294. package/dist/esm/kol-input-color.entry.js +1 -1
  295. package/dist/esm/kol-input-date.entry.js +1 -1
  296. package/dist/esm/kol-input-email.entry.js +1 -1
  297. package/dist/esm/kol-input-file.entry.js +1 -1
  298. package/dist/esm/kol-input-number.entry.js +1 -1
  299. package/dist/esm/kol-input-password.entry.js +1 -1
  300. package/dist/esm/kol-input-radio.entry.js +1 -1
  301. package/dist/esm/kol-input-range.entry.js +1 -1
  302. package/dist/esm/kol-input-text.entry.js +1 -1
  303. package/dist/esm/kol-kolibri.entry.js +1 -1
  304. package/dist/esm/kol-link-button.entry.js +1 -1
  305. package/dist/esm/kol-link-wc.entry.js +1 -1
  306. package/dist/esm/kol-link.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-nav.entry.js.map +1 -1
  310. package/dist/esm/kol-pagination-wc.entry.js +4 -0
  311. package/dist/esm/kol-pagination-wc.entry.js.map +1 -0
  312. package/dist/esm/kol-pagination.entry.js +1 -1
  313. package/dist/esm/kol-pagination.entry.js.map +1 -1
  314. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  315. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  316. package/dist/esm/kol-popover-button.entry.js +1 -1
  317. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  318. package/dist/esm/kol-popover-wc.entry.js +1 -1
  319. package/dist/esm/kol-progress.entry.js +1 -1
  320. package/dist/esm/kol-quote.entry.js +1 -1
  321. package/dist/esm/kol-select.entry.js +1 -1
  322. package/dist/esm/kol-single-select.entry.js +1 -1
  323. package/dist/esm/kol-single-select.entry.js.map +1 -1
  324. package/dist/esm/kol-skip-nav.entry.js +1 -1
  325. package/dist/esm/kol-spin.entry.js +1 -1
  326. package/dist/esm/kol-split-button.entry.js +1 -1
  327. package/dist/esm/kol-split-button.entry.js.map +1 -1
  328. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  329. package/dist/esm/kol-table-stateful.entry.js +1 -1
  330. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  331. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  332. package/dist/esm/kol-table-stateless.entry.js +1 -1
  333. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  334. package/dist/esm/kol-tabs.entry.js +1 -1
  335. package/dist/esm/kol-textarea.entry.js +1 -1
  336. package/dist/esm/kol-toast-container.entry.js +1 -1
  337. package/dist/esm/kol-toolbar.entry.js +1 -1
  338. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  339. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  340. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  341. package/dist/esm/kol-tree-item.entry.js +1 -1
  342. package/dist/esm/kol-tree-wc.entry.js +1 -1
  343. package/dist/esm/kol-tree.entry.js +1 -1
  344. package/dist/esm/kol-version.entry.js +1 -1
  345. package/dist/esm/kolibri.js +1 -1
  346. package/dist/esm/loader.js +1 -1
  347. package/dist/esm/test-component.entry.js +1 -1
  348. package/dist/kolibri/Alert-e58cf301.js +4 -0
  349. package/dist/kolibri/Alert-e58cf301.js.map +1 -0
  350. package/dist/kolibri/{Collapsible-af548d40.js → Collapsible-556bd10b.js} +1 -1
  351. package/dist/kolibri/CustomSuggestionsOptionsGroup-72c6ff70.js +4 -0
  352. package/dist/kolibri/CustomSuggestionsOptionsGroup-72c6ff70.js.map +1 -0
  353. package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-0cd044eb.js} +1 -1
  354. package/dist/kolibri/{Heading-733c8dda.js → Heading-dcf25cb6.js} +1 -1
  355. package/dist/kolibri/Icon-cd576310.js +4 -0
  356. package/dist/kolibri/Input-673592ef.js +4 -0
  357. package/dist/kolibri/{InputStateWrapper-9b8419a8.js → InputStateWrapper-c166c7ed.js} +1 -1
  358. package/dist/kolibri/InternalUnderlinedBadgeText-2223c9c3.js +4 -0
  359. package/dist/kolibri/Span-0d93e5fa.js +4 -0
  360. package/dist/kolibri/{Span-d15a3ea1.js.map → Span-0d93e5fa.js.map} +1 -1
  361. package/dist/kolibri/align-floating-elements-9459ccc3.js +4 -0
  362. package/dist/kolibri/align-floating-elements-9459ccc3.js.map +1 -0
  363. package/dist/kolibri/app-globals-4a4a31c2.js +4 -0
  364. package/dist/kolibri/{associated.controller-92af2554.js → associated.controller-4237c28d.js} +1 -1
  365. package/dist/kolibri/{bootstrap-93c7a706.js → bootstrap-53ed580c.js} +1 -1
  366. package/dist/kolibri/component-names-0657b355.js +4 -0
  367. package/dist/kolibri/component-names-0657b355.js.map +1 -0
  368. package/dist/kolibri/{controller-91a4c3ba.js → controller-235b6c3b.js} +1 -1
  369. package/dist/kolibri/{controller-912bda08.js → controller-31137f06.js} +1 -1
  370. package/dist/kolibri/{controller-f5a335ce.js → controller-c152770e.js} +1 -1
  371. package/dist/kolibri/{controller-ce246aad.js → controller-d70d121a.js} +1 -1
  372. package/dist/kolibri/{controller-icon-de12de48.js → controller-icon-14c213a2.js} +1 -1
  373. package/dist/kolibri/{dev.utils-cb61837d.js → dev.utils-300c83a4.js} +1 -1
  374. package/dist/kolibri/{devtools-90d0e710.js → devtools-ca41eeaf.js} +1 -1
  375. package/dist/kolibri/{getRenderStates-c4b5c6cb.js → getRenderStates-d5b07576.js} +1 -1
  376. package/dist/kolibri/{index-1ed13705.js → index-aa2635d0.js} +1 -1
  377. package/dist/kolibri/index-aa2635d0.js.map +1 -0
  378. package/dist/kolibri/index.esm.js +1 -1
  379. package/dist/kolibri/kol-abbr.entry.js +1 -1
  380. package/dist/kolibri/kol-accordion.entry.js +1 -1
  381. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  382. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  383. package/dist/kolibri/kol-alert.entry.js +1 -1
  384. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  385. package/dist/kolibri/kol-avatar.entry.js +1 -1
  386. package/dist/kolibri/kol-badge.entry.js +1 -1
  387. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  388. package/dist/kolibri/kol-button-link.entry.js +1 -1
  389. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  390. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  391. package/dist/kolibri/kol-button.entry.js +1 -1
  392. package/dist/kolibri/kol-card-wc.entry.js +4 -0
  393. package/dist/kolibri/kol-card-wc.entry.js.map +1 -0
  394. package/dist/kolibri/kol-card.entry.js +1 -1
  395. package/dist/kolibri/kol-card.entry.js.map +1 -1
  396. package/dist/kolibri/kol-combobox.entry.js +1 -1
  397. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  398. package/dist/kolibri/kol-details.entry.js +1 -1
  399. package/dist/kolibri/kol-drawer.entry.js +1 -1
  400. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  401. package/dist/kolibri/kol-form.entry.js +1 -1
  402. package/dist/kolibri/kol-heading.entry.js +1 -1
  403. package/dist/kolibri/kol-icon.entry.js +1 -1
  404. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  405. package/dist/kolibri/kol-image.entry.js +1 -1
  406. package/dist/kolibri/kol-image.entry.js.map +1 -1
  407. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  408. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  409. package/dist/kolibri/kol-input-color.entry.js +1 -1
  410. package/dist/kolibri/kol-input-date.entry.js +1 -1
  411. package/dist/kolibri/kol-input-email.entry.js +1 -1
  412. package/dist/kolibri/kol-input-file.entry.js +1 -1
  413. package/dist/kolibri/kol-input-number.entry.js +1 -1
  414. package/dist/kolibri/kol-input-password.entry.js +1 -1
  415. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  416. package/dist/kolibri/kol-input-range.entry.js +1 -1
  417. package/dist/kolibri/kol-input-text.entry.js +1 -1
  418. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  419. package/dist/kolibri/kol-link-button.entry.js +1 -1
  420. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  421. package/dist/kolibri/kol-link.entry.js +1 -1
  422. package/dist/kolibri/kol-modal.entry.js +1 -1
  423. package/dist/kolibri/kol-nav.entry.js +1 -1
  424. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  425. package/dist/kolibri/kol-pagination-wc.entry.js +4 -0
  426. package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -0
  427. package/dist/kolibri/kol-pagination.entry.js +1 -1
  428. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  429. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  430. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  431. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  432. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  433. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  434. package/dist/kolibri/kol-progress.entry.js +1 -1
  435. package/dist/kolibri/kol-quote.entry.js +1 -1
  436. package/dist/kolibri/kol-select.entry.js +1 -1
  437. package/dist/kolibri/kol-single-select.entry.js +1 -1
  438. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  439. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  440. package/dist/kolibri/kol-spin.entry.js +1 -1
  441. package/dist/kolibri/kol-split-button.entry.js +1 -1
  442. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  443. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  444. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  445. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  446. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  447. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  448. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  449. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  450. package/dist/kolibri/kol-tabs.entry.js +1 -1
  451. package/dist/kolibri/kol-textarea.entry.js +1 -1
  452. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  453. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  454. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  455. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  456. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  457. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  458. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  459. package/dist/kolibri/kol-tree.entry.js +1 -1
  460. package/dist/kolibri/kol-version.entry.js +1 -1
  461. package/dist/kolibri/kolibri.esm.js +1 -1
  462. package/dist/kolibri/kolibri.esm.js.map +1 -1
  463. package/dist/kolibri/test-component.entry.js +1 -1
  464. package/dist/types/components/button/component.d.ts +1 -2
  465. package/dist/types/components/card/component.d.ts +19 -0
  466. package/dist/types/components/card/shadow.d.ts +2 -12
  467. package/dist/types/components/drawer/shadow.d.ts +3 -1
  468. package/dist/types/components/pagination/component.d.ts +46 -0
  469. package/dist/types/components/pagination/shadow.d.ts +2 -32
  470. package/dist/types/components/split-button/shadow.d.ts +11 -4
  471. package/dist/types/components/tooltip/component.d.ts +5 -5
  472. package/dist/types/components.d.ts +190 -8
  473. package/dist/types/core/component-names.d.ts +2 -0
  474. package/dist/types/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.d.ts +1 -0
  475. package/dist/types/schema/components/drawer.d.ts +3 -3
  476. package/dist/types/schema/components/image.d.ts +5 -16
  477. package/dist/types/schema/props/alt.d.ts +7 -0
  478. package/dist/types/schema/props/image-sizes.d.ts +7 -0
  479. package/dist/types/schema/props/image-srcset.d.ts +7 -0
  480. package/dist/types/schema/props/index.d.ts +1 -1
  481. package/dist/types/schema/props/loading.d.ts +3 -0
  482. package/doc/card.md +1 -1
  483. package/doc/components.md +4 -4
  484. package/doc/drawer.md +7 -6
  485. package/doc/pagination.md +1 -1
  486. package/doc/split-button.md +41 -18
  487. package/package.json +5 -1
  488. package/postinstall.js +38 -0
  489. package/vscode-custom-data.json +100 -0
  490. package/dist/cjs/Alert-22627abf.js +0 -4
  491. package/dist/cjs/Alert-22627abf.js.map +0 -1
  492. package/dist/cjs/CustomSuggestionsOptionsGroup-421dca3c.js +0 -4
  493. package/dist/cjs/CustomSuggestionsOptionsGroup-421dca3c.js.map +0 -1
  494. package/dist/cjs/Icon-add098ba.js +0 -4
  495. package/dist/cjs/align-floating-elements-7e50809a.js +0 -4
  496. package/dist/cjs/align-floating-elements-7e50809a.js.map +0 -1
  497. package/dist/cjs/component-names-82c4d68d.js +0 -4
  498. package/dist/cjs/component-names-82c4d68d.js.map +0 -1
  499. package/dist/cjs/index-a40019ac.js +0 -4
  500. package/dist/cjs/index-a40019ac.js.map +0 -1
  501. package/dist/esm/Alert-112aec59.js +0 -4
  502. package/dist/esm/Alert-112aec59.js.map +0 -1
  503. package/dist/esm/CustomSuggestionsOptionsGroup-dcff90e4.js +0 -4
  504. package/dist/esm/CustomSuggestionsOptionsGroup-dcff90e4.js.map +0 -1
  505. package/dist/esm/Icon-446dff9e.js +0 -4
  506. package/dist/esm/InternalUnderlinedBadgeText-781ef373.js +0 -4
  507. package/dist/esm/align-floating-elements-526ce555.js +0 -4
  508. package/dist/esm/align-floating-elements-526ce555.js.map +0 -1
  509. package/dist/esm/component-names-7924d82a.js +0 -4
  510. package/dist/esm/component-names-7924d82a.js.map +0 -1
  511. package/dist/esm/index-1ed13705.js +0 -4
  512. package/dist/esm/index-1ed13705.js.map +0 -1
  513. package/dist/kolibri/Alert-112aec59.js +0 -4
  514. package/dist/kolibri/Alert-112aec59.js.map +0 -1
  515. package/dist/kolibri/CustomSuggestionsOptionsGroup-dcff90e4.js +0 -4
  516. package/dist/kolibri/CustomSuggestionsOptionsGroup-dcff90e4.js.map +0 -1
  517. package/dist/kolibri/Icon-446dff9e.js +0 -4
  518. package/dist/kolibri/Input-8502a991.js +0 -4
  519. package/dist/kolibri/InternalUnderlinedBadgeText-781ef373.js +0 -4
  520. package/dist/kolibri/Span-d15a3ea1.js +0 -4
  521. package/dist/kolibri/align-floating-elements-526ce555.js +0 -4
  522. package/dist/kolibri/align-floating-elements-526ce555.js.map +0 -1
  523. package/dist/kolibri/app-globals-081a982f.js +0 -4
  524. package/dist/kolibri/component-names-7924d82a.js +0 -4
  525. package/dist/kolibri/component-names-7924d82a.js.map +0 -1
  526. package/dist/kolibri/index-1ed13705.js.map +0 -1
  527. /package/dist/kolibri/{Collapsible-af548d40.js.map → Collapsible-556bd10b.js.map} +0 -0
  528. /package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-0cd044eb.js.map} +0 -0
  529. /package/dist/kolibri/{Heading-733c8dda.js.map → Heading-dcf25cb6.js.map} +0 -0
  530. /package/dist/kolibri/{Icon-446dff9e.js.map → Icon-cd576310.js.map} +0 -0
  531. /package/dist/kolibri/{Input-8502a991.js.map → Input-673592ef.js.map} +0 -0
  532. /package/dist/kolibri/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-c166c7ed.js.map} +0 -0
  533. /package/dist/kolibri/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-2223c9c3.js.map} +0 -0
  534. /package/dist/kolibri/{app-globals-081a982f.js.map → app-globals-4a4a31c2.js.map} +0 -0
  535. /package/dist/kolibri/{associated.controller-92af2554.js.map → associated.controller-4237c28d.js.map} +0 -0
  536. /package/dist/kolibri/{bootstrap-93c7a706.js.map → bootstrap-53ed580c.js.map} +0 -0
  537. /package/dist/kolibri/{controller-91a4c3ba.js.map → controller-235b6c3b.js.map} +0 -0
  538. /package/dist/kolibri/{controller-912bda08.js.map → controller-31137f06.js.map} +0 -0
  539. /package/dist/kolibri/{controller-f5a335ce.js.map → controller-c152770e.js.map} +0 -0
  540. /package/dist/kolibri/{controller-ce246aad.js.map → controller-d70d121a.js.map} +0 -0
  541. /package/dist/kolibri/{controller-icon-de12de48.js.map → controller-icon-14c213a2.js.map} +0 -0
  542. /package/dist/kolibri/{dev.utils-cb61837d.js.map → dev.utils-300c83a4.js.map} +0 -0
  543. /package/dist/kolibri/{devtools-90d0e710.js.map → devtools-ca41eeaf.js.map} +0 -0
  544. /package/dist/kolibri/{getRenderStates-c4b5c6cb.js.map → getRenderStates-d5b07576.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{I as watchNumber,l as watchString,i as watchBoolean,w as watchValidator,k as setState}from"./index2.js";import{n as nonce}from"./dev.utils.js";import{b as getDefaultProps,a as checkHasMsg,g as getRenderStates,c as convertMsgToInternMsg,F as FormFieldStateWrapper}from"./getRenderStates.js";import{_ as __rest}from"./tslib.es6.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./InputContainerStateWrapper.js";import{v as validateHasCounter}from"./has-counter.js";import{v as validateRows}from"./rows.js";import{v as validateSpellCheck}from"./spell-check.js";const cssResizeOptions=["vertical","none"],TextAreaFc=e=>{const{class:t,msg:a,touched:n,readonly:i,disabled:o,required:l,ariaDescribedBy:s,hideLabel:r,label:d}=e,c=__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),u=checkHasMsg(a,n),p={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(n),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${(null==a?void 0:a.type)||"error"}`]:u},_=Object.assign(Object.assign({class:clsx("kol-textarea",p,t),required:l,disabled:o,readonly:i},getDefaultProps({ariaDescribedBy:s,hideLabel:r,label:d})),c);return h("textarea",Object.assign({},_))};function getTextAreaProps(e){const{ariaDescribedBy:t}=getRenderStates(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,maxLength:e._maxLength,touched:e._touched,msg:convertMsgToInternMsg(e._msg)}}const TextAreaStateWrapper=e=>{var{state:t}=e,a=__rest(e,["state"]);return h(TextAreaFc,Object.assign({},getTextAreaProps(t),a))};class TextareaController extends InputIconController{constructor(e,t,a){super(e,t,a),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,{defaultValue:"vertical"})}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateSpellCheck(e){validateSpellCheck(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.validateSpellCheck(this.component._spellCheck),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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",KolTextareaDefaultStyle0=defaultStyleCss,increaseTextareaHeight=e=>{e.style.overflow="hidden";const t=e.rows,a=e.clientHeight/t;e.rows=1;const n=Math.round(e.scrollHeight/a);return e.rows=t,n},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":!!this.state._hasCounter}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize}},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"754dea74a89ae00f840540e45092d145055a30cd"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"c6823b12d2ee282a62dabd16e2c42509abe62862",state:this.state},h(TextAreaStateWrapper,Object.assign({key:"aa8ab23c18521e393e14a9ad716de8928d40a2ae"},this.getTextAreaProps()))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{if(this.textareaRef instanceof HTMLTextAreaElement){const t=this.textareaRef.value;setState(this,"_currentLength",t.length),this._value=t,this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e)}},this._accessKey=void 0,this._adjustHeight=!1,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!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._spellCheck=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new TextareaController(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}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){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>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"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_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"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolTextareaDefaultStyle0}}},[49,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_disabled:[4],_hasCounter:[4,"_has-counter"],_hideMsg:[1540,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_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"],_spellCheck:[4,"_spell-check"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_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"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_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{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{I as watchNumber,l as watchString,i as watchBoolean,w as watchValidator,k as setState}from"./index2.js";import{n as nonce}from"./dev.utils.js";import{b as getDefaultProps,a as checkHasMsg,g as getRenderStates,c as convertMsgToInternMsg,F as FormFieldStateWrapper}from"./getRenderStates.js";import{_ as __rest}from"./tslib.es6.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./InputContainerStateWrapper.js";import{v as validateHasCounter}from"./has-counter.js";import{v as validateRows}from"./rows.js";import{v as validateSpellCheck}from"./spell-check.js";const cssResizeOptions=["vertical","none"],TextAreaFc=e=>{const{class:t,msg:a,touched:n,readonly:i,disabled:o,required:l,ariaDescribedBy:s,hideLabel:r,label:d}=e,c=__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),u=checkHasMsg(a,n),p={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(n),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${(null==a?void 0:a.type)||"error"}`]:u},_=Object.assign(Object.assign({class:clsx("kol-textarea",p,t),required:l,disabled:o,readonly:i},getDefaultProps({ariaDescribedBy:s,hideLabel:r,label:d})),c);return h("textarea",Object.assign({},_))};function getTextAreaProps(e){const{ariaDescribedBy:t}=getRenderStates(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,maxLength:e._maxLength,touched:e._touched,msg:convertMsgToInternMsg(e._msg)}}const TextAreaStateWrapper=e=>{var{state:t}=e,a=__rest(e,["state"]);return h(TextAreaFc,Object.assign({},getTextAreaProps(t),a))};class TextareaController extends InputIconController{constructor(e,t,a){super(e,t,a),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,{defaultValue:"vertical"})}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateSpellCheck(e){validateSpellCheck(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.validateSpellCheck(this.component._spellCheck),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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",KolTextareaDefaultStyle0=defaultStyleCss,increaseTextareaHeight=e=>{e.style.overflow="hidden";const t=e.rows,a=e.clientHeight/t;e.rows=1;const n=Math.round(e.scrollHeight/a);return e.rows=t,n},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":!!this.state._hasCounter}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize}},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"92d2decb15fa4fa25f86387d6f911e5988f17c12"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"6bfa13c2aae8fa96002903b7c4064bff6868984c",state:this.state},h(TextAreaStateWrapper,Object.assign({key:"40aa057c2a81472a4db3ac2a5ab69392afce5037"},this.getTextAreaProps()))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{if(this.textareaRef instanceof HTMLTextAreaElement){const t=this.textareaRef.value;setState(this,"_currentLength",t.length),this._value=t,this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e)}},this._accessKey=void 0,this._adjustHeight=!1,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!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._spellCheck=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new TextareaController(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}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){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>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"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_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"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolTextareaDefaultStyle0}}},[49,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_disabled:[4],_hasCounter:[4,"_has-counter"],_hideMsg:[1540,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_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"],_spellCheck:[4,"_spell-check"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_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"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_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{h,proxyCustomElement,HTMLElement,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{n as nonce}from"./dev.utils.js";import{r as KolButtonTag}from"./component-names.js";import"./bem.js";import"./index2.js";import"./markdown.js";import{_ as __rest}from"./tslib.es6.js";import{K as KolAlertFc}from"./Alert.js";import{c as clsx}from"./clsx.js";const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,s=__rest(t,["status","toast","onClose"]);const{type:a,label:i,description:l,variant:r}=e;return h("div",{class:clsx("kol-toast-item",`kol-toast-item--${n}`)},h(KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:i,level:0,hasCloser:!0,type:a,variant:r||"card",onCloserClick:o},h("div",Object.assign({},s),l)))},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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n display: flex;\n flex-direction: column;\n position: fixed;\n z-index: 200;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",KolToastContainerDefaultStyle0=defaultStyleCss,TRANSITION_TIMEOUT=300,KolToastContainer$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${nonce()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),300),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((n=>(n.id===t.id&&(n.status="removing"),n)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>n.id!==t.id))})}),300)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map((t=>Object.assign(Object.assign({},t),{status:"removing"})))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>t.every((t=>t.id!==n.id))))})}),300)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return h(Host,{key:"43cab139328015afcc3105680b99a8880ad8c525",class:"kol-toast-container"},this.state._toastStates.length>1&&h(KolButtonTag,{key:"1c8af42ea396c97e400db71cb7aeb4522fa12d4e",_label:translate("kol-toast-close-all"),class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((t=>h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status}))))}static get style(){return{default:KolToastContainerDefaultStyle0}}},[33,"kol-toast-container",{state:[32],enqueue:[64],closeAll:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast-container"].forEach((t=>{if("kol-toast-container"===t)customElements.get(t)||customElements.define(t,KolToastContainer$1)}))}const KolToastContainer=KolToastContainer$1,defineCustomElement=defineCustomElement$1;export{KolToastContainer,defineCustomElement};
4
+ import{h,proxyCustomElement,HTMLElement,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{n as nonce}from"./dev.utils.js";import{t as KolButtonTag}from"./component-names.js";import"./bem.js";import"./index2.js";import"./markdown.js";import{_ as __rest}from"./tslib.es6.js";import{K as KolAlertFc}from"./Alert.js";import{c as clsx}from"./clsx.js";const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,s=__rest(t,["status","toast","onClose"]);const{type:a,label:i,description:l,variant:r}=e;return h("div",{class:clsx("kol-toast-item",`kol-toast-item--${n}`)},h(KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:i,level:0,hasCloser:!0,type:a,variant:r||"card",onCloserClick:o},h("div",Object.assign({},s),l)))},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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n display: flex;\n flex-direction: column;\n position: fixed;\n z-index: 200;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",KolToastContainerDefaultStyle0=defaultStyleCss,TRANSITION_TIMEOUT=300,KolToastContainer$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${nonce()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),300),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((n=>(n.id===t.id&&(n.status="removing"),n)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>n.id!==t.id))})}),300)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map((t=>Object.assign(Object.assign({},t),{status:"removing"})))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>t.every((t=>t.id!==n.id))))})}),300)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return h(Host,{key:"4286f2f18e5333c7238c10d5fa73167650b067a4",class:"kol-toast-container"},this.state._toastStates.length>1&&h(KolButtonTag,{key:"d00f8dde0a2cc279b13cadd17fcad3e585bb0164",_label:translate("kol-toast-close-all"),class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((t=>h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status}))))}static get style(){return{default:KolToastContainerDefaultStyle0}}},[33,"kol-toast-container",{state:[32],enqueue:[64],closeAll:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast-container"].forEach((t=>{if("kol-toast-container"===t)customElements.get(t)||customElements.define(t,KolToastContainer$1)}))}const KolToastContainer=KolToastContainer$1,defineCustomElement=defineCustomElement$1;export{KolToastContainer,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{O as emptyStringByArrayHandler,o as objectObjectHandler,m as parseJson,k as setState}from"./index2.js";import{f as KolLinkWcTag,b as KolButtonWcTag}from"./component-names.js";import{v as validateOrientation}from"./orientation.js";import{K as KeyboardKey}from"./keyboard.js";import{v as validateLabel}from"./label.js";const validateToolbarItems=(n,e)=>{emptyStringByArrayHandler(e,(()=>{objectObjectHandler(e,(()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(n){}Array.isArray(e)&&e.every((n=>"object"==typeof n&&null!==n))&&setState(n,"_items",e)}))}))},defaultStyleCss="@charset \"UTF-8\";\n/*\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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 :host {\n display: inline-block;\n }\n .kol-link {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n .kol-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-link__text {\n margin: auto;\n width: 100%;\n }\n}\n@layer kol-component {\n .kol-toolbar {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n }\n .kol-toolbar--orientation-vertical {\n align-items: stretch;\n flex-direction: column;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolToolbarDefaultStyle0=defaultStyleCss,KolToolbar$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.indexToElement=new Map,this.renderItem=(n,e)=>{const t=e!==this.currentIndex||(null==n?void 0:n._disabled)?-1:0,o={key:e,class:"button normal kol-toolbar__item",_tabIndex:t},i=n=>{n&&this.indexToElement.set(e,n)};return"_href"in n?h(KolLinkWcTag,Object.assign({},n,o,{ref:i,_role:"button"})):h(KolButtonWcTag,Object.assign({},n,o,{ref:i}))},this.state={_label:"",_items:[]},this.currentIndex=0,this._label=void 0,this._items=void 0,this._orientation=void 0}render(){return h("div",{key:"30938e1827e44beda26c1cc9ac80df905f674f91",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n)}validateOrientation(n){validateOrientation(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex((n=>!n._disabled))}handleKeyDown(n){var e,t;const o=n.code;if(![KeyboardKey.ArrowUp,KeyboardKey.ArrowDown,KeyboardKey.ArrowRight,KeyboardKey.ArrowLeft].includes(o))return;n.preventDefault();const i=(null===(e=this._items)||void 0===e?void 0:e.length)-1,a=this.currentIndex;let l=0;switch(o){case KeyboardKey.ArrowUp:case KeyboardKey.ArrowLeft:l=a!==l?a-1:i;break;case KeyboardKey.ArrowDown:case KeyboardKey.ArrowRight:i!==a&&(l=a+1)}a!==l&&(this.currentIndex=l,null===(t=this.getCurrentToolbarItem(l))||void 0===t||t.kolFocus())}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return this}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}static get style(){return{default:KolToolbarDefaultStyle0}}},[33,"kol-toolbar",{_label:[1],_items:[16],_orientation:[1],state:[32],currentIndex:[32]},[[0,"keydown","handleKeyDown"],[2,"blur","handleBlur"]],{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toolbar"].forEach((n=>{if("kol-toolbar"===n)customElements.get(n)||customElements.define(n,KolToolbar$1)}))}const KolToolbar=KolToolbar$1,defineCustomElement=defineCustomElement$1;export{KolToolbar,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{O as emptyStringByArrayHandler,o as objectObjectHandler,m as parseJson,k as setState}from"./index2.js";import{f as KolLinkWcTag,b as KolButtonWcTag}from"./component-names.js";import{v as validateOrientation}from"./orientation.js";import{K as KeyboardKey}from"./keyboard.js";import{v as validateLabel}from"./label.js";const validateToolbarItems=(n,e)=>{emptyStringByArrayHandler(e,(()=>{objectObjectHandler(e,(()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(n){}Array.isArray(e)&&e.every((n=>"object"==typeof n&&null!==n))&&setState(n,"_items",e)}))}))},defaultStyleCss="@charset \"UTF-8\";\n/*\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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 :host {\n display: inline-block;\n }\n .kol-link {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n .kol-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-link__text {\n margin: auto;\n width: 100%;\n }\n}\n@layer kol-component {\n .kol-toolbar {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n }\n .kol-toolbar--orientation-vertical {\n align-items: stretch;\n flex-direction: column;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolToolbarDefaultStyle0=defaultStyleCss,KolToolbar$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.indexToElement=new Map,this.renderItem=(n,e)=>{const t=e!==this.currentIndex||(null==n?void 0:n._disabled)?-1:0,o={key:e,class:"button normal kol-toolbar__item",_tabIndex:t},i=n=>{n&&this.indexToElement.set(e,n)};return"_href"in n?h(KolLinkWcTag,Object.assign({},n,o,{ref:i,_role:"button"})):h(KolButtonWcTag,Object.assign({},n,o,{ref:i}))},this.state={_label:"",_items:[]},this.currentIndex=0,this._label=void 0,this._items=void 0,this._orientation=void 0}render(){return h("div",{key:"820d0df7f0df9ab8a3e8de78b0d3fead62abfff8",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n)}validateOrientation(n){validateOrientation(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex((n=>!n._disabled))}handleKeyDown(n){var e,t;const o=n.code;if(![KeyboardKey.ArrowUp,KeyboardKey.ArrowDown,KeyboardKey.ArrowRight,KeyboardKey.ArrowLeft].includes(o))return;n.preventDefault();const i=(null===(e=this._items)||void 0===e?void 0:e.length)-1,a=this.currentIndex;let l=0;switch(o){case KeyboardKey.ArrowUp:case KeyboardKey.ArrowLeft:l=a!==l?a-1:i;break;case KeyboardKey.ArrowDown:case KeyboardKey.ArrowRight:i!==a&&(l=a+1)}a!==l&&(this.currentIndex=l,null===(t=this.getCurrentToolbarItem(l))||void 0===t||t.kolFocus())}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return this}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}static get style(){return{default:KolToolbarDefaultStyle0}}},[33,"kol-toolbar",{_label:[1],_items:[16],_orientation:[1],state:[32],currentIndex:[32]},[[0,"keydown","handleKeyDown"],[2,"blur","handleBlur"]],{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toolbar"].forEach((n=>{if("kol-toolbar"===n)customElements.get(n)||customElements.define(n,KolToolbar$1)}))}const KolToolbar=KolToolbar$1,defineCustomElement=defineCustomElement$1;export{KolToolbar,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{l as watchString,g as getDocument}from"./index2.js";import"./i18n2.js";import"./bem.js";import{K as KolSpanFc}from"./Span.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";const validateBadgeText=(t,e)=>{watchString(t,"_badgeText",e)},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 TOOLTIP_DELAY=300,KolTooltipWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),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.showTooltipWithDelay=()=>{clearTimeout(this.showTooltipTimeout),this.showTooltipTimeout=setTimeout((()=>{this.showTooltip()}),300)},this.hideTooltipWithDelay=()=>{clearTimeout(this.hideTooltipTimeout),this.hideTooltipTimeout=setTimeout((()=>{this.hideTooltip()}),300)},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._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})}async hideTooltip(){clearTimeout(this.showTooltipTimeout),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)}handleMouseEnter(){this.showTooltipWithDelay()}handleMouseleave(){this.hideTooltipWithDelay()}handleFocusIn(){this.showTooltipWithDelay()}handleFocusout(){this.hideTooltipWithDelay()}render(){return h(Host,{key:"6ad9ed485572637aed6d5cdd5541a08dd4df4370",class:"kol-tooltip"},""!==this.state._label&&h("div",{key:"b17bbd19a6179aab5d0d1c1a84ae9f0132bae650",class:"kol-tooltip__floating",ref:this.catchTooltipElement},h("div",{key:"38a52559848377f83753eb0e1d38bb1e0dad93da",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),h(KolSpanFc,{key:"08d2154602b5d6c27753ad06886b00f951c395c4",class:"kol-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],hideTooltip:[64]},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{l as watchString,g as getDocument}from"./index2.js";import"./i18n2.js";import"./bem.js";import{K as KolSpanFc}from"./Span.js";import{a as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";const validateBadgeText=(t,e)=>{watchString(t,"_badgeText",e)},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:"de08062e83c35022db6132bfb4726e1cb7244dcc",class:"kol-tooltip"},""!==this.state._label&&h("div",{key:"2ebc4f82d4fade592b5e8703b0cf4c0041a9ddb6",class:"kol-tooltip__floating",ref:this.catchTooltipElement},h("div",{key:"861cdf3e0914c808e09056e8964d619fb0ecf6fd",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),h(KolSpanFc,{key:"a92d13e134f6a905a052c61c51961be851e406c1",class:"kol-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 +1 @@
1
- {"file":"kol-tooltip-wc.js","mappings":";;;;;;;;;;;;AAgBO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB;IAChG,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;;ACHM,MAAM,UAAU,GAAG,CAAC,SAAoC,EAAE,KAAkB;IAClF,WAAW,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC;;ACVD,MAAM,gBAAgB,GAAqB,IAAI,GAAG,EAAE,CAAC;SASrC,WAAW,CAAC,OAAoB;IAC/C,gBAAgB,CAAC,OAAO,CAAC,CAAC,cAAc;QACvC,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KACnD,CAAC,CAAC;IACH,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;SASe,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C,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;IAEO,oBAAoB;;QAC3B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACpF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;KAC/D;IAEM,iBAAiB;;QACvB,IAAI,CAAC,eAAe,GAAG,MAAA,IAAI,CAAC,IAAI,0CAAE,sBAAsB,CAAC;KACzD;IAEM,kBAAkB;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC5B;IAKM,oBAAoB;QAC1B,IAAI,IAAI,CAAC,eAAe,EAAmC;YAC1D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC3C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;SACjC;QACD,IAAI,IAAI,CAAC,cAAc,EAAmC;YACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC9B;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTooltipWc"],"sources":["src/schema/props/badge-text.ts","src/schema/props/id.ts","src/utils/overlay.ts","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchString } from '../utils';\nimport type { AccessKeyPropType } from './access-key';\nimport type { ShortKeyPropType } from './short-key';\n\n/* types */\nexport type BadgeTextPropType = AccessKeyPropType | ShortKeyPropType;\n\n/**\n * Defines the elements badge text.\n */\nexport type PropBadgeText = {\n\tbadgeText: BadgeTextPropType;\n};\n\n/* validator */\nexport const validateBadgeText = (component: Generic.Element.Component, value?: BadgeTextPropType): void => {\n\twatchString(component, '_badgeText', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../utils';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport type { AlignPropType, BadgeTextPropType, IdPropType, LabelPropType, TooltipAPI, TooltipStates } from '../../schema';\nimport { getDocument, validateBadgeText, validateAlign, validateId, validateLabel } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Method } from '@stencil/core';\nimport { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { KolSpanFc } from '../../functional-components';\n\n// Timing Guidelines for Exposing Hidden Content: https://www.nngroup.com/articles/timing-exposing-content/\nconst TOOLTIP_DELAY = 300;\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tshadow: false,\n})\nexport class KolTooltipWc implements TooltipAPI {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate showTooltipTimeout?: ReturnType<typeof setTimeout>;\n\tprivate showTooltipWithDelay = (): void => {\n\t\tclearTimeout(this.showTooltipTimeout);\n\t\tthis.showTooltipTimeout = setTimeout(() => {\n\t\t\tthis.showTooltip();\n\t\t}, TOOLTIP_DELAY);\n\t};\n\n\tprivate hideTooltipTimeout?: ReturnType<typeof setTimeout>;\n\tprivate hideTooltipWithDelay = (): void => {\n\t\tclearTimeout(this.hideTooltipTimeout);\n\t\tthis.hideTooltipTimeout = setTimeout(() => {\n\t\t\tvoid this.hideTooltip();\n\t\t}, TOOLTIP_DELAY);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hideTooltip() {\n\t\tclearTimeout(this.showTooltipTimeout); // Cancel scheduled tooltips\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t}\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tvoid this.hideTooltip();\n\t\t}\n\t};\n\n\tprivate handleMouseEnter() {\n\t\tthis.showTooltipWithDelay();\n\t}\n\tprivate handleMouseleave() {\n\t\tthis.hideTooltipWithDelay();\n\t}\n\tprivate handleFocusIn() {\n\t\tthis.showTooltipWithDelay();\n\t}\n\tprivate handleFocusout() {\n\t\tthis.hideTooltipWithDelay();\n\t}\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseenter', this.handleMouseEnter.bind(this));\n\t\tel.addEventListener('mouseleave', this.handleMouseleave.bind(this));\n\t\tel.addEventListener('focusin', this.handleFocusIn.bind(this));\n\t\tel.addEventListener('focusout', this.handleFocusout.bind(this));\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseenter', this.handleMouseEnter.bind(this));\n\t\tel.removeEventListener('mouseleave', this.handleMouseleave.bind(this));\n\t\tel.removeEventListener('focusin', this.handleFocusIn.bind(this));\n\t\tel.removeEventListener('focusout', this.handleFocusout.bind(this));\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-tooltip\">\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"kol-tooltip__floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"kol-tooltip__arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<KolSpanFc class=\"kol-tooltip__content\" id={this.state._id} badgeText={this._badgeText} label={this.state._label} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements badge text.\n\t */\n\t@Prop() public _badgeText?: BadgeTextPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: TooltipStates = {\n\t\t_align: 'top',\n\t\t_label: '', // ⚠ required\n\t};\n\n\t@Watch('_badgeText')\n\tpublic validateBadgeText(value?: BadgeTextPropType): void {\n\t\tvalidateBadgeText(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateBadgeText(this._badgeText);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-tooltip-wc.js","mappings":";;;;;;;;;;;;AAgBO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB;IAChG,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;;ACHM,MAAM,UAAU,GAAG,CAAC,SAAoC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I,CAAC,eAAe,GAAG,SAAS,CAAC;SACjC;QACD,IAAI,IAAI,CAAC,cAAc,EAAmC;YACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC9B;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTooltipWc"],"sources":["src/schema/props/badge-text.ts","src/schema/props/id.ts","src/utils/overlay.ts","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchString } from '../utils';\nimport type { AccessKeyPropType } from './access-key';\nimport type { ShortKeyPropType } from './short-key';\n\n/* types */\nexport type BadgeTextPropType = AccessKeyPropType | ShortKeyPropType;\n\n/**\n * Defines the elements badge text.\n */\nexport type PropBadgeText = {\n\tbadgeText: BadgeTextPropType;\n};\n\n/* validator */\nexport const validateBadgeText = (component: Generic.Element.Component, value?: BadgeTextPropType): void => {\n\twatchString(component, '_badgeText', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../utils';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport type { AlignPropType, BadgeTextPropType, IdPropType, LabelPropType, TooltipAPI, TooltipStates } from '../../schema';\nimport { getDocument, validateBadgeText, validateAlign, validateId, validateLabel } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { KolSpanFc } from '../../functional-components';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tshadow: false,\n})\nexport class KolTooltipWc implements TooltipAPI {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\tprivate hasFocusIn = false;\n\tprivate hasMouseIn = false;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate handleMouseEnter() {\n\t\tthis.hasMouseIn = true;\n\t\tthis.showOrHideTooltip();\n\t}\n\tprivate handleMouseleave() {\n\t\tthis.hasMouseIn = false;\n\t\tthis.showOrHideTooltip();\n\t}\n\tprivate handleFocusIn() {\n\t\tthis.hasFocusIn = true;\n\t\tthis.showOrHideTooltip();\n\t}\n\tprivate handleFocusout() {\n\t\tthis.hasFocusIn = false;\n\t\tthis.showOrHideTooltip();\n\t}\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseenter', this.handleMouseEnter.bind(this));\n\t\tel.addEventListener('mouseleave', this.handleMouseleave.bind(this));\n\t\tel.addEventListener('focusin', this.handleFocusIn.bind(this));\n\t\tel.addEventListener('focusout', this.handleFocusout.bind(this));\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseenter', this.handleMouseEnter.bind(this));\n\t\tel.removeEventListener('mouseleave', this.handleMouseleave.bind(this));\n\t\tel.removeEventListener('focusin', this.handleFocusIn.bind(this));\n\t\tel.removeEventListener('focusout', this.handleFocusout.bind(this));\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-tooltip\">\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"kol-tooltip__floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"kol-tooltip__arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<KolSpanFc class=\"kol-tooltip__content\" id={this.state._id} badgeText={this._badgeText} label={this.state._label} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements badge text.\n\t */\n\t@Prop() public _badgeText?: BadgeTextPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: TooltipStates = {\n\t\t_align: 'top',\n\t\t_label: '', // ⚠ required\n\t};\n\n\t@Watch('_badgeText')\n\tpublic validateBadgeText(value?: BadgeTextPropType): void {\n\t\tvalidateBadgeText(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tif (this.hasMouseIn || this.hasFocusIn) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t\t// Timing Guidelines for Exposing Hidden Content: https://www.nngroup.com/articles/timing-exposing-content/\n\t\t}, 300);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateBadgeText(this._badgeText);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"version":3}
@@ -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{i as watchBoolean}from"./index2.js";import{f as KolLinkWcTag,d as KolIconTag,v as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils.js";import{c as clsx}from"./clsx.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:"1358f3b8f8c7ae14535f30e3c2ff1ef8ab6904b1",onSlotchange:this.handleSlotchange.bind(this)},h("li",{key:"d6271238a133cac44eb78bf8ed0b94a951135432",class:"kol-tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"329b9adc28bacf6742544123bc02fe82f2ceb9b5",class:clsx("kol-tree-item__link",{"kol-tree-item__link--first-level":0===this.level,"kol-tree-item__link--active":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:"0292f071a8abfe0f9332ef4a8561149d38f804e2",class:"kol-tree-item__link-inner",slot:"expert"},a?h("span",{class:"kol-tree-item__toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{class:"kol-tree-item__toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""})):h("span",{class:"kol-tree-item__toggle-button-placeholder"}),h("span",{key:"ed810a798a4e2ba38f848ce0c6fdfc3893c3c86d",class:"kol-tree-item__text"},l))),h("ul",{key:"0e8ea268f1c26f79e55d45bfeda91d230bc4789d",class:"kol-tree-item__children",hidden:!a||!i,role:"group",id:this.groupId},h("slot",{key:"a6509011c3fa851be4c6cace3aadf2b6d6bbfc7b"}))))}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{i as watchBoolean}from"./index2.js";import{f as KolLinkWcTag,d as KolIconTag,w as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils.js";import{c as clsx}from"./clsx.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:"e0d63b982e56ef662c1420fc9ade69068b8a81ff",onSlotchange:this.handleSlotchange.bind(this)},h("li",{key:"7c2d91957ad2e92256d5bc8bcbfa003d830a3645",class:"kol-tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"7207fe34d30d14349d397fbd75ff2f0d16aa7086",class:clsx("kol-tree-item__link",{"kol-tree-item__link--first-level":0===this.level,"kol-tree-item__link--active":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:"d959cfb814982fcbb72f89a7fea3e2b6031e7ab4",class:"kol-tree-item__link-inner",slot:"expert"},a?h("span",{class:"kol-tree-item__toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{class:"kol-tree-item__toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""})):h("span",{class:"kol-tree-item__toggle-button-placeholder"}),h("span",{key:"2249d95f2466360ef113bb8f271d91d5b7ed88e4",class:"kol-tree-item__text"},l))),h("ul",{key:"1648a8aebf70ae58ad6068bf5192078de6d05cfd",class:"kol-tree-item__children",hidden:!a||!i,role:"group",id:this.groupId},h("slot",{key:"07aceb35f569834db39a1d9cfb18f80a5a9753e4"}))))}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{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{u as KolTreeItemWcTag}from"./component-names.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",KolTreeItemDefaultStyle0=defaultStyleCss,KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var e,n;return null!==(n=await(null===(e=this.element)||void 0===e?void 0:e.isOpen()))&&void 0!==n&&n}render(){return h(KolTreeItemWcTag,{key:"058ffb876889218e812b8d16395cf3d4735e9786",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:e=>this.element=e},h("slot",{key:"a084e5ba793a60fd5696756cd16d92e50f6c9c9f"}))}static get style(){return{default:KolTreeItemDefaultStyle0}}},[33,"kol-tree-item",{_active:[4],_label:[1],_open:[4],_href:[1],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item"].forEach((e=>{if("kol-tree-item"===e)customElements.get(e)||customElements.define(e,KolTreeItem$1)}))}const KolTreeItem=KolTreeItem$1,defineCustomElement=defineCustomElement$1;export{KolTreeItem,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{v as KolTreeItemWcTag}from"./component-names.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",KolTreeItemDefaultStyle0=defaultStyleCss,KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var e,n;return null!==(n=await(null===(e=this.element)||void 0===e?void 0:e.isOpen()))&&void 0!==n&&n}render(){return h(KolTreeItemWcTag,{key:"6e77abb1a162108a6f06ac8bf9024b408a9bf990",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:e=>this.element=e},h("slot",{key:"752481a98faee9bad7d5661bb01bc868198e544e"}))}static get style(){return{default:KolTreeItemDefaultStyle0}}},[33,"kol-tree-item",{_active:[4],_label:[1],_open:[4],_href:[1],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item"].forEach((e=>{if("kol-tree-item"===e)customElements.get(e)||customElements.define(e,KolTreeItem$1)}))}const KolTreeItem=KolTreeItem$1,defineCustomElement=defineCustomElement$1;export{KolTreeItem,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"./index2.js";import{w as KolTreeItemTag,v as KolTreeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(){super(),this.__registerHost(),this.state={_label:""},this._label=void 0}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"05d1fdf7fc5589847e2fdce7b3d307860721ccd2",onSlotchange:this.handleSlotchange.bind(this)},h("nav",{key:"b03ad56f3ce550d09d22efa04e23273588093034",class:"kol-tree","aria-label":this.state._label},h("ul",{key:"7b7e4fc2e98037621beb67e6dcdd00f7072d3878",class:"kol-tree__treeview-navigation",role:"tree","aria-label":this.state._label},h("slot",{key:"c6bd99309dd93b1eb88031533f17f25c0e9952c7"}))))}static isTreeItem(e){return(null==e?void 0:e.tagName)===KolTreeItemTag.toUpperCase()}componentWillLoad(){this.validateLabel(this._label),this.handleTreeChange(),this.observeChildListMutations()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}observeChildListMutations(){this.observer=new MutationObserver(this.handleTreeChange.bind(this)),this.observeTopLevelItems()}handleSlotchange(){this.observeTopLevelItems(),this.handleTreeChange()}observeTopLevelItems(){var e;null===(e=this.getTopLevelTreeItems())||void 0===e||e.forEach((e=>{var t;null===(t=this.observer)||void 0===t||t.observe(e,{childList:!0,subtree:!0})}))}getTopLevelTreeItems(){var t,l,a;return null===(a=null===(l=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===l?void 0:l.call(t))||void 0===a?void 0:a.filter(e.isTreeItem)}handleTreeChange(){this.treeItemElements=this.getTreeItemElements(),this.ensureActiveItemVisibility()}getTreeItemElements(){var e;return null===(e=this.getTopLevelTreeItems())||void 0===e?void 0:e.reduce(((e,t)=>{const l=t.querySelectorAll(KolTreeItemTag);return[...e,t,...l]}),[])}async getOpenTreeItemElements(){if(!this.treeItemElements)return;const t=async l=>!e.isTreeItem(l.parentElement)||await l.parentElement.isOpen()&&await t(l.parentElement);return(await Promise.all(this.treeItemElements.map((async e=>({value:e,include:await t(e)}))))).filter((e=>e.include)).map((e=>e.value))}async handleKeyDown(e){var t,l,a,i,n,s,o,r,c;const d=await this.getOpenTreeItemElements(),u=null===(t=document.activeElement)||void 0===t?void 0:t.closest(KolTreeItemTag),v=e.metaKey||e.altKey||e.ctrlKey||e.shiftKey;if(!d||!u)return;const m=null==d?void 0:d.findIndex((e=>e===u));switch(e.key){case"ArrowDown":await(null===(l=d[m+1])||void 0===l?void 0:l.focusLink()),e.preventDefault();break;case"ArrowUp":await(null===(a=d[m-1])||void 0===a?void 0:a.focusLink()),e.preventDefault();break;case"Right":case"ArrowRight":e.preventDefault(),await u.isOpen()?await(null===(i=d[m+1])||void 0===i?void 0:i.focusLink()):await u.expand();break;case"Left":case"ArrowLeft":if(e.preventDefault(),await u.isOpen())await u.collapse();else{const e=d.findIndex((e=>e===u.parentElement));-1!==e&&await(null===(n=d[e])||void 0===n?void 0:n.focusLink())}break;case"Home":await(null===(s=d[0])||void 0===s?void 0:s.focusLink()),e.preventDefault();break;case"End":await(null===(o=d[d.length-1])||void 0===o?void 0:o.focusLink()),e.preventDefault();break;case null===(r=e.key.match(/^[a-zA-Z0-9]$/))||void 0===r?void 0:r.input:if(!v){const t=e.key.toLowerCase(),l=d.indexOf(u)+1,a=d.concat(d),i=a.slice(l,l+d.length).findIndex((e=>{var l;return null===(l=e.getAttribute("_label"))||void 0===l?void 0:l.trim().toLowerCase().startsWith(t)}));-1!==i&&(await a[l+i].focusLink(),e.preventDefault())}break;case"*":{const e=null===(c=u.parentElement)||void 0===c?void 0:c.querySelectorAll(KolTreeItemTag);null==e||e.forEach((e=>{e.expand()}));break}}}async handleFocusOut(e){e.relatedTarget&&!e.relatedTarget.closest(KolTreeTag)&&await this.ensureActiveItemVisibility()}async ensureActiveItemVisibility(){const t=l=>{e.isTreeItem(l.parentElement)&&(l.parentElement.expand(),t(l.parentElement))},l=(()=>{var t,l,a,i;const n=null!==(i=null===(a=null===(l=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===l?void 0:l.call(t))||void 0===a?void 0:a.filter(e.isTreeItem))&&void 0!==i?i:[];for(const e of n){if(e._active)return e;const t=e.querySelector(`${KolTreeItemTag}[_active="true"]`);if(t&&t._active)return t}})();l&&t(l)}get host(){return this}static get watchers(){return{_label:["validateLabel"]}}},[4,"kol-tree-wc",{_label:[1],state:[32]},[[0,"keydown","handleKeyDown"],[0,"focusout","handleFocusOut"]],{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-wc"].forEach((e=>{if("kol-tree-wc"===e)customElements.get(e)||customElements.define(e,KolTreeWc$1)}))}const KolTreeWc=KolTreeWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import"./index2.js";import{x as KolTreeItemTag,w as KolTreeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(){super(),this.__registerHost(),this.state={_label:""},this._label=void 0}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"0018aab7e413a716e2662cfd597d2ffdb063ffea",onSlotchange:this.handleSlotchange.bind(this)},h("nav",{key:"383abb8a0f89e041b9d84fc7e872e1d4a4638948",class:"kol-tree","aria-label":this.state._label},h("ul",{key:"f35923f336b1c615940c32e40735fc5f74cade61",class:"kol-tree__treeview-navigation",role:"tree","aria-label":this.state._label},h("slot",{key:"21d555457a7a9cdab0f798c30230cde851b4038c"}))))}static isTreeItem(e){return(null==e?void 0:e.tagName)===KolTreeItemTag.toUpperCase()}componentWillLoad(){this.validateLabel(this._label),this.handleTreeChange(),this.observeChildListMutations()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}observeChildListMutations(){this.observer=new MutationObserver(this.handleTreeChange.bind(this)),this.observeTopLevelItems()}handleSlotchange(){this.observeTopLevelItems(),this.handleTreeChange()}observeTopLevelItems(){var e;null===(e=this.getTopLevelTreeItems())||void 0===e||e.forEach((e=>{var t;null===(t=this.observer)||void 0===t||t.observe(e,{childList:!0,subtree:!0})}))}getTopLevelTreeItems(){var t,a,l;return null===(l=null===(a=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===a?void 0:a.call(t))||void 0===l?void 0:l.filter(e.isTreeItem)}handleTreeChange(){this.treeItemElements=this.getTreeItemElements(),this.ensureActiveItemVisibility()}getTreeItemElements(){var e;return null===(e=this.getTopLevelTreeItems())||void 0===e?void 0:e.reduce(((e,t)=>{const a=t.querySelectorAll(KolTreeItemTag);return[...e,t,...a]}),[])}async getOpenTreeItemElements(){if(!this.treeItemElements)return;const t=async a=>!e.isTreeItem(a.parentElement)||await a.parentElement.isOpen()&&await t(a.parentElement);return(await Promise.all(this.treeItemElements.map((async e=>({value:e,include:await t(e)}))))).filter((e=>e.include)).map((e=>e.value))}async handleKeyDown(e){var t,a,l,i,n,s,o,r,c;const d=await this.getOpenTreeItemElements(),u=null===(t=document.activeElement)||void 0===t?void 0:t.closest(KolTreeItemTag),v=e.metaKey||e.altKey||e.ctrlKey||e.shiftKey;if(!d||!u)return;const m=null==d?void 0:d.findIndex((e=>e===u));switch(e.key){case"ArrowDown":await(null===(a=d[m+1])||void 0===a?void 0:a.focusLink()),e.preventDefault();break;case"ArrowUp":await(null===(l=d[m-1])||void 0===l?void 0:l.focusLink()),e.preventDefault();break;case"Right":case"ArrowRight":e.preventDefault(),await u.isOpen()?await(null===(i=d[m+1])||void 0===i?void 0:i.focusLink()):await u.expand();break;case"Left":case"ArrowLeft":if(e.preventDefault(),await u.isOpen())await u.collapse();else{const e=d.findIndex((e=>e===u.parentElement));-1!==e&&await(null===(n=d[e])||void 0===n?void 0:n.focusLink())}break;case"Home":await(null===(s=d[0])||void 0===s?void 0:s.focusLink()),e.preventDefault();break;case"End":await(null===(o=d[d.length-1])||void 0===o?void 0:o.focusLink()),e.preventDefault();break;case null===(r=e.key.match(/^[a-zA-Z0-9]$/))||void 0===r?void 0:r.input:if(!v){const t=e.key.toLowerCase(),a=d.indexOf(u)+1,l=d.concat(d),i=l.slice(a,a+d.length).findIndex((e=>{var a;return null===(a=e.getAttribute("_label"))||void 0===a?void 0:a.trim().toLowerCase().startsWith(t)}));-1!==i&&(await l[a+i].focusLink(),e.preventDefault())}break;case"*":{const e=null===(c=u.parentElement)||void 0===c?void 0:c.querySelectorAll(KolTreeItemTag);null==e||e.forEach((e=>{e.expand()}));break}}}async handleFocusOut(e){e.relatedTarget&&!e.relatedTarget.closest(KolTreeTag)&&await this.ensureActiveItemVisibility()}async ensureActiveItemVisibility(){const t=a=>{e.isTreeItem(a.parentElement)&&(a.parentElement.expand(),t(a.parentElement))},a=(()=>{var t,a,l,i;const n=null!==(i=null===(l=null===(a=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===a?void 0:a.call(t))||void 0===l?void 0:l.filter(e.isTreeItem))&&void 0!==i?i:[];for(const e of n){if(e._active)return e;const t=e.querySelector(`${KolTreeItemTag}[_active="true"]`);if(t&&t._active)return t}})();a&&t(a)}get host(){return this}static get watchers(){return{_label:["validateLabel"]}}},[4,"kol-tree-wc",{_label:[1],state:[32]},[[0,"keydown","handleKeyDown"],[0,"focusout","handleFocusOut"]],{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-wc"].forEach((e=>{if("kol-tree-wc"===e)customElements.get(e)||customElements.define(e,KolTreeWc$1)}))}const KolTreeWc=KolTreeWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{t as KolTreeWcTag}from"./component-names.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree__treeview-navigation {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTreeDefaultStyle0=defaultStyleCss,KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0}render(){return h(KolTreeWcTag,{key:"d9f26f840ce0ccdb32731859e6075cd0fd737dd5",_label:this._label},h("slot",{key:"8f020e01d6f839e2739e5cf0256afdd01eb5c0e5"}))}static get style(){return{default:KolTreeDefaultStyle0}}},[33,"kol-tree",{_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree"].forEach((n=>{if("kol-tree"===n)customElements.get(n)||customElements.define(n,KolTree$1)}))}const KolTree=KolTree$1,defineCustomElement=defineCustomElement$1;export{KolTree,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{u as KolTreeWcTag}from"./component-names.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree__treeview-navigation {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTreeDefaultStyle0=defaultStyleCss,KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0}render(){return h(KolTreeWcTag,{key:"13d3e695605cbf910749ac998731d7d6310b3ed8",_label:this._label},h("slot",{key:"b4702460fa7ca8fe8e259cb7b782a8971735a9ef"}))}static get style(){return{default:KolTreeDefaultStyle0}}},[33,"kol-tree",{_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree"].forEach((n=>{if("kol-tree"===n)customElements.get(n)||customElements.define(n,KolTree$1)}))}const KolTree=KolTree$1,defineCustomElement=defineCustomElement$1;export{KolTree,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"./index2.js";import{t as translate}from"./i18n2.js";import{x as KolBadgeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}",KolVersionDefaultStyle0=defaultStyleCss,KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"abaf942617b20e8e900dde885533f035b3cda21a",class:"kol-version"},h(KolBadgeTag,{key:"ac1df455d3abf291c8a88debe0a0e2ae51ce6b61",_color:"#bec5c9",_icons:{left:{icon:"codicon codicon-versions",label:translate("kol-version")}},_label:this.state._label}))}validateLabel(n){validateLabel(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}static get style(){return{default:KolVersionDefaultStyle0}}},[33,"kol-version",{_label:[1],state:[32]},void 0,{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-version"].forEach((n=>{if("kol-version"===n)customElements.get(n)||customElements.define(n,KolVersion$1)}))}const KolVersion=KolVersion$1,defineCustomElement=defineCustomElement$1;export{KolVersion,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import"./index2.js";import{t as translate}from"./i18n2.js";import{y as KolBadgeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";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 * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * 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: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}",KolVersionDefaultStyle0=defaultStyleCss,KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"3304cd937945785a92d3cf9a25cd70065f2ac5dd",class:"kol-version"},h(KolBadgeTag,{key:"155a2fbdb3ce12a1800b62745a2f9683585c9794",_color:"#bec5c9",_icons:{left:{icon:"codicon codicon-versions",label:translate("kol-version")}},_label:this.state._label}))}validateLabel(n){validateLabel(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}static get style(){return{default:KolVersionDefaultStyle0}}},[33,"kol-version",{_label:[1],state:[32]},void 0,{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-version"].forEach((n=>{if("kol-version"===n)customElements.get(n)||customElements.define(n,KolVersion$1)}))}const KolVersion=KolVersion$1,defineCustomElement=defineCustomElement$1;export{KolVersion,defineCustomElement};
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-aa2635d0.js";import{c as clsx}from"./clsx-09a06a12.js";import{e as KolIconTag,b as KolButtonWcTag}from"./component-names-0657b355.js";import{t as translate}from"./i18n-260f0fe9.js";import{a as BEM_CLASS_ALERT__ICON,b as bem,c as BEM_CLASS_ALERT__CONTENT,d as BEM_CLASS_ALERT__CLOSER}from"./bem-e4c3a2e6.js";import{K as KolHeadingFc}from"./Heading-dcf25cb6.js";const Icon=({ariaLabel:a,icon:e})=>h(Fragment,null,h("span",{class:"visually-hidden"},a),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:e})),AlertIcon=({type:a,label:e})=>{switch(a){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e})}},vibrateOnError=()=>{if("undefined"==typeof navigator||"function"!=typeof navigator.vibrate)return;const a=navigator.userActivation;if(((null==a?void 0:a.isActive)||(null==a?void 0:a.hasBeenActive))&&matchMedia("(any-pointer: coarse)").matches)try{navigator.vibrate([100,75,100,75,100])}catch(a){}},KolAlertFc=(a,e)=>{const{class:o={},alert:l=!1,hasCloser:n=!1,label:t,level:r=0,type:s="default",variant:i="msg",onAlertTimeout:c,onCloserClick:d}=a,_=__rest(a,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]);l&&(vibrateOnError(),setTimeout((()=>{null==c||c()}),1e4));const b=bem("kol-alert",{hasCloser:!!n,[`type-${s}`]:!0,[`variant-${i}`]:!0}),m=bem("kol-alert","heading",{[`h${r}`]:!0}),v=Object.assign({class:clsx(o,b),role:l?"error"===s?"alert":"status":void 0},_);return h("div",Object.assign({},v),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:t,type:s}),h("div",{class:"kol-alert__container-content"},t&&h(KolHeadingFc,{class:m,level:r,id:"heading"},t),"msg"===i&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":t?"heading":void 0},e)),n&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER,"data-testid":"alert-close-button",_ariaDescription:(null==t?void 0:t.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:d},_tooltipAlign:"left"})),"card"===i&&h("div",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":t?"heading":void 0},e))};export{KolAlertFc as K};
@@ -0,0 +1 @@
1
+ {"file":"Alert-e58cf301.js","mappings":";;;;;;;;;;;AAWA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC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AChC,EAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI;YACvC,WAAK,KAAK,EAAC,8BAA8B;gBACvC,KAAK,KACL,EAAC,YAAY,IAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,IACjE,KAAK,CACQ,CACf;gBACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACpF,QAAQ,CACH,CACP,CACI;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\n/**\n * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n * - https://googlechrome.github.io/samples/vibration/\n * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n * @todo Move side-effect out of render-function to avoid multiple incarnations.\n */\nconst vibrateOnError = (): void => {\n\tif (typeof navigator === 'undefined' || typeof navigator.vibrate !== 'function') {\n\t\treturn;\n\t}\n\tconst ua = navigator.userActivation;\n\tconst hasGesture = ua?.isActive || ua?.hasBeenActive;\n\tif (!hasGesture) {\n\t\treturn;\n\t}\n\tif (!matchMedia('(any-pointer: coarse)').matches) {\n\t\treturn;\n\t}\n\ttry {\n\t\tnavigator.vibrate([100, 75, 100, 75, 100]);\n\t} catch {\n\t\t/* no-op */\n\t}\n};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\tvibrateOnError();\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-1ed13705.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-7924d82a.js";import{K as KolHeadingFc}from"./Heading-733c8dda.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:i,level:e=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,_=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),b=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},_),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:e,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${b}`,_label:i,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-aa2635d0.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-0657b355.js";import{K as KolHeadingFc}from"./Heading-dcf25cb6.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:i,level:e=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:e,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:i,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
@@ -1 +1 @@
1
- {"file":"Collapsible-af548d40.js","mappings":";;;;;;;;;MAuCM,gBAAgB,GAAyB,CAAC,KAAK,EAAE,QAAQ;IAC9D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,GAAG,EAAE,EAAE,kBAAkB,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,KAAe,KAAK,EAAf,KAAK,UAAK,KAAK,EAArJ,sHAA6I,CAAQ,CAAC;IAC5J,MAAM,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;IAErC,QACC,yBACC,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,IAAI,CACV,aAAa,EACb;YACC,uBAAuB,EAAE,QAAQ,KAAK,IAAI;YAC1C,mBAAmB,EAAE,IAAI,KAAK,IAAI;SAClC,EACD,UAAU,CACV,IACG,KAAK;QAET,EAAC,YAAY,IAAC,GAAG,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;YAC3G,EAAC,cAAc,IACd,KAAK,EAAE,IAAI,CAAC,6BAA6B,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,CAAC,EACrE,GAAG,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,GAAG,EAC5B,IAAI,EAAC,QAAQ,EACb,aAAa,EAAE,GAAG,EAAE,UAAU,EAC9B,aAAa,EAAE,IAAI,EACnB,SAAS,EAAE,QAAQ,EACnB,MAAM,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,KAAI,mBAAmB,IAAI,EAAE,EAC/D,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,EAAE,OAAO,EAAE,GACC,CACJ;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,cAAc,CAAC;gBAC/E,0BAAkB,IAAI,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\nimport KolHeadingFc from '../Heading';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\t'collapsible--disabled': disabled === true,\n\t\t\t\t\t'collapsible--open': open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingFc ref={HeadingProps?.ref} level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingFc>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\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BAAmB,IAAI,EAAE,EAC/D,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,EAAE,OAAO,EAAE,GACC,CACJ;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,cAAc,CAAC;gBAC/E,0BAAkB,IAAI,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\nimport KolHeadingFc from '../Heading';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\t'collapsible--disabled': disabled === true,\n\t\t\t\t\t'collapsible--open': open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingFc ref={HeadingProps?.ref} level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingFc>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default KolCollapsibleFc;\n"],"version":3}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{h}from"./index-aa2635d0.js";import{e as KolIconTag}from"./component-names-0657b355.js";import{t as translate}from"./i18n-260f0fe9.js";import{c as clsx}from"./clsx-09a06a12.js";const getRenderStates=o=>{var s;const e="error"===(null===(s=o._msg)||void 0===s?void 0:s._type)&&!0===o._touched,t="string"==typeof o._hint&&o._hint.length>0,n=[];return!0===e&&n.push(`${o._id}-error`),!0===t&&n.push(`${o._id}-hint`),{hasMsg:e,hasHint:t,ariaDescribedBy:n}},CustomSuggestionsToggleFc=({onClick:o,disabled:s})=>h("button",{tabindex:"-1",class:"kol-custom-suggestions-toggle",onClick:o,disabled:s},h(KolIconTag,{_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown")})),CustomSuggestionsOptionFc=({index:o,ref:s,selected:e,onClick:t,onMouseOver:n,onFocus:i,onKeyDown:r,option:g,searchTerm:l})=>h("li",{id:`option-${o}`,key:`-${o}`,ref:s,"data-index":o,tabIndex:-1,role:"option","aria-selected":e?"true":void 0,onClick:t,onMouseOver:n,onFocus:i,class:"kol-custom-suggestions-option",onKeyDown:r},((o,s)=>{if(!(null==s?void 0:s.trim()))return o;const e=new RegExp(`(${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return o.split(e).map(((o,s)=>e.test(o)?h("mark",{key:s},o):o))})(String(g),l||"")),CustomSuggestionsOptionsGroupFc=({blockSuggestionMouseOver:o,onKeyDown:s,style:e},t)=>h("ul",{role:"listbox",style:e,class:clsx("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":o}),onKeyDown:s},t);export{CustomSuggestionsToggleFc as C,CustomSuggestionsOptionsGroupFc as a,CustomSuggestionsOptionFc as b,getRenderStates as g};