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

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 (355) hide show
  1. package/custom-elements.json +22 -5
  2. package/dist/cjs/{InternalUnderlinedAccessKey-3951c769.js → InternalUnderlinedAccessKey-c22d55f9.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-3951c769.js.map → InternalUnderlinedAccessKey-c22d55f9.js.map} +1 -1
  4. package/dist/cjs/{app-globals-13285c37.js → app-globals-80ac5154.js} +1 -1
  5. package/dist/cjs/{app-globals-13285c37.js.map → app-globals-80ac5154.js.map} +1 -1
  6. package/dist/cjs/component-names-4a2d0b57.js +4 -0
  7. package/dist/cjs/component-names-4a2d0b57.js.map +1 -0
  8. package/dist/cjs/{controller-42b3f8a1.js → controller-ff4a9f64.js} +1 -1
  9. package/dist/cjs/{controller-42b3f8a1.js.map → controller-ff4a9f64.js.map} +1 -1
  10. package/dist/cjs/{dev.utils-edbe192a.js → dev.utils-807035c8.js} +1 -1
  11. package/dist/cjs/{dev.utils-edbe192a.js.map → dev.utils-807035c8.js.map} +1 -1
  12. package/dist/cjs/{devtools-a43c79b4.js → devtools-f6a085c7.js} +1 -1
  13. package/dist/cjs/{devtools-a43c79b4.js.map → devtools-f6a085c7.js.map} +1 -1
  14. package/dist/cjs/events-bf0426a9.js +4 -0
  15. package/dist/cjs/events-bf0426a9.js.map +1 -0
  16. package/dist/cjs/{form-field-msg-eb812022.js → form-field-msg-34f12619.js} +1 -1
  17. package/dist/cjs/{form-field-msg-eb812022.js.map → form-field-msg-34f12619.js.map} +1 -1
  18. package/dist/cjs/index-69c6474f.js +4 -0
  19. package/dist/cjs/index-69c6474f.js.map +1 -0
  20. package/dist/cjs/index.cjs.js +1 -1
  21. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  23. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  25. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  34. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-popover-wc.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
  82. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  94. package/dist/cjs/kolibri.cjs.js +1 -1
  95. package/dist/cjs/loader.cjs.js +1 -1
  96. package/dist/components/component-names.js +1 -1
  97. package/dist/components/component-names.js.map +1 -1
  98. package/dist/components/events2.js +1 -1
  99. package/dist/components/events2.js.map +1 -1
  100. package/dist/components/kol-button-wc.js +1 -1
  101. package/dist/components/kol-button-wc.js.map +1 -1
  102. package/dist/components/kol-combobox.js +1 -1
  103. package/dist/components/kol-indented-text-wc.js +1 -1
  104. package/dist/components/kol-modal.js +1 -1
  105. package/dist/components/kol-modal.js.map +1 -1
  106. package/dist/components/kol-nav.js +1 -1
  107. package/dist/components/kol-popover-wc.js +1 -1
  108. package/dist/components/kol-popover-wc.js.map +1 -1
  109. package/dist/components/kol-progress.js +1 -1
  110. package/dist/components/kol-quote.js +1 -1
  111. package/dist/components/kol-select.js +1 -1
  112. package/dist/components/kol-single-select.js +1 -1
  113. package/dist/components/kol-skip-nav.js +1 -1
  114. package/dist/components/kol-span-wc.js +1 -1
  115. package/dist/components/kol-spin.js +1 -1
  116. package/dist/components/kol-split-button.js +1 -1
  117. package/dist/components/kol-split-button.js.map +1 -1
  118. package/dist/components/kol-symbol.js +1 -1
  119. package/dist/components/kol-table-stateful.js +1 -1
  120. package/dist/components/kol-table-stateless-wc.js +1 -1
  121. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  122. package/dist/components/kol-table-stateless.js +1 -1
  123. package/dist/components/kol-table.js +1 -1
  124. package/dist/components/kol-tabs.js +1 -1
  125. package/dist/components/kol-textarea.js +1 -1
  126. package/dist/components/kol-toast-container.js +1 -1
  127. package/dist/components/kol-toolbar.js +1 -1
  128. package/dist/components/kol-tooltip-wc.js +1 -1
  129. package/dist/components/kol-tree-item-wc.js +1 -1
  130. package/dist/components/kol-tree-item.js +1 -1
  131. package/dist/components/kol-tree-wc.js +1 -1
  132. package/dist/components/kol-tree.js +1 -1
  133. package/dist/components/kol-version.js +1 -1
  134. package/dist/esm/{InternalUnderlinedAccessKey-308bff0a.js → InternalUnderlinedAccessKey-6dcea924.js} +1 -1
  135. package/dist/esm/{InternalUnderlinedAccessKey-308bff0a.js.map → InternalUnderlinedAccessKey-6dcea924.js.map} +1 -1
  136. package/dist/esm/{app-globals-ca7441bd.js → app-globals-af8ec159.js} +1 -1
  137. package/dist/esm/{app-globals-ca7441bd.js.map → app-globals-af8ec159.js.map} +1 -1
  138. package/dist/esm/{component-names-3e0158fe.js → component-names-0a8a1a6c.js} +1 -1
  139. package/dist/esm/component-names-0a8a1a6c.js.map +1 -0
  140. package/dist/esm/{controller-ad9f8f69.js → controller-1ef92bc2.js} +1 -1
  141. package/dist/esm/{controller-ad9f8f69.js.map → controller-1ef92bc2.js.map} +1 -1
  142. package/dist/esm/{dev.utils-cb789c3d.js → dev.utils-e03eae45.js} +1 -1
  143. package/dist/esm/{dev.utils-cb789c3d.js.map → dev.utils-e03eae45.js.map} +1 -1
  144. package/dist/esm/{devtools-a88bc2ec.js → devtools-5ea408e2.js} +1 -1
  145. package/dist/esm/{devtools-a88bc2ec.js.map → devtools-5ea408e2.js.map} +1 -1
  146. package/dist/esm/{events-9570402d.js → events-4ee0f1f6.js} +1 -1
  147. package/dist/esm/events-4ee0f1f6.js.map +1 -0
  148. package/dist/esm/{form-field-msg-2e39a9f7.js → form-field-msg-4b82d64f.js} +1 -1
  149. package/dist/esm/{form-field-msg-2e39a9f7.js.map → form-field-msg-4b82d64f.js.map} +1 -1
  150. package/dist/esm/index-5ca1f480.js +4 -0
  151. package/dist/esm/index-5ca1f480.js.map +1 -0
  152. package/dist/esm/index.js +1 -1
  153. package/dist/esm/kol-abbr.entry.js +1 -1
  154. package/dist/esm/kol-accordion.entry.js +1 -1
  155. package/dist/esm/kol-alert-wc.entry.js +1 -1
  156. package/dist/esm/kol-alert.entry.js +1 -1
  157. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  158. package/dist/esm/kol-avatar.entry.js +1 -1
  159. package/dist/esm/kol-badge.entry.js +1 -1
  160. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  161. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  162. package/dist/esm/kol-button-group.entry.js +1 -1
  163. package/dist/esm/kol-button-link.entry.js +1 -1
  164. package/dist/esm/kol-button-wc.entry.js +1 -1
  165. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  166. package/dist/esm/kol-button.entry.js +1 -1
  167. package/dist/esm/kol-card.entry.js +1 -1
  168. package/dist/esm/kol-combobox.entry.js +1 -1
  169. package/dist/esm/kol-details.entry.js +1 -1
  170. package/dist/esm/kol-drawer.entry.js +1 -1
  171. package/dist/esm/kol-form.entry.js +1 -1
  172. package/dist/esm/kol-heading-wc.entry.js +1 -1
  173. package/dist/esm/kol-heading.entry.js +1 -1
  174. package/dist/esm/kol-icon.entry.js +1 -1
  175. package/dist/esm/kol-image.entry.js +1 -1
  176. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  177. package/dist/esm/kol-indented-text.entry.js +1 -1
  178. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  179. package/dist/esm/kol-input-color.entry.js +1 -1
  180. package/dist/esm/kol-input-date.entry.js +1 -1
  181. package/dist/esm/kol-input-email.entry.js +1 -1
  182. package/dist/esm/kol-input-file.entry.js +1 -1
  183. package/dist/esm/kol-input-number.entry.js +1 -1
  184. package/dist/esm/kol-input-password.entry.js +1 -1
  185. package/dist/esm/kol-input-radio.entry.js +1 -1
  186. package/dist/esm/kol-input-range.entry.js +1 -1
  187. package/dist/esm/kol-input-text.entry.js +1 -1
  188. package/dist/esm/kol-input.entry.js +1 -1
  189. package/dist/esm/kol-kolibri.entry.js +1 -1
  190. package/dist/esm/kol-link-button.entry.js +1 -1
  191. package/dist/esm/kol-link-group.entry.js +1 -1
  192. package/dist/esm/kol-link-wc.entry.js +1 -1
  193. package/dist/esm/kol-link.entry.js +1 -1
  194. package/dist/esm/kol-logo.entry.js +1 -1
  195. package/dist/esm/kol-modal.entry.js +1 -1
  196. package/dist/esm/kol-modal.entry.js.map +1 -1
  197. package/dist/esm/kol-nav.entry.js +1 -1
  198. package/dist/esm/kol-pagination.entry.js +1 -1
  199. package/dist/esm/kol-popover-wc.entry.js +1 -1
  200. package/dist/esm/kol-popover-wc.entry.js.map +1 -1
  201. package/dist/esm/kol-progress.entry.js +1 -1
  202. package/dist/esm/kol-quote.entry.js +1 -1
  203. package/dist/esm/kol-select.entry.js +1 -1
  204. package/dist/esm/kol-single-select.entry.js +1 -1
  205. package/dist/esm/kol-skip-nav.entry.js +1 -1
  206. package/dist/esm/kol-span-wc.entry.js +1 -1
  207. package/dist/esm/kol-spin.entry.js +1 -1
  208. package/dist/esm/kol-split-button.entry.js +1 -1
  209. package/dist/esm/kol-split-button.entry.js.map +1 -1
  210. package/dist/esm/kol-symbol.entry.js +1 -1
  211. package/dist/esm/kol-table-stateful.entry.js +1 -1
  212. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  213. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  214. package/dist/esm/kol-table-stateless.entry.js +1 -1
  215. package/dist/esm/kol-table.entry.js +1 -1
  216. package/dist/esm/kol-tabs.entry.js +1 -1
  217. package/dist/esm/kol-textarea.entry.js +1 -1
  218. package/dist/esm/kol-toast-container.entry.js +1 -1
  219. package/dist/esm/kol-toolbar.entry.js +1 -1
  220. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  221. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  222. package/dist/esm/kol-tree-item.entry.js +1 -1
  223. package/dist/esm/kol-tree-wc.entry.js +1 -1
  224. package/dist/esm/kol-tree.entry.js +1 -1
  225. package/dist/esm/kol-version.entry.js +1 -1
  226. package/dist/esm/kolibri.js +1 -1
  227. package/dist/esm/loader.js +1 -1
  228. package/dist/kolibri/InternalUnderlinedAccessKey-6dcea924.js +4 -0
  229. package/dist/kolibri/{app-globals-ca7441bd.js → app-globals-af8ec159.js} +1 -1
  230. package/dist/kolibri/{component-names-3e0158fe.js → component-names-0a8a1a6c.js} +1 -1
  231. package/dist/kolibri/{component-names-3e0158fe.js.map → component-names-0a8a1a6c.js.map} +1 -1
  232. package/dist/kolibri/controller-1ef92bc2.js +4 -0
  233. package/dist/kolibri/{dev.utils-cb789c3d.js → dev.utils-e03eae45.js} +1 -1
  234. package/dist/kolibri/{devtools-a88bc2ec.js → devtools-5ea408e2.js} +1 -1
  235. package/dist/kolibri/{events-9570402d.js → events-4ee0f1f6.js} +1 -1
  236. package/dist/kolibri/{events-9570402d.js.map → events-4ee0f1f6.js.map} +1 -1
  237. package/dist/kolibri/form-field-msg-4b82d64f.js +4 -0
  238. package/dist/kolibri/{index-bd96e8df.js → index-5ca1f480.js} +1 -1
  239. package/dist/kolibri/index-5ca1f480.js.map +1 -0
  240. package/dist/kolibri/index.esm.js +1 -1
  241. package/dist/kolibri/kol-abbr.entry.js +1 -1
  242. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  243. package/dist/kolibri/kol-accordion.entry.js +1 -1
  244. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  245. package/dist/kolibri/kol-alert.entry.js +1 -1
  246. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  247. package/dist/kolibri/kol-avatar.entry.js +1 -1
  248. package/dist/kolibri/kol-badge.entry.js +1 -1
  249. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  250. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  251. package/dist/kolibri/kol-button-group.entry.js +1 -1
  252. package/dist/kolibri/kol-button-link.entry.js +1 -1
  253. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  254. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  255. package/dist/kolibri/kol-button.entry.js +1 -1
  256. package/dist/kolibri/kol-card.entry.js +1 -1
  257. package/dist/kolibri/kol-combobox.entry.js +1 -1
  258. package/dist/kolibri/kol-details.entry.js +1 -1
  259. package/dist/kolibri/kol-drawer.entry.js +1 -1
  260. package/dist/kolibri/kol-form.entry.js +1 -1
  261. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  262. package/dist/kolibri/kol-heading.entry.js +1 -1
  263. package/dist/kolibri/kol-icon.entry.js +1 -1
  264. package/dist/kolibri/kol-image.entry.js +1 -1
  265. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  266. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  267. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  268. package/dist/kolibri/kol-input-color.entry.js +1 -1
  269. package/dist/kolibri/kol-input-date.entry.js +1 -1
  270. package/dist/kolibri/kol-input-email.entry.js +1 -1
  271. package/dist/kolibri/kol-input-file.entry.js +1 -1
  272. package/dist/kolibri/kol-input-number.entry.js +1 -1
  273. package/dist/kolibri/kol-input-password.entry.js +1 -1
  274. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  275. package/dist/kolibri/kol-input-range.entry.js +1 -1
  276. package/dist/kolibri/kol-input-text.entry.js +1 -1
  277. package/dist/kolibri/kol-input.entry.js +1 -1
  278. package/dist/kolibri/kol-input.entry.js.map +1 -1
  279. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  280. package/dist/kolibri/kol-link-button.entry.js +1 -1
  281. package/dist/kolibri/kol-link-group.entry.js +1 -1
  282. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  283. package/dist/kolibri/kol-link.entry.js +1 -1
  284. package/dist/kolibri/kol-logo.entry.js +1 -1
  285. package/dist/kolibri/kol-modal.entry.js +1 -1
  286. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  287. package/dist/kolibri/kol-nav.entry.js +1 -1
  288. package/dist/kolibri/kol-pagination.entry.js +1 -1
  289. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  290. package/dist/kolibri/kol-popover-wc.entry.js.map +1 -1
  291. package/dist/kolibri/kol-progress.entry.js +1 -1
  292. package/dist/kolibri/kol-quote.entry.js +1 -1
  293. package/dist/kolibri/kol-select.entry.js +1 -1
  294. package/dist/kolibri/kol-single-select.entry.js +1 -1
  295. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  296. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  297. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  298. package/dist/kolibri/kol-spin.entry.js +1 -1
  299. package/dist/kolibri/kol-split-button.entry.js +1 -1
  300. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  301. package/dist/kolibri/kol-symbol.entry.js +1 -1
  302. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  303. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  304. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  305. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  306. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  307. package/dist/kolibri/kol-table.entry.js +1 -1
  308. package/dist/kolibri/kol-tabs.entry.js +1 -1
  309. package/dist/kolibri/kol-textarea.entry.js +1 -1
  310. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  311. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  312. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  313. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  314. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  315. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  316. package/dist/kolibri/kol-tree.entry.js +1 -1
  317. package/dist/kolibri/kol-version.entry.js +1 -1
  318. package/dist/kolibri/kolibri.esm.js +1 -1
  319. package/dist/kolibri/kolibri.esm.js.map +1 -1
  320. package/dist/types/components/modal/shadow.d.ts +4 -2
  321. package/dist/types/components/modal/test/html.mock.d.ts +2 -1
  322. package/dist/types/components/popover/component.d.ts +3 -1
  323. package/dist/types/components/split-button/shadow.d.ts +2 -5
  324. package/dist/types/components.d.ts +31 -6
  325. package/dist/types/schema/components/popover.d.ts +3 -3
  326. package/dist/types/schema/enums/events.d.ts +2 -1
  327. package/dist/types/schema/props/index.d.ts +1 -1
  328. package/dist/types/schema/props/popover-callbacks.d.ts +10 -0
  329. package/doc/modal.md +56 -45
  330. package/doc/popover.md +5 -4
  331. package/doc/split-button.md +13 -0
  332. package/doc/tabs.md +1 -1
  333. package/package.json +1 -1
  334. package/vscode-custom-data.json +1 -1
  335. package/dist/cjs/component-names-f704607d.js +0 -4
  336. package/dist/cjs/component-names-f704607d.js.map +0 -1
  337. package/dist/cjs/events-a0477b5a.js +0 -4
  338. package/dist/cjs/events-a0477b5a.js.map +0 -1
  339. package/dist/cjs/index-afb88da6.js +0 -4
  340. package/dist/cjs/index-afb88da6.js.map +0 -1
  341. package/dist/esm/component-names-3e0158fe.js.map +0 -1
  342. package/dist/esm/events-9570402d.js.map +0 -1
  343. package/dist/esm/index-bd96e8df.js +0 -4
  344. package/dist/esm/index-bd96e8df.js.map +0 -1
  345. package/dist/kolibri/InternalUnderlinedAccessKey-308bff0a.js +0 -4
  346. package/dist/kolibri/controller-ad9f8f69.js +0 -4
  347. package/dist/kolibri/form-field-msg-2e39a9f7.js +0 -4
  348. package/dist/kolibri/index-bd96e8df.js.map +0 -1
  349. package/dist/types/components/modal/service.d.ts +0 -11
  350. /package/dist/kolibri/{InternalUnderlinedAccessKey-308bff0a.js.map → InternalUnderlinedAccessKey-6dcea924.js.map} +0 -0
  351. /package/dist/kolibri/{app-globals-ca7441bd.js.map → app-globals-af8ec159.js.map} +0 -0
  352. /package/dist/kolibri/{controller-ad9f8f69.js.map → controller-1ef92bc2.js.map} +0 -0
  353. /package/dist/kolibri/{dev.utils-cb789c3d.js.map → dev.utils-e03eae45.js.map} +0 -0
  354. /package/dist/kolibri/{devtools-a88bc2ec.js.map → devtools-5ea408e2.js.map} +0 -0
  355. /package/dist/kolibri/{form-field-msg-2e39a9f7.js.map → form-field-msg-4b82d64f.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{n as KolLinkWcTag}from"./component-names-3e0158fe.js";const 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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-block;\n }\n :is(a, button) {\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n :is(a, button)::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n /* TODO: Why we need this? */\n :is(a, button) > .kol-span-wc {\n margin: auto;\n width: 100%;\n }\n}",KolLinkButtonDefaultStyle0=defaultStyleCss,KolLinkButton=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this._variant="normal"}async focus(){await this.kolFocus()}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return h(Host,{key:"aaa71aa908dc2f9b2333ef32a980b19db8901aa1",class:"kol-link-button"},h(KolLinkWcTag,{key:"98bb9faeac2a860088009e7bf1906b3efc723db6",ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},h("slot",{key:"75eb4d6455e80bba999110d3f744b60f7bde2803",name:"expert",slot:"expert"})))}};KolLinkButton.style={default:KolLinkButtonDefaultStyle0};export{KolLinkButton as kol_link_button};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{n as KolLinkWcTag}from"./component-names-0a8a1a6c.js";const 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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-block;\n }\n :is(a, button) {\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n :is(a, button)::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n /* TODO: Why we need this? */\n :is(a, button) > .kol-span-wc {\n margin: auto;\n width: 100%;\n }\n}",KolLinkButtonDefaultStyle0=defaultStyleCss,KolLinkButton=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this._variant="normal"}async focus(){await this.kolFocus()}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return h(Host,{key:"aaa71aa908dc2f9b2333ef32a980b19db8901aa1",class:"kol-link-button"},h(KolLinkWcTag,{key:"98bb9faeac2a860088009e7bf1906b3efc723db6",ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},h("slot",{key:"75eb4d6455e80bba999110d3f744b60f7bde2803",name:"expert",slot:"expert"})))}};KolLinkButton.style={default:KolLinkButtonDefaultStyle0};export{KolLinkButton as kol_link_button};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{w as watchNavLinks}from"./validation-381a4169.js";import{h as KolLinkTag}from"./component-names-3e0158fe.js";import{v as validateLabel}from"./label-37acddfe.js";import{w as watchValidator}from"./prop.validators-f89d26b4.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n :is(ol, ul).horizontal {\n display: flex;\n flex-wrap: wrap;\n }\n :is(ol, ul).horizontal li {\n margin-left: calc(20rem / var(--kolibri-root-font-size, 16));\n margin-right: calc(4rem / var(--kolibri-root-font-size, 16));\n }\n :is(ol, ul).horizontal li:first-child {\n margin-left: 0;\n }\n :is(ol, ul).horizontal li:last-child {\n margin-right: 0;\n }\n :is(ol, ul).vertical li {\n margin-left: calc(28rem / var(--kolibri-root-font-size, 16));\n margin-right: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n li.list-none {\n list-style-type: none !important;\n margin-left: 0;\n }\n}",KolLinkGroupDefaultStyle0=defaultStyleCss,ListItem=n=>{const e=[];return n.links.map(((t,i)=>{e.push(h("li",{key:i,class:{ident:i>0&&"vertical"===n.orientation,"list-none":0===i&&"horizontal"===n.orientation},style:{listStyleType:n.listStyleType}},h(KolLinkTag,Object.assign({},t))))})),e},KolLinkGroup=class{constructor(n){registerInstance(this,n),this.isUl=!0,this._listStyleType=void 0,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){const n=this.isUl?"ul":"ol";return h(Host,{key:"166b42082d8da56cb526c76d8b0631a3f5ccfd5d",class:"kol-link-group"},h(n,{key:"b417e8bc884c5bba727fbc8b62e37dfcdd3eab37","aria-label":this.state._label,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},h(ListItem,{key:"9c08949729ef120301d176f6ccbdaca785edfa31",links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateLabel(n,e,t=!1){!t&&this.state._label&&removeNavLabel(this.state._label),validateLabel(this,n),this.state._label&&addNavLabel(this.state._label)}validateListStyleType(n){watchValidator(this,"_listStyleType",(n=>{switch(n){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),n,{defaultValue:"disc"})}validateLinks(n){watchNavLinks("KolLinkGroup",this,n)}validateOrientation(n){watchValidator(this,"_orientation",(n=>"horizontal"===n||"vertical"===n),new Set(["Orientation {horizontal, vertical}"]),n,{defaultValue:"vertical"})}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateListStyleType(this._listStyleType),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){this.state._label&&removeNavLabel(this.state._label)}static get watchers(){return{_label:["validateLabel"],_listStyleType:["validateListStyleType"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolLinkGroup.style={default:KolLinkGroupDefaultStyle0};export{KolLinkGroup as kol_link_group};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{w as watchNavLinks}from"./validation-381a4169.js";import{h as KolLinkTag}from"./component-names-0a8a1a6c.js";import{v as validateLabel}from"./label-37acddfe.js";import{w as watchValidator}from"./prop.validators-f89d26b4.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n :is(ol, ul).horizontal {\n display: flex;\n flex-wrap: wrap;\n }\n :is(ol, ul).horizontal li {\n margin-left: calc(20rem / var(--kolibri-root-font-size, 16));\n margin-right: calc(4rem / var(--kolibri-root-font-size, 16));\n }\n :is(ol, ul).horizontal li:first-child {\n margin-left: 0;\n }\n :is(ol, ul).horizontal li:last-child {\n margin-right: 0;\n }\n :is(ol, ul).vertical li {\n margin-left: calc(28rem / var(--kolibri-root-font-size, 16));\n margin-right: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n li.list-none {\n list-style-type: none !important;\n margin-left: 0;\n }\n}",KolLinkGroupDefaultStyle0=defaultStyleCss,ListItem=n=>{const e=[];return n.links.map(((t,i)=>{e.push(h("li",{key:i,class:{ident:i>0&&"vertical"===n.orientation,"list-none":0===i&&"horizontal"===n.orientation},style:{listStyleType:n.listStyleType}},h(KolLinkTag,Object.assign({},t))))})),e},KolLinkGroup=class{constructor(n){registerInstance(this,n),this.isUl=!0,this._listStyleType=void 0,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){const n=this.isUl?"ul":"ol";return h(Host,{key:"166b42082d8da56cb526c76d8b0631a3f5ccfd5d",class:"kol-link-group"},h(n,{key:"b417e8bc884c5bba727fbc8b62e37dfcdd3eab37","aria-label":this.state._label,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},h(ListItem,{key:"9c08949729ef120301d176f6ccbdaca785edfa31",links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateLabel(n,e,t=!1){!t&&this.state._label&&removeNavLabel(this.state._label),validateLabel(this,n),this.state._label&&addNavLabel(this.state._label)}validateListStyleType(n){watchValidator(this,"_listStyleType",(n=>{switch(n){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),n,{defaultValue:"disc"})}validateLinks(n){watchNavLinks("KolLinkGroup",this,n)}validateOrientation(n){watchValidator(this,"_orientation",(n=>"horizontal"===n||"vertical"===n),new Set(["Orientation {horizontal, vertical}"]),n,{defaultValue:"vertical"})}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateListStyleType(this._listStyleType),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){this.state._label&&removeNavLabel(this.state._label)}static get watchers(){return{_label:["validateLabel"],_listStyleType:["validateListStyleType"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolLinkGroup.style={default:KolLinkGroupDefaultStyle0};export{KolLinkGroup as kol_link_group};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{o as onLocationChange}from"./ariaCurrentService-6fe36ebc.js";import{p as preventDefaultAndStopPropagation}from"./events-29e84d75.js";import{n as nonce}from"./dev.utils-cb789c3d.js";import{a as KolTooltipWcTag,f as KolSpanWcTag,g as KolIconTag}from"./component-names-3e0158fe.js";import{t as translate}from"./i18n-80da5843.js";import{w as watchValidator,i as watchString,q as setEventTarget,j as devHint}from"./prop.validators-f89d26b4.js";import{v as validateHref}from"./href-e8c05473.js";import{s as showExpertSlot}from"./reuse-523ba2ac.js";import{v as validateAccessKey}from"./access-key-6ced3097.js";import{v as validateAriaDescription,a as validateAriaExpanded,b as validateAlternativeButtonLinkRole}from"./aria-expanded-e75617bf.js";import{v as validateDisabled}from"./disabled-d5b4a883.js";import{v as validateHideLabel}from"./hide-label-6424f890.js";import{v as validateIcons}from"./icons-bd60f3a5.js";import{a as validateLabelWithExpertSlot}from"./label-37acddfe.js";import{v as validateTabIndex}from"./tab-index-a117f598.js";import{v as validateTooltipAlign}from"./tooltip-align-b217e9d0.js";import"./dev.utils-fab45cbc.js";import"./i18n-ece780dd.js";import"./index-db4aa6e4.js";import"./common-54bf85ba.js";import"./align-89a65800.js";const ariaCurrentValuePropTypeOptions=["date","location","page","step","time","true","false"],validateAriaCurrentValue=(a,t)=>{watchValidator(a,"_ariaCurrentValue",(a=>"string"==typeof a&&ariaCurrentValuePropTypeOptions.includes(a)),new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),t,{defaultValue:"page"})},validateAriaOwns=(a,t)=>{watchString(a,"_ariaOwns",t,{defaultValue:void 0})},validateDownload=(a,t)=>{watchString(a,"_download",t)},validateLinkCallbacks=(a,t)=>{"object"==typeof t&&"function"==typeof(null==t?void 0:t.onClick)&&(a.state=Object.assign(Object.assign({},a.state),{_on:t}))},validateLinkTarget=(a,t)=>{watchString(a,"_target",t)},KolLinkWc=class{constructor(a){registerInstance(this,a),this.internalDescriptionById=nonce(),this.catchRef=a=>{this.anchorRef=a},this.onClick=a=>{var t,e;!0===this.state._disabled?preventDefaultAndStopPropagation(a):"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onClick)&&(a.preventDefault(),a.stopPropagation(),setEventTarget(a,this.anchorRef),null===(e=this.state._on)||void 0===e||e.onClick(a,this.state._href))},this.getRenderValues=()=>{const a="string"==typeof this.state._target&&"_self"!==this.state._target,t={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:a?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] An aria-label must be set when _hide-label is set."),{isExternal:a,tagAttrs:t}},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaOwns=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this.state={_ariaCurrentValue:"page",_href:"",_icons:{}}}async kolFocus(){var a;null===(a=this.anchorRef)||void 0===a||a.focus()}render(){var a,t;const{isExternal:e,tagAttrs:i}=this.getRenderValues(),s=showExpertSlot(this.state._label),l=Boolean(null===(t=null===(a=this.state._ariaDescription)||void 0===a?void 0:a.trim())||void 0===t?void 0:t.length);return h(Host,{key:"ca779101a7b0a1fc00ba4c487f485bf64c021e2a",class:"kol-link-wc"},h("a",Object.assign({key:"26fbff98d2ce402df318eb6aa8d3b1c5faadb96d",ref:this.catchRef},i,{accessKey:this.state._accessKey,"aria-current":this.state._ariaCurrent,"aria-describedby":l?this.internalDescriptionById:void 0,"aria-disabled":this.state._disabled?"true":void 0,"aria-expanded":"boolean"==typeof this.state._ariaExpanded?String(this.state._ariaExpanded):void 0,"aria-owns":this.state._ariaOwns,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?`${this.state._label}${e?` (${translate("kol-open-link-in-tab")})`:""}`:void 0,class:{disabled:!0===this.state._disabled,"external-link":e,"hide-label":!0===this.state._hideLabel}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick,role:this.state._role,tabIndex:this.state._disabled?-1:this.state._tabIndex}),h(KolSpanWcTag,{key:"ae5fd2b9494d8af7e734ff604bb6d0bdbe9d2918",_accessKey:this.state._accessKey,_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:s?"":this.state._label||this.state._href},h("slot",{key:"e663545748652867f7bda05b95dc780624afd694",name:"expert",slot:"expert"})),e&&h(KolIconTag,{key:"9272168a80f7d7ea1695edbd148d77c712e3af6c",class:"external-link-icon",_label:this.state._hideLabel?"":translate("kol-open-link-in-tab"),_icons:"codicon codicon-link-external","aria-hidden":this.state._hideLabel})),h(KolTooltipWcTag,{key:"9cd2d8d555edd92377a24c433b76d0de5dcdeb6f","aria-hidden":"true",hidden:s||!this.state._hideLabel,_accessKey:this.state._accessKey,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}),l&&h("span",{key:"58b50fd2c3e3c3bc4956bcbdc248c0237b3cddcf",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}validateAccessKey(a){validateAccessKey(this,a)}validateAriaCurrentValue(a){validateAriaCurrentValue(this,a)}validateAriaDescription(a){validateAriaDescription(this,a)}validateAriaExpanded(a){validateAriaExpanded(this,a)}validateAriaOwns(a){validateAriaOwns(this,a)}validateDisabled(a){validateDisabled(this,a)}validateDownload(a){validateDownload(this,a)}validateHideLabel(a){validateHideLabel(this,a)}validateHref(a){validateHref(this,a,{required:!0})}validateIcons(a){validateIcons(this,a)}validateLabel(a){validateLabelWithExpertSlot(this,a)}validateOn(a){validateLinkCallbacks(this,a)}validateRole(a){validateAlternativeButtonLinkRole(this,a)}validateTabIndex(a){validateTabIndex(this,a)}validateTarget(a){validateLinkTarget(this,a)}validateTooltipAlign(a){validateTooltipAlign(this,a)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaOwns(this._ariaOwns),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel),this.validateHref(this._href),this.validateIcons(this._icons),this.validateLabel(this._label),this.validateOn(this._on),this.validateRole(this._role),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTooltipAlign(this._tooltipAlign),this.unsubscribeOnLocationChange=onLocationChange((a=>{this.state._ariaCurrent=a===this.state._href?this.state._ariaCurrentValue:void 0}))}disconnectedCallback(){this.unsubscribeOnLocationChange&&this.unsubscribeOnLocationChange()}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaOwns:["validateAriaOwns"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_tooltipAlign:["validateTooltipAlign"]}}};export{KolLinkWc as kol_link_wc};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{o as onLocationChange}from"./ariaCurrentService-6fe36ebc.js";import{p as preventDefaultAndStopPropagation}from"./events-29e84d75.js";import{n as nonce}from"./dev.utils-e03eae45.js";import{a as KolTooltipWcTag,f as KolSpanWcTag,g as KolIconTag}from"./component-names-0a8a1a6c.js";import{t as translate}from"./i18n-80da5843.js";import{w as watchValidator,i as watchString,q as setEventTarget,j as devHint}from"./prop.validators-f89d26b4.js";import{v as validateHref}from"./href-e8c05473.js";import{s as showExpertSlot}from"./reuse-523ba2ac.js";import{v as validateAccessKey}from"./access-key-6ced3097.js";import{v as validateAriaDescription,a as validateAriaExpanded,b as validateAlternativeButtonLinkRole}from"./aria-expanded-e75617bf.js";import{v as validateDisabled}from"./disabled-d5b4a883.js";import{v as validateHideLabel}from"./hide-label-6424f890.js";import{v as validateIcons}from"./icons-bd60f3a5.js";import{a as validateLabelWithExpertSlot}from"./label-37acddfe.js";import{v as validateTabIndex}from"./tab-index-a117f598.js";import{v as validateTooltipAlign}from"./tooltip-align-b217e9d0.js";import"./dev.utils-fab45cbc.js";import"./i18n-ece780dd.js";import"./index-db4aa6e4.js";import"./common-54bf85ba.js";import"./align-89a65800.js";const ariaCurrentValuePropTypeOptions=["date","location","page","step","time","true","false"],validateAriaCurrentValue=(a,t)=>{watchValidator(a,"_ariaCurrentValue",(a=>"string"==typeof a&&ariaCurrentValuePropTypeOptions.includes(a)),new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),t,{defaultValue:"page"})},validateAriaOwns=(a,t)=>{watchString(a,"_ariaOwns",t,{defaultValue:void 0})},validateDownload=(a,t)=>{watchString(a,"_download",t)},validateLinkCallbacks=(a,t)=>{"object"==typeof t&&"function"==typeof(null==t?void 0:t.onClick)&&(a.state=Object.assign(Object.assign({},a.state),{_on:t}))},validateLinkTarget=(a,t)=>{watchString(a,"_target",t)},KolLinkWc=class{constructor(a){registerInstance(this,a),this.internalDescriptionById=nonce(),this.catchRef=a=>{this.anchorRef=a},this.onClick=a=>{var t,e;!0===this.state._disabled?preventDefaultAndStopPropagation(a):"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onClick)&&(a.preventDefault(),a.stopPropagation(),setEventTarget(a,this.anchorRef),null===(e=this.state._on)||void 0===e||e.onClick(a,this.state._href))},this.getRenderValues=()=>{const a="string"==typeof this.state._target&&"_self"!==this.state._target,t={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:a?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] An aria-label must be set when _hide-label is set."),{isExternal:a,tagAttrs:t}},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaOwns=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this.state={_ariaCurrentValue:"page",_href:"",_icons:{}}}async kolFocus(){var a;null===(a=this.anchorRef)||void 0===a||a.focus()}render(){var a,t;const{isExternal:e,tagAttrs:i}=this.getRenderValues(),s=showExpertSlot(this.state._label),l=Boolean(null===(t=null===(a=this.state._ariaDescription)||void 0===a?void 0:a.trim())||void 0===t?void 0:t.length);return h(Host,{key:"ca779101a7b0a1fc00ba4c487f485bf64c021e2a",class:"kol-link-wc"},h("a",Object.assign({key:"26fbff98d2ce402df318eb6aa8d3b1c5faadb96d",ref:this.catchRef},i,{accessKey:this.state._accessKey,"aria-current":this.state._ariaCurrent,"aria-describedby":l?this.internalDescriptionById:void 0,"aria-disabled":this.state._disabled?"true":void 0,"aria-expanded":"boolean"==typeof this.state._ariaExpanded?String(this.state._ariaExpanded):void 0,"aria-owns":this.state._ariaOwns,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?`${this.state._label}${e?` (${translate("kol-open-link-in-tab")})`:""}`:void 0,class:{disabled:!0===this.state._disabled,"external-link":e,"hide-label":!0===this.state._hideLabel}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick,role:this.state._role,tabIndex:this.state._disabled?-1:this.state._tabIndex}),h(KolSpanWcTag,{key:"ae5fd2b9494d8af7e734ff604bb6d0bdbe9d2918",_accessKey:this.state._accessKey,_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:s?"":this.state._label||this.state._href},h("slot",{key:"e663545748652867f7bda05b95dc780624afd694",name:"expert",slot:"expert"})),e&&h(KolIconTag,{key:"9272168a80f7d7ea1695edbd148d77c712e3af6c",class:"external-link-icon",_label:this.state._hideLabel?"":translate("kol-open-link-in-tab"),_icons:"codicon codicon-link-external","aria-hidden":this.state._hideLabel})),h(KolTooltipWcTag,{key:"9cd2d8d555edd92377a24c433b76d0de5dcdeb6f","aria-hidden":"true",hidden:s||!this.state._hideLabel,_accessKey:this.state._accessKey,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}),l&&h("span",{key:"58b50fd2c3e3c3bc4956bcbdc248c0237b3cddcf",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}validateAccessKey(a){validateAccessKey(this,a)}validateAriaCurrentValue(a){validateAriaCurrentValue(this,a)}validateAriaDescription(a){validateAriaDescription(this,a)}validateAriaExpanded(a){validateAriaExpanded(this,a)}validateAriaOwns(a){validateAriaOwns(this,a)}validateDisabled(a){validateDisabled(this,a)}validateDownload(a){validateDownload(this,a)}validateHideLabel(a){validateHideLabel(this,a)}validateHref(a){validateHref(this,a,{required:!0})}validateIcons(a){validateIcons(this,a)}validateLabel(a){validateLabelWithExpertSlot(this,a)}validateOn(a){validateLinkCallbacks(this,a)}validateRole(a){validateAlternativeButtonLinkRole(this,a)}validateTabIndex(a){validateTabIndex(this,a)}validateTarget(a){validateLinkTarget(this,a)}validateTooltipAlign(a){validateTooltipAlign(this,a)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaOwns(this._ariaOwns),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel),this.validateHref(this._href),this.validateIcons(this._icons),this.validateLabel(this._label),this.validateOn(this._on),this.validateRole(this._role),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTooltipAlign(this._tooltipAlign),this.unsubscribeOnLocationChange=onLocationChange((a=>{this.state._ariaCurrent=a===this.state._href?this.state._ariaCurrentValue:void 0}))}disconnectedCallback(){this.unsubscribeOnLocationChange&&this.unsubscribeOnLocationChange()}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaOwns:["validateAriaOwns"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_tooltipAlign:["validateTooltipAlign"]}}};export{KolLinkWc as kol_link_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{n as KolLinkWcTag}from"./component-names-3e0158fe.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: -99999px;\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1em;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n }\n}",KolLinkDefaultStyle0=defaultStyleCss,KolLink=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right"}async focus(){await this.kolFocus()}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return h(Host,{key:"5b334d85642030f026e064f34cbdd08f7808ff28",class:"kol-link"},h(KolLinkWcTag,{key:"3e73251313ea33ba37f793e368670549359a0cb0",ref:this.catchRef,_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},h("slot",{key:"22adfc508721f3c9b4beb818a95a3e1da9405d04",name:"expert",slot:"expert"})))}};KolLink.style={default:KolLinkDefaultStyle0};export{KolLink as kol_link};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{n as KolLinkWcTag}from"./component-names-0a8a1a6c.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: -99999px;\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1em;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n }\n}",KolLinkDefaultStyle0=defaultStyleCss,KolLink=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right"}async focus(){await this.kolFocus()}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return h(Host,{key:"5b334d85642030f026e064f34cbdd08f7808ff28",class:"kol-link"},h(KolLinkWcTag,{key:"3e73251313ea33ba37f793e368670549359a0cb0",ref:this.catchRef,_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},h("slot",{key:"22adfc508721f3c9b4beb818a95a3e1da9405d04",name:"expert",slot:"expert"})))}};KolLink.style={default:KolLinkDefaultStyle0};export{KolLink as kol_link};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{d as Bundesanstalt,B as Bundesministerium,b as Bundesamt,f as BUND_LOGO_TEXT_MAP}from"./bund-ad41b762.js";import{t as translate}from"./i18n-80da5843.js";import{s as setState,j as devHint}from"./prop.validators-f89d26b4.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./index-db4aa6e4.js";import"./dev.utils-fab45cbc.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n text {\n font-size: 16px;\n letter-spacing: normal;\n word-spacing: normal;\n }\n svg {\n max-height: 100%;\n }\n}",KolLogoDefaultStyle0=defaultStyleCss;function enumToArray(n,e=new Map){return Object.entries(n).map((([n,t])=>{e.set(t,n)})),e}const ENUM_AS_MAP=enumToArray(Bundesamt,enumToArray(Bundesanstalt,enumToArray(Bundesministerium)));function getAriaLabel(n){return ENUM_AS_MAP.has(n)?ENUM_AS_MAP.get(n):""}const Adler=()=>h("path",{d:"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z"}),KolLogo=class{constructor(n){registerInstance(this,n),this._org=void 0,this.state={_org:Bundesanstalt["Informationstechnikzentrum Bund"]}}validateOrg(n){"string"==typeof n&&ENUM_AS_MAP.has(n)?setState(this,"_org",n):devHint(`The abbreviation (${n}) used is not defined!`)}componentWillLoad(){this.validateOrg(this._org)}render(){var n;return h(Host,{key:"00b2dfecc3fed5fee1ddc678ad5db466657135ee",class:"kol-logo"},h("svg",{key:"29ce4e5b38c73d080bc5d9f7e507eded70be7bf2","aria-label":translate("kol-logo-description",{placeholders:{orgShort:this.state._org,orgLong:getAriaLabel(this.state._org)}}),role:"img",viewBox:"0 0 225 100"},h("rect",{key:"f9bcc15e299ef767fe534152d6a36a3517935031",width:"100%",height:"100%",fill:"white"}),h("svg",{key:"b190c40b40a6e69b71f9ebfa90b61facb3467a70",x:"0",y:"4",height:"75"},h(Adler,{key:"7c7e7966dd2dbe3190ec696ac91bb6826b69d94b"})),h("svg",{key:"226145289c46d420828acc8f6c19dec591d182d6",x:"40.5",y:"3.5",height:"100"},h("rect",{key:"1ea801500c85982d2e23125e50de12d9fc2404be",width:"5",height:"30"}),h("rect",{key:"31aa33e4820eeb8e20b3a6eb5d3081fc028f7506",y:"30",width:"5",height:"30",fill:"red"}),h("rect",{key:"091e80d86aff989e495a1e06d290d50ca56fbdd9",y:"60",width:"5",height:"30",fill:"#fc0"})),h("svg",{key:"5946b2fce0cd19428ed71f504032c9cf3f8a6a20",x:"50",y:"0"},h("text",{key:"665d760de83898f8766ab3c73b89c00008e7cd8b",x:"0",y:"-0.05em","font-family":"BundesSans Web",style:{backgroundColor:"white",color:"black"}},BUND_LOGO_TEXT_MAP.has(this.state._org)?h("tspan",null,null===(n=BUND_LOGO_TEXT_MAP.get(this.state._org))||void 0===n?void 0:n.map(((n,e)=>h("tspan",{x:"0",dy:"1.1em",key:`kol-logo-text-${e}`},n)))):h("tspan",{fill:"red"},h("tspan",{x:"0",dy:"1.1em"},"Der Schlüsselwert"),h("tspan",{x:"0",dy:"1.1em","font-weight":"bold"},"'",this.state._org,"'"),h("tspan",{x:"0",dy:"1.1em"},"ist nicht definiert."),h("tspan",{x:"0",dy:"1.1em"},"oder freigegeben."))))))}static get watchers(){return{_org:["validateOrg"]}}};KolLogo.style={default:KolLogoDefaultStyle0};export{KolLogo as kol_logo};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{d as Bundesanstalt,B as Bundesministerium,b as Bundesamt,f as BUND_LOGO_TEXT_MAP}from"./bund-ad41b762.js";import{t as translate}from"./i18n-80da5843.js";import{s as setState,j as devHint}from"./prop.validators-f89d26b4.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./index-db4aa6e4.js";import"./dev.utils-fab45cbc.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n text {\n font-size: 16px;\n letter-spacing: normal;\n word-spacing: normal;\n }\n svg {\n max-height: 100%;\n }\n}",KolLogoDefaultStyle0=defaultStyleCss;function enumToArray(n,e=new Map){return Object.entries(n).map((([n,t])=>{e.set(t,n)})),e}const ENUM_AS_MAP=enumToArray(Bundesamt,enumToArray(Bundesanstalt,enumToArray(Bundesministerium)));function getAriaLabel(n){return ENUM_AS_MAP.has(n)?ENUM_AS_MAP.get(n):""}const Adler=()=>h("path",{d:"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z"}),KolLogo=class{constructor(n){registerInstance(this,n),this._org=void 0,this.state={_org:Bundesanstalt["Informationstechnikzentrum Bund"]}}validateOrg(n){"string"==typeof n&&ENUM_AS_MAP.has(n)?setState(this,"_org",n):devHint(`The abbreviation (${n}) used is not defined!`)}componentWillLoad(){this.validateOrg(this._org)}render(){var n;return h(Host,{key:"00b2dfecc3fed5fee1ddc678ad5db466657135ee",class:"kol-logo"},h("svg",{key:"29ce4e5b38c73d080bc5d9f7e507eded70be7bf2","aria-label":translate("kol-logo-description",{placeholders:{orgShort:this.state._org,orgLong:getAriaLabel(this.state._org)}}),role:"img",viewBox:"0 0 225 100"},h("rect",{key:"f9bcc15e299ef767fe534152d6a36a3517935031",width:"100%",height:"100%",fill:"white"}),h("svg",{key:"b190c40b40a6e69b71f9ebfa90b61facb3467a70",x:"0",y:"4",height:"75"},h(Adler,{key:"7c7e7966dd2dbe3190ec696ac91bb6826b69d94b"})),h("svg",{key:"226145289c46d420828acc8f6c19dec591d182d6",x:"40.5",y:"3.5",height:"100"},h("rect",{key:"1ea801500c85982d2e23125e50de12d9fc2404be",width:"5",height:"30"}),h("rect",{key:"31aa33e4820eeb8e20b3a6eb5d3081fc028f7506",y:"30",width:"5",height:"30",fill:"red"}),h("rect",{key:"091e80d86aff989e495a1e06d290d50ca56fbdd9",y:"60",width:"5",height:"30",fill:"#fc0"})),h("svg",{key:"5946b2fce0cd19428ed71f504032c9cf3f8a6a20",x:"50",y:"0"},h("text",{key:"665d760de83898f8766ab3c73b89c00008e7cd8b",x:"0",y:"-0.05em","font-family":"BundesSans Web",style:{backgroundColor:"white",color:"black"}},BUND_LOGO_TEXT_MAP.has(this.state._org)?h("tspan",null,null===(n=BUND_LOGO_TEXT_MAP.get(this.state._org))||void 0===n?void 0:n.map(((n,e)=>h("tspan",{x:"0",dy:"1.1em",key:`kol-logo-text-${e}`},n)))):h("tspan",{fill:"red"},h("tspan",{x:"0",dy:"1.1em"},"Der Schlüsselwert"),h("tspan",{x:"0",dy:"1.1em","font-weight":"bold"},"'",this.state._org,"'"),h("tspan",{x:"0",dy:"1.1em"},"ist nicht definiert."),h("tspan",{x:"0",dy:"1.1em"},"oder freigegeben."))))))}static get watchers(){return{_org:["validateOrg"]}}};KolLogo.style={default:KolLogoDefaultStyle0};export{KolLogo as kol_logo};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{g as getDocument,L as Log}from"./dev.utils-fab45cbc.js";import{w as watchValidator,f as featureHint,s as setState,i as watchString}from"./prop.validators-f89d26b4.js";import{v as validateLabel}from"./label-37acddfe.js";import"./index-db4aa6e4.js";class ModalService{constructor(){this.lockedElements=new Map,this.modalStack=new Map}lockElement(e){const t=e.getAttribute("tabindex");(e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||"string"==typeof t||void 0!==e.dataset.kolModal)&&("string"==typeof t?this.lockedElements.set(e,{tabIndex:t}):this.lockedElements.set(e,{}),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),e.style.userSelect="none")}unlockElement(e,t){"string"==typeof e.tabIndex?t.setAttribute("tabindex",e.tabIndex):t.removeAttribute("tabindex"),t.removeAttribute("aria-hidden"),t.style.userSelect="unset",this.lockedElements.delete(t)}unlockLockedElements(e){e.forEach(this.unlockElement.bind(this))}lockFocus(e,t){try{if(e!==t&&(e instanceof HTMLElement||e instanceof ShadowRoot)){e instanceof HTMLElement&&(this.lockElement(e),this.lockFocus(e.shadowRoot,t));for(let n=0;n<e.children.length;n++)this.lockFocus(e.children[n],t)}}catch(e){}}renderModalIfExists(e){if(e instanceof HTMLElement){this.lockedElements.has(e)&&this.unlockElement(this.lockedElements.get(e),e);const t=setTimeout((()=>{clearTimeout(t),e.focus()}),500)}if(this.unlockLockedElements(this.lockedElements),this.modalStack.size>0){const e=Array.from(this.modalStack.keys()),t=e[e.length-1];this.modalStack.forEach(((e,n)=>{n.style.display=t===n?"inline":"none"})),getDocument().body.style.maxHeight="100vh",getDocument().body.style.overflow="hidden",this.lockFocus(getDocument().body,t)}else getDocument().body.style.maxHeight="unset",getDocument().body.style.overflow="unset"}openModal(e,t){e instanceof HTMLElement==!1?Log.warn("[KolModalService] The DOM reference of the modal is not valid."):(this.modalStack.set(e,{activeElement:t}),this.renderModalIfExists())}closeModal(e){var t;if(e instanceof HTMLElement==!1)Log.warn("[KolModalService] The DOM reference of the modal is not valid.");else{const n=null===(t=this.modalStack.get(e))||void 0===t?void 0:t.activeElement;this.modalStack.delete(e),this.renderModalIfExists(n)}}}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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .overlay {\n background-color: rgba(0, 0, 0, 0.33);\n display: flex;\n height: 100%;\n inset: 0;\n position: fixed;\n width: 100%;\n z-index: 100;\n }\n .modal {\n margin: auto;\n max-height: 100%;\n max-width: 100%;\n }\n}",KolModalDefaultStyle0=defaultStyleCss,modalService=new ModalService,KolModal=class{constructor(e){registerInstance(this,e),this.onKeyDown=e=>{e&&"Escape"===e.code&&(this._activeElement=null)},this._activeElement=void 0,this._label=void 0,this._on=void 0,this._width="100%",this.state={_activeElement:null,_label:"",_width:"100%"}}componentDidRender(){this.hostElement&&(this.state._activeElement?modalService.openModal(this.hostElement,this.state._activeElement):modalService.closeModal(this.hostElement))}disconnectedCallback(){this.hostElement&&modalService.closeModal(this.hostElement)}render(){return h(Host,{key:"d2c80f7e0009bd8168bafac940611d343686a5b0",class:"kol-modal",ref:e=>{this.hostElement=e}},this.state._activeElement&&h("div",{key:"a80a763d53104165e94815bc6801ece58dcfc538",class:"overlay"},h("div",{key:"348a17a603ee222cfe02c0c15dca4ecad2d99b08",class:"modal",style:{width:this.state._width},"aria-label":this.state._label,"aria-modal":"true",role:"dialog",onKeyDown:this.onKeyDown,ref:e=>{e&&(e.setAttribute("tabindex","0"),setTimeout((()=>e.focus()),250))}},h("slot",{key:"28be8eb18ffd21161fe29b6c56b972252ed172a9"}))))}validateActiveElement(e){watchValidator(this,"_activeElement",(e=>"object"==typeof e||null===e),new Set(["HTMLElement","null"]),e,{defaultValue:null,hooks:{afterPatch:()=>{var e;null===this._activeElement&&(null===(e=this.state._on)||void 0===e?void 0:e.onClose)&&this.state._on.onClose()}}})}validateLabel(e){validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const t={};"function"!=typeof e.onClose&&!0!==e.onClose||(t.onClose=e.onClose),setState(this,"_on",t)}}validateWidth(e){watchString(this,"_width",e,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateLabel(this._label),this.validateOn(this._on),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}}};KolModal.style={default:KolModalDefaultStyle0};export{KolModal as kol_modal};
4
+ import{r as registerInstance,h}from"./index-5ca1f480.js";import{w as watchValidator,s as setState,i as watchString}from"./prop.validators-f89d26b4.js";import{v as validateLabel}from"./label-37acddfe.js";import"./index-db4aa6e4.js";import"./dev.utils-fab45cbc.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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-modal {\n border: 0;\n padding: 0;\n }\n .kol-modal::backdrop {\n background-color: rgba(0, 0, 0, 0.33);\n }\n}",KolModalDefaultStyle0=defaultStyleCss,KolModal=class{constructor(n){registerInstance(this,n),this._activeElement=void 0,this._label=void 0,this._on=void 0,this._width="100%",this.state={_activeElement:null,_label:"",_width:"100%"}}componentDidRender(){var n;this.state._activeElement&&(null===(n=this.refDialog)||void 0===n||n.showModal())}disconnectedCallback(){this.closeModal()}handleNativeCloseEvent(){var n,e;null===(e=null===(n=this.state._on)||void 0===n?void 0:n.onClose)||void 0===e||e.call(n)}async openModal(){var n;null===(n=this.refDialog)||void 0===n||n.showModal()}async closeModal(){var n,e;this._activeElement=null,null===(e=null===(n=this.refDialog)||void 0===n?void 0:n.close)||void 0===e||e.call(n)}render(){return h("dialog",{key:"5033fc2965dfda66c31938ba52d631f1b9ecc902",class:"kol-modal",ref:n=>{this.refDialog=n},style:{width:this.state._width},"aria-label":this.state._label,onClose:this.handleNativeCloseEvent.bind(this)},h("div",{key:"a891311e24e9946af4976e61f5c30de3c9403f5c"},h("slot",{key:"6f6f37bb1b8a723b0c1dafbc880989c153214fae"})))}validateActiveElement(n){watchValidator(this,"_activeElement",(n=>"object"==typeof n||null===n),new Set(["HTMLElement","null"]),n,{defaultValue:null,hooks:{afterPatch:()=>{this.state._activeElement?this.openModal():this.closeModal()}}})}validateLabel(n){validateLabel(this,n,{required:!0})}validateOn(n){if("object"==typeof n&&null!==n){const e={};"function"!=typeof n.onClose&&!0!==n.onClose||(e.onClose=n.onClose),setState(this,"_on",e)}}validateWidth(n){watchString(this,"_width",n,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateLabel(this._label),this.validateOn(this._on),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}}};KolModal.style={default:KolModalDefaultStyle0};export{KolModal as kol_modal};
@@ -1 +1 @@
1
- {"file":"kol-modal.entry.js","mappings":"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","names":[],"sources":["src/components/modal/service.ts","src/components/modal/style.scss?tag=kol-modal&mode=default&encapsulation=shadow","src/components/modal/shadow.tsx"],"sourcesContent":["import { Log, getDocument } from '../../schema';\n\ntype ModalContext = {\n\tactiveElement?: HTMLElement;\n};\n\ntype LockedElementContext = {\n\ttabIndex?: string;\n};\n\n/**\n * The modal service is only working client-side!\n */\nexport class ModalService {\n\tprivate lockedElements: Map<HTMLElement, LockedElementContext> = new Map();\n\tprivate modalStack: Map<HTMLElement, ModalContext> = new Map();\n\n\tprivate lockElement(htmlElement: HTMLElement) {\n\t\tconst tabIndex: string | null = htmlElement.getAttribute('tabindex');\n\t\tif (\n\t\t\thtmlElement instanceof HTMLAnchorElement ||\n\t\t\thtmlElement instanceof HTMLButtonElement ||\n\t\t\thtmlElement instanceof HTMLInputElement ||\n\t\t\thtmlElement instanceof HTMLSelectElement ||\n\t\t\thtmlElement instanceof HTMLTextAreaElement ||\n\t\t\ttypeof tabIndex === 'string' ||\n\t\t\thtmlElement.dataset.kolModal !== undefined\n\t\t) {\n\t\t\tif (typeof tabIndex === 'string') {\n\t\t\t\tthis.lockedElements.set(htmlElement, {\n\t\t\t\t\ttabIndex,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.lockedElements.set(htmlElement, {});\n\t\t\t}\n\t\t\thtmlElement.setAttribute('tabindex', '-1');\n\t\t\thtmlElement.setAttribute('aria-hidden', 'true');\n\t\t\thtmlElement.style.userSelect = 'none';\n\t\t}\n\t}\n\n\tprivate unlockElement(value: LockedElementContext, htmlElement: HTMLElement) {\n\t\tif (typeof value.tabIndex === 'string') {\n\t\t\thtmlElement.setAttribute('tabindex', value.tabIndex);\n\t\t} else {\n\t\t\thtmlElement.removeAttribute('tabindex');\n\t\t}\n\t\thtmlElement.removeAttribute('aria-hidden');\n\t\thtmlElement.style.userSelect = 'unset';\n\t\tthis.lockedElements.delete(htmlElement);\n\t}\n\n\tprivate unlockLockedElements(lockedElements: Map<HTMLElement, LockedElementContext>) {\n\t\tlockedElements.forEach(this.unlockElement.bind(this));\n\t}\n\n\tprivate lockFocus(hostElement: HTMLElement | ShadowRoot | null, excludeElement?: HTMLElement) {\n\t\ttry {\n\t\t\tif (hostElement !== excludeElement && (hostElement instanceof HTMLElement || hostElement instanceof ShadowRoot)) {\n\t\t\t\tif (hostElement instanceof HTMLElement) {\n\t\t\t\t\tthis.lockElement(hostElement);\n\t\t\t\t\tthis.lockFocus(hostElement.shadowRoot, excludeElement);\n\t\t\t\t}\n\t\t\t\tfor (let i = 0; i < hostElement.children.length; i++) {\n\t\t\t\t\tthis.lockFocus(hostElement.children[i] as HTMLElement, excludeElement);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t}\n\n\tprivate renderModalIfExists(activeElement?: HTMLElement) {\n\t\tif (activeElement instanceof HTMLElement) {\n\t\t\tif (this.lockedElements.has(activeElement)) {\n\t\t\t\tthis.unlockElement(this.lockedElements.get(activeElement) as LockedElementContext, activeElement);\n\t\t\t}\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tactiveElement.focus();\n\t\t\t}, 500);\n\t\t}\n\t\tthis.unlockLockedElements(this.lockedElements);\n\t\tif (this.modalStack.size > 0) {\n\t\t\tconst modalKeys = Array.from(this.modalStack.keys());\n\t\t\tconst modalRef = modalKeys[modalKeys.length - 1] as HTMLElement & {\n\t\t\t\t_activeElement: HTMLElement | null; // typo sugger\n\t\t\t};\n\t\t\tthis.modalStack.forEach((_value: ModalContext, htmlElement: HTMLElement) => {\n\t\t\t\tif (modalRef === htmlElement) {\n\t\t\t\t\thtmlElement.style.display = 'inline';\n\t\t\t\t} else {\n\t\t\t\t\thtmlElement.style.display = `none`;\n\t\t\t\t}\n\t\t\t});\n\t\t\tgetDocument().body.style.maxHeight = '100vh';\n\t\t\tgetDocument().body.style.overflow = 'hidden';\n\t\t\tthis.lockFocus(getDocument().body, modalRef);\n\t\t} else {\n\t\t\tgetDocument().body.style.maxHeight = 'unset';\n\t\t\tgetDocument().body.style.overflow = 'unset';\n\t\t}\n\t}\n\n\tpublic openModal(modalRef: HTMLElement, activeElement?: HTMLElement): void {\n\t\tif (modalRef instanceof HTMLElement === false) {\n\t\t\tLog.warn(`[KolModalService] The DOM reference of the modal is not valid.`);\n\t\t} else {\n\t\t\tthis.modalStack.set(modalRef, {\n\t\t\t\tactiveElement,\n\t\t\t});\n\t\t\tthis.renderModalIfExists();\n\t\t}\n\t}\n\n\tpublic closeModal(modalRef: HTMLElement): void {\n\t\tif (modalRef instanceof HTMLElement === false) {\n\t\t\tLog.warn(`[KolModalService] The DOM reference of the modal is not valid.`);\n\t\t} else {\n\t\t\tconst activeElement = this.modalStack.get(modalRef)?.activeElement;\n\t\t\tthis.modalStack.delete(modalRef);\n\t\t\tthis.renderModalIfExists(activeElement);\n\t\t}\n\t}\n}\n","@import '../@shared/mixins';\n@import '../style';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n\n\t.overlay {\n\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\tinset: 0;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\tz-index: 100;\n\t}\n\n\t.modal {\n\t\tmargin: auto;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport type { KoliBriModalEventCallbacks, LabelPropType, ModalAPI, ModalStates } from '../../schema';\nimport { featureHint, setState, validateLabel, watchString, watchValidator } from '../../schema';\nimport { Component, Host, Prop, State, Watch, h } from '@stencil/core';\n\nimport type { JSX } from '@stencil/core';\nimport { ModalService } from './service';\n\nconst modalService = new ModalService();\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n * @deprecated use the native <dialog> instead\n */\n\n/**\n * @slot - Der Inhalt des Modals.\n */\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements ModalAPI {\n\tprivate hostElement?: HTMLElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tif (this.state._activeElement /* SSR instanceof HTMLElement */) {\n\t\t\t\tmodalService.openModal(this.hostElement, this.state._activeElement);\n\t\t\t} else {\n\t\t\t\tmodalService.closeModal(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tmodalService.closeModal(this.hostElement);\n\t\t}\n\t}\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event && event.code === 'Escape') {\n\t\t\tthis._activeElement = null;\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass=\"kol-modal\"\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.hostElement = el as HTMLElement;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._activeElement /* SSR instanceof HTMLElement */ && (\n\t\t\t\t\t<div class=\"overlay\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"modal\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: this.state._width,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-label={this.state._label}\n\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\tif (el /* SSR instanceof HTMLElement */) {\n\t\t\t\t\t\t\t\t\tel.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t\t\tsetTimeout(() => el.focus(), 250);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\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 * Gibt die Referenz auf das auslösende HTML-Element an, wodurch das Modal geöffnet wurde.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\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/**\n\t * Gibt die EventCallback-Function für das Schließen des Modals an.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Defines the width of the modal. (max-width: 100%)\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t@State() public state: ModalStates = {\n\t\t_activeElement: null,\n\t\t_label: '', // ⚠ required\n\t\t_width: '100%',\n\t};\n\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\t/* Call onClose event in the _activeElement watcher because activeElement can be set internally and from the outside and closes the modal when set to null. */\n\t\t\t\t\tif (this._activeElement === null && this.state._on?.onClose) {\n\t\t\t\t\t\tthis.state._on.onClose();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\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\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t@Watch('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-modal.entry.js","mappings":"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","names":[],"sources":["src/components/modal/style.scss?tag=kol-modal&mode=default&encapsulation=shadow","src/components/modal/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n\n\t.kol-modal {\n\t\tborder: 0;\n\t\tpadding: 0;\n\n\t\t&::backdrop {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\t}\n\t}\n}\n","import type { KoliBriModalEventCallbacks, LabelPropType, ModalAPI, ModalStates } from '../../schema';\nimport { setState, validateLabel, watchString, watchValidator } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Method } from '@stencil/core';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n *\n * @slot - The modal's contents.\n */\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements ModalAPI {\n\tprivate refDialog?: HTMLDialogElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.state._activeElement) {\n\t\t\tthis.refDialog?.showModal();\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tvoid this.closeModal();\n\t}\n\n\tprivate handleNativeCloseEvent() {\n\t\tthis.state._on?.onClose?.();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tasync openModal() {\n\t\tthis.refDialog?.showModal();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async closeModal() {\n\t\tthis._activeElement = null;\n\n\t\t/* The optional chaining for the `close` method is not strictly necessary, but a simple/lazy workaround for HTMLDialog not being implemented in jsdom, causing Jest tests to fail. It may be removed in the future. */\n\t\tthis.refDialog?.close?.();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<dialog\n\t\t\t\tclass=\"kol-modal\"\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.refDialog = el;\n\t\t\t\t}}\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: this.state._width,\n\t\t\t\t}}\n\t\t\t\taria-label={this.state._label}\n\t\t\t\tonClose={this.handleNativeCloseEvent.bind(this)}\n\t\t\t>\n\t\t\t\t{/* It's necessary to have a block element container for cross-browser compatibility. The display property for the slot content is unknown and could be inline. */}\n\t\t\t\t<div>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</dialog>\n\t\t);\n\t}\n\n\t/**\n\t * Legacy property - while set to an HTMLElement, the modal is open.\n\t * @deprecated Use methode `openModal` and `closeModal` instead.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\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/**\n\t * Defines the modal callback functions.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Defines the width of the modal. (max-width: 100%)\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t@State() public state: ModalStates = {\n\t\t_activeElement: null,\n\t\t_label: '', // ⚠ required\n\t\t_width: '100%',\n\t};\n\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.state._activeElement) {\n\t\t\t\t\t\tvoid this.openModal();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvoid this.closeModal();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\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\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t@Watch('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{t as translate}from"./i18n-80da5843.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{w as watchNavLinks}from"./validation-381a4169.js";import{n as KolLinkWcTag,c as KolButtonWcTag,o as KolButtonTag}from"./component-names-3e0158fe.js";import{b as watchBoolean,l as devWarning,e as a11yHintLabelingLandmarks,j as devHint,w as watchValidator}from"./prop.validators-f89d26b4.js";import{v as validateHideLabel}from"./hide-label-6424f890.js";import{v as validateLabel}from"./label-37acddfe.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.js";const validateCollapsible=(e,n)=>{watchBoolean(e,"_collapsible",n)},validateHasCompactButton=(e,n)=>{watchBoolean(e,"_hasCompactButton",n)},validateHasIconsWhenExpanded=(e,n)=>{watchBoolean(e,"_hasIconsWhenExpanded",n)},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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n place-items: center;\n }\n :not(.is-compact) nav {\n width: 100%;\n }\n .list {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .list.vertical {\n flex-direction: column;\n }\n .entry {\n display: flex;\n }\n .entry-item {\n flex-grow: 1;\n }\n}",KolNavDefaultStyle0=defaultStyleCss,entryIsLink=e=>"string"==typeof e._href,entryIsButton=e=>{var n;return void 0===e._href&&"function"==typeof(null===(n=e._on)||void 0===n?void 0:n.onClick)},KolNav=class{constructor(e){registerInstance(this,e),this.handleToggleExpansionClick=e=>{e&&(this.state._expandedChildren.includes(e)?this.collapseChildren(e):this.expandChildren(e))},this.linkList=e=>h("ul",{class:"list "+(0===e.deep&&"horizontal"===e.orientation?" horizontal":" vertical"),"data-deep":e.deep},e.links.map(((n,t)=>this.li(e.collapsible,e.hideLabel,e.deep,t,n,e.orientation)))),this._collapsible=!0,this._hasCompactButton=!1,this._hasIconsWhenExpanded=!1,this._hideLabel=!1,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hasIconsWhenExpanded:!1,_hideLabel:!1,_label:"",_links:[],_orientation:"vertical",_expandedChildren:[]}}expandChildren(e){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[...this.state._expandedChildren,e]})}collapseChildren(e){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:this.state._expandedChildren.filter((n=>n!=e))})}entry(e,n,t,a,i){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?a._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return h("div",{class:{entry:!0,"hide-label":n}},entryIsLink(a)?h(KolLinkWcTag,Object.assign({class:"entry-item"},a,{_hideLabel:n,_icons:l})):h(KolButtonWcTag,{class:"entry-item",_label:a._label,_hideLabel:n,_icons:l,_on:{onClick:(e,n)=>{entryIsButton(a)&&"function"==typeof a._on.onClick?a._on.onClick(e,n):this.handleToggleExpansionClick(a._children)}}}),t?this.expandButton(e,a,i):"")}expandButton(e,n,t){return h(KolButtonWcTag,{class:"expand-button",_ariaExpanded:t,_disabled:!e,_icons:"codicon codicon-"+(t?"remove":"add"),_hideLabel:!0,_label:`${translate(t?"kol-nav-label-close":"kol-nav-label-open",{placeholders:{label:n._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(n._children)}})}li(e,n,t,a,i,l){const o=!!i._active,s=Array.isArray(i._children)&&i._children.length>0,d=Boolean(i._children&&this.state._expandedChildren.includes(i._children));return h("li",{class:{active:o,expanded:d,"has-children":s},key:a},this.entry(e,n,s,i,d),d&&h(this.linkList,{collapsible:e,hideLabel:n,deep:t+1,links:i._children||[],orientation:l}))}initializeExpandedChildren(){const e=n=>{if(n._active)return n._children&&this.expandChildren(n._children),!0;if(n._children)for(const t of n._children)if(e(t))return this.expandChildren(n._children),!0;return!1};this.state._links.forEach(e)}render(){let e=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(e=!1,devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const n=!0===this.state._collapsible,t=!0===this.state._hideLabel,a=this.state._orientation;return h(Host,{key:"92fd0640d0dfce31ce7b0726af5ab0afb5d44424",class:"kol-nav"},h("div",{key:"4a501282a8c55b0a326b81976f3b0d850a15666d",class:{nav:!0,[a]:!0,"is-compact":this.state._hideLabel}},h("nav",{key:"b0293a098f89ca720d5a89f56e4bffc4af0a616f","aria-label":this.state._label,id:"nav"},h(this.linkList,{key:"c95025f77fcadf0da90c6115dfb51d2b197e9c59",collapsible:n,hideLabel:t,deep:0,links:this.state._links,orientation:a})),e&&h("div",{key:"d29149b8603e87336a2faa98004b4c0a1d5138dc",class:"compact"},h(KolButtonTag,{key:"4f60faa72e2bbc3dd7ea458f559ead1abe3dc33b",_ariaControls:"nav",_ariaExpanded:!t,_icons:t?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:translate(t?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateCollapsible(e){validateCollapsible(this,e)}validateHasCompactButton(e){validateHasCompactButton(this,e)}validateHasIconsWhenExpanded(e){validateHasIconsWhenExpanded(this,e)}validateHideLabel(e){validateHideLabel(this,e)}validateLabel(e,n,t=!1){t||removeNavLabel(this.state._label),validateLabel(this,e,{required:!0}),a11yHintLabelingLandmarks(e),addNavLabel(this.state._label)}validateLinks(e){watchNavLinks("KolNav",this,e),devHint("[KolNav] The navigation structure is not yet validated recursively.")}validateOrientation(e){watchValidator(this,"_orientation",(e=>"horizontal"===e||"vertical"===e),new Set(["Orientation {horizontal, vertical}"]),e,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateHasIconsWhenExpanded(this._hasIconsWhenExpanded),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.initializeExpandedChildren()}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolNav.style={default:KolNavDefaultStyle0};export{KolNav as kol_nav};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{t as translate}from"./i18n-80da5843.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{w as watchNavLinks}from"./validation-381a4169.js";import{n as KolLinkWcTag,c as KolButtonWcTag,o as KolButtonTag}from"./component-names-0a8a1a6c.js";import{b as watchBoolean,l as devWarning,e as a11yHintLabelingLandmarks,j as devHint,w as watchValidator}from"./prop.validators-f89d26b4.js";import{v as validateHideLabel}from"./hide-label-6424f890.js";import{v as validateLabel}from"./label-37acddfe.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.js";const validateCollapsible=(e,n)=>{watchBoolean(e,"_collapsible",n)},validateHasCompactButton=(e,n)=>{watchBoolean(e,"_hasCompactButton",n)},validateHasIconsWhenExpanded=(e,n)=>{watchBoolean(e,"_hasIconsWhenExpanded",n)},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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n place-items: center;\n }\n :not(.is-compact) nav {\n width: 100%;\n }\n .list {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .list.vertical {\n flex-direction: column;\n }\n .entry {\n display: flex;\n }\n .entry-item {\n flex-grow: 1;\n }\n}",KolNavDefaultStyle0=defaultStyleCss,entryIsLink=e=>"string"==typeof e._href,entryIsButton=e=>{var n;return void 0===e._href&&"function"==typeof(null===(n=e._on)||void 0===n?void 0:n.onClick)},KolNav=class{constructor(e){registerInstance(this,e),this.handleToggleExpansionClick=e=>{e&&(this.state._expandedChildren.includes(e)?this.collapseChildren(e):this.expandChildren(e))},this.linkList=e=>h("ul",{class:"list "+(0===e.deep&&"horizontal"===e.orientation?" horizontal":" vertical"),"data-deep":e.deep},e.links.map(((n,t)=>this.li(e.collapsible,e.hideLabel,e.deep,t,n,e.orientation)))),this._collapsible=!0,this._hasCompactButton=!1,this._hasIconsWhenExpanded=!1,this._hideLabel=!1,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hasIconsWhenExpanded:!1,_hideLabel:!1,_label:"",_links:[],_orientation:"vertical",_expandedChildren:[]}}expandChildren(e){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[...this.state._expandedChildren,e]})}collapseChildren(e){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:this.state._expandedChildren.filter((n=>n!=e))})}entry(e,n,t,a,i){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?a._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return h("div",{class:{entry:!0,"hide-label":n}},entryIsLink(a)?h(KolLinkWcTag,Object.assign({class:"entry-item"},a,{_hideLabel:n,_icons:l})):h(KolButtonWcTag,{class:"entry-item",_label:a._label,_hideLabel:n,_icons:l,_on:{onClick:(e,n)=>{entryIsButton(a)&&"function"==typeof a._on.onClick?a._on.onClick(e,n):this.handleToggleExpansionClick(a._children)}}}),t?this.expandButton(e,a,i):"")}expandButton(e,n,t){return h(KolButtonWcTag,{class:"expand-button",_ariaExpanded:t,_disabled:!e,_icons:"codicon codicon-"+(t?"remove":"add"),_hideLabel:!0,_label:`${translate(t?"kol-nav-label-close":"kol-nav-label-open",{placeholders:{label:n._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(n._children)}})}li(e,n,t,a,i,l){const o=!!i._active,s=Array.isArray(i._children)&&i._children.length>0,d=Boolean(i._children&&this.state._expandedChildren.includes(i._children));return h("li",{class:{active:o,expanded:d,"has-children":s},key:a},this.entry(e,n,s,i,d),d&&h(this.linkList,{collapsible:e,hideLabel:n,deep:t+1,links:i._children||[],orientation:l}))}initializeExpandedChildren(){const e=n=>{if(n._active)return n._children&&this.expandChildren(n._children),!0;if(n._children)for(const t of n._children)if(e(t))return this.expandChildren(n._children),!0;return!1};this.state._links.forEach(e)}render(){let e=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(e=!1,devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const n=!0===this.state._collapsible,t=!0===this.state._hideLabel,a=this.state._orientation;return h(Host,{key:"e5df59a6b0f2955c7ffe0a1b8ae05828d089a03a",class:"kol-nav"},h("div",{key:"5d82a8a378240b280609a81899cb8252983ee0b9",class:{nav:!0,[a]:!0,"is-compact":this.state._hideLabel}},h("nav",{key:"10ccef9a51a0c52f74edeacca8c484cded85ccdd","aria-label":this.state._label,id:"nav"},h(this.linkList,{key:"64913625fc3f3d8ffd61edd3cb6c720b816e1d79",collapsible:n,hideLabel:t,deep:0,links:this.state._links,orientation:a})),e&&h("div",{key:"e6578b70620b8039bc1b9ec85eb994eac960d675",class:"compact"},h(KolButtonTag,{key:"9fa2d5bb11c1ae77020d7329cb0fd70050b4e58d",_ariaControls:"nav",_ariaExpanded:!t,_icons:t?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:translate(t?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateCollapsible(e){validateCollapsible(this,e)}validateHasCompactButton(e){validateHasCompactButton(this,e)}validateHasIconsWhenExpanded(e){validateHasIconsWhenExpanded(this,e)}validateHideLabel(e){validateHideLabel(this,e)}validateLabel(e,n,t=!1){t||removeNavLabel(this.state._label),validateLabel(this,e,{required:!0}),a11yHintLabelingLandmarks(e),addNavLabel(this.state._label)}validateLinks(e){watchNavLinks("KolNav",this,e),devHint("[KolNav] The navigation structure is not yet validated recursively.")}validateOrientation(e){watchValidator(this,"_orientation",(e=>"horizontal"===e||"vertical"===e),new Set(["Orientation {horizontal, vertical}"]),e,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateHasIconsWhenExpanded(this._hasIconsWhenExpanded),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.initializeExpandedChildren()}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolNav.style={default:KolNavDefaultStyle0};export{KolNav as kol_nav};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{t as translate}from"./i18n-80da5843.js";import{n as nonce}from"./dev.utils-cb789c3d.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{p as KolSelectTag,c as KolButtonWcTag}from"./component-names-3e0158fe.js";import{S as STATE_CHANGE_EVENT}from"./common-54bf85ba.js";import{v as validateCustomClass}from"./custom-class-2d443ea5.js";import{k as watchNumber,w as watchValidator,g as watchJsonArrayString,p as parseJson}from"./prop.validators-f89d26b4.js";import{v as validateLabel}from"./label-37acddfe.js";import{v as validateTooltipAlign}from"./tooltip-align-b217e9d0.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.js";import"./align-89a65800.js";const validateMax=(t,e,a)=>{watchNumber(t,"_max",e,a)},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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .separator:before {\n content: \"•••\";\n }\n}",KolPaginationDefaultStyle0=defaultStyleCss,leftDoubleArrowIcon={left:"codicon codicon-debug-reverse-continue"},leftSingleArrow={left:"codicon codicon-chevron-left"},rightSingleArrowIcon={right:"codicon codicon-chevron-right"},rightDoubleArrowIcon={right:"codicon codicon-debug-continue"};function getUserLanguage(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}const userLanguage=getUserLanguage(),NUMBER_FORMATTER=new Intl.NumberFormat(userLanguage,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),KolPagination=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const a=setTimeout((()=>{clearTimeout(a),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const a=setTimeout((()=>{clearTimeout(a),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let a=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const n=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(n)&&n.length>0){const t=n.find((t=>t.value===a));a=void 0===t?n[0].value:t.value,e.set("_pageSize",a)}const i=e.has("_page")?e.get("_page"):this.state._page,s=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,i,e.get("_pageSize"),s)},this.syncPage=(t,e,a,n)=>{if(n>0){const i=this.calcCount(n,a);i>0&&(e>i?(t.set("_page",i),this.onChangePage(STATE_CHANGE_EVENT,i)):e<1&&(t.set("_page",1),this.onChangePage(STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,e)=>{const a=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&a.push({label:translate("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",a),this.beforePageSize(a,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:translate("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const a=this.getCount(),n=Array.from(Array(a).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>a-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,h("li",{key:nonce()},h("span",{class:"separator","aria-hidden":"true"}))):null));return h(Host,{class:"kol-pagination"},h("nav",{"aria-label":this.state._label},h("ul",{class:"navigation-list"},this.state._hasButtons.first&&h("li",null,h(KolButtonWcTag,{class:"first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftDoubleArrowIcon,_hideLabel:!0,_label:translate("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&h("li",null,h(KolButtonWcTag,{class:"previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftSingleArrow,_hideLabel:!0,_label:translate("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),n,this.state._hasButtons.next&&h("li",null,h(KolButtonWcTag,{class:"next",exportparts:"icon",_customClass:this.state._customClass,_disabled:a<=this.state._page,_icons:rightSingleArrowIcon,_hideLabel:!0,_label:translate("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&h("li",null,h(KolButtonWcTag,{class:"last",exportparts:"icon",_customClass:this.state._customClass,_disabled:a<=this.state._page,_icons:rightDoubleArrowIcon,_hideLabel:!0,_label:translate("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&h(KolSelectTag,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:translate("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return h("li",{key:nonce()},h(KolButtonWcTag,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},h("span",{slot:"expert"},h("span",{class:"visually-hidden"},translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}getSelectedPageButton(t){return h("li",{key:nonce()},h(KolButtonWcTag,{class:"selected",_customClass:this.state._customClass,_disabled:!0,_label:""},h("span",{slot:"expert"},h("span",{class:"visually-hidden"},translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}validateBoundaryCount(t){watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){validateCustomClass(this,t)}validateLabel(t,e,a=!1){a||removeNavLabel(this.state._label),validateLabel(this,t),addNavLabel(this.state._label)}validateHasButtons(t){watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=parseJson(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){watchNumber(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const a=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,n=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,a,n)}}})}validatePageSize(t){watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){validateMax(this,t,{hooks:{beforePatch:(t,e)=>{const a=e.has("_page")?e.get("_page"):this.state._page,n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,a,n,t)}}})}validateTooltipAlign(t){validateTooltipAlign(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};KolPagination.style={default:KolPaginationDefaultStyle0};export{KolPagination as kol_pagination};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{t as translate}from"./i18n-80da5843.js";import{n as nonce}from"./dev.utils-e03eae45.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-768d04e9.js";import{p as KolSelectTag,c as KolButtonWcTag}from"./component-names-0a8a1a6c.js";import{S as STATE_CHANGE_EVENT}from"./common-54bf85ba.js";import{v as validateCustomClass}from"./custom-class-2d443ea5.js";import{k as watchNumber,w as watchValidator,g as watchJsonArrayString,p as parseJson}from"./prop.validators-f89d26b4.js";import{v as validateLabel}from"./label-37acddfe.js";import{v as validateTooltipAlign}from"./tooltip-align-b217e9d0.js";import"./i18n-ece780dd.js";import"./reuse-523ba2ac.js";import"./dev.utils-fab45cbc.js";import"./index-db4aa6e4.js";import"./align-89a65800.js";const validateMax=(t,e,a)=>{watchNumber(t,"_max",e,a)},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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .separator:before {\n content: \"•••\";\n }\n}",KolPaginationDefaultStyle0=defaultStyleCss,leftDoubleArrowIcon={left:"codicon codicon-debug-reverse-continue"},leftSingleArrow={left:"codicon codicon-chevron-left"},rightSingleArrowIcon={right:"codicon codicon-chevron-right"},rightDoubleArrowIcon={right:"codicon codicon-debug-continue"};function getUserLanguage(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}const userLanguage=getUserLanguage(),NUMBER_FORMATTER=new Intl.NumberFormat(userLanguage,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),KolPagination=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const a=setTimeout((()=>{clearTimeout(a),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const a=setTimeout((()=>{clearTimeout(a),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let a=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const n=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(n)&&n.length>0){const t=n.find((t=>t.value===a));a=void 0===t?n[0].value:t.value,e.set("_pageSize",a)}const i=e.has("_page")?e.get("_page"):this.state._page,s=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,i,e.get("_pageSize"),s)},this.syncPage=(t,e,a,n)=>{if(n>0){const i=this.calcCount(n,a);i>0&&(e>i?(t.set("_page",i),this.onChangePage(STATE_CHANGE_EVENT,i)):e<1&&(t.set("_page",1),this.onChangePage(STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,e)=>{const a=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&a.push({label:translate("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",a),this.beforePageSize(a,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:translate("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const a=this.getCount(),n=Array.from(Array(a).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>a-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,h("li",{key:nonce()},h("span",{class:"separator","aria-hidden":"true"}))):null));return h(Host,{class:"kol-pagination"},h("nav",{"aria-label":this.state._label},h("ul",{class:"navigation-list"},this.state._hasButtons.first&&h("li",null,h(KolButtonWcTag,{class:"first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftDoubleArrowIcon,_hideLabel:!0,_label:translate("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&h("li",null,h(KolButtonWcTag,{class:"previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftSingleArrow,_hideLabel:!0,_label:translate("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),n,this.state._hasButtons.next&&h("li",null,h(KolButtonWcTag,{class:"next",exportparts:"icon",_customClass:this.state._customClass,_disabled:a<=this.state._page,_icons:rightSingleArrowIcon,_hideLabel:!0,_label:translate("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&h("li",null,h(KolButtonWcTag,{class:"last",exportparts:"icon",_customClass:this.state._customClass,_disabled:a<=this.state._page,_icons:rightDoubleArrowIcon,_hideLabel:!0,_label:translate("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&h(KolSelectTag,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:translate("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return h("li",{key:nonce()},h(KolButtonWcTag,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},h("span",{slot:"expert"},h("span",{class:"visually-hidden"},translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}getSelectedPageButton(t){return h("li",{key:nonce()},h(KolButtonWcTag,{class:"selected",_customClass:this.state._customClass,_disabled:!0,_label:""},h("span",{slot:"expert"},h("span",{class:"visually-hidden"},translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}validateBoundaryCount(t){watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){validateCustomClass(this,t)}validateLabel(t,e,a=!1){a||removeNavLabel(this.state._label),validateLabel(this,t),addNavLabel(this.state._label)}validateHasButtons(t){watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=parseJson(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){watchNumber(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const a=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,n=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,a,n)}}})}validatePageSize(t){watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){validateMax(this,t,{hooks:{beforePatch:(t,e)=>{const a=e.has("_page")?e.get("_page"):this.state._page,n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,a,n,t)}}})}validateTooltipAlign(t){validateTooltipAlign(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};KolPagination.style={default:KolPaginationDefaultStyle0};export{KolPagination as kol_pagination};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-bd96e8df.js";import{a as alignFloatingElements}from"./align-floating-elements-42e5ff04.js";import{g as getDocument}from"./dev.utils-fab45cbc.js";import{a as validateAlign}from"./align-89a65800.js";import{v as validateShow}from"./show-d234ff64.js";import"./reuse-523ba2ac.js";import"./prop.validators-f89d26b4.js";import"./index-db4aa6e4.js";const styleCss="/*\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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-popover {\n height: 0;\n position: absolute;\n }\n .kol-popover .popover {\n background-color: #fff;\n min-height: max-content;\n min-width: max-content;\n opacity: 0;\n position: absolute;\n }\n .kol-popover .show {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover .disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover .arrow {\n background-color: inherit;\n height: var(--font-size);\n position: absolute;\n rotate: 0.125turn;\n width: var(--font-size);\n z-index: -1;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}",KolPopoverWcStyle0=styleCss,KolPopover=class{constructor(e){registerInstance(this,e),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover()},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover()},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._show=!1,this.state={_align:"top",_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await alignFloatingElements({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))}hidePopover(){var e;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(e=this.triggerElement)||void 0===e||e.focus(),this.removeListenersToBody()}addListenersToBody(){var e;const n=getDocument().body;n.addEventListener("keyup",this.hidePopoverByEscape),n.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",(()=>{this.showPopover()}),{passive:!0})}removeListenersToBody(){var e;const n=getDocument().body;n.removeEventListener("keyup",this.hidePopoverByEscape),n.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",(()=>{this.showPopover()}))}render(){return h(Host,{key:"5de137646cae05e306581df283dbace9dff598e9",ref:this.catchHostAndTriggerElement,class:"kol-popover-wc"},h("div",{key:"fa17d442659db5c85b1108194eb72fefa758366a",class:{popover:!0,show:this.state._visible},ref:this.catchPopoverElement,hidden:!this.state._show},h("div",{key:"447b90068aea0ecacb700d1dcc2d3ba01ab148b8",class:`arrow ${this.state._align}`,ref:this.catchArrowElement}),h("slot",{key:"a1c9100277b4c48c9f10442f7eb3ef12726a8a0c"})))}validateAlign(e){validateAlign(this,e)}validateShow(e){validateShow(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_show:["validateShow"]}}};KolPopover.style=KolPopoverWcStyle0;export{KolPopover as kol_popover_wc};
4
+ import{r as registerInstance,h,H as Host}from"./index-5ca1f480.js";import{a as alignFloatingElements}from"./align-floating-elements-42e5ff04.js";import{w as watchValidator}from"./prop.validators-f89d26b4.js";import{g as getDocument}from"./dev.utils-fab45cbc.js";import{a as validateAlign}from"./align-89a65800.js";import{v as validateShow}from"./show-d234ff64.js";import"./reuse-523ba2ac.js";import"./index-db4aa6e4.js";const validatePopoverCallbacks=(e,n)=>{watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["PopoverCallbacksPropType {Events.onClose}"]),n)},styleCss="/*\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: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\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%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-popover {\n height: 0;\n position: absolute;\n }\n .kol-popover .popover {\n background-color: #fff;\n min-height: max-content;\n min-width: max-content;\n opacity: 0;\n position: absolute;\n }\n .kol-popover .show {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover .disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover .arrow {\n background-color: inherit;\n height: var(--font-size);\n position: absolute;\n rotate: 0.125turn;\n width: var(--font-size);\n z-index: -1;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}",KolPopoverWcStyle0=styleCss,KolPopover=class{constructor(e){registerInstance(this,e),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover(e)},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover(e)},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._on=void 0,this._show=!1,this.state={_align:"top",_on:{},_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await alignFloatingElements({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))}hidePopover(e){var n,t,o;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(n=this.triggerElement)||void 0===n||n.focus(),this.removeListenersToBody(),null===(o=null===(t=this.state._on)||void 0===t?void 0:t.onClose)||void 0===o||o.call(t,e)}addListenersToBody(){var e;const n=getDocument().body;n.addEventListener("keyup",this.hidePopoverByEscape),n.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",(()=>{this.showPopover()}),{passive:!0})}removeListenersToBody(){var e;const n=getDocument().body;n.removeEventListener("keyup",this.hidePopoverByEscape),n.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",(()=>{this.showPopover()}))}render(){return h(Host,{key:"08aee53cfe44cbf919c23ead27450c60503f3ae9",ref:this.catchHostAndTriggerElement,class:"kol-popover"},h("div",{key:"2d9e3ca85b144564023029ef1cd89d78059bea4b",class:{popover:!0,show:this.state._visible},ref:this.catchPopoverElement,hidden:!this.state._show},h("div",{key:"5174ee3c34a5ab1b130f0a2412cb595dd312fe9b",class:`arrow ${this.state._align}`,ref:this.catchArrowElement}),h("slot",{key:"a1756190c8f58cfbb7f318a1f93b494843f4c3db"})))}validateAlign(e){validateAlign(this,e)}validateOn(e){validatePopoverCallbacks(this,e)}validateShow(e){validateShow(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}}};KolPopover.style=KolPopoverWcStyle0;export{KolPopover as kol_popover_wc};
@@ -1 +1 @@
1
- {"file":"kol-popover-wc.entry.js","mappings":"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","names":[],"sources":["src/components/popover/style.scss?tag=kol-popover-wc","src/components/popover/component.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n\n\t.kol-popover {\n\t\theight: 0;\n\t\tposition: absolute;\n\t}\n\n\t.kol-popover .popover {\n\t\tbackground-color: #fff;\n\t\tmin-height: max-content;\n\t\tmin-width: max-content;\n\t\topacity: 0;\n\t\tposition: absolute;\n\t}\n\n\t.kol-popover .show {\n\t\tanimation: 0.3s ease-in forwards fadeInOpacity;\n\t}\n\n\t.kol-popover .disappear {\n\t\tanimation: 0.3s ease-in backwards fadeInOpacity;\n\t}\n\n\t.kol-popover .arrow {\n\t\tbackground-color: inherit;\n\t\theight: var(--font-size);\n\t\tposition: absolute;\n\t\trotate: 0.125turn;\n\t\twidth: var(--font-size);\n\t\tz-index: -1;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n","import type { AlignPropType, PopoverAPI, PopoverStates, ShowPropType } from '../../schema';\nimport { getDocument, validateAlign, validateShow } from '../../schema';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\n\nimport type { JSX } from '@stencil/core';\n/**\n * @slot - Der Inhalt des Popover.\n */\n@Component({\n\ttag: 'kol-popover-wc',\n\tstyleUrl: './style.scss',\n\tshadow: false,\n})\nexport class KolPopover implements PopoverAPI {\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate popoverElement?: HTMLDivElement;\n\tprivate triggerElement?: HTMLElement | null;\n\tprivate host?: HTMLElement;\n\n\tprivate async showPopover(): Promise<void> {\n\t\tthis.addListenersToBody();\n\n\t\tif (this.triggerElement && this.popoverElement) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.triggerElement,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.popoverElement,\n\t\t\t});\n\t\t\tthis.state = { ...this.state, _visible: true };\n\t\t}\n\t}\n\tprivate hidePopover(): void {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_visible: false,\n\t\t};\n\t\tthis._show = false;\n\t\tthis.triggerElement?.focus();\n\t\tthis.removeListenersToBody();\n\t}\n\tprivate hidePopoverByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') this.hidePopover();\n\t};\n\tprivate hidePopoverByClickOutside = (event: MouseEvent): void => {\n\t\tif (this.host && !this.host.contains(event.target as HTMLElement)) {\n\t\t\tthis.hidePopover();\n\t\t}\n\t};\n\n\t/* EventListener functions */\n\tprivate addListenersToBody(): void {\n\t\tconst body = getDocument().body;\n\t\tbody.addEventListener('keyup', this.hidePopoverByEscape);\n\t\tbody.addEventListener('click', this.hidePopoverByClickOutside);\n\t\tdocument.scrollingElement?.addEventListener(\n\t\t\t'scroll',\n\t\t\t() => {\n\t\t\t\tvoid this.showPopover();\n\t\t\t},\n\t\t\t{ passive: true },\n\t\t);\n\t}\n\tprivate removeListenersToBody(): void {\n\t\tconst body = getDocument().body;\n\t\tbody.removeEventListener('keyup', this.hidePopoverByEscape);\n\t\tbody.removeEventListener('click', this.hidePopoverByClickOutside);\n\t\tdocument.scrollingElement?.removeEventListener('scroll', () => {\n\t\t\tvoid this.showPopover();\n\t\t});\n\t}\n\n\t/* catchElement functions */\n\tprivate catchHostAndTriggerElement = (element: HTMLElement | null): void => {\n\t\tif (element) {\n\t\t\tthis.host = element;\n\t\t\tthis.triggerElement = element.previousElementSibling as HTMLElement | null;\n\t\t}\n\t};\n\tprivate catchPopoverElement = (element?: HTMLDivElement): void => {\n\t\tthis.popoverElement = element;\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 ref={this.catchHostAndTriggerElement} class=\"kol-popover-wc\">\n\t\t\t\t<div class={{ popover: true, show: this.state._visible }} ref={this.catchPopoverElement} hidden={!this.state._show}>\n\t\t\t\t\t<div class={`arrow ${this.state._align}`} ref={this.catchArrowElement} />\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\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 * Makes the element show up.\n\t * @TODO: Change type back to `ShowPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = false;\n\n\t@State() public state: PopoverStates = {\n\t\t_align: 'top',\n\t\t_show: false,\n\t\t_visible: false,\n\t};\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_show')\n\tpublic validateShow(value?: ShowPropType): void {\n\t\tvalidateShow(this, value);\n\t\tif (value) void this.showPopover();\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateShow(this._show);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-popover-wc.entry.js","mappings":"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","names":[],"sources":["src/schema/props/popover-callbacks.ts","src/components/popover/style.scss?tag=kol-popover-wc","src/components/popover/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { Events } from '../enums';\nimport type { EventCallback } from '../types/callbacks';\nimport { watchValidator } from '../utils';\n\n/* types */\nexport type PopoverCallbacksPropType = {\n\t[Events.onClose]?: EventCallback<MouseEvent | KeyboardEvent>;\n};\n\n/**\n * Defines the callback functions for popover events.\n */\nexport type PropPopoverCallbacks = {\n\ton: PopoverCallbacksPropType;\n};\n\n/* validator */\nexport const validatePopoverCallbacks = (component: Generic.Element.Component, value?: PopoverCallbacksPropType): void => {\n\twatchValidator(component, `_on`, (value) => typeof value === 'object' && value !== null, new Set(['PopoverCallbacksPropType {Events.onClose}']), value);\n};\n","@import '../@shared/mixins';\n@import '../style';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n\n\t.kol-popover {\n\t\theight: 0;\n\t\tposition: absolute;\n\t}\n\n\t.kol-popover .popover {\n\t\tbackground-color: #fff;\n\t\tmin-height: max-content;\n\t\tmin-width: max-content;\n\t\topacity: 0;\n\t\tposition: absolute;\n\t}\n\n\t.kol-popover .show {\n\t\tanimation: 0.3s ease-in forwards fadeInOpacity;\n\t}\n\n\t.kol-popover .disappear {\n\t\tanimation: 0.3s ease-in backwards fadeInOpacity;\n\t}\n\n\t.kol-popover .arrow {\n\t\tbackground-color: inherit;\n\t\theight: var(--font-size);\n\t\tposition: absolute;\n\t\trotate: 0.125turn;\n\t\twidth: var(--font-size);\n\t\tz-index: -1;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n","import type { AlignPropType, PopoverAPI, PopoverCallbacksPropType, PopoverStates, ShowPropType } from '../../schema';\nimport { getDocument, validateAlign, validatePopoverCallbacks, validateShow } from '../../schema';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\n\nimport type { JSX } from '@stencil/core';\n/**\n * @slot - Der Inhalt des Popover.\n */\n@Component({\n\ttag: 'kol-popover-wc',\n\tstyleUrl: './style.scss',\n\tshadow: false,\n})\nexport class KolPopover implements PopoverAPI {\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate popoverElement?: HTMLDivElement;\n\tprivate triggerElement?: HTMLElement | null;\n\tprivate host?: HTMLElement;\n\n\tprivate async showPopover(): Promise<void> {\n\t\tthis.addListenersToBody();\n\n\t\tif (this.triggerElement && this.popoverElement) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.triggerElement,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.popoverElement,\n\t\t\t});\n\t\t\tthis.state = { ...this.state, _visible: true };\n\t\t}\n\t}\n\tprivate hidePopover(event: MouseEvent | KeyboardEvent): void {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_visible: false,\n\t\t};\n\t\tthis._show = false;\n\t\tthis.triggerElement?.focus();\n\t\tthis.removeListenersToBody();\n\n\t\tthis.state._on?.onClose?.(event);\n\t}\n\n\tprivate hidePopoverByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') this.hidePopover(event);\n\t};\n\n\tprivate hidePopoverByClickOutside = (event: MouseEvent): void => {\n\t\tif (this.host && !this.host.contains(event.target as HTMLElement)) {\n\t\t\tthis.hidePopover(event);\n\t\t}\n\t};\n\n\t/* EventListener functions */\n\tprivate addListenersToBody(): void {\n\t\tconst body = getDocument().body;\n\t\tbody.addEventListener('keyup', this.hidePopoverByEscape);\n\t\tbody.addEventListener('click', this.hidePopoverByClickOutside);\n\t\tdocument.scrollingElement?.addEventListener(\n\t\t\t'scroll',\n\t\t\t() => {\n\t\t\t\tvoid this.showPopover();\n\t\t\t},\n\t\t\t{ passive: true },\n\t\t);\n\t}\n\tprivate removeListenersToBody(): void {\n\t\tconst body = getDocument().body;\n\t\tbody.removeEventListener('keyup', this.hidePopoverByEscape);\n\t\tbody.removeEventListener('click', this.hidePopoverByClickOutside);\n\t\tdocument.scrollingElement?.removeEventListener('scroll', () => {\n\t\t\tvoid this.showPopover();\n\t\t});\n\t}\n\n\t/* catchElement functions */\n\tprivate catchHostAndTriggerElement = (element: HTMLElement | null): void => {\n\t\tif (element) {\n\t\t\tthis.host = element;\n\t\t\tthis.triggerElement = element.previousElementSibling as HTMLElement | null;\n\t\t}\n\t};\n\tprivate catchPopoverElement = (element?: HTMLDivElement): void => {\n\t\tthis.popoverElement = element;\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 ref={this.catchHostAndTriggerElement} class=\"kol-popover\">\n\t\t\t\t<div class={{ popover: true, show: this.state._visible }} ref={this.catchPopoverElement} hidden={!this.state._show}>\n\t\t\t\t\t<div class={`arrow ${this.state._align}`} ref={this.catchArrowElement} />\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\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 callback functions for popover events.\n\t */\n\t@Prop() public _on?: PopoverCallbacksPropType;\n\n\t/**\n\t * Makes the element show up.\n\t * @TODO: Change type back to `ShowPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = false;\n\n\t@State() public state: PopoverStates = {\n\t\t_align: 'top',\n\t\t_on: {},\n\t\t_show: false,\n\t\t_visible: false,\n\t};\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: PopoverCallbacksPropType): void {\n\t\tvalidatePopoverCallbacks(this, value);\n\t}\n\n\t@Watch('_show')\n\tpublic validateShow(value?: ShowPropType): void {\n\t\tvalidateShow(this, value);\n\t\tif (value) void this.showPopover();\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateShow(this._show);\n\t}\n}\n"],"version":3}