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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (723) hide show
  1. package/custom-elements.json +44 -14
  2. package/dist/cjs/{InternalUnderlinedAccessKey-3951c769.js → InternalUnderlinedAccessKey-0d7f5c6f.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-3951c769.js.map → InternalUnderlinedAccessKey-0d7f5c6f.js.map} +1 -1
  4. package/dist/cjs/access-key-dda2764c.js +4 -0
  5. package/dist/cjs/{access-key-12589f9b.js.map → access-key-dda2764c.js.map} +1 -1
  6. package/dist/cjs/{align-cf181773.js → align-83af4905.js} +1 -1
  7. package/dist/cjs/{align-cf181773.js.map → align-83af4905.js.map} +1 -1
  8. package/dist/cjs/align-floating-elements-fa02822a.js +4 -0
  9. package/dist/cjs/align-floating-elements-fa02822a.js.map +1 -0
  10. package/dist/cjs/app-globals-8a924e59.js +4 -0
  11. package/dist/cjs/app-globals-8a924e59.js.map +1 -0
  12. package/dist/cjs/aria-expanded-9cc5b0f8.js +4 -0
  13. package/dist/cjs/aria-expanded-9cc5b0f8.js.map +1 -0
  14. package/dist/cjs/{associated.controller-17a88d17.js → associated.controller-6ef4fe6e.js} +1 -1
  15. package/dist/cjs/{associated.controller-17a88d17.js.map → associated.controller-6ef4fe6e.js.map} +1 -1
  16. package/dist/cjs/{color-e9f9368d.js → color-cd543319.js} +1 -1
  17. package/dist/cjs/{color-e9f9368d.js.map → color-cd543319.js.map} +1 -1
  18. package/dist/cjs/component-names-4a2d0b57.js +4 -0
  19. package/dist/cjs/component-names-4a2d0b57.js.map +1 -0
  20. package/dist/cjs/{controller-e2f6b61c.js → controller-117b4d51.js} +1 -1
  21. package/dist/cjs/{controller-e2f6b61c.js.map → controller-117b4d51.js.map} +1 -1
  22. package/dist/cjs/{controller-42b3f8a1.js → controller-1840e05f.js} +1 -1
  23. package/dist/cjs/{controller-42b3f8a1.js.map → controller-1840e05f.js.map} +1 -1
  24. package/dist/cjs/controller-7a54a71e.js +4 -0
  25. package/dist/cjs/controller-7a54a71e.js.map +1 -0
  26. package/dist/cjs/{controller-bd9f9fcd.js → controller-abfeee06.js} +1 -1
  27. package/dist/cjs/{controller-bd9f9fcd.js.map → controller-abfeee06.js.map} +1 -1
  28. package/dist/cjs/{controller-f984e45f.js → controller-fa7804d6.js} +1 -1
  29. package/dist/cjs/controller-fa7804d6.js.map +1 -0
  30. package/dist/cjs/{controller-icon-885a15b3.js → controller-icon-a817b9b8.js} +1 -1
  31. package/dist/cjs/{controller-icon-885a15b3.js.map → controller-icon-a817b9b8.js.map} +1 -1
  32. package/dist/cjs/custom-class-691f9ea4.js +4 -0
  33. package/dist/cjs/{custom-class-5a76b8cc.js.map → custom-class-691f9ea4.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-edbe192a.js → dev.utils-0390f767.js} +1 -1
  35. package/dist/cjs/{dev.utils-edbe192a.js.map → dev.utils-0390f767.js.map} +1 -1
  36. package/dist/cjs/{devtools-a43c79b4.js → devtools-d86cb62f.js} +1 -1
  37. package/dist/cjs/{devtools-a43c79b4.js.map → devtools-d86cb62f.js.map} +1 -1
  38. package/dist/cjs/disabled-523f7adc.js +4 -0
  39. package/dist/cjs/{disabled-4f7a7b7e.js.map → disabled-523f7adc.js.map} +1 -1
  40. package/dist/cjs/events-a9d909db.js +4 -0
  41. package/dist/cjs/events-a9d909db.js.map +1 -0
  42. package/dist/cjs/{form-field-msg-eb812022.js → form-field-msg-e2ee9067.js} +1 -1
  43. package/dist/cjs/{form-field-msg-eb812022.js.map → form-field-msg-e2ee9067.js.map} +1 -1
  44. package/dist/cjs/has-closer-143268e8.js +4 -0
  45. package/dist/cjs/{has-closer-354720e1.js.map → has-closer-143268e8.js.map} +1 -1
  46. package/dist/cjs/has-counter-d8a31282.js +4 -0
  47. package/dist/cjs/has-counter-d8a31282.js.map +1 -0
  48. package/dist/cjs/hide-label-82890fe7.js +4 -0
  49. package/dist/cjs/{hide-label-7e4f3ef4.js.map → hide-label-82890fe7.js.map} +1 -1
  50. package/dist/cjs/href-a32df224.js +4 -0
  51. package/dist/cjs/{href-87a51631.js.map → href-a32df224.js.map} +1 -1
  52. package/dist/cjs/i18n-737701e2.js +4 -0
  53. package/dist/cjs/i18n-737701e2.js.map +1 -0
  54. package/dist/cjs/{i18n-c8be9482.js → i18n-b46c3c64.js} +1 -1
  55. package/dist/cjs/{i18n-c8be9482.js.map → i18n-b46c3c64.js.map} +1 -1
  56. package/dist/cjs/{icons-3f3e0089.js → icons-dc98cea7.js} +1 -1
  57. package/dist/cjs/{icons-3f3e0089.js.map → icons-dc98cea7.js.map} +1 -1
  58. package/dist/cjs/image-source-c6b8c632.js +4 -0
  59. package/dist/cjs/{image-source-7ee44fb4.js.map → image-source-c6b8c632.js.map} +1 -1
  60. package/dist/cjs/index-277fc2a7.js +4 -0
  61. package/dist/cjs/index-277fc2a7.js.map +1 -0
  62. package/dist/cjs/index-6912b26b.js +4 -0
  63. package/dist/cjs/index-6912b26b.js.map +1 -0
  64. package/dist/cjs/index.cjs.js +1 -1
  65. package/dist/cjs/index.cjs.js.map +1 -1
  66. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
  70. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  90. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  98. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  100. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  104. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  108. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  118. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-popover-wc.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  124. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  131. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  132. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  134. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
  135. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  136. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  137. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  138. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  139. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  140. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  141. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  142. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  143. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  144. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  145. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  146. package/dist/cjs/kol-tree-item.cjs.entry.js.map +1 -1
  147. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  148. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  149. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  150. package/dist/cjs/kolibri.cjs.js +1 -1
  151. package/dist/cjs/kolibri.cjs.js.map +1 -1
  152. package/dist/cjs/{label-5ba50d8b.js → label-5e56f4a8.js} +1 -1
  153. package/dist/cjs/{label-5ba50d8b.js.map → label-5e56f4a8.js.map} +1 -1
  154. package/dist/cjs/loader.cjs.js +1 -1
  155. package/dist/cjs/open-10ca3d4d.js +4 -0
  156. package/dist/cjs/{open-f0d79417.js.map → open-10ca3d4d.js.map} +1 -1
  157. package/dist/cjs/{prop.validators-37113ad1.js → prop.validators-9c1f1dbd.js} +1 -1
  158. package/dist/cjs/prop.validators-9c1f1dbd.js.map +1 -0
  159. package/dist/cjs/rows-df280396.js +4 -0
  160. package/dist/cjs/{rows-4c48715e.js.map → rows-df280396.js.map} +1 -1
  161. package/dist/cjs/show-3a46ec81.js +4 -0
  162. package/dist/cjs/{show-b03b7745.js.map → show-3a46ec81.js.map} +1 -1
  163. package/dist/cjs/{suggestions-3dbb61f0.js → suggestions-5e3cc93f.js} +1 -1
  164. package/dist/cjs/{suggestions-3dbb61f0.js.map → suggestions-5e3cc93f.js.map} +1 -1
  165. package/dist/cjs/{tab-index-621163bf.js → tab-index-a50181fc.js} +1 -1
  166. package/dist/cjs/{tab-index-621163bf.js.map → tab-index-a50181fc.js.map} +1 -1
  167. package/dist/cjs/tooltip-align-8c5c5618.js +4 -0
  168. package/dist/cjs/{tooltip-align-18f90f3f.js.map → tooltip-align-8c5c5618.js.map} +1 -1
  169. package/dist/cjs/{validation-c5bb8a53.js → validation-7f19befc.js} +1 -1
  170. package/dist/cjs/{validation-c5bb8a53.js.map → validation-7f19befc.js.map} +1 -1
  171. package/dist/cjs/{validation-ccf9173b.js → validation-b853d0e9.js} +1 -1
  172. package/dist/cjs/{validation-ccf9173b.js.map → validation-b853d0e9.js.map} +1 -1
  173. package/dist/components/align-floating-elements.js +1 -1
  174. package/dist/components/align-floating-elements.js.map +1 -1
  175. package/dist/components/aria-expanded.js +1 -1
  176. package/dist/components/aria-expanded.js.map +1 -1
  177. package/dist/components/color.js +1 -1
  178. package/dist/components/component-names.js +1 -1
  179. package/dist/components/component-names.js.map +1 -1
  180. package/dist/components/controller-icon.js +1 -1
  181. package/dist/components/controller2.js +1 -1
  182. package/dist/components/controller4.js +1 -1
  183. package/dist/components/controller4.js.map +1 -1
  184. package/dist/components/controller5.js +1 -1
  185. package/dist/components/controller5.js.map +1 -1
  186. package/dist/components/devtools.js +1 -1
  187. package/dist/components/events2.js +1 -1
  188. package/dist/components/events2.js.map +1 -1
  189. package/dist/components/has-counter.js +4 -0
  190. package/dist/components/has-counter.js.map +1 -0
  191. package/dist/components/i18n.js +1 -1
  192. package/dist/components/i18n.js.map +1 -1
  193. package/dist/components/icons.js +1 -1
  194. package/dist/components/index.js +1 -1
  195. package/dist/components/index.js.map +1 -1
  196. package/dist/components/kol-alert-wc.js +1 -1
  197. package/dist/components/kol-alert-wc.js.map +1 -1
  198. package/dist/components/kol-badge.js +1 -1
  199. package/dist/components/kol-breadcrumb.js +1 -1
  200. package/dist/components/kol-button-wc.js +1 -1
  201. package/dist/components/kol-button-wc.js.map +1 -1
  202. package/dist/components/kol-combobox.js +1 -1
  203. package/dist/components/kol-icon.js +1 -1
  204. package/dist/components/kol-icon.js.map +1 -1
  205. package/dist/components/kol-indented-text-wc.js +1 -1
  206. package/dist/components/kol-input-checkbox.js +1 -1
  207. package/dist/components/kol-input-checkbox.js.map +1 -1
  208. package/dist/components/kol-input-date.js +1 -1
  209. package/dist/components/kol-input-date.js.map +1 -1
  210. package/dist/components/kol-input-password.js +1 -1
  211. package/dist/components/kol-input-password.js.map +1 -1
  212. package/dist/components/kol-input.js +1 -1
  213. package/dist/components/kol-input.js.map +1 -1
  214. package/dist/components/kol-modal.js +1 -1
  215. package/dist/components/kol-modal.js.map +1 -1
  216. package/dist/components/kol-nav.js +1 -1
  217. package/dist/components/kol-popover-wc.js +1 -1
  218. package/dist/components/kol-popover-wc.js.map +1 -1
  219. package/dist/components/kol-progress.js +1 -1
  220. package/dist/components/kol-quote.js +1 -1
  221. package/dist/components/kol-select.js +1 -1
  222. package/dist/components/kol-single-select.js +1 -1
  223. package/dist/components/kol-skip-nav.js +1 -1
  224. package/dist/components/kol-span-wc.js +1 -1
  225. package/dist/components/kol-spin.js +1 -1
  226. package/dist/components/kol-split-button.js +1 -1
  227. package/dist/components/kol-split-button.js.map +1 -1
  228. package/dist/components/kol-symbol.js +1 -1
  229. package/dist/components/kol-table-stateful.js +1 -1
  230. package/dist/components/kol-table-stateless-wc.js +1 -1
  231. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  232. package/dist/components/kol-table-stateless.js +1 -1
  233. package/dist/components/kol-table.js +1 -1
  234. package/dist/components/kol-tabs.js +1 -1
  235. package/dist/components/kol-tabs.js.map +1 -1
  236. package/dist/components/kol-textarea.js +1 -1
  237. package/dist/components/kol-textarea.js.map +1 -1
  238. package/dist/components/kol-toast-container.js +1 -1
  239. package/dist/components/kol-toolbar.js +1 -1
  240. package/dist/components/kol-tooltip-wc.js +1 -1
  241. package/dist/components/kol-tree-item-wc.js +1 -1
  242. package/dist/components/kol-tree-item.js +1 -1
  243. package/dist/components/kol-tree-item.js.map +1 -1
  244. package/dist/components/kol-tree-wc.js +1 -1
  245. package/dist/components/kol-tree.js +1 -1
  246. package/dist/components/kol-version.js +1 -1
  247. package/dist/components/prop.validators.js +1 -1
  248. package/dist/components/prop.validators.js.map +1 -1
  249. package/dist/esm/{InternalUnderlinedAccessKey-308bff0a.js → InternalUnderlinedAccessKey-b2266b5a.js} +1 -1
  250. package/dist/esm/{InternalUnderlinedAccessKey-308bff0a.js.map → InternalUnderlinedAccessKey-b2266b5a.js.map} +1 -1
  251. package/dist/esm/{access-key-6ced3097.js → access-key-729d2115.js} +1 -1
  252. package/dist/esm/{access-key-6ced3097.js.map → access-key-729d2115.js.map} +1 -1
  253. package/dist/esm/{align-89a65800.js → align-78bab7b5.js} +1 -1
  254. package/dist/esm/{align-89a65800.js.map → align-78bab7b5.js.map} +1 -1
  255. package/dist/esm/align-floating-elements-8dfecb37.js +4 -0
  256. package/dist/esm/align-floating-elements-8dfecb37.js.map +1 -0
  257. package/dist/esm/app-globals-4f2c8e7b.js +4 -0
  258. package/dist/esm/app-globals-4f2c8e7b.js.map +1 -0
  259. package/dist/esm/aria-expanded-259cbe01.js +4 -0
  260. package/dist/esm/aria-expanded-259cbe01.js.map +1 -0
  261. package/dist/esm/{associated.controller-8e2d43be.js → associated.controller-15cdd804.js} +1 -1
  262. package/dist/esm/{associated.controller-8e2d43be.js.map → associated.controller-15cdd804.js.map} +1 -1
  263. package/dist/esm/{color-52b1b536.js → color-b8652714.js} +1 -1
  264. package/dist/esm/{color-52b1b536.js.map → color-b8652714.js.map} +1 -1
  265. package/dist/esm/{component-names-3e0158fe.js → component-names-0a8a1a6c.js} +1 -1
  266. package/dist/esm/component-names-0a8a1a6c.js.map +1 -0
  267. package/dist/esm/controller-0ab676b5.js +4 -0
  268. package/dist/esm/controller-0ab676b5.js.map +1 -0
  269. package/dist/esm/{controller-ad9f8f69.js → controller-2a4348e1.js} +1 -1
  270. package/dist/esm/{controller-ad9f8f69.js.map → controller-2a4348e1.js.map} +1 -1
  271. package/dist/esm/controller-8c35edf1.js +4 -0
  272. package/dist/esm/controller-8c35edf1.js.map +1 -0
  273. package/dist/esm/{controller-ec76e4bf.js → controller-ec60cfa6.js} +1 -1
  274. package/dist/esm/{controller-ec76e4bf.js.map → controller-ec60cfa6.js.map} +1 -1
  275. package/dist/esm/{controller-056d0f3b.js → controller-fe5a6b8d.js} +1 -1
  276. package/dist/esm/{controller-056d0f3b.js.map → controller-fe5a6b8d.js.map} +1 -1
  277. package/dist/esm/{controller-icon-e155a2b1.js → controller-icon-78e12429.js} +1 -1
  278. package/dist/esm/{controller-icon-e155a2b1.js.map → controller-icon-78e12429.js.map} +1 -1
  279. package/dist/esm/custom-class-1b4696e3.js +4 -0
  280. package/dist/esm/{custom-class-2d443ea5.js.map → custom-class-1b4696e3.js.map} +1 -1
  281. package/dist/esm/{dev.utils-cb789c3d.js → dev.utils-44ef1bde.js} +1 -1
  282. package/dist/esm/{dev.utils-cb789c3d.js.map → dev.utils-44ef1bde.js.map} +1 -1
  283. package/dist/esm/{devtools-a88bc2ec.js → devtools-417fc238.js} +1 -1
  284. package/dist/esm/{devtools-a88bc2ec.js.map → devtools-417fc238.js.map} +1 -1
  285. package/dist/esm/{disabled-d5b4a883.js → disabled-60f09b20.js} +1 -1
  286. package/dist/esm/{disabled-d5b4a883.js.map → disabled-60f09b20.js.map} +1 -1
  287. package/dist/esm/{events-9570402d.js → events-476662bc.js} +1 -1
  288. package/dist/esm/events-476662bc.js.map +1 -0
  289. package/dist/esm/{form-field-msg-2e39a9f7.js → form-field-msg-22e08734.js} +1 -1
  290. package/dist/esm/{form-field-msg-2e39a9f7.js.map → form-field-msg-22e08734.js.map} +1 -1
  291. package/dist/esm/{has-closer-67035624.js → has-closer-f40b362c.js} +1 -1
  292. package/dist/esm/{has-closer-67035624.js.map → has-closer-f40b362c.js.map} +1 -1
  293. package/dist/esm/has-counter-798e2301.js +4 -0
  294. package/dist/esm/has-counter-798e2301.js.map +1 -0
  295. package/dist/esm/{hide-label-6424f890.js → hide-label-1d403517.js} +1 -1
  296. package/dist/esm/{hide-label-6424f890.js.map → hide-label-1d403517.js.map} +1 -1
  297. package/dist/esm/{href-e8c05473.js → href-5e305ce2.js} +1 -1
  298. package/dist/esm/{href-e8c05473.js.map → href-5e305ce2.js.map} +1 -1
  299. package/dist/esm/i18n-7ea9f137.js +4 -0
  300. package/dist/esm/i18n-7ea9f137.js.map +1 -0
  301. package/dist/esm/i18n-8640d789.js +4 -0
  302. package/dist/esm/{i18n-80da5843.js.map → i18n-8640d789.js.map} +1 -1
  303. package/dist/esm/{icons-bd60f3a5.js → icons-b0b05e20.js} +1 -1
  304. package/dist/esm/{icons-bd60f3a5.js.map → icons-b0b05e20.js.map} +1 -1
  305. package/dist/esm/{image-source-c68f09bf.js → image-source-87526275.js} +1 -1
  306. package/dist/esm/{image-source-c68f09bf.js.map → image-source-87526275.js.map} +1 -1
  307. package/dist/esm/index-5728f164.js +4 -0
  308. package/dist/esm/index-5728f164.js.map +1 -0
  309. package/dist/esm/index-cf24d1fe.js +4 -0
  310. package/dist/esm/index-cf24d1fe.js.map +1 -0
  311. package/dist/esm/index.js +1 -1
  312. package/dist/esm/index.js.map +1 -1
  313. package/dist/esm/kol-abbr.entry.js +1 -1
  314. package/dist/esm/kol-accordion.entry.js +1 -1
  315. package/dist/esm/kol-alert-wc.entry.js +1 -1
  316. package/dist/esm/kol-alert-wc.entry.js.map +1 -1
  317. package/dist/esm/kol-alert.entry.js +1 -1
  318. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  319. package/dist/esm/kol-avatar.entry.js +1 -1
  320. package/dist/esm/kol-badge.entry.js +1 -1
  321. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  322. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  323. package/dist/esm/kol-button-group.entry.js +1 -1
  324. package/dist/esm/kol-button-link.entry.js +1 -1
  325. package/dist/esm/kol-button-wc.entry.js +1 -1
  326. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  327. package/dist/esm/kol-button.entry.js +1 -1
  328. package/dist/esm/kol-card.entry.js +1 -1
  329. package/dist/esm/kol-combobox.entry.js +1 -1
  330. package/dist/esm/kol-details.entry.js +1 -1
  331. package/dist/esm/kol-drawer.entry.js +1 -1
  332. package/dist/esm/kol-form.entry.js +1 -1
  333. package/dist/esm/kol-heading-wc.entry.js +1 -1
  334. package/dist/esm/kol-heading.entry.js +1 -1
  335. package/dist/esm/kol-icon.entry.js +1 -1
  336. package/dist/esm/kol-icon.entry.js.map +1 -1
  337. package/dist/esm/kol-image.entry.js +1 -1
  338. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  339. package/dist/esm/kol-indented-text.entry.js +1 -1
  340. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  341. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  342. package/dist/esm/kol-input-color.entry.js +1 -1
  343. package/dist/esm/kol-input-date.entry.js +1 -1
  344. package/dist/esm/kol-input-date.entry.js.map +1 -1
  345. package/dist/esm/kol-input-email.entry.js +1 -1
  346. package/dist/esm/kol-input-email.entry.js.map +1 -1
  347. package/dist/esm/kol-input-file.entry.js +1 -1
  348. package/dist/esm/kol-input-number.entry.js +1 -1
  349. package/dist/esm/kol-input-password.entry.js +1 -1
  350. package/dist/esm/kol-input-password.entry.js.map +1 -1
  351. package/dist/esm/kol-input-radio.entry.js +1 -1
  352. package/dist/esm/kol-input-range.entry.js +1 -1
  353. package/dist/esm/kol-input-text.entry.js +1 -1
  354. package/dist/esm/kol-input-text.entry.js.map +1 -1
  355. package/dist/esm/kol-input.entry.js +1 -1
  356. package/dist/esm/kol-input.entry.js.map +1 -1
  357. package/dist/esm/kol-kolibri.entry.js +1 -1
  358. package/dist/esm/kol-link-button.entry.js +1 -1
  359. package/dist/esm/kol-link-group.entry.js +1 -1
  360. package/dist/esm/kol-link-wc.entry.js +1 -1
  361. package/dist/esm/kol-link.entry.js +1 -1
  362. package/dist/esm/kol-logo.entry.js +1 -1
  363. package/dist/esm/kol-modal.entry.js +1 -1
  364. package/dist/esm/kol-modal.entry.js.map +1 -1
  365. package/dist/esm/kol-nav.entry.js +1 -1
  366. package/dist/esm/kol-pagination.entry.js +1 -1
  367. package/dist/esm/kol-popover-wc.entry.js +1 -1
  368. package/dist/esm/kol-popover-wc.entry.js.map +1 -1
  369. package/dist/esm/kol-progress.entry.js +1 -1
  370. package/dist/esm/kol-quote.entry.js +1 -1
  371. package/dist/esm/kol-select.entry.js +1 -1
  372. package/dist/esm/kol-single-select.entry.js +1 -1
  373. package/dist/esm/kol-skip-nav.entry.js +1 -1
  374. package/dist/esm/kol-span-wc.entry.js +1 -1
  375. package/dist/esm/kol-spin.entry.js +1 -1
  376. package/dist/esm/kol-split-button.entry.js +1 -1
  377. package/dist/esm/kol-split-button.entry.js.map +1 -1
  378. package/dist/esm/kol-symbol.entry.js +1 -1
  379. package/dist/esm/kol-table-stateful.entry.js +1 -1
  380. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  381. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  382. package/dist/esm/kol-table-stateless.entry.js +1 -1
  383. package/dist/esm/kol-table.entry.js +1 -1
  384. package/dist/esm/kol-tabs.entry.js +1 -1
  385. package/dist/esm/kol-tabs.entry.js.map +1 -1
  386. package/dist/esm/kol-textarea.entry.js +1 -1
  387. package/dist/esm/kol-textarea.entry.js.map +1 -1
  388. package/dist/esm/kol-toast-container.entry.js +1 -1
  389. package/dist/esm/kol-toolbar.entry.js +1 -1
  390. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  391. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  392. package/dist/esm/kol-tree-item.entry.js +1 -1
  393. package/dist/esm/kol-tree-item.entry.js.map +1 -1
  394. package/dist/esm/kol-tree-wc.entry.js +1 -1
  395. package/dist/esm/kol-tree.entry.js +1 -1
  396. package/dist/esm/kol-version.entry.js +1 -1
  397. package/dist/esm/kolibri.js +1 -1
  398. package/dist/esm/kolibri.js.map +1 -1
  399. package/dist/esm/{label-37acddfe.js → label-084ed1e7.js} +1 -1
  400. package/dist/esm/{label-37acddfe.js.map → label-084ed1e7.js.map} +1 -1
  401. package/dist/esm/loader.js +1 -1
  402. package/dist/esm/{open-8e6f0bcd.js → open-7d2c57bd.js} +1 -1
  403. package/dist/esm/{open-8e6f0bcd.js.map → open-7d2c57bd.js.map} +1 -1
  404. package/dist/esm/prop.validators-5a58fa40.js +4 -0
  405. package/dist/esm/prop.validators-5a58fa40.js.map +1 -0
  406. package/dist/esm/{rows-9afeef27.js → rows-c1ee8752.js} +1 -1
  407. package/dist/esm/{rows-9afeef27.js.map → rows-c1ee8752.js.map} +1 -1
  408. package/dist/esm/show-430cafc2.js +4 -0
  409. package/dist/esm/{show-d234ff64.js.map → show-430cafc2.js.map} +1 -1
  410. package/dist/esm/{suggestions-1d994338.js → suggestions-2f34bad6.js} +1 -1
  411. package/dist/esm/{suggestions-1d994338.js.map → suggestions-2f34bad6.js.map} +1 -1
  412. package/dist/esm/{tab-index-a117f598.js → tab-index-86f3bbae.js} +1 -1
  413. package/dist/esm/{tab-index-a117f598.js.map → tab-index-86f3bbae.js.map} +1 -1
  414. package/dist/esm/{tooltip-align-b217e9d0.js → tooltip-align-e140b328.js} +1 -1
  415. package/dist/esm/{tooltip-align-b217e9d0.js.map → tooltip-align-e140b328.js.map} +1 -1
  416. package/dist/esm/{validation-80318b2c.js → validation-2329d751.js} +1 -1
  417. package/dist/esm/{validation-80318b2c.js.map → validation-2329d751.js.map} +1 -1
  418. package/dist/esm/{validation-381a4169.js → validation-d958b624.js} +1 -1
  419. package/dist/esm/{validation-381a4169.js.map → validation-d958b624.js.map} +1 -1
  420. package/dist/kolibri/{InternalUnderlinedAccessKey-308bff0a.js → InternalUnderlinedAccessKey-b2266b5a.js} +1 -1
  421. package/dist/kolibri/access-key-729d2115.js +4 -0
  422. package/dist/kolibri/align-78bab7b5.js +4 -0
  423. package/dist/kolibri/align-floating-elements-8dfecb37.js +4 -0
  424. package/dist/kolibri/align-floating-elements-8dfecb37.js.map +1 -0
  425. package/dist/kolibri/app-globals-4f2c8e7b.js +4 -0
  426. package/dist/kolibri/aria-expanded-259cbe01.js +4 -0
  427. package/dist/kolibri/aria-expanded-259cbe01.js.map +1 -0
  428. package/dist/kolibri/{associated.controller-8e2d43be.js → associated.controller-15cdd804.js} +1 -1
  429. package/dist/kolibri/{color-52b1b536.js → color-b8652714.js} +1 -1
  430. package/dist/kolibri/{component-names-3e0158fe.js → component-names-0a8a1a6c.js} +1 -1
  431. package/dist/kolibri/{component-names-3e0158fe.js.map → component-names-0a8a1a6c.js.map} +1 -1
  432. package/dist/kolibri/controller-0ab676b5.js +4 -0
  433. package/dist/kolibri/controller-0ab676b5.js.map +1 -0
  434. package/dist/kolibri/controller-2a4348e1.js +4 -0
  435. package/dist/kolibri/controller-8c35edf1.js +4 -0
  436. package/dist/kolibri/controller-8c35edf1.js.map +1 -0
  437. package/dist/kolibri/{controller-ec76e4bf.js → controller-ec60cfa6.js} +1 -1
  438. package/dist/kolibri/{controller-056d0f3b.js → controller-fe5a6b8d.js} +1 -1
  439. package/dist/kolibri/{controller-icon-e155a2b1.js → controller-icon-78e12429.js} +1 -1
  440. package/dist/kolibri/custom-class-1b4696e3.js +4 -0
  441. package/dist/kolibri/{dev.utils-cb789c3d.js → dev.utils-44ef1bde.js} +1 -1
  442. package/dist/kolibri/{devtools-a88bc2ec.js → devtools-417fc238.js} +1 -1
  443. package/dist/kolibri/{disabled-d5b4a883.js → disabled-60f09b20.js} +1 -1
  444. package/dist/kolibri/{events-9570402d.js → events-476662bc.js} +1 -1
  445. package/dist/kolibri/{events-9570402d.js.map → events-476662bc.js.map} +1 -1
  446. package/dist/kolibri/form-field-msg-22e08734.js +4 -0
  447. package/dist/kolibri/has-closer-f40b362c.js +4 -0
  448. package/dist/kolibri/has-counter-798e2301.js +4 -0
  449. package/dist/kolibri/has-counter-798e2301.js.map +1 -0
  450. package/dist/kolibri/hide-label-1d403517.js +4 -0
  451. package/dist/kolibri/href-5e305ce2.js +4 -0
  452. package/dist/kolibri/i18n-7ea9f137.js +4 -0
  453. package/dist/kolibri/i18n-7ea9f137.js.map +1 -0
  454. package/dist/kolibri/i18n-8640d789.js +4 -0
  455. package/dist/kolibri/{icons-bd60f3a5.js → icons-b0b05e20.js} +1 -1
  456. package/dist/kolibri/image-source-87526275.js +4 -0
  457. package/dist/kolibri/index-5728f164.js +4 -0
  458. package/dist/kolibri/index-5728f164.js.map +1 -0
  459. package/dist/kolibri/index-cf24d1fe.js +5 -0
  460. package/dist/kolibri/index-cf24d1fe.js.map +1 -0
  461. package/dist/kolibri/index.esm.js +1 -1
  462. package/dist/kolibri/index.esm.js.map +1 -1
  463. package/dist/kolibri/kol-abbr.entry.js +1 -1
  464. package/dist/kolibri/kol-accordion.entry.js +1 -1
  465. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  466. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  467. package/dist/kolibri/kol-alert.entry.js +1 -1
  468. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  469. package/dist/kolibri/kol-avatar.entry.js +1 -1
  470. package/dist/kolibri/kol-badge.entry.js +1 -1
  471. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  472. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  473. package/dist/kolibri/kol-button-group.entry.js +1 -1
  474. package/dist/kolibri/kol-button-link.entry.js +1 -1
  475. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  476. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  477. package/dist/kolibri/kol-button.entry.js +1 -1
  478. package/dist/kolibri/kol-card.entry.js +1 -1
  479. package/dist/kolibri/kol-combobox.entry.js +1 -1
  480. package/dist/kolibri/kol-details.entry.js +1 -1
  481. package/dist/kolibri/kol-drawer.entry.js +1 -1
  482. package/dist/kolibri/kol-form.entry.js +1 -1
  483. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  484. package/dist/kolibri/kol-heading.entry.js +1 -1
  485. package/dist/kolibri/kol-icon.entry.js +1 -1
  486. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  487. package/dist/kolibri/kol-image.entry.js +1 -1
  488. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  489. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  490. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  491. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  492. package/dist/kolibri/kol-input-color.entry.js +1 -1
  493. package/dist/kolibri/kol-input-date.entry.js +1 -1
  494. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  495. package/dist/kolibri/kol-input-email.entry.js +1 -1
  496. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  497. package/dist/kolibri/kol-input-file.entry.js +1 -1
  498. package/dist/kolibri/kol-input-number.entry.js +1 -1
  499. package/dist/kolibri/kol-input-password.entry.js +1 -1
  500. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  501. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  502. package/dist/kolibri/kol-input-range.entry.js +1 -1
  503. package/dist/kolibri/kol-input-text.entry.js +1 -1
  504. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  505. package/dist/kolibri/kol-input.entry.js +1 -1
  506. package/dist/kolibri/kol-input.entry.js.map +1 -1
  507. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  508. package/dist/kolibri/kol-link-button.entry.js +1 -1
  509. package/dist/kolibri/kol-link-group.entry.js +1 -1
  510. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  511. package/dist/kolibri/kol-link.entry.js +1 -1
  512. package/dist/kolibri/kol-logo.entry.js +1 -1
  513. package/dist/kolibri/kol-modal.entry.js +1 -1
  514. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  515. package/dist/kolibri/kol-nav.entry.js +1 -1
  516. package/dist/kolibri/kol-pagination.entry.js +1 -1
  517. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  518. package/dist/kolibri/kol-popover-wc.entry.js.map +1 -1
  519. package/dist/kolibri/kol-progress.entry.js +1 -1
  520. package/dist/kolibri/kol-quote.entry.js +1 -1
  521. package/dist/kolibri/kol-select.entry.js +1 -1
  522. package/dist/kolibri/kol-single-select.entry.js +1 -1
  523. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  524. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  525. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  526. package/dist/kolibri/kol-spin.entry.js +1 -1
  527. package/dist/kolibri/kol-split-button.entry.js +1 -1
  528. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  529. package/dist/kolibri/kol-symbol.entry.js +1 -1
  530. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  531. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  532. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  533. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  534. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  535. package/dist/kolibri/kol-table.entry.js +1 -1
  536. package/dist/kolibri/kol-tabs.entry.js +1 -1
  537. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  538. package/dist/kolibri/kol-textarea.entry.js +1 -1
  539. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  540. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  541. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  542. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  543. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  544. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  545. package/dist/kolibri/kol-tree-item.entry.js.map +1 -1
  546. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  547. package/dist/kolibri/kol-tree.entry.js +1 -1
  548. package/dist/kolibri/kol-version.entry.js +1 -1
  549. package/dist/kolibri/kolibri.esm.js +1 -1
  550. package/dist/kolibri/kolibri.esm.js.map +1 -1
  551. package/dist/kolibri/{label-37acddfe.js → label-084ed1e7.js} +1 -1
  552. package/dist/kolibri/open-7d2c57bd.js +4 -0
  553. package/dist/kolibri/{prop.validators-f89d26b4.js → prop.validators-5a58fa40.js} +1 -1
  554. package/dist/kolibri/rows-c1ee8752.js +4 -0
  555. package/dist/kolibri/show-430cafc2.js +4 -0
  556. package/dist/kolibri/{suggestions-1d994338.js → suggestions-2f34bad6.js} +1 -1
  557. package/dist/kolibri/tab-index-86f3bbae.js +4 -0
  558. package/dist/kolibri/{tab-index-a117f598.js.map → tab-index-86f3bbae.js.map} +1 -1
  559. package/dist/kolibri/tooltip-align-e140b328.js +4 -0
  560. package/dist/kolibri/validation-2329d751.js +4 -0
  561. package/dist/kolibri/validation-d958b624.js +4 -0
  562. package/dist/types/components/input-checkbox/controller.d.ts +2 -1
  563. package/dist/types/components/input-checkbox/shadow.d.ts +3 -1
  564. package/dist/types/components/input-date/controller.d.ts +1 -1
  565. package/dist/types/components/input-password/controller.d.ts +1 -0
  566. package/dist/types/components/input-text/controller.d.ts +0 -1
  567. package/dist/types/components/modal/shadow.d.ts +4 -2
  568. package/dist/types/components/modal/test/html.mock.d.ts +2 -1
  569. package/dist/types/components/popover/component.d.ts +3 -1
  570. package/dist/types/components/split-button/shadow.d.ts +2 -5
  571. package/dist/types/components/table-stateless/component.d.ts +2 -0
  572. package/dist/types/components/tabs/shadow.d.ts +13 -1
  573. package/dist/types/components.d.ts +47 -6
  574. package/dist/types/index.d.ts +3 -4
  575. package/dist/types/schema/components/input-checkbox.d.ts +3 -3
  576. package/dist/types/schema/components/popover.d.ts +3 -3
  577. package/dist/types/schema/components/tabs.d.ts +3 -3
  578. package/dist/types/schema/enums/events.d.ts +2 -1
  579. package/dist/types/schema/enums/index.d.ts +1 -1
  580. package/dist/types/schema/enums/keyboard.d.ts +8 -0
  581. package/dist/types/schema/index.d.ts +1 -1
  582. package/dist/types/schema/props/alternative-button-link-role.d.ts +3 -1
  583. package/dist/types/schema/props/has-counter.d.ts +2 -1
  584. package/dist/types/schema/props/index.d.ts +1 -1
  585. package/dist/types/schema/props/label-align.d.ts +8 -0
  586. package/dist/types/schema/props/popover-callbacks.d.ts +10 -0
  587. package/dist/types/schema/props/tab-behavior.d.ts +8 -0
  588. package/dist/types/schema/utils/prop.validators.d.ts +5 -5
  589. package/dist/types/schema/utils/reuse.d.ts +1 -1
  590. package/doc/badge.md +6 -6
  591. package/doc/input-checkbox.md +1 -0
  592. package/doc/input-color.md +22 -22
  593. package/doc/input-date.md +28 -28
  594. package/doc/input-email.md +29 -29
  595. package/doc/input-file.md +23 -23
  596. package/doc/input-number.md +28 -28
  597. package/doc/input-password.md +28 -28
  598. package/doc/input-text.md +29 -29
  599. package/doc/modal.md +56 -45
  600. package/doc/popover.md +5 -4
  601. package/doc/split-button.md +13 -0
  602. package/doc/table.md +1 -1
  603. package/doc/tabs.md +2 -1
  604. package/package.json +4 -1
  605. package/vscode-custom-data.json +98 -2
  606. package/dist/cjs/access-key-12589f9b.js +0 -4
  607. package/dist/cjs/align-floating-elements-e55859b9.js +0 -4
  608. package/dist/cjs/align-floating-elements-e55859b9.js.map +0 -1
  609. package/dist/cjs/app-globals-13285c37.js +0 -4
  610. package/dist/cjs/app-globals-13285c37.js.map +0 -1
  611. package/dist/cjs/aria-expanded-be98ced6.js +0 -4
  612. package/dist/cjs/aria-expanded-be98ced6.js.map +0 -1
  613. package/dist/cjs/component-names-f704607d.js +0 -4
  614. package/dist/cjs/component-names-f704607d.js.map +0 -1
  615. package/dist/cjs/controller-cbd26426.js +0 -4
  616. package/dist/cjs/controller-cbd26426.js.map +0 -1
  617. package/dist/cjs/controller-f984e45f.js.map +0 -1
  618. package/dist/cjs/custom-class-5a76b8cc.js +0 -4
  619. package/dist/cjs/disabled-4f7a7b7e.js +0 -4
  620. package/dist/cjs/events-a0477b5a.js +0 -4
  621. package/dist/cjs/events-a0477b5a.js.map +0 -1
  622. package/dist/cjs/has-closer-354720e1.js +0 -4
  623. package/dist/cjs/hide-label-7e4f3ef4.js +0 -4
  624. package/dist/cjs/href-87a51631.js +0 -4
  625. package/dist/cjs/i18n-41ebfcca.js +0 -4
  626. package/dist/cjs/i18n-41ebfcca.js.map +0 -1
  627. package/dist/cjs/image-source-7ee44fb4.js +0 -4
  628. package/dist/cjs/index-1285d2d1.js +0 -4
  629. package/dist/cjs/index-1285d2d1.js.map +0 -1
  630. package/dist/cjs/index-afb88da6.js +0 -4
  631. package/dist/cjs/index-afb88da6.js.map +0 -1
  632. package/dist/cjs/open-f0d79417.js +0 -4
  633. package/dist/cjs/prop.validators-37113ad1.js.map +0 -1
  634. package/dist/cjs/rows-4c48715e.js +0 -4
  635. package/dist/cjs/show-b03b7745.js +0 -4
  636. package/dist/cjs/tooltip-align-18f90f3f.js +0 -4
  637. package/dist/esm/align-floating-elements-42e5ff04.js +0 -4
  638. package/dist/esm/align-floating-elements-42e5ff04.js.map +0 -1
  639. package/dist/esm/app-globals-ca7441bd.js +0 -4
  640. package/dist/esm/app-globals-ca7441bd.js.map +0 -1
  641. package/dist/esm/aria-expanded-e75617bf.js +0 -4
  642. package/dist/esm/aria-expanded-e75617bf.js.map +0 -1
  643. package/dist/esm/component-names-3e0158fe.js.map +0 -1
  644. package/dist/esm/controller-3cb3d1e6.js +0 -4
  645. package/dist/esm/controller-3cb3d1e6.js.map +0 -1
  646. package/dist/esm/controller-4bd39719.js +0 -4
  647. package/dist/esm/controller-4bd39719.js.map +0 -1
  648. package/dist/esm/custom-class-2d443ea5.js +0 -4
  649. package/dist/esm/events-9570402d.js.map +0 -1
  650. package/dist/esm/i18n-80da5843.js +0 -4
  651. package/dist/esm/i18n-ece780dd.js +0 -4
  652. package/dist/esm/i18n-ece780dd.js.map +0 -1
  653. package/dist/esm/index-bd96e8df.js +0 -4
  654. package/dist/esm/index-bd96e8df.js.map +0 -1
  655. package/dist/esm/index-db4aa6e4.js +0 -4
  656. package/dist/esm/index-db4aa6e4.js.map +0 -1
  657. package/dist/esm/prop.validators-f89d26b4.js +0 -4
  658. package/dist/esm/prop.validators-f89d26b4.js.map +0 -1
  659. package/dist/esm/show-d234ff64.js +0 -4
  660. package/dist/kolibri/access-key-6ced3097.js +0 -4
  661. package/dist/kolibri/align-89a65800.js +0 -4
  662. package/dist/kolibri/align-floating-elements-42e5ff04.js +0 -4
  663. package/dist/kolibri/align-floating-elements-42e5ff04.js.map +0 -1
  664. package/dist/kolibri/app-globals-ca7441bd.js +0 -4
  665. package/dist/kolibri/aria-expanded-e75617bf.js +0 -4
  666. package/dist/kolibri/aria-expanded-e75617bf.js.map +0 -1
  667. package/dist/kolibri/controller-3cb3d1e6.js +0 -4
  668. package/dist/kolibri/controller-3cb3d1e6.js.map +0 -1
  669. package/dist/kolibri/controller-4bd39719.js +0 -4
  670. package/dist/kolibri/controller-4bd39719.js.map +0 -1
  671. package/dist/kolibri/controller-ad9f8f69.js +0 -4
  672. package/dist/kolibri/custom-class-2d443ea5.js +0 -4
  673. package/dist/kolibri/form-field-msg-2e39a9f7.js +0 -4
  674. package/dist/kolibri/has-closer-67035624.js +0 -4
  675. package/dist/kolibri/hide-label-6424f890.js +0 -4
  676. package/dist/kolibri/href-e8c05473.js +0 -4
  677. package/dist/kolibri/i18n-80da5843.js +0 -4
  678. package/dist/kolibri/i18n-ece780dd.js +0 -4
  679. package/dist/kolibri/i18n-ece780dd.js.map +0 -1
  680. package/dist/kolibri/image-source-c68f09bf.js +0 -4
  681. package/dist/kolibri/index-bd96e8df.js +0 -5
  682. package/dist/kolibri/index-bd96e8df.js.map +0 -1
  683. package/dist/kolibri/index-db4aa6e4.js +0 -4
  684. package/dist/kolibri/index-db4aa6e4.js.map +0 -1
  685. package/dist/kolibri/open-8e6f0bcd.js +0 -4
  686. package/dist/kolibri/rows-9afeef27.js +0 -4
  687. package/dist/kolibri/show-d234ff64.js +0 -4
  688. package/dist/kolibri/tab-index-a117f598.js +0 -4
  689. package/dist/kolibri/tooltip-align-b217e9d0.js +0 -4
  690. package/dist/kolibri/validation-381a4169.js +0 -4
  691. package/dist/kolibri/validation-80318b2c.js +0 -4
  692. package/dist/types/components/modal/service.d.ts +0 -11
  693. /package/dist/kolibri/{InternalUnderlinedAccessKey-308bff0a.js.map → InternalUnderlinedAccessKey-b2266b5a.js.map} +0 -0
  694. /package/dist/kolibri/{access-key-6ced3097.js.map → access-key-729d2115.js.map} +0 -0
  695. /package/dist/kolibri/{align-89a65800.js.map → align-78bab7b5.js.map} +0 -0
  696. /package/dist/kolibri/{app-globals-ca7441bd.js.map → app-globals-4f2c8e7b.js.map} +0 -0
  697. /package/dist/kolibri/{associated.controller-8e2d43be.js.map → associated.controller-15cdd804.js.map} +0 -0
  698. /package/dist/kolibri/{color-52b1b536.js.map → color-b8652714.js.map} +0 -0
  699. /package/dist/kolibri/{controller-ad9f8f69.js.map → controller-2a4348e1.js.map} +0 -0
  700. /package/dist/kolibri/{controller-ec76e4bf.js.map → controller-ec60cfa6.js.map} +0 -0
  701. /package/dist/kolibri/{controller-056d0f3b.js.map → controller-fe5a6b8d.js.map} +0 -0
  702. /package/dist/kolibri/{controller-icon-e155a2b1.js.map → controller-icon-78e12429.js.map} +0 -0
  703. /package/dist/kolibri/{custom-class-2d443ea5.js.map → custom-class-1b4696e3.js.map} +0 -0
  704. /package/dist/kolibri/{dev.utils-cb789c3d.js.map → dev.utils-44ef1bde.js.map} +0 -0
  705. /package/dist/kolibri/{devtools-a88bc2ec.js.map → devtools-417fc238.js.map} +0 -0
  706. /package/dist/kolibri/{disabled-d5b4a883.js.map → disabled-60f09b20.js.map} +0 -0
  707. /package/dist/kolibri/{form-field-msg-2e39a9f7.js.map → form-field-msg-22e08734.js.map} +0 -0
  708. /package/dist/kolibri/{has-closer-67035624.js.map → has-closer-f40b362c.js.map} +0 -0
  709. /package/dist/kolibri/{hide-label-6424f890.js.map → hide-label-1d403517.js.map} +0 -0
  710. /package/dist/kolibri/{href-e8c05473.js.map → href-5e305ce2.js.map} +0 -0
  711. /package/dist/kolibri/{i18n-80da5843.js.map → i18n-8640d789.js.map} +0 -0
  712. /package/dist/kolibri/{icons-bd60f3a5.js.map → icons-b0b05e20.js.map} +0 -0
  713. /package/dist/kolibri/{image-source-c68f09bf.js.map → image-source-87526275.js.map} +0 -0
  714. /package/dist/kolibri/{label-37acddfe.js.map → label-084ed1e7.js.map} +0 -0
  715. /package/dist/kolibri/{open-8e6f0bcd.js.map → open-7d2c57bd.js.map} +0 -0
  716. /package/dist/kolibri/{prop.validators-f89d26b4.js.map → prop.validators-5a58fa40.js.map} +0 -0
  717. /package/dist/kolibri/{rows-9afeef27.js.map → rows-c1ee8752.js.map} +0 -0
  718. /package/dist/kolibri/{show-d234ff64.js.map → show-430cafc2.js.map} +0 -0
  719. /package/dist/kolibri/{suggestions-1d994338.js.map → suggestions-2f34bad6.js.map} +0 -0
  720. /package/dist/kolibri/{tooltip-align-b217e9d0.js.map → tooltip-align-e140b328.js.map} +0 -0
  721. /package/dist/kolibri/{validation-80318b2c.js.map → validation-2329d751.js.map} +0 -0
  722. /package/dist/kolibri/{validation-381a4169.js.map → validation-d958b624.js.map} +0 -0
  723. /package/dist/{declare.d.ts → types/declare.d.ts} +0 -0
@@ -1 +1 @@
1
- {"file":"kol-input.js","mappings":";;;;;;;;;;MAgCa,UAAU;;;;QAGd,aAAQ,GAAW,OAAO,CAAC;QAM3B,mBAAc,GAAG,CAAC,IAAqB;YAC9C,iBAAiB,CAAC,IAAI,CAAC,IAAK,EAAE,IAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpD,CAAC;;sBAkHgC,IAAI;;yBAWD,KAAK;2BAMH,KAAK;0BAMN,KAAK;0BAOL,KAAK;qBAKX,EAAE;;;;;;yBA+BG,KAAK;8BAKA,KAAK;yBAMV,KAAK;;;;6BAqBY,KAAK;wBAMvB,KAAK;;IAhOlC,mBAAmB;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;KAC1D;IAMO,aAAa,CAAC,IAA2C;QAChE,OAAO,IAAI,IAAI,O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AAqB,MAC5C,cAAQ,KAAK,EAAE,MAAM,GAAI,CACzB,CAAC,CACQ,CACX,EACA,IAAI,CAAC,WAAW,KAChB,6DAAM,KAAK,EAAC,SAAS,iBAAa,MAAM,eAAW,QAAQ,IACzD,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,UAAU,KACf,kBACC,2EAAkB,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC,KAAK,QAE1C,EACN,IAAI,CAAC,UAAU,CACd,CACH,EAAE,GAAG,EACN,+DAAO,SAAS,CAAC,gBAAgB,CAAC,CAAQ,CACpC,CACP,CACK,EACN;KACF;IAqHO,6BAA6B;;QACpC,IAAI,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,EAAE;YACrB,OAAO;gBACN,OAAO,EAAE,kBAAkB;gBAC3B,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,kBAAkB;gBAC3B,OAAO,EAAE,kBAAkB;gBAC3B,KAAK,EAAE,gBAAgB;aACvB,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,CAAC,CAAC;SACpB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { handleSlotContent, type MsgPropType, showExpertSlot } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, Host, Prop, h } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { translate } from '../../i18n';\n\nimport type {\n\tAccessKeyPropType,\n\tAnyIconFontClass,\n\tButtonProps,\n\tIdPropType,\n\tKoliBriCustomIcon,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tStringified,\n\tSuggestionsPropType,\n\tTooltipAlignPropType,\n\tW3CInputValue,\n} from '../../schema';\nimport { FormFieldMsg } from '../@shared/form-field-msg';\nimport type { Props } from './types';\nimport { KolButtonWcTag, KolIconTag, KolTooltipWcTag } from '../../core/component-names';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInputWc implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tprivate getIconStyles(icon?: AnyIconFontClass | KoliBriCustomIcon): Record<string, string> {\n\t\treturn icon && typeof icon === 'object' && icon.style ? icon.style : {};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst isMessageValidError = Boolean(this._msg?._type === 'error' && this._msg._description && this._msg._description?.length > 0);\n\t\tconst hasError = !this._readOnly && isMessageValidError && this._touched === true;\n\t\tconst showFormFieldMsg = Boolean(hasError || (this._msg?._type !== 'error' && this._msg?._description));\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={clsx('kol-input', this.getModifierClassNameByMsgType(), {\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<label class=\"input-label\" id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span class=\"input-label-span\">\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icons?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icons?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this._icons?.left && (\n\t\t\t\t\t\t<KolIconTag _label=\"\" _icons={(this._icons?.left as KoliBriCustomIcon).icon} style={this.getIconStyles(this._icons?.left)}></KolIconTag>\n\t\t\t\t\t)}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icons={this._smartButton._icons}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t)}\n\t\t\t\t\t{this._icons?.right && (\n\t\t\t\t\t\t<KolIconTag _label=\"\" _icons={(this._icons?.right as KoliBriCustomIcon).icon} style={this.getIconStyles(this._icons?.right)}></KolIconTag>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<KolTooltipWcTag\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></KolTooltipWcTag>\n\t\t\t\t)}\n\t\t\t\t{showFormFieldMsg && <FormFieldMsg _alert={this._alert} _hideError={this._hideError} _msg={this._msg} _id={this._id} />}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id!: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: MsgPropType;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _touched?: boolean = false;\n\n\tprivate getModifierClassNameByMsgType() {\n\t\tif (this._msg?._type) {\n\t\t\treturn {\n\t\t\t\tdefault: 'msg-type-default',\n\t\t\t\tinfo: 'msg-type-info',\n\t\t\t\tsuccess: 'msg-type-success',\n\t\t\t\twarning: 'msg-type-warning',\n\t\t\t\terror: 'msg-type-error',\n\t\t\t}[this._msg?._type];\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-input.js","mappings":";;;;;;;;;;MAgCa,UAAU;;;;QAGd,aAAQ,GAAW,OAAO,CAAC;QAM3B,mBAAc,GAAG,CAAC,IAAqB;YAC9C,iBAAiB,CAAC,IAAI,CAAC,IAAK,EAAE,IAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpD,CAAC;;sBAkHgC,IAAI;;yBAWD,KAAK;2BAMH,KAAK;0BAMN,KAAK;0BAOL,KAAK;qBAKX,EAAE;;;;;;yBA+BG,KAAK;8BAKA,KAAK;yBAMV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ACtH,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,KAChE,iEAAU,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,IAC9B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAqB,MAC5C,cAAQ,KAAK,EAAE,MAAM,GAAI,CACzB,CAAC,CACQ,CACX,EACA,IAAI,CAAC,WAAW,KAChB,6DAAM,KAAK,EAAC,SAAS,iBAAa,MAAM,eAAW,QAAQ,iBAAa,eAAe,IACrF,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,UAAU,KACf,kBACC,2EAAkB,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC,KAAK,QAE1C,EACN,IAAI,CAAC,UAAU,CACd,CACH,EAAE,GAAG,EACN,+DAAO,SAAS,CAAC,gBAAgB,CAAC,CAAQ,CACpC,CACP,CACK,EACN;KACF;IAqHO,6BAA6B;;QACpC,IAAI,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,EAAE;YACrB,OAAO;gBACN,OAAO,EAAE,kBAAkB;gBAC3B,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,kBAAkB;gBAC3B,OAAO,EAAE,kBAAkB;gBAC3B,KAAK,EAAE,gBAAgB;aACvB,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,CAAC,CAAC;SACpB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { handleSlotContent, type MsgPropType, showExpertSlot } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, Host, Prop, h } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { translate } from '../../i18n';\n\nimport type {\n\tAccessKeyPropType,\n\tAnyIconFontClass,\n\tButtonProps,\n\tIdPropType,\n\tKoliBriCustomIcon,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tStringified,\n\tSuggestionsPropType,\n\tTooltipAlignPropType,\n\tW3CInputValue,\n} from '../../schema';\nimport { FormFieldMsg } from '../@shared/form-field-msg';\nimport type { Props } from './types';\nimport { KolButtonWcTag, KolIconTag, KolTooltipWcTag } from '../../core/component-names';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInputWc implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tprivate getIconStyles(icon?: AnyIconFontClass | KoliBriCustomIcon): Record<string, string> {\n\t\treturn icon && typeof icon === 'object' && icon.style ? icon.style : {};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst isMessageValidError = Boolean(this._msg?._type === 'error' && this._msg._description && this._msg._description?.length > 0);\n\t\tconst hasError = !this._readOnly && isMessageValidError && this._touched === true;\n\t\tconst showFormFieldMsg = Boolean(hasError || (this._msg?._type !== 'error' && this._msg?._description));\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={clsx('kol-input', this.getModifierClassNameByMsgType(), {\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<label class=\"input-label\" id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span class=\"input-label-span\">\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icons?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icons?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this._icons?.left && (\n\t\t\t\t\t\t<KolIconTag _label=\"\" _icons={(this._icons?.left as KoliBriCustomIcon).icon} style={this.getIconStyles(this._icons?.left)}></KolIconTag>\n\t\t\t\t\t)}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icons={this._smartButton._icons}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t)}\n\t\t\t\t\t{this._icons?.right && (\n\t\t\t\t\t\t<KolIconTag _label=\"\" _icons={(this._icons?.right as KoliBriCustomIcon).icon} style={this.getIconStyles(this._icons?.right)}></KolIconTag>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<KolTooltipWcTag\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></KolTooltipWcTag>\n\t\t\t\t)}\n\t\t\t\t{showFormFieldMsg && <FormFieldMsg _alert={this._alert} _hideError={this._hideError} _msg={this._msg} _id={this._id} />}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\" data-testid=\"input-counter\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id!: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: MsgPropType;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _touched?: boolean = false;\n\n\tprivate getModifierClassNameByMsgType() {\n\t\tif (this._msg?._type) {\n\t\t\treturn {\n\t\t\t\tdefault: 'msg-type-default',\n\t\t\t\tinfo: 'msg-type-info',\n\t\t\t\tsuccess: 'msg-type-success',\n\t\t\t\twarning: 'msg-type-warning',\n\t\t\t\terror: 'msg-type-error',\n\t\t\t}[this._msg?._type];\n\t\t}\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement as HTMLElement$1,h,Host}from"@stencil/core/internal/client";import{g as getDocument,L as Log}from"./dev.utils.js";import{w as watchValidator,f as featureHint,b as setState,e as watchString}from"./prop.validators.js";import{v as validateLabel}from"./label.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$1=proxyCustomElement(class extends HTMLElement$1{constructor(){super(),this.__registerHost(),this.__attachShadow(),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"]}}static get style(){return{default:KolModalDefaultStyle0}}},[33,"kol-modal",{_activeElement:[1040],_label:[1],_on:[16],_width:[1],state:[32]},void 0,{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-modal"].forEach((e=>{if("kol-modal"===e)customElements.get(e)||customElements.define(e,KolModal$1)}))}const KolModal=KolModal$1,defineCustomElement=defineCustomElement$1;export{KolModal,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchValidator,b as setState,e as watchString}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 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$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._activeElement=void 0,this._label=void 0,this._on=void 0,this._width="100%",this.state={_activeElement:null,_label:"",_width:"100%"}}componentDidRender(){var e;this.state._activeElement&&(null===(e=this.refDialog)||void 0===e||e.showModal())}disconnectedCallback(){this.closeModal()}handleNativeCloseEvent(){var e,n;null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onClose)||void 0===n||n.call(e)}async openModal(){var e;null===(e=this.refDialog)||void 0===e||e.showModal()}async closeModal(){var e,n;this._activeElement=null,null===(n=null===(e=this.refDialog)||void 0===e?void 0:e.close)||void 0===n||n.call(e)}render(){return h("dialog",{key:"5033fc2965dfda66c31938ba52d631f1b9ecc902",class:"kol-modal",ref:e=>{this.refDialog=e},style:{width:this.state._width},"aria-label":this.state._label,onClose:this.handleNativeCloseEvent.bind(this)},h("div",{key:"a891311e24e9946af4976e61f5c30de3c9403f5c"},h("slot",{key:"6f6f37bb1b8a723b0c1dafbc880989c153214fae"})))}validateActiveElement(e){watchValidator(this,"_activeElement",(e=>"object"==typeof e||null===e),new Set(["HTMLElement","null"]),e,{defaultValue:null,hooks:{afterPatch:()=>{this.state._activeElement?this.openModal():this.closeModal()}}})}validateLabel(e){validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const n={};"function"!=typeof e.onClose&&!0!==e.onClose||(n.onClose=e.onClose),setState(this,"_on",n)}}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"]}}static get style(){return{default:KolModalDefaultStyle0}}},[33,"kol-modal",{_activeElement:[1040],_label:[1],_on:[16],_width:[1],state:[32],openModal:[64],closeModal:[64]},void 0,{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-modal"].forEach((e=>{if("kol-modal"===e)customElements.get(e)||customElements.define(e,KolModal$1)}))}const KolModal=KolModal$1,defineCustomElement=defineCustomElement$1;export{KolModal,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-modal.js","mappings":";;;;;;;;MAaa,YAAY;IAAzB;QACS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,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;gBAClE,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;aAClC;YACD,QAAQ,CAA6B,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7D;KACD;IAGM,aAAa,CAAC,KAAc;QAClC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;YAClC,YAAY,EAAE,MAAM;SACpB,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolModal"],"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.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,4sIAA4sI,CAAC;AACruI,8BAAe,eAAe;;MCiBjBA,UAAQ;;;;;;;;sBAw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AAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;wBAC9B,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;qBACtB;yBAAM;wBACN,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;qBACvB;iBACD;aACD;SACD,CAAC,CAAC;KACH;IAGM,aAAa,CAAC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;YAC1B,QAAQ,EAAE,IAAI;SACd,CAAC,CAAC;KACH;IAGM,UAAU,CAAC,KAAkC;QACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,MAAM,SAAS,GAA+B,EAAE,CAAC;YACjD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;gBAClE,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;aAClC;YACD,QAAQ,CAA6B,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7D;KACD;IAGM,aAAa,CAAC,KAAc;QAClC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;YAClC,YAAY,EAAE,MAAM;SACpB,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolModal"],"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{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels.js";import{w as watchNavLinks}from"./validation2.js";import{n as KolLinkWcTag,c as KolButtonWcTag,o as KolButtonTag}from"./component-names.js";import{c as watchBoolean,v as devWarning,i as a11yHintLabelingLandmarks,t as devHint,w as watchValidator}from"./prop.validators.js";import{v as validateHideLabel}from"./hide-label.js";import{v as validateLabel}from"./label.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$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),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"]}}static get style(){return{default:KolNavDefaultStyle0}}},[33,"kol-nav",{_collapsible:[4],_hasCompactButton:[4,"_has-compact-button"],_hasIconsWhenExpanded:[4,"_has-icons-when-expanded"],_hideLabel:[4,"_hide-label"],_label:[1],_links:[1],_orientation:[1],state:[32]},void 0,{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav"].forEach((e=>{if("kol-nav"===e)customElements.get(e)||customElements.define(e,KolNav$1)}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels.js";import{w as watchNavLinks}from"./validation2.js";import{n as KolLinkWcTag,c as KolButtonWcTag,o as KolButtonTag}from"./component-names.js";import{c as watchBoolean,v as devWarning,j as a11yHintLabelingLandmarks,t as devHint,w as watchValidator}from"./prop.validators.js";import{v as validateHideLabel}from"./hide-label.js";import{v as validateLabel}from"./label.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$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),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"]}}static get style(){return{default:KolNavDefaultStyle0}}},[33,"kol-nav",{_collapsible:[4],_hasCompactButton:[4,"_has-compact-button"],_hasIconsWhenExpanded:[4,"_has-icons-when-expanded"],_hideLabel:[4,"_hide-label"],_label:[1],_links:[1],_orientation:[1],state:[32]},void 0,{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav"].forEach((e=>{if("kol-nav"===e)customElements.get(e)||customElements.define(e,KolNav$1)}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as alignFloatingElements}from"./align-floating-elements.js";import{v as validateShow}from"./show.js";import{g as getDocument}from"./dev.utils.js";import{a as validateAlign}from"./align.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=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),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"]}}static get style(){return KolPopoverWcStyle0}},[4,"kol-popover-wc",{_align:[1],_show:[1540],state:[32]},void 0,{_align:["validateAlign"],_show:["validateShow"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-wc"].forEach((e=>{if("kol-popover-wc"===e)customElements.get(e)||customElements.define(e,KolPopover)}))}const KolPopoverWc=KolPopover,defineCustomElement=defineCustomElement$1;export{KolPopoverWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as alignFloatingElements}from"./align-floating-elements.js";import{w as watchValidator}from"./prop.validators.js";import{v as validateShow}from"./show.js";import{g as getDocument}from"./dev.utils.js";import{a as validateAlign}from"./align.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=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),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"]}}static get style(){return KolPopoverWcStyle0}},[4,"kol-popover-wc",{_align:[1],_on:[16],_show:[1540],state:[32]},void 0,{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-wc"].forEach((e=>{if("kol-popover-wc"===e)customElements.get(e)||customElements.define(e,KolPopover)}))}const KolPopoverWc=KolPopover,defineCustomElement=defineCustomElement$1;export{KolPopoverWc,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-popover-wc.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,kwJAAkwJ,CAAC;AACpxJ,2BAAe,QAAQ;;MCcV,UAAU;;;;QA4Bd,wBAAmB,GAAG,CAAC,KAAoB;YAClD,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;gBAAE,IAAI,CAAC,WAAW,EAAE,CAAC;SAC/C,CAAC;QACM,8BAAyB,GAAG,CAAC,KAAiB;YACrD,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAqB,CAAC,EAAE;gBAClE,IAAI,CAAC,WAAW,EAAE,CAAC;aACnB;SACD,CAAC;QAyBM,+BAA0B,GAAG,CAAC,OAA2B;YAChE,IAAI,OAAO,EAAE;gBACZ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;gBACpB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,sBAA4C,CAAC;aAC3E;SACD,CAAC;QACM,wBAAmB,GAAG,CAAC,OAAwB;YACtD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;SAC9B,CAAC;QACM,sBAAiB,GAAG,CAAC,OAAwB;YACp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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.js","mappings":";;;;;;;;;;AAkBO,MAAM,wBAAwB,GAAG,CAAC,SAAoC,EAAE,KAAgC;IAC9G,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,2CAA2C,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACzJ,CAAC;;ACpBD,MAAM,QAAQ,GAAG,kwJAAkwJ,CAAC;AACpxJ,2BAAe,QAAQ;;MCcV,UAAU;;;;QA+Bd,wBAAmB,GAAG,CAAC,KAAoB;YAClD,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;gBAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACpD,CAA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MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IACjH,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,iBAAiB,GAAI,EACzE,8DAAQ,CACH,CACA,EACN;KACF;IA0BM,aAAa,CAAC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC3B;IAGM,UAAU,CAAC,KAAgC;QACjD,wBAAwB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACtC;IAGM,YAAY,CAAC,KAAoB;QACvC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1B,IAAI,KAAK;YAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;KACnC;IAEM,iBAAiB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{x as watchNumber,e as watchString,w as watchValidator}from"./prop.validators.js";var KoliBriProgressVariantEnum;!function(e){e.bar="bar",e.cycle="cycle"}(KoliBriProgressVariantEnum||(KoliBriProgressVariantEnum={}));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 progress {\n display: block;\n height: 0;\n overflow: hidden;\n width: 0;\n }\n .bar {\n width: 150px;\n }\n .bar .border {\n fill: transparent;\n stroke: black;\n }\n .bar .background {\n fill: lightgray;\n stroke: white;\n }\n .bar .progress {\n fill: #0075ff;\n stroke: transparent;\n transition: 250ms ease-in-out 50ms;\n }\n .cycle .background {\n fill: transparent;\n stroke: lightgray;\n }\n .cycle .border {\n fill: transparent;\n stroke: black;\n }\n .cycle .whitespace {\n fill: transparent;\n stroke: white;\n }\n .cycle .progress {\n fill: transparent;\n stroke: #0075ff;\n transform-origin: 50% 50%;\n transform: rotate(-90deg);\n transition: 250ms ease-in-out 50ms;\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n @media (prefers-reduced-motion) {\n .progress {\n transition-duration: 0s;\n transition-delay: 0s;\n }\n }\n}",KolProgressDefaultStyle0=defaultStyleCss,VALID_VARIANTS=Object.keys(KoliBriProgressVariantEnum),CycleSvg=({state:e})=>{const t=e._label?"57%":"50%";return h("svg",{class:"cycle",width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"}),e._label&&h("text",{"aria-hidden":"true",x:"50%",y:"43%","text-anchor":"middle",fill:"currentColor"},e._label),h("text",{"aria-hidden":"true",x:"50%",y:t,"text-anchor":"middle",fill:"currentColor"},e._value,e._unit))},BarSvg=({state:e})=>{const t="var(--kolibri-text-label-padding, 45px)",n=e._value/e._max*100;return h("div",{class:"bar"},e._label&&h("div",null,e._label),h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},h("rect",{class:"background",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(100% - 2px - ${t})`}}),h("rect",{class:"border",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",style:{width:`calc(100% - 2px - ${t})`}}),h("rect",{class:"progress",x:"2.5",y:"2.5",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${n}% - 5px - (${t} / 100 * ${n}))`}}),h("text",{"aria-hidden":"true","text-anchor":"end","dominant-baseline":"middle",fill:"currentColor",x:"100%",y:"50%"},e._value,e._unit)))},createProgressSVG=e=>{switch(e._variant){case"cycle":return h(CycleSvg,{state:e});case"bar":return h(BarSvg,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._max=void 0,this._unit="%",this._value=void 0,this._variant=void 0,this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){return h(Host,{key:"68cd1579ff9628041564e8ea5d96ff47c46b2003",class:"kol-progress"},createProgressSVG(this.state),h("progress",{key:"d2ad880345dee53c60f9cec52a2c1711a97d5a02","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{key:"e14a064412d61232f253d20f8438ac3dbb7c99c8","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},this.state._liveValue," von ",this.state._max," ",this.state._unit))}validateLabel(e){validateLabel(this,e)}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateUnit(e){watchString(this,"_unit",e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&VALID_VARIANTS.includes(e)),new Set(VALID_VARIANTS),e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.interval=setInterval((()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))}),5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:KolProgressDefaultStyle0}}},[33,"kol-progress",{_label:[1],_max:[2],_unit:[1],_value:[2],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach((e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProcess)}))}const KolProgress=KolProcess,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{x as watchNumber,e as watchString,w as watchValidator}from"./prop.validators.js";var KoliBriProgressVariantEnum;!function(e){e.bar="bar",e.cycle="cycle"}(KoliBriProgressVariantEnum||(KoliBriProgressVariantEnum={}));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 progress {\n display: block;\n height: 0;\n overflow: hidden;\n width: 0;\n }\n .bar {\n width: 150px;\n }\n .bar .border {\n fill: transparent;\n stroke: black;\n }\n .bar .background {\n fill: lightgray;\n stroke: white;\n }\n .bar .progress {\n fill: #0075ff;\n stroke: transparent;\n transition: 250ms ease-in-out 50ms;\n }\n .cycle .background {\n fill: transparent;\n stroke: lightgray;\n }\n .cycle .border {\n fill: transparent;\n stroke: black;\n }\n .cycle .whitespace {\n fill: transparent;\n stroke: white;\n }\n .cycle .progress {\n fill: transparent;\n stroke: #0075ff;\n transform-origin: 50% 50%;\n transform: rotate(-90deg);\n transition: 250ms ease-in-out 50ms;\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n @media (prefers-reduced-motion) {\n .progress {\n transition-duration: 0s;\n transition-delay: 0s;\n }\n }\n}",KolProgressDefaultStyle0=defaultStyleCss,VALID_VARIANTS=Object.keys(KoliBriProgressVariantEnum),CycleSvg=({state:e})=>{const t=e._label?"57%":"50%";return h("svg",{class:"cycle",width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"}),e._label&&h("text",{"aria-hidden":"true",x:"50%",y:"43%","text-anchor":"middle",fill:"currentColor"},e._label),h("text",{"aria-hidden":"true",x:"50%",y:t,"text-anchor":"middle",fill:"currentColor"},e._value,e._unit))},BarSvg=({state:e})=>{const t="var(--kolibri-text-label-padding, 45px)",n=e._value/e._max*100;return h("div",{class:"bar"},e._label&&h("div",null,e._label),h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},h("rect",{class:"background",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(100% - 2px - ${t})`}}),h("rect",{class:"border",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",style:{width:`calc(100% - 2px - ${t})`}}),h("rect",{class:"progress",x:"2.5",y:"2.5",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${n}% - 5px - (${t} / 100 * ${n}))`}}),h("text",{"aria-hidden":"true","text-anchor":"end","dominant-baseline":"middle",fill:"currentColor",x:"100%",y:"50%"},e._value,e._unit)))},createProgressSVG=e=>{switch(e._variant){case"cycle":return h(CycleSvg,{state:e});case"bar":return h(BarSvg,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._max=void 0,this._unit="%",this._value=void 0,this._variant=void 0,this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){return h(Host,{key:"dd9bd33793492d68c12244d65bc496b3854a5ff8",class:"kol-progress"},createProgressSVG(this.state),h("progress",{key:"11bcc7740948e6cda74526ad8941166834771cde","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{key:"6bbf5a8e7dc9ac05f7e64f5a4e67241a48aa44b2","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},this.state._liveValue," von ",this.state._max," ",this.state._unit))}validateLabel(e){validateLabel(this,e)}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateUnit(e){watchString(this,"_unit",e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&VALID_VARIANTS.includes(e)),new Set(VALID_VARIANTS),e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.interval=setInterval((()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))}),5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:KolProgressDefaultStyle0}}},[33,"kol-progress",{_label:[1],_max:[2],_unit:[1],_value:[2],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach((e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProcess)}))}const KolProgress=KolProcess,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as KolLinkTag}from"./component-names.js";import{v as validateLabel}from"./label.js";import{e as watchString,w as watchValidator}from"./prop.validators.js";import{s as showExpertSlot}from"./reuse.js";const koliBriQuoteVariantOptions=["block","inline"],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-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n cite,\n figure,\n q + figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n blockquote:before {\n content: open-quote;\n }\n blockquote::after {\n content: close-quote;\n }\n cite:before {\n content: \"—\";\n }\n .block cite:before {\n padding-right: 0.5em;\n }\n .inline cite:before {\n padding: 0.5em;\n }\n}",KolQuoteDefaultStyle0=defaultStyleCss,KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._href=void 0,this._quote=void 0,this._variant="inline",this.state={_href:"",_quote:"",_variant:"inline"}}validateLabel(e){validateLabel(this,e)}validateHref(e){watchString(this,"_href",e,{required:!0})}validateQuote(e){watchString(this,"_quote",e,{required:!0})}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&koliBriQuoteVariantOptions.includes(e)),new Set(koliBriQuoteVariantOptions),e)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const e=showExpertSlot(this.state._quote);return h(Host,{key:"2487e0efcc0b7eb36a0b22096be4c15eed465441",class:"kol-quote"},h("figure",{key:"de65c394fd574f4366f1db40bf1ca1b084336e4f",class:{[this.state._variant]:!0}},"block"===this.state._variant?h("blockquote",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))):h("q",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",{key:"28f5771809da69cf3069d2e71efb958e390721d7"},h("cite",{key:"82927cf5f9cb3360963061a7e7fe999b5d69c0a9"},h(KolLinkTag,{key:"be75f2b39937cd74ff353abc353ad5e640279449",_href:this.state._href,_label:this.state._label,_target:"_blank"})))))}static get watchers(){return{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}}static get style(){return{default:KolQuoteDefaultStyle0}}},[33,"kol-quote",{_label:[1],_href:[1],_quote:[1],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-quote"].forEach((e=>{if("kol-quote"===e)customElements.get(e)||customElements.define(e,KolQuote$1)}))}const KolQuote=KolQuote$1,defineCustomElement=defineCustomElement$1;export{KolQuote,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as KolLinkTag}from"./component-names.js";import{v as validateLabel}from"./label.js";import{e as watchString,w as watchValidator}from"./prop.validators.js";import{s as showExpertSlot}from"./reuse.js";const koliBriQuoteVariantOptions=["block","inline"],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-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n cite,\n figure,\n q + figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n blockquote:before {\n content: open-quote;\n }\n blockquote::after {\n content: close-quote;\n }\n cite:before {\n content: \"—\";\n }\n .block cite:before {\n padding-right: 0.5em;\n }\n .inline cite:before {\n padding: 0.5em;\n }\n}",KolQuoteDefaultStyle0=defaultStyleCss,KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._href=void 0,this._quote=void 0,this._variant="inline",this.state={_href:"",_quote:"",_variant:"inline"}}validateLabel(e){validateLabel(this,e)}validateHref(e){watchString(this,"_href",e,{required:!0})}validateQuote(e){watchString(this,"_quote",e,{required:!0})}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&koliBriQuoteVariantOptions.includes(e)),new Set(koliBriQuoteVariantOptions),e)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const e=showExpertSlot(this.state._quote);return h(Host,{key:"08232b44e1ee7d5f3acfc4fcd846fa85a9731b0f",class:"kol-quote"},h("figure",{key:"23b315c6c5b6ca342fa0c88b08c8d335ffb032d6",class:{[this.state._variant]:!0}},"block"===this.state._variant?h("blockquote",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))):h("q",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",{key:"5c5b876fb1ec7230f478e3283e056ae72dfba220"},h("cite",{key:"b264ba94846f2b895d6d400b7d4f642445111cbf"},h(KolLinkTag,{key:"b32b9d1716549f5a3b3d9b96ac74e534eb03cf60",_href:this.state._href,_label:this.state._label,_target:"_blank"})))))}static get watchers(){return{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}}static get style(){return{default:KolQuoteDefaultStyle0}}},[33,"kol-quote",{_label:[1],_href:[1],_quote:[1],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-quote"].forEach((e=>{if("kol-quote"===e)customElements.get(e)||customElements.define(e,KolQuote$1)}))}const KolQuote=KolQuote$1,defineCustomElement=defineCustomElement$1;export{KolQuote,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{n as nonce}from"./dev.utils2.js";import{t as tryToDispatchKoliBriEvent,s as stopPropagation}from"./events.js";import{g as getRenderStates}from"./controller2.js";import{I as InternalUnderlinedAccessKey}from"./InternalUnderlinedAccessKey.js";import{I as InputIconController}from"./controller-icon.js";import{f as fillKeyOptionMap,v as validateOptionsWithOptgroup}from"./controller3.js";import{v as validateRows}from"./rows.js";import{c as watchBoolean,k as watchJsonArrayString}from"./prop.validators.js";import{k as KolInputWcTag}from"./component-names.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{s as showExpertSlot}from"./reuse.js";class SelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find((t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options))),this.filterValuesInOptions=(e,t)=>e.filter((e=>void 0!==this.isValueInOptions(e,t))),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(n)&&n.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,n);const e=t.has("_value")?t.get("_value"):this.component.state._value,i=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],n);!1===this.component._multiple&&0===i.length?t.set("_value",[n[0].value]):Array.isArray(e)&&i.length<e.length&&t.set("_value",i)}},this.component=e}validateOptions(e){validateOptionsWithOptgroup(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){watchBoolean(this.component,"_multiple",e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateValue(e){watchJsonArrayString(this.component,"_value",(()=>!0),e,void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n/*\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: block;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolSelectDefaultStyle0=defaultStyleCss,isSelected=(e,t)=>Array.isArray(e)&&e.includes(t),KolSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this.state._value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}renderOptgroup(e,t){var n;return h("optgroup",{disabled:e.disabled,label:e.label},null===(n=e.options)||void 0===n?void 0:n.map(((e,n)=>{const i=`${t}-${n}`;return Array.isArray(e.options)?this.renderOptgroup(e,i):h("option",{disabled:e.disabled,key:i,selected:isSelected(this.state._value,e.value),value:i},e.label)})))}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"a3af086496c39dca6be776f6581a50430965119e",class:{"kol-select":!0,"has-value":this.state._hasValue}},h(KolInputWcTag,{key:"5cd2a72c6ceb62c5a5dc75ad554682dd19d0b8b3",class:{"hide-label":!!this.state._hideLabel,select:!0},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_msg:this.state._msg,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"e8bd7c009018ea5fedc26608430e4676ac120860",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{key:"f4b2b7793efdb7db986f2e0ba14fd0b05ed40502",slot:"input"},h("form",{key:"e6da4dc84e269a0721f205d859b0e6c688f5f135",onSubmit:e=>{e.preventDefault(),propagateSubmitEventToForm({form:this.host,ref:this.selectRef})}},h("input",{key:"1066dee3013b6c3b4d5ef8196dc2e1e142b473b2",type:"submit",hidden:!0}),h("select",Object.assign({key:"9a8db7a694b0570e14a85b15d1f68725a4d4ac0c",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,size:this.state._rows,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this)}),this.state._options.map(((e,t)=>{const n=`-${t}`;return Array.isArray(e.options)?this.renderOptgroup(e,n):h("option",{disabled:e.disabled,key:n,selected:isSelected(this.state._value,e.value),value:n},e.label)})))))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.selectRef=e},this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._options=void 0,this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.controller=new SelectController(this,"select",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}onInput(e){var t,n,i;this._value=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter((e=>!0===e.selected)).map((e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value})),tryToDispatchKoliBriEvent("input",this.host,this._value),null===(i=null===(n=this.state._on)||void 0===n?void 0:n.onInput)||void 0===i||i.call(n,e,this._value)}onChange(e){var t,n;stopPropagation(e),tryToDispatchKoliBriEvent("change",this.host,this._value),this.controller.setFormAssociatedValue(this._value),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onChange)||void 0===n||n.call(t,e,this._value)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolSelectDefaultStyle0}}},[33,"kol-select",{_accessKey:[1,"_access-key"],_alert:[1540],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[16],_multiple:[4],_name:[1],_on:[16],_options:[1],_required:[4],_rows:[2],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1025],state:[32],getValue:[64],focus:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-select"].forEach((e=>{if("kol-select"===e)customElements.get(e)||customElements.define(e,KolSelect$1)}))}const KolSelect=KolSelect$1,defineCustomElement=defineCustomElement$1;export{KolSelect,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{n as nonce}from"./dev.utils2.js";import{t as tryToDispatchKoliBriEvent,s as stopPropagation}from"./events.js";import{g as getRenderStates}from"./controller2.js";import{I as InternalUnderlinedAccessKey}from"./InternalUnderlinedAccessKey.js";import{I as InputIconController}from"./controller-icon.js";import{f as fillKeyOptionMap,v as validateOptionsWithOptgroup}from"./controller3.js";import{v as validateRows}from"./rows.js";import{c as watchBoolean,k as watchJsonArrayString}from"./prop.validators.js";import{k as KolInputWcTag}from"./component-names.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{s as showExpertSlot}from"./reuse.js";class SelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find((t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options))),this.filterValuesInOptions=(e,t)=>e.filter((e=>void 0!==this.isValueInOptions(e,t))),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(n)&&n.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,n);const e=t.has("_value")?t.get("_value"):this.component.state._value,i=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],n);!1===this.component._multiple&&0===i.length?t.set("_value",[n[0].value]):Array.isArray(e)&&i.length<e.length&&t.set("_value",i)}},this.component=e}validateOptions(e){validateOptionsWithOptgroup(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){watchBoolean(this.component,"_multiple",e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){watchBoolean(this.component,"_required",e)}validateRows(e){validateRows(this.component,e)}validateValue(e){watchJsonArrayString(this.component,"_value",(()=>!0),e,void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n/*\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: block;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolSelectDefaultStyle0=defaultStyleCss,isSelected=(e,t)=>Array.isArray(e)&&e.includes(t),KolSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this.state._value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}renderOptgroup(e,t){var n;return h("optgroup",{disabled:e.disabled,label:e.label},null===(n=e.options)||void 0===n?void 0:n.map(((e,n)=>{const i=`${t}-${n}`;return Array.isArray(e.options)?this.renderOptgroup(e,i):h("option",{disabled:e.disabled,key:i,selected:isSelected(this.state._value,e.value),value:i},e.label)})))}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"5c65d97077bdf5a3d3464e1e99b1250ee73f5854",class:{"kol-select":!0,"has-value":this.state._hasValue}},h(KolInputWcTag,{key:"a25c65cad1afdb4af663dc4f1f1d59953cb5541d",class:{"hide-label":!!this.state._hideLabel,select:!0},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_msg:this.state._msg,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"e17163aa892c06a4cb4cc436646a9a6987426ba4",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{key:"6bb946f289f25dfb3eae4d59d090d6d087f90cce",slot:"input"},h("form",{key:"3779103b74a973a67e5c20f0882a78c3c0a84a01",onSubmit:e=>{e.preventDefault(),propagateSubmitEventToForm({form:this.host,ref:this.selectRef})}},h("input",{key:"77a378acca5561f63e8ae062e0de4e068fd50b96",type:"submit",hidden:!0}),h("select",Object.assign({key:"89d75cef3db8e79fdb8a29948a23b88c4225eac5",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,size:this.state._rows,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this)}),this.state._options.map(((e,t)=>{const n=`-${t}`;return Array.isArray(e.options)?this.renderOptgroup(e,n):h("option",{disabled:e.disabled,key:n,selected:isSelected(this.state._value,e.value),value:n},e.label)})))))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.selectRef=e},this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._options=void 0,this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.controller=new SelectController(this,"select",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}onInput(e){var t,n,i;this._value=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter((e=>!0===e.selected)).map((e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value})),tryToDispatchKoliBriEvent("input",this.host,this._value),null===(i=null===(n=this.state._on)||void 0===n?void 0:n.onInput)||void 0===i||i.call(n,e,this._value)}onChange(e){var t,n;stopPropagation(e),tryToDispatchKoliBriEvent("change",this.host,this._value),this.controller.setFormAssociatedValue(this._value),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onChange)||void 0===n||n.call(t,e,this._value)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolSelectDefaultStyle0}}},[33,"kol-select",{_accessKey:[1,"_access-key"],_alert:[1540],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[16],_multiple:[4],_name:[1],_on:[16],_options:[1],_required:[4],_rows:[2],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1025],state:[32],getValue:[64],focus:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-select"].forEach((e=>{if("kol-select"===e)customElements.get(e)||customElements.define(e,KolSelect$1)}))}const KolSelect=KolSelect$1,defineCustomElement=defineCustomElement$1;export{KolSelect,defineCustomElement};