@public-ui/components 1.6.0-rc.4 → 1.6.0-rc.5

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 (445) hide show
  1. package/custom-elements.json +6 -6
  2. package/dist/cjs/button-link-153007e8.js.map +1 -1
  3. package/dist/cjs/{controller-1b763c05.js → controller-0ad98a73.js} +1 -1
  4. package/dist/cjs/{controller-1b763c05.js.map → controller-0ad98a73.js.map} +1 -1
  5. package/dist/cjs/{controller-93165ab9.js → controller-1d3b3fd5.js} +1 -1
  6. package/dist/cjs/{controller-93165ab9.js.map → controller-1d3b3fd5.js.map} +1 -1
  7. package/dist/cjs/controller-30129612.js +4 -0
  8. package/dist/cjs/controller-30129612.js.map +1 -0
  9. package/dist/cjs/{controller-abf026e3.js → controller-bd648cb7.js} +1 -1
  10. package/dist/cjs/{controller-abf026e3.js.map → controller-bd648cb7.js.map} +1 -1
  11. package/dist/cjs/controller-d95ae8a8.js +4 -0
  12. package/dist/cjs/controller-d95ae8a8.js.map +1 -0
  13. package/dist/cjs/{controller-icon-d3ae7955.js → controller-icon-5f64efaa.js} +1 -1
  14. package/dist/cjs/{controller-icon-d3ae7955.js.map → controller-icon-5f64efaa.js.map} +1 -1
  15. package/dist/cjs/floating-ui.dom.esm-f01eaf3d.js.map +1 -1
  16. package/dist/cjs/kol-alert-wc_2.cjs.entry.js +1 -1
  17. package/dist/cjs/kol-alert-wc_2.cjs.entry.js.map +1 -1
  18. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  19. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  20. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  21. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  24. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  25. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  26. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  27. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  28. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  32. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  34. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  36. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  38. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  40. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  42. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  44. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  46. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  48. package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
  49. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  53. package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  55. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-popover.cjs.entry.js.map +1 -1
  58. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  60. package/dist/cjs/kol-quote.cjs.entry.js.map +1 -1
  61. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-span-wc.cjs.entry.js.map +1 -1
  66. package/dist/cjs/kol-span.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  68. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  70. package/dist/cjs/kol-symbol.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-table.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
  79. package/dist/cjs/kolibri.cjs.js +1 -1
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/components/aria-selected.js +1 -1
  82. package/dist/components/color.js +1 -1
  83. package/dist/components/component.js.map +1 -1
  84. package/dist/components/component12.js +1 -1
  85. package/dist/components/component12.js.map +1 -1
  86. package/dist/components/component13.js +1 -1
  87. package/dist/components/component13.js.map +1 -1
  88. package/dist/components/component14.js.map +1 -1
  89. package/dist/components/component15.js +1 -1
  90. package/dist/components/component15.js.map +1 -1
  91. package/dist/components/component2.js.map +1 -1
  92. package/dist/components/component3.js +1 -1
  93. package/dist/components/component3.js.map +1 -1
  94. package/dist/components/component4.js.map +1 -1
  95. package/dist/components/component5.js +1 -1
  96. package/dist/components/component5.js.map +1 -1
  97. package/dist/components/component6.js +1 -1
  98. package/dist/components/component7.js +1 -1
  99. package/dist/components/component7.js.map +1 -1
  100. package/dist/components/component8.js +1 -1
  101. package/dist/components/component8.js.map +1 -1
  102. package/dist/components/controller.js +1 -1
  103. package/dist/components/controller.js.map +1 -1
  104. package/dist/components/controller2.js +1 -1
  105. package/dist/components/controller4.js +1 -1
  106. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  107. package/dist/components/kol-accordion.js +1 -1
  108. package/dist/components/kol-breadcrumb.js.map +1 -1
  109. package/dist/components/kol-card.js +1 -1
  110. package/dist/components/kol-card.js.map +1 -1
  111. package/dist/components/kol-details.js +1 -1
  112. package/dist/components/kol-details.js.map +1 -1
  113. package/dist/components/kol-form.js +1 -1
  114. package/dist/components/kol-form.js.map +1 -1
  115. package/dist/components/kol-heading.js.map +1 -1
  116. package/dist/components/kol-input-checkbox.js +1 -1
  117. package/dist/components/kol-input-checkbox.js.map +1 -1
  118. package/dist/components/kol-input-color.js +1 -1
  119. package/dist/components/kol-input-color.js.map +1 -1
  120. package/dist/components/kol-input-date.js +1 -1
  121. package/dist/components/kol-input-date.js.map +1 -1
  122. package/dist/components/kol-input-email.js +1 -1
  123. package/dist/components/kol-input-email.js.map +1 -1
  124. package/dist/components/kol-input-file.js +1 -1
  125. package/dist/components/kol-input-file.js.map +1 -1
  126. package/dist/components/kol-input-number.js +1 -1
  127. package/dist/components/kol-input-number.js.map +1 -1
  128. package/dist/components/kol-input-password.js +1 -1
  129. package/dist/components/kol-input-password.js.map +1 -1
  130. package/dist/components/kol-input-range.js +1 -1
  131. package/dist/components/kol-input-range.js.map +1 -1
  132. package/dist/components/kol-input-text.js +1 -1
  133. package/dist/components/kol-input-text.js.map +1 -1
  134. package/dist/components/kol-kolibri.js +1 -1
  135. package/dist/components/kol-kolibri.js.map +1 -1
  136. package/dist/components/kol-link-group.js +1 -1
  137. package/dist/components/kol-link-group.js.map +1 -1
  138. package/dist/components/kol-logo.js.map +1 -1
  139. package/dist/components/kol-modal.js.map +1 -1
  140. package/dist/components/kol-nav.js +1 -1
  141. package/dist/components/kol-nav.js.map +1 -1
  142. package/dist/components/kol-popover.js.map +1 -1
  143. package/dist/components/kol-progress.js +1 -1
  144. package/dist/components/kol-progress.js.map +1 -1
  145. package/dist/components/kol-quote.js.map +1 -1
  146. package/dist/components/kol-skip-nav.js +1 -1
  147. package/dist/components/kol-skip-nav.js.map +1 -1
  148. package/dist/components/kol-span.js.map +1 -1
  149. package/dist/components/kol-spin.js +1 -1
  150. package/dist/components/kol-spin.js.map +1 -1
  151. package/dist/components/kol-split-button.js +1 -1
  152. package/dist/components/kol-split-button.js.map +1 -1
  153. package/dist/components/kol-symbol.js.map +1 -1
  154. package/dist/components/kol-table.js.map +1 -1
  155. package/dist/components/kol-tabs.js.map +1 -1
  156. package/dist/components/kol-textarea.js +1 -1
  157. package/dist/components/kol-textarea.js.map +1 -1
  158. package/dist/components/kol-toast.js +1 -1
  159. package/dist/components/kol-toast.js.map +1 -1
  160. package/dist/components/kol-version.js.map +1 -1
  161. package/dist/components/prop.validators.js +1 -1
  162. package/dist/components/show.js +1 -1
  163. package/dist/components/tab-index.js +1 -1
  164. package/dist/esm/button-link-283b2d32.js.map +1 -1
  165. package/dist/esm/controller-4ec2558c.js +4 -0
  166. package/dist/esm/controller-4ec2558c.js.map +1 -0
  167. package/dist/esm/{controller-5a459788.js → controller-60d1d5f4.js} +1 -1
  168. package/dist/esm/{controller-5a459788.js.map → controller-60d1d5f4.js.map} +1 -1
  169. package/dist/esm/controller-8fc78dec.js +4 -0
  170. package/dist/esm/controller-8fc78dec.js.map +1 -0
  171. package/dist/esm/{controller-cb6b97eb.js → controller-ad7fb632.js} +1 -1
  172. package/dist/esm/{controller-cb6b97eb.js.map → controller-ad7fb632.js.map} +1 -1
  173. package/dist/esm/{controller-2847846e.js → controller-e0b5fdbd.js} +1 -1
  174. package/dist/esm/{controller-2847846e.js.map → controller-e0b5fdbd.js.map} +1 -1
  175. package/dist/esm/{controller-icon-65f3377a.js → controller-icon-7e3b404f.js} +1 -1
  176. package/dist/esm/{controller-icon-65f3377a.js.map → controller-icon-7e3b404f.js.map} +1 -1
  177. package/dist/esm/floating-ui.dom.esm-2bceafa3.js.map +1 -1
  178. package/dist/esm/kol-alert-wc_2.entry.js +1 -1
  179. package/dist/esm/kol-alert-wc_2.entry.js.map +1 -1
  180. package/dist/esm/kol-badge.entry.js.map +1 -1
  181. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  182. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  183. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  184. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  185. package/dist/esm/kol-card.entry.js.map +1 -1
  186. package/dist/esm/kol-details.entry.js.map +1 -1
  187. package/dist/esm/kol-form.entry.js.map +1 -1
  188. package/dist/esm/kol-heading.entry.js.map +1 -1
  189. package/dist/esm/kol-icon.entry.js.map +1 -1
  190. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  191. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  192. package/dist/esm/kol-input-color.entry.js +1 -1
  193. package/dist/esm/kol-input-color.entry.js.map +1 -1
  194. package/dist/esm/kol-input-date.entry.js +1 -1
  195. package/dist/esm/kol-input-date.entry.js.map +1 -1
  196. package/dist/esm/kol-input-email.entry.js +1 -1
  197. package/dist/esm/kol-input-email.entry.js.map +1 -1
  198. package/dist/esm/kol-input-file.entry.js +1 -1
  199. package/dist/esm/kol-input-file.entry.js.map +1 -1
  200. package/dist/esm/kol-input-number.entry.js +1 -1
  201. package/dist/esm/kol-input-number.entry.js.map +1 -1
  202. package/dist/esm/kol-input-password.entry.js +1 -1
  203. package/dist/esm/kol-input-password.entry.js.map +1 -1
  204. package/dist/esm/kol-input-radio.entry.js +1 -1
  205. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  206. package/dist/esm/kol-input-range.entry.js +1 -1
  207. package/dist/esm/kol-input-range.entry.js.map +1 -1
  208. package/dist/esm/kol-input-text.entry.js +1 -1
  209. package/dist/esm/kol-input-text.entry.js.map +1 -1
  210. package/dist/esm/kol-kolibri.entry.js.map +1 -1
  211. package/dist/esm/kol-link-group.entry.js +1 -1
  212. package/dist/esm/kol-link-group.entry.js.map +1 -1
  213. package/dist/esm/kol-link-wc.entry.js +1 -1
  214. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  215. package/dist/esm/kol-logo.entry.js.map +1 -1
  216. package/dist/esm/kol-modal.entry.js.map +1 -1
  217. package/dist/esm/kol-nav.entry.js.map +1 -1
  218. package/dist/esm/kol-pagination.entry.js.map +1 -1
  219. package/dist/esm/kol-popover.entry.js.map +1 -1
  220. package/dist/esm/kol-progress.entry.js +1 -1
  221. package/dist/esm/kol-progress.entry.js.map +1 -1
  222. package/dist/esm/kol-quote.entry.js.map +1 -1
  223. package/dist/esm/kol-select.entry.js +1 -1
  224. package/dist/esm/kol-select.entry.js.map +1 -1
  225. package/dist/esm/kol-skip-nav.entry.js +1 -1
  226. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  227. package/dist/esm/kol-span-wc.entry.js.map +1 -1
  228. package/dist/esm/kol-span.entry.js.map +1 -1
  229. package/dist/esm/kol-spin.entry.js.map +1 -1
  230. package/dist/esm/kol-split-button.entry.js +1 -1
  231. package/dist/esm/kol-split-button.entry.js.map +1 -1
  232. package/dist/esm/kol-symbol.entry.js.map +1 -1
  233. package/dist/esm/kol-table.entry.js.map +1 -1
  234. package/dist/esm/kol-tabs.entry.js.map +1 -1
  235. package/dist/esm/kol-textarea.entry.js +1 -1
  236. package/dist/esm/kol-textarea.entry.js.map +1 -1
  237. package/dist/esm/kol-toast.entry.js +1 -1
  238. package/dist/esm/kol-toast.entry.js.map +1 -1
  239. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  240. package/dist/esm/kol-version.entry.js.map +1 -1
  241. package/dist/esm/kolibri.js +1 -1
  242. package/dist/esm/loader.js +1 -1
  243. package/dist/kolibri/button-link-283b2d32.js.map +1 -1
  244. package/dist/kolibri/controller-4ec2558c.js +4 -0
  245. package/dist/kolibri/controller-4ec2558c.js.map +1 -0
  246. package/dist/kolibri/{controller-5a459788.js → controller-60d1d5f4.js} +1 -1
  247. package/dist/kolibri/controller-8fc78dec.js +4 -0
  248. package/dist/kolibri/controller-8fc78dec.js.map +1 -0
  249. package/dist/kolibri/{controller-cb6b97eb.js → controller-ad7fb632.js} +1 -1
  250. package/dist/kolibri/controller-e0b5fdbd.js +4 -0
  251. package/dist/kolibri/controller-icon-7e3b404f.js +4 -0
  252. package/dist/kolibri/floating-ui.dom.esm-2bceafa3.js.map +1 -1
  253. package/dist/kolibri/kol-alert-wc_2.entry.js +1 -1
  254. package/dist/kolibri/kol-alert-wc_2.entry.js.map +1 -1
  255. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  256. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  257. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  258. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  259. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  260. package/dist/kolibri/kol-card.entry.js.map +1 -1
  261. package/dist/kolibri/kol-details.entry.js.map +1 -1
  262. package/dist/kolibri/kol-form.entry.js.map +1 -1
  263. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  264. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  265. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  266. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  267. package/dist/kolibri/kol-input-color.entry.js +1 -1
  268. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  269. package/dist/kolibri/kol-input-date.entry.js +1 -1
  270. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  271. package/dist/kolibri/kol-input-email.entry.js +1 -1
  272. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  273. package/dist/kolibri/kol-input-file.entry.js +1 -1
  274. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  275. package/dist/kolibri/kol-input-number.entry.js +1 -1
  276. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  277. package/dist/kolibri/kol-input-password.entry.js +1 -1
  278. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  279. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  280. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  281. package/dist/kolibri/kol-input-range.entry.js +1 -1
  282. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  283. package/dist/kolibri/kol-input-text.entry.js +1 -1
  284. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  285. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  286. package/dist/kolibri/kol-link-group.entry.js +1 -1
  287. package/dist/kolibri/kol-link-group.entry.js.map +1 -1
  288. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  289. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  290. package/dist/kolibri/kol-logo.entry.js.map +1 -1
  291. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  292. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  293. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  294. package/dist/kolibri/kol-popover.entry.js.map +1 -1
  295. package/dist/kolibri/kol-progress.entry.js +1 -1
  296. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  297. package/dist/kolibri/kol-quote.entry.js.map +1 -1
  298. package/dist/kolibri/kol-select.entry.js +1 -1
  299. package/dist/kolibri/kol-select.entry.js.map +1 -1
  300. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  301. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  302. package/dist/kolibri/kol-span-wc.entry.js.map +1 -1
  303. package/dist/kolibri/kol-span.entry.js.map +1 -1
  304. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  305. package/dist/kolibri/kol-split-button.entry.js +1 -1
  306. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  307. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  308. package/dist/kolibri/kol-table.entry.js.map +1 -1
  309. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  310. package/dist/kolibri/kol-textarea.entry.js +1 -1
  311. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  312. package/dist/kolibri/kol-toast.entry.js +1 -1
  313. package/dist/kolibri/kol-toast.entry.js.map +1 -1
  314. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  315. package/dist/kolibri/kol-version.entry.js.map +1 -1
  316. package/dist/kolibri/kolibri.esm.js +1 -1
  317. package/dist/kolibri/kolibri.esm.js.map +1 -1
  318. package/dist/types/components/@deprecated/input/types.d.ts +1 -0
  319. package/dist/types/components/badge/component.d.ts +4 -24
  320. package/dist/types/components/badge/test/html.mock.d.ts +2 -2
  321. package/dist/types/components/badge/types.d.ts +23 -0
  322. package/dist/types/components/breadcrumb/component.d.ts +3 -16
  323. package/dist/types/components/breadcrumb/test/html.mock.d.ts +2 -2
  324. package/dist/types/components/breadcrumb/types.d.ts +16 -0
  325. package/dist/types/components/card/component.d.ts +3 -16
  326. package/dist/types/components/card/test/html.mock.d.ts +2 -2
  327. package/dist/types/components/card/types.d.ts +16 -0
  328. package/dist/types/components/details/component.d.ts +3 -14
  329. package/dist/types/components/details/test/html.mock.d.ts +2 -2
  330. package/dist/types/components/details/types.d.ts +13 -0
  331. package/dist/types/components/form/component.d.ts +3 -19
  332. package/dist/types/components/form/test/html.mock.d.ts +2 -2
  333. package/dist/types/components/form/types.d.ts +18 -0
  334. package/dist/types/components/heading/component.d.ts +3 -20
  335. package/dist/types/components/heading/shadow.d.ts +2 -2
  336. package/dist/types/components/heading/test/html.mock.d.ts +3 -3
  337. package/dist/types/components/heading/types.d.ts +20 -0
  338. package/dist/types/components/icon/component.d.ts +3 -15
  339. package/dist/types/components/icon/test/html.mock.d.ts +2 -2
  340. package/dist/types/components/icon/types.d.ts +14 -0
  341. package/dist/types/components/input/component.d.ts +1 -0
  342. package/dist/types/components/input/types.d.ts +2 -0
  343. package/dist/types/components/input-adapter-leanup/controller.d.ts +2 -0
  344. package/dist/types/components/input-adapter-leanup/types.d.ts +1 -0
  345. package/dist/types/components/input-checkbox/component.d.ts +2 -0
  346. package/dist/types/components/input-checkbox/types.d.ts +1 -0
  347. package/dist/types/components/input-color/component.d.ts +2 -0
  348. package/dist/types/components/input-color/types.d.ts +1 -0
  349. package/dist/types/components/input-date/component.d.ts +2 -0
  350. package/dist/types/components/input-date/types.d.ts +1 -0
  351. package/dist/types/components/input-email/component.d.ts +2 -0
  352. package/dist/types/components/input-email/types.d.ts +1 -0
  353. package/dist/types/components/input-file/component.d.ts +2 -0
  354. package/dist/types/components/input-file/types.d.ts +1 -0
  355. package/dist/types/components/input-number/component.d.ts +2 -0
  356. package/dist/types/components/input-number/types.d.ts +1 -0
  357. package/dist/types/components/input-password/component.d.ts +2 -0
  358. package/dist/types/components/input-password/types.d.ts +1 -0
  359. package/dist/types/components/input-radio/component.d.ts +2 -0
  360. package/dist/types/components/input-radio/types.d.ts +1 -0
  361. package/dist/types/components/input-range/component.d.ts +2 -0
  362. package/dist/types/components/input-range/types.d.ts +1 -0
  363. package/dist/types/components/input-text/component.d.ts +2 -0
  364. package/dist/types/components/input-text/types.d.ts +1 -0
  365. package/dist/types/components/kolibri/component.d.ts +3 -21
  366. package/dist/types/components/kolibri/types.d.ts +21 -0
  367. package/dist/types/components/link/component.d.ts +2 -3
  368. package/dist/types/components/link-group/component.d.ts +3 -28
  369. package/dist/types/components/link-group/types.d.ts +28 -0
  370. package/dist/types/components/logo/component.d.ts +3 -13
  371. package/dist/types/components/logo/types.d.ts +13 -0
  372. package/dist/types/components/modal/component.d.ts +3 -19
  373. package/dist/types/components/modal/types.d.ts +19 -0
  374. package/dist/types/components/nav/component.d.ts +4 -25
  375. package/dist/types/components/nav/types.d.ts +25 -0
  376. package/dist/types/components/pagination/component.d.ts +4 -40
  377. package/dist/types/components/pagination/types.d.ts +39 -0
  378. package/dist/types/components/popover/component.d.ts +4 -14
  379. package/dist/types/components/popover/test/html.mock.d.ts +2 -2
  380. package/dist/types/components/popover/types.d.ts +12 -0
  381. package/dist/types/components/progress/component.d.ts +3 -22
  382. package/dist/types/components/progress/types.d.ts +22 -0
  383. package/dist/types/components/quote/shadow.d.ts +3 -3
  384. package/dist/types/components/quote/test/html.mock.d.ts +2 -2
  385. package/dist/types/components/quote/types.d.ts +3 -3
  386. package/dist/types/components/select/component.d.ts +2 -0
  387. package/dist/types/components/select/types.d.ts +1 -0
  388. package/dist/types/components/skip-nav/component.d.ts +3 -15
  389. package/dist/types/components/skip-nav/types.d.ts +15 -0
  390. package/dist/types/components/span/component.d.ts +4 -27
  391. package/dist/types/components/span/shadow.d.ts +2 -2
  392. package/dist/types/components/span/test/html.mock.d.ts +3 -3
  393. package/dist/types/components/span/types.d.ts +27 -0
  394. package/dist/types/components/spin/component.d.ts +4 -12
  395. package/dist/types/components/spin/test/html.mock.d.ts +2 -2
  396. package/dist/types/components/spin/types.d.ts +11 -0
  397. package/dist/types/components/split-button/component.d.ts +3 -3
  398. package/dist/types/components/split-button/types.d.ts +2 -2
  399. package/dist/types/components/symbol/component.d.ts +3 -13
  400. package/dist/types/components/symbol/test/html.mock.d.ts +2 -2
  401. package/dist/types/components/symbol/types.d.ts +12 -0
  402. package/dist/types/components/table/component.d.ts +7 -32
  403. package/dist/types/components/table/types.d.ts +65 -0
  404. package/dist/types/components/tabs/component.d.ts +4 -45
  405. package/dist/types/components/tabs/types.d.ts +44 -0
  406. package/dist/types/components/textarea/component.d.ts +2 -0
  407. package/dist/types/components/textarea/types.d.ts +1 -0
  408. package/dist/types/components/toast/component.d.ts +3 -18
  409. package/dist/types/components/toast/test/html.mock.d.ts +2 -2
  410. package/dist/types/components/toast/types.d.ts +18 -0
  411. package/dist/types/components/tooltip/component.d.ts +3 -15
  412. package/dist/types/components/tooltip/test/html.mock.d.ts +2 -2
  413. package/dist/types/components/tooltip/types.d.ts +15 -0
  414. package/dist/types/components/version/component.d.ts +3 -12
  415. package/dist/types/components/version/test/html.mock.d.ts +2 -2
  416. package/dist/types/components/version/types.d.ts +11 -0
  417. package/dist/types/components.d.ts +66 -16
  418. package/dist/types/core/declare.d.ts +10 -0
  419. package/dist/types/i18n.d.ts +1 -1
  420. package/dist/types/types/button-link.d.ts +3 -2
  421. package/doc/icon-font-awesome.md +1 -1
  422. package/doc/icon-icofont.md +1 -1
  423. package/doc/table.md +3 -3
  424. package/jest-test-results.json +1 -1
  425. package/package.json +1 -1
  426. package/vscode-custom-data.json +12 -12
  427. package/dist/cjs/controller-31f22d30.js +0 -4
  428. package/dist/cjs/controller-31f22d30.js.map +0 -1
  429. package/dist/cjs/controller-77a2ce9f.js +0 -4
  430. package/dist/cjs/controller-77a2ce9f.js.map +0 -1
  431. package/dist/esm/controller-cad0ac5e.js +0 -4
  432. package/dist/esm/controller-cad0ac5e.js.map +0 -1
  433. package/dist/esm/controller-cc18d25f.js +0 -4
  434. package/dist/esm/controller-cc18d25f.js.map +0 -1
  435. package/dist/kolibri/controller-2847846e.js +0 -4
  436. package/dist/kolibri/controller-cad0ac5e.js +0 -4
  437. package/dist/kolibri/controller-cad0ac5e.js.map +0 -1
  438. package/dist/kolibri/controller-cc18d25f.js +0 -4
  439. package/dist/kolibri/controller-cc18d25f.js.map +0 -1
  440. package/dist/kolibri/controller-icon-65f3377a.js +0 -4
  441. package/dist/types/types/table.d.ts +0 -37
  442. /package/dist/kolibri/{controller-5a459788.js.map → controller-60d1d5f4.js.map} +0 -0
  443. /package/dist/kolibri/{controller-cb6b97eb.js.map → controller-ad7fb632.js.map} +0 -0
  444. /package/dist/kolibri/{controller-2847846e.js.map → controller-e0b5fdbd.js.map} +0 -0
  445. /package/dist/kolibri/{controller-icon-65f3377a.js.map → controller-icon-7e3b404f.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{l as watchBoolean,w as watchString,m as featureHint,q as setState,C as watchNumber,a as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$5}from"./component4.js";import{d as defineCustomElement$8}from"./shadow.js";import{d as defineCustomElement$7}from"./component6.js";import{d as defineCustomElement$6}from"./component5.js";import{d as defineCustomElement$4}from"./component2.js";import{d as defineCustomElement$3}from"./component3.js";import{d as defineCustomElement$2}from"./component.js";import{v as validateShow}from"./show.js";const validateHasCloser=(t,e)=>{watchBoolean(t,"_hasCloser",e)},defaultStyleCss=":host{--a11y-min-size:44px;font-size:inherit}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:block}:host>div{background-color:#fff;height:0;left:0;position:fixed;top:0;width:100%;z-index:200}:host>div>kol-alert{display:block;margin:auto;max-width:750px}:host>div>kol-button-wc{display:block;margin:auto;position:relative;top:0;width:1em}",KolToast$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.handleShowAndDuration=()=>{!0===this.state._show&&"number"==typeof this.state._showDuration&&this.state._showDuration>=0&&(clearTimeout(this.durationTimeout),this.durationTimeout=setTimeout((()=>{this.close()}),this.state._showDuration))},this.close=()=>{var t;this._show=!1,this.state=Object.assign(Object.assign({},this.state),{_show:!1}),void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClose:this.close},this._alert=!0,this._hasCloser=!1,this._heading="",this._level=1,this._on=void 0,this._show=!0,this._showDuration=1e4,this._type="default",this.state={_alert:!0,_level:1,_show:!0}}validateAlert(t){watchBoolean(this,"_alert",t)}validateHasCloser(t){validateHasCloser(this,t)}validateHeading(t){watchString(this,"_heading",t)}validateLevel(t){watchHeadingLevel(this,t)}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolToast] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onClose&&!0!==t.onClose||(e.onClose=t.onClose),setState(this,"_on",e)}}validateShow(t){validateShow(this,t,{hooks:{afterPatch:this.handleShowAndDuration}})}validateShowDuration(t){watchNumber(this,"_showDuration",t,{hooks:{afterPatch:this.handleShowAndDuration}})}validateType(t){watchValidator(this,"_type",(t=>"string"==typeof t&&("default"===t||"error"===t||"info"===t||"success"===t||"warning"===t)),new Set("String {success, info, warning, error}"),t)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateHeading(this._heading),this.validateLevel(this._level),this.validateOn(this._on),this.validateShow(this._show),this.validateShowDuration(this._showDuration),this.validateType(this._type)}render(){return h(Host,null,this.state._show&&h("div",null,h("kol-alert",{_alert:this.state._alert,_heading:this.state._heading,_level:this.state._level,_hasCloser:this.state._hasCloser,_type:this.state._type,_variant:"card",_on:this.on},h("slot",null))))}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_heading:["validateHeading"],_level:["validateLevel"],_on:["validateOn"],_show:["validateShow"],_showDuration:["validateShowDuration"],_type:["validateType"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-toast",{_alert:[516],_hasCloser:[516,"_has-closer"],_heading:[1],_level:[2],_on:[16],_show:[1540],_showDuration:[2,"_show-duration"],_type:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-toast":customElements.get(t)||customElements.define(t,KolToast$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$8();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-icon":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolToast=KolToast$1,defineCustomElement=defineCustomElement$1;export{KolToast,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{j as watchBoolean,w as watchString,q as setState,C as watchNumber,a as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$5}from"./component4.js";import{d as defineCustomElement$8}from"./shadow.js";import{d as defineCustomElement$7}from"./component6.js";import{d as defineCustomElement$6}from"./component5.js";import{d as defineCustomElement$4}from"./component2.js";import{d as defineCustomElement$3}from"./component3.js";import{d as defineCustomElement$2}from"./component.js";import{v as validateShow}from"./show.js";const validateHasCloser=(t,e)=>{watchBoolean(t,"_hasCloser",e)},defaultStyleCss=":host{--a11y-min-size:44px;font-size:inherit}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:block}:host>div{background-color:#fff;height:0;left:0;position:fixed;top:0;width:100%;z-index:200}:host>div>kol-alert{display:block;margin:auto;max-width:750px}:host>div>kol-button-wc{display:block;margin:auto;position:relative;top:0;width:1em}",KolToast$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.handleShowAndDuration=()=>{!0===this.state._show&&"number"==typeof this.state._showDuration&&this.state._showDuration>=0&&(clearTimeout(this.durationTimeout),this.durationTimeout=setTimeout((()=>{this.close()}),this.state._showDuration))},this.close=()=>{var t;this._show=!1,this.state=Object.assign(Object.assign({},this.state),{_show:!1}),void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClose:this.close},this._alert=!0,this._hasCloser=!1,this._heading="",this._level=1,this._on=void 0,this._show=!0,this._showDuration=1e4,this._type="default",this.state={_alert:!0,_level:1,_show:!0}}validateAlert(t){watchBoolean(this,"_alert",t)}validateHasCloser(t){validateHasCloser(this,t)}validateHeading(t){watchString(this,"_heading",t)}validateLevel(t){watchHeadingLevel(this,t)}validateOn(t){"object"!=typeof t||"function"!=typeof(null==t?void 0:t.onClose)&&!0!==t.onClose||setState(this,"_on",{onClose:t.onClose})}validateShow(t){validateShow(this,t,{hooks:{afterPatch:this.handleShowAndDuration}})}validateShowDuration(t){watchNumber(this,"_showDuration",t,{hooks:{afterPatch:this.handleShowAndDuration}})}validateType(t){watchValidator(this,"_type",(t=>"string"==typeof t&&("default"===t||"error"===t||"info"===t||"success"===t||"warning"===t)),new Set("String {success, info, warning, error}"),t)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateHeading(this._heading),this.validateLevel(this._level),this.validateOn(this._on),this.validateShow(this._show),this.validateShowDuration(this._showDuration),this.validateType(this._type)}render(){return h(Host,null,this.state._show&&h("div",null,h("kol-alert",{_alert:this.state._alert,_heading:this.state._heading,_level:this.state._level,_hasCloser:this.state._hasCloser,_type:this.state._type,_variant:"card",_on:this.on},h("slot",null))))}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_heading:["validateHeading"],_level:["validateLevel"],_on:["validateOn"],_show:["validateShow"],_showDuration:["validateShowDuration"],_type:["validateType"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-toast",{_alert:[516],_hasCloser:[516,"_has-closer"],_heading:[1],_level:[2],_on:[16],_show:[1540],_showDuration:[2,"_show-duration"],_type:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-toast":customElements.get(t)||customElements.define(t,KolToast$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$8();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-icon":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolToast=KolToast$1,defineCustomElement=defineCustomElement$1;export{KolToast,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-toast.js","mappings":";;;;;;;;;;;;;;AAeO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAe;EACtF,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;;ACjBD,MAAM,eAAe,GAAG,w7BAAw7B;;MCqCn8BA,UAAQ;;;;;IAqHH,0BAAqB,GAAG;MACxC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK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AAG,CAAC,CAAC;IAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC9B;EA6BM,MAAM;IACZ,QACC,EAAC,IAAI,QACH,IAAI,CAAC,KAAK,CAAC,KAAK,KAChB,eACC,iBACC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAC,MAAM,EAEf,GAAG,EAAE,IAAI,CAAC,EAAE,IAEZ,eAAQ,CACG,CACP,CACN,CACK,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolToast"],"sources":["./src/types/props/has-closer.ts","./src/components/toast/style.css?tag=kol-toast&mode=default&encapsulation=shadow","./src/components/toast/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Markiert dieses Element als geöffnet, oder dass das verknüpfte Element (aria-controls/aria-owns) geöffnet ist.\n */\n/** en\n * Marks this element as open/expanded, or that the connected element (aria-controls/aria-owns) is open/expanded.\n */\nexport type PropHasCloser = {\n\thasCloser: boolean;\n};\n\n/* validator */\nexport const validateHasCloser = (component: Generic.Element.Component, value?: boolean): void => {\n\twatchBoolean(component, '_hasCloser', value);\n};\n","@import url(../style.css);\n@import url(../host-display-block.css);\n:host > div {\n\tbackground-color: #fff;\n\t/* needed for overlay situations */\n\theight: 0;\n\tleft: 0;\n\tposition: fixed;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 200;\n}\n:host > div > kol-alert {\n\tdisplay: block;\n\tmargin: auto;\n\tmax-width: 750px;\n}\n:host > div > kol-button-wc {\n\tdisplay: block;\n\tmargin: auto;\n\tposition: relative;\n\ttop: 0;\n\twidth: 1em;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { AlertType } from '../alert/types';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { setState, watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { KoliBriToastEventCallbacks } from '../../types/toast';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { PropHasCloser, PropShow, validateHasCloser, validateShow } from '../../types/props';\n\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\talert: boolean;\n\theading: string;\n\tlevel: HeadingLevel;\n\ton: KoliBriToastEventCallbacks;\n\tshowDuration: number;\n\ttype: AlertType;\n} & PropHasCloser &\n\tPropShow;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n/**\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-toast',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolToast implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt an, ob der Screenreader die Meldung aktiv vorlesen soll.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob die Komponente einen Schließen-Schalter hat.\n\t */\n\t@Prop({ reflect: true }) public _hasCloser?: boolean = false;\n\n\t/**\n\t * Gibt die Beschriftung der Komponente an.\n\t */\n\t@Prop() public _heading?: string = '';\n\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder bei 0, ob es keine Überschrift ist und als fett gedruckter Text angezeigt werden soll.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Toasts an.\n\t */\n\t@Prop() public _on?: KoliBriToastEventCallbacks;\n\n\t/**\n\t * Gibt an, ob die Komponente entweder ein- oder ausgeblendet ist.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = true;\n\n\t/**\n\t * Gibt an, wie viele Millisekunden der Toast eingeblendet werden soll.\n\t */\n\t@Prop() public _showDuration?: number = 10000;\n\n\t/**\n\t * Setzt den Typ der Komponente oder des interaktiven Elements in der Komponente an.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t@State() public state: States = {\n\t\t_alert: true,\n\t\t_level: 1,\n\t\t_show: true,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: boolean): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriToastEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolToast] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriToastEventCallbacks = {};\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<KoliBriToastEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\tvalidateShow(this, value, { hooks: { afterPatch: this.handleShowAndDuration } });\n\t}\n\n\t@Watch('_showDuration')\n\tpublic validateShowDuration(value?: number): void {\n\t\twatchNumber(this, '_showDuration', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleShowAndDuration,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value) => typeof value === 'string' && (value === 'default' || value === 'error' || value === 'info' || value === 'success' || value === 'warning'),\n\t\t\tnew Set('String {success, info, warning, error}'),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateShow(this._show);\n\t\tthis.validateShowDuration(this._showDuration);\n\t\tthis.validateType(this._type);\n\t}\n\n\tprivate durationTimeout?: NodeJS.Timer;\n\n\tprivate readonly handleShowAndDuration = () => {\n\t\tif (this.state._show === true && typeof this.state._showDuration === 'number' && this.state._showDuration >= 0) {\n\t\t\tclearTimeout(this.durationTimeout as NodeJS.Timer);\n\t\t\tthis.durationTimeout = setTimeout(() => {\n\t\t\t\tthis.close();\n\t\t\t}, this.state._showDuration);\n\t\t}\n\t};\n\n\tprivate readonly close = () => {\n\t\tthis._show = false;\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_show: false,\n\t\t};\n\n\t\tif (this._on?.onClose !== undefined) {\n\t\t\tthis._on.onClose(new Event('Close'));\n\t\t}\n\t};\n\n\tprivate readonly on = {\n\t\tonClose: this.close,\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t\t\t_heading={this.state._heading}\n\t\t\t\t\t\t\t_level={this.state._level}\n\t\t\t\t\t\t\t_hasCloser={this.state._hasCloser}\n\t\t\t\t\t\t\t_type={this.state._type}\n\t\t\t\t\t\t\t_variant=\"card\"\n\t\t\t\t\t\t\t// tabindex=\"0\"\n\t\t\t\t\t\t\t_on={this.on}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</kol-alert>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-toast.js","mappings":";;;;;;;;;;;;;;AAeO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAe;EACtF,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;;ACjBD,MAAM,eAAe,GAAG,w7BAAw7B;;MCoBn8BA,UAAQ;;;;;IAgHH,0BAAqB,GAAG;MACxC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,EAAE;QAC/G,YAAY,CAAC,IAAI,CAAC,eAA+B,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC;UACjC,IAAI,CAAC,KAAK,EAAE,CAAC;SACb,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;OAC7B;KACD,CAAC;IAEe,UAAK,GAAG;;MACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;MACnB,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,KAAK,EAAE,KAAK,GACZ,CAAC;MAEF,IAAI,CAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,EA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AAQ,EAAC,MAAM,EAEf,GAAG,EAAE,IAAI,CAAC,EAAE,IAEZ,eAAQ,CACG,CACP,CACN,CACK,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolToast"],"sources":["./src/types/props/has-closer.ts","./src/components/toast/style.css?tag=kol-toast&mode=default&encapsulation=shadow","./src/components/toast/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Markiert dieses Element als geöffnet, oder dass das verknüpfte Element (aria-controls/aria-owns) geöffnet ist.\n */\n/** en\n * Marks this element as open/expanded, or that the connected element (aria-controls/aria-owns) is open/expanded.\n */\nexport type PropHasCloser = {\n\thasCloser: boolean;\n};\n\n/* validator */\nexport const validateHasCloser = (component: Generic.Element.Component, value?: boolean): void => {\n\twatchBoolean(component, '_hasCloser', value);\n};\n","@import url(../style.css);\n@import url(../host-display-block.css);\n:host > div {\n\tbackground-color: #fff;\n\t/* needed for overlay situations */\n\theight: 0;\n\tleft: 0;\n\tposition: fixed;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 200;\n}\n:host > div > kol-alert {\n\tdisplay: block;\n\tmargin: auto;\n\tmax-width: 750px;\n}\n:host > div > kol-button-wc {\n\tdisplay: block;\n\tmargin: auto;\n\tposition: relative;\n\ttop: 0;\n\twidth: 1em;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { AlertType } from '../alert/types';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { setState, watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { KoliBriToastEventCallbacks } from '../../types/toast';\nimport { validateHasCloser, validateShow } from '../../types/props';\nimport { KoliBriToastAPI, KoliBriToastStates } from './types';\n\n/**\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-toast',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolToast implements KoliBriToastAPI {\n\t/**\n\t * Gibt an, ob der Screenreader die Meldung aktiv vorlesen soll.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob die Komponente einen Schließen-Schalter hat.\n\t */\n\t@Prop({ reflect: true }) public _hasCloser?: boolean = false;\n\n\t/**\n\t * Gibt die Beschriftung der Komponente an.\n\t */\n\t@Prop() public _heading?: string = '';\n\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder bei 0, ob es keine Überschrift ist und als fett gedruckter Text angezeigt werden soll.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Toasts an.\n\t */\n\t@Prop() public _on?: KoliBriToastEventCallbacks;\n\n\t/**\n\t * Gibt an, ob die Komponente entweder ein- oder ausgeblendet ist.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = true;\n\n\t/**\n\t * Gibt an, wie viele Millisekunden der Toast eingeblendet werden soll.\n\t */\n\t@Prop() public _showDuration?: number = 10000;\n\n\t/**\n\t * Setzt den Typ der Komponente oder des interaktiven Elements in der Komponente an.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t@State() public state: KoliBriToastStates = {\n\t\t_alert: true,\n\t\t_level: 1,\n\t\t_show: true,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: boolean): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriToastEventCallbacks): void {\n\t\tif (typeof value === 'object' && (typeof value?.onClose === 'function' || value.onClose === true)) {\n\t\t\tsetState<KoliBriToastEventCallbacks>(this, '_on', { onClose: value.onClose });\n\t\t}\n\t}\n\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\tvalidateShow(this, value, { hooks: { afterPatch: this.handleShowAndDuration } });\n\t}\n\n\t@Watch('_showDuration')\n\tpublic validateShowDuration(value?: number): void {\n\t\twatchNumber(this, '_showDuration', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleShowAndDuration,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value) => typeof value === 'string' && (value === 'default' || value === 'error' || value === 'info' || value === 'success' || value === 'warning'),\n\t\t\tnew Set('String {success, info, warning, error}'),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateShow(this._show);\n\t\tthis.validateShowDuration(this._showDuration);\n\t\tthis.validateType(this._type);\n\t}\n\n\tprivate durationTimeout?: NodeJS.Timer;\n\n\tprivate readonly handleShowAndDuration = () => {\n\t\tif (this.state._show === true && typeof this.state._showDuration === 'number' && this.state._showDuration >= 0) {\n\t\t\tclearTimeout(this.durationTimeout as NodeJS.Timer);\n\t\t\tthis.durationTimeout = setTimeout(() => {\n\t\t\t\tthis.close();\n\t\t\t}, this.state._showDuration);\n\t\t}\n\t};\n\n\tprivate readonly close = () => {\n\t\tthis._show = false;\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_show: false,\n\t\t};\n\n\t\tif (this._on?.onClose !== undefined) {\n\t\t\tthis._on.onClose(new Event('Close'));\n\t\t}\n\t};\n\n\tprivate readonly on = {\n\t\tonClose: this.close,\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t\t\t_heading={this.state._heading}\n\t\t\t\t\t\t\t_level={this.state._level}\n\t\t\t\t\t\t\t_hasCloser={this.state._hasCloser}\n\t\t\t\t\t\t\t_type={this.state._type}\n\t\t\t\t\t\t\t_variant=\"card\"\n\t\t\t\t\t\t\t// tabindex=\"0\"\n\t\t\t\t\t\t\t_on={this.on}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</kol-alert>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"kol-version.js","mappings":";;;;;;;;;;;AAyBA,IAAY,YAkBX;AAlBD,WAAY,YAAY;EACvB,mCAAqB,CAAA;EACrB,qCAAuB,CAAA;EACvB,+BAAiB,CAAA;EACjB,kCAAoB,CAAA;EACpB,sCAAwB,CAAA;EACxB,gCAAkB,CAAA;EAClB,yCAAsB,CAAA;EACtB,gCAAkB,CAAA;EAClB,2CAAwB,CAAA;EACxB,qCAAkB,CAAA;EAClB,uCAAoB,CAAA;EACpB,oCAAsB,CAAA;EACtB,gCAAkB,CAAA;EAClB,kCAAoB,CAAA;EACpB,sCAAwB,CAAA;EACxB,sCAAwB,CAAA;EACxB,oCAAsB,CAAA;AACvB,CAAC,EAlBW,YAAY,KAAZ,YAAY;;ACzBxB,MAAM,eAAe,GAAG,srBAAsrB;;MCuBjsBA,YAAU;;;;;;iBAUU;MAC/B,QAAQ,EAAE,eAAe;KACzB;;EAXM,MAAM;IACZ,OAAO,iBAAW,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAC,0BAA0B,EAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAI,CAAC;GACxH;EAYM,eAAe,CAAC,KAAc;IACpC,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;MACpC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAEM,iBAAiB;IACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolVersion"],"sources":["./src/enums/color.ts","./src/components/version/style.css?tag=kol-version&mode=default&encapsulation=shadow","./src/components/version/component.tsx"],"sourcesContent":["/**\n * @deprecated We will remove this enum in the next major release.\n */\nexport type FarbspektrumNames =\n\t| 'Violett'\n\t| 'Dunkelrot'\n\t| 'Rot'\n\t| 'Orange'\n\t| 'Hellorange'\n\t| 'Gelb'\n\t| 'Hellgrün'\n\t| 'Oliv'\n\t| 'Dunkelgrün'\n\t| 'Grün'\n\t| 'Türkis'\n\t| 'Hellblau'\n\t| 'Blau'\n\t| 'Petrol'\n\t| 'Dunkelblau'\n\t| 'Dunkelgrau'\n\t| 'Hellgrau';\n\n/**\n * @deprecated We will remove this enum in the next major release.\n */\nexport enum Farbspektrum {\n\t'Violett' = '#5f316e',\n\t'Dunkelrot' = '#780f2d',\n\t'Rot' = '#c0003c',\n\t'Orange' = '#cd5038',\n\t'Hellorange' = '#f7bb3d',\n\t'Gelb' = '#f9e03a',\n\t'Hellgrün' = '#c1ca31',\n\t'Oliv' = '#597c39',\n\t'Dunkelgrün' = '#005c45',\n\t'Grün' = '#00854a',\n\t'Türkis' = '#00818b',\n\t'Hellblau' = '#80cdec',\n\t'Blau' = '#0077b6',\n\t'Petrol' = '#007194',\n\t'Dunkelblau' = '#004b76',\n\t'Dunkelgrau' = '#576164',\n\t'Hellgrau' = '#bec5c9',\n}\n","@import url(../style.css);\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\nimport { Farbspektrum } from '../../enums/color';\n\nimport { Generic } from '@a11y-ui/core';\nimport { watchString } from '../../utils/prop.validators';\n\ntype RequiredProps = {\n\tversion: string;\n};\ntype OptionalProps = unknown;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-version',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolVersion implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn <kol-badge _color={Farbspektrum.Hellgrau} _icon=\"codicon codicon-versions\" _label={`v${this.state._version}`} />;\n\t}\n\n\t/**\n\t * Gibt die Versionsnummer als Text an.\n\t */\n\t@Prop() public _version!: string;\n\n\t@State() public state: States = {\n\t\t_version: '0.0.0-alpha.0',\n\t};\n\n\t@Watch('_version')\n\tpublic validateVersion(value?: string): void {\n\t\twatchString(this, '_version', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateVersion(this._version);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-version.js","mappings":";;;;;;;;;;;AAyBA,IAAY,YAkBX;AAlBD,WAAY,YAAY;EACvB,mCAAqB,CAAA;EACrB,qCAAuB,CAAA;EACvB,+BAAiB,CAAA;EACjB,kCAAoB,CAAA;EACpB,sCAAwB,CAAA;EACxB,gCAAkB,CAAA;EAClB,yCAAsB,CAAA;EACtB,gCAAkB,CAAA;EAClB,2CAAwB,CAAA;EACxB,qCAAkB,CAAA;EAClB,uCAAoB,CAAA;EACpB,oCAAsB,CAAA;EACtB,gCAAkB,CAAA;EAClB,kCAAoB,CAAA;EACpB,sCAAwB,CAAA;EACxB,sCAAwB,CAAA;EACxB,oCAAsB,CAAA;AACvB,CAAC,EAlBW,YAAY,KAAZ,YAAY;;ACzBxB,MAAM,eAAe,GAAG,srBAAsrB;;MCajsBA,YAAU;;;;;;iBAUwB;MAC7C,QAAQ,EAAE,eAAe;KACzB;;EAXM,MAAM;IACZ,OAAO,iBAAW,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAC,0BAA0B,EAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAI,CAAC;GACxH;EAYM,eAAe,CAAC,KAAc;IACpC,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;MACpC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAEM,iBAAiB;IACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolVersion"],"sources":["./src/enums/color.ts","./src/components/version/style.css?tag=kol-version&mode=default&encapsulation=shadow","./src/components/version/component.tsx"],"sourcesContent":["/**\n * @deprecated We will remove this enum in the next major release.\n */\nexport type FarbspektrumNames =\n\t| 'Violett'\n\t| 'Dunkelrot'\n\t| 'Rot'\n\t| 'Orange'\n\t| 'Hellorange'\n\t| 'Gelb'\n\t| 'Hellgrün'\n\t| 'Oliv'\n\t| 'Dunkelgrün'\n\t| 'Grün'\n\t| 'Türkis'\n\t| 'Hellblau'\n\t| 'Blau'\n\t| 'Petrol'\n\t| 'Dunkelblau'\n\t| 'Dunkelgrau'\n\t| 'Hellgrau';\n\n/**\n * @deprecated We will remove this enum in the next major release.\n */\nexport enum Farbspektrum {\n\t'Violett' = '#5f316e',\n\t'Dunkelrot' = '#780f2d',\n\t'Rot' = '#c0003c',\n\t'Orange' = '#cd5038',\n\t'Hellorange' = '#f7bb3d',\n\t'Gelb' = '#f9e03a',\n\t'Hellgrün' = '#c1ca31',\n\t'Oliv' = '#597c39',\n\t'Dunkelgrün' = '#005c45',\n\t'Grün' = '#00854a',\n\t'Türkis' = '#00818b',\n\t'Hellblau' = '#80cdec',\n\t'Blau' = '#0077b6',\n\t'Petrol' = '#007194',\n\t'Dunkelblau' = '#004b76',\n\t'Dunkelgrau' = '#576164',\n\t'Hellgrau' = '#bec5c9',\n}\n","@import url(../style.css);\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\nimport { Farbspektrum } from '../../enums/color';\n\nimport { KoliBriVersionAPI, KoliBriVersionStates } from './types';\nimport { watchString } from '../../utils/prop.validators';\n\n@Component({\n\ttag: 'kol-version',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolVersion implements KoliBriVersionAPI {\n\tpublic render(): JSX.Element {\n\t\treturn <kol-badge _color={Farbspektrum.Hellgrau} _icon=\"codicon codicon-versions\" _label={`v${this.state._version}`} />;\n\t}\n\n\t/**\n\t * Gibt die Versionsnummer als Text an.\n\t */\n\t@Prop() public _version!: string;\n\n\t@State() public state: KoliBriVersionStates = {\n\t\t_version: '0.0.0-alpha.0',\n\t};\n\n\t@Watch('_version')\n\tpublic validateVersion(value?: string): void {\n\t\twatchString(this, '_version', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateVersion(this._version);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t,o){return e(o={path:t,exports:{},require:function(e,t){return commonjsRequire()}},o.exports),o.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var loglevel=createCommonjsModule((function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(t,o){for(var r=0;r<n.length;r++){var i=n[r];this[i]=r<t?e:this.methodFactory(i,t,o)}this.log=this.debug}function a(e,o,n){return function(){typeof console!==t&&(l.call(this,o,n),this[e].apply(this,arguments))}}function s(n,l,s){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?i:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,o,r){var i,a=this;o=null==o?"WARN":o;var c="loglevel";function u(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=o.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(o.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=r||s,a.getLevel=function(){return i},a.setLevel=function(o,r){if("string"==typeof o&&void 0!==a.levels[o.toUpperCase()]&&(o=a.levels[o.toUpperCase()]),!("number"==typeof o&&o>=0&&o<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+o;if(i=o,!1!==r&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+o+";"}catch(e){}}}(o),l.call(a,o,e),typeof console===t&&o<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){o=e,u()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(o,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var d=u();null==d&&(d=o),a.setLevel(d,!1)}var u=new c,d={};u.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new c(e,u.getLevel(),u.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return u.noConflict=function(){return typeof window!==t&&window.log===u&&(window.log=h),u},u.getLoggers=function(){return d},u.default=u,u},e.exports?e.exports=o():t.log=o()}));const STORE="object"==typeof window?window:"object"==typeof global?global:"object"==typeof self?self:{};let lockThemePatching=!0,warrentyWarning=!1;const THEME_NAME_PATTERN=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,isThemeNameValid=e=>"string"==typeof e&&THEME_NAME_PATTERN.test(e),validateThemeName=e=>{if(!1===isThemeNameValid(e))throw new Error(`[Theming] The theme identifier "${"string"==typeof e?e:""}" (Type: ${typeof e}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},patchThemeTag=(e,t,o)=>{validateThemeName(e),!0===lockThemePatching&&!1===warrentyWarning&&(warrentyWarning=!0,loglevel.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.\n\nimport { register } from '@a11y-ui/core';\nimport { defineCustomElements } from '...';\nimport { THEME } from '...';\n\nregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\tconst htmlDivElement: HTMLElement | null = document.querySelector<HTMLElement>('#my-app');\n if (htmlDivElement instanceof HTMLElement) {\n const root = createRoot(htmlDivElement);\n root.render(<App />);\n }\n })\n .catch(console.warn);`)),"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={}),"object"!=typeof STORE.A11yUi||null===STORE.A11yUi||"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes||(STORE.A11yUi.Themes={}),"object"!=typeof STORE.A11yUi||null===STORE.A11yUi||"object"!=typeof STORE.A11yUi.Themes||null===STORE.A11yUi.Themes||"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]||(STORE.A11yUi.Themes[e]={}),"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes&&"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]&&(STORE.A11yUi.Themes[e][t]=o)},patchTheme=(e,t)=>(validateThemeName(e),"object"==typeof t&&null!==t&&Object.getOwnPropertyNames(t).forEach((o=>{const n=t[o];"string"==typeof n&&n.length>0&&patchThemeTag(e,o,n)})),e),getThemeNode=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return getThemeNode(t)}}return null},getEncroachCss=(e={})=>"false"!==e.themeEncroachCss&&"true"!==e.themeReset&&{mode:"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?e.themeEncroachCssMode:"before"},isTheCurrentThemeConfigValid=()=>"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Theme&&null!==STORE.A11yUi.Theme&&"boolean"==typeof STORE.A11yUi.Theme.cache&&"object"==typeof STORE.A11yUi.Theme.encroachCss&&null!==typeof STORE.A11yUi.Theme.encroachCss&&"string"==typeof STORE.A11yUi.Theme.encroachCss.mode&&"string"==typeof STORE.A11yUi.Theme.name,getThemeDetails=e=>{if(isTheCurrentThemeConfigValid())return STORE.A11yUi.Theme;{const t={cache:!0,encroachCss:getEncroachCss(),loglevel:"silent",name:null},o=getThemeNode(e);return o instanceof HTMLElement&&(t.cache="false"!==o.dataset.themeCache,t.encroachCss=getEncroachCss(o.dataset),t.loglevel="debug"===o.dataset.themeLoglevel?o.dataset.themeLoglevel:"silent",t.name=o.dataset.theme||null),t}},getThemeOptionDefaults=(e,t)=>({cache:!1!==t.cache,detect:"auto"===t.detect?"auto":"fixed",encroachCss:!1!==t.encroachCss&&("object"!=typeof t.encroachCss||null==t.encroachCss||"after"!==t.encroachCss.mode&&"before"!==t.encroachCss.mode?{mode:"before"}:t.encroachCss),loglevel:"debug"===t.loglevel?t.loglevel:"silent",name:"string"==typeof t.name?t.name:e}),setConfigureTheme=(e,t)=>{!1!==isTheCurrentThemeConfigValid()||0!=("object"==typeof STORE.A11yUi&&null!==STORE.A11yUi)&&0!=("object"==typeof STORE.A11yUi.Theme&&null!==STORE.A11yUi.Theme)&&"default"===STORE.A11yUi.Theme.name||"object"==typeof t&&null!==t&&("fixed"===(t=getThemeOptionDefaults(e,t)).detect?(null===t.name&&"string"==typeof e&&(t.name=e),e===t.name&&("object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={}),STORE.A11yUi.Theme=t,loglevel.info(`[Theming] Theme "${e}" was set as default theme.`))):loglevel.warn("[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode."))};let registered=!1;const register=(e,t,o={})=>{!1===registered&&(registered=!0,lockThemePatching=!1),"function"==typeof e?e=new Set([e]):Array.isArray(e)&&(e=new Set(e)),e instanceof Set&&e.forEach((e=>{"function"==typeof e&&1===e.length?setConfigureTheme(e(patchTheme),{cache:o.theme?.cache,detect:o.theme?.detect,encroachCss:o.theme?.encroachCss,name:o.theme?.name}):loglevel.error("[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.")})),lockThemePatching=!0,"function"==typeof t?t=new Set([t]):Array.isArray(t)&&(t=new Set(t));const n=[];return t.forEach((e=>n.push(e()))),Promise.all(n)},STYLING_TASK_QUEUE=new Map,HYDRATED_HISTORY=[],CSS_PROPERTIES_REGISTERED=new Set,CSS_STYLE_CACHE=new Map,REGEX_CSS_PROPERTIES=/--[^;]+/g,REGEX_SPLIT_CSS_PROPERTY=/:/;"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={CSS_STYLE_CACHE:CSS_STYLE_CACHE,HYDRATED_HISTORY:HYDRATED_HISTORY,STYLING_TASK_QUEUE:STYLING_TASK_QUEUE});const extractProperties=(e,t)=>{let o=t.match(REGEX_CSS_PROPERTIES);if(Array.isArray(o)){o=o.filter((e=>REGEX_SPLIT_CSS_PROPERTY.test(e)));const t=document.createElement("style");t.innerHTML=`.${e} {${o.join(";")}}`,document.querySelector("head")?.appendChild(t)}CSS_PROPERTIES_REGISTERED.add(e)},getCssStyle=(e,t)=>"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes&&"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]&&"string"==typeof STORE.A11yUi.Themes[e][t]?STORE.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",removeStyle=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLStyleElement&&"STYLE"===t.tagName))break;e.removeChild(t)}},patchStyle=(e,t)=>{try{const o=[];t.forEach((e=>{const t=new CSSStyleSheet;t.replaceSync(e),o.push(t)})),e.adoptedStyleSheets=o}catch(o){t.reverse().forEach((t=>{const o=document.createElement("style");o.innerHTML=t,e.insertBefore(o,e.firstChild)}))}},encroachStyles=(e,t,o)=>{if(!1!==o){const n=[...Array.from(e.childNodes).filter((e=>e instanceof HTMLStyleElement&&"STYLE"===e.tagName))];let r;try{r=[...Array.from(e.adoptedStyleSheets)]}catch(e){r=[]}"before"===o?.mode?(n.reverse().forEach((e=>t.unshift(e.innerHTML))),r.reverse().forEach((e=>t.unshift(Array.from(e.cssRules).map((e=>e.cssText)).join(""))))):"after"===o?.mode&&(n.forEach((e=>t.push(e.innerHTML))),r.forEach((e=>t.push(Array.from(e.cssRules).map((e=>e.cssText)).join("")))))}},setThemeStyleAfterHydrated=(e,t,o)=>{const n=t.name||"default";let r;try{if(null===e.shadowRoot)throw new Error("ShadowRoot is null");r=e.shadowRoot}catch(t){r=e}if(CSS_STYLE_CACHE.get(n)?.has(e.tagName))switchStyle(e,r,CSS_STYLE_CACHE.get(n)?.get(e.tagName),o);else{const i=getCssStyle(n,"PROPERTIES"),l=getCssStyle(n,"GLOBAL"),a=getCssStyle(n,e.tagName);!1===CSS_PROPERTIES_REGISTERED.has(n)&&extractProperties(n,l);const s=[i,l,a];encroachStyles(r,s,t.encroachCss),"debug"===t.loglevel&&console.log(e.tagName,s),!0===t.cache&&(!1===CSS_STYLE_CACHE.has(n)&&CSS_STYLE_CACHE.set(n,new Map),CSS_STYLE_CACHE.get(n)?.set(e.tagName,s)),switchStyle(e,r,s,o)}},switchStyle=(e,t,o,n)=>{removeStyle(t),patchStyle(t,o),e.style.display=n},logHydratedHistory=e=>{"debug"===e.loglevel&&HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:STYLING_TASK_QUEUE.size})},pushToDoTask=(e,t)=>{STYLING_TASK_QUEUE.set(e,{styleDisplay:e.style.display?`${e.style.display}`:null,themeDetails:t})},loggedPushToDoTask=(e,t)=>{pushToDoTask(e,t),logHydratedHistory(t)},deleteDoneTask=e=>{STYLING_TASK_QUEUE.delete(e)},loggedDeleteDoneTask=(e,t)=>{deleteDoneTask(e),logHydratedHistory(t)},waitForHydrated=e=>{const t=setTimeout((()=>{if(clearTimeout(t),STYLING_TASK_QUEUE.has(e)&&e.classList.contains("hydrated")){const{styleDisplay:t,themeDetails:o}=STYLING_TASK_QUEUE.get(e);setThemeStyleAfterHydrated(e,o,t),loggedDeleteDoneTask(e,o)}else waitForHydrated(e)}),25)},observerCallback=e=>{for(const t of e)if(STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:e,themeDetails:o}=STYLING_TASK_QUEUE.get(t.target);setThemeStyleAfterHydrated(t.target,o,e),loggedDeleteDoneTask(t.target,o)}},observerOptions={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1};let observer;try{observer=new MutationObserver(observerCallback)}catch(e){observer=null}const setThemeStyle=(e,t)=>{loggedPushToDoTask(e,t),observer?observer.observe(e,observerOptions):waitForHydrated(e),e.style.display="none"};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){if(e!==t&&(e instanceof HTMLElement||e instanceof ShadowRoot)){e instanceof HTMLElement&&(this.lockElement(e),this.lockFocus(e.shadowRoot,t));for(let o=0;o<e.children.length;o++)this.lockFocus(e.children[o],t)}}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,o)=>{o.style.display=t===o?"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] Die DOM-Referenz des Modals ist nicht valide."):(this.modalStack.set(e,{activeElement:t}),this.renderModalIfExists())}closeModal(e){var t;if(e instanceof HTMLElement==!1)Log.warn("[KolModalService] Die DOM-Referenz des Modals ist nicht valide.");else{const o=null===(t=this.modalStack.get(e))||void 0===t?void 0:t.activeElement;this.modalStack.delete(e),this.renderModalIfExists(o)}}}class ToasterService{constructor(e){this.document=e,this.queue=new Set,this.isOpen=!1,this.toastElement=this.document.createElement("kol-toast"),this.toastElement.setAttribute("_level","3"),this.toastElement.setAttribute("_show","false"),this.toastElement.setAttribute("_show-duration","-1"),this.toastElement.setAttribute("_has-closer","true"),this.toastElement._on={onClose:()=>{const e=this.queue.values().next();e.value?(this.queue.delete(e.value),setTimeout((()=>{this.showToast(e.value)}),200)):this.isOpen=!1}},this.document.body.insertBefore(this.toastElement,this.document.body.firstChild)}enqueue(e){this.isOpen?this.queue.add(e):this.showToast(e)}showToast(e){this.toastElement.setAttribute("_heading",e.heading),this.toastElement.setAttribute("_show","true"),this.toastElement.setAttribute("_type",e.type),this.toastElement.innerText=e.description,this.isOpen=!0}}const isObject=e=>"object"==typeof e&&null!==e,isString=(e,t=0)=>"string"==typeof e&&e.length>=t,isStyle=e=>{if("object"!=typeof e||null===e)return isString(e,1);for(const t in e)if(!1===isString(t,1))return!1;return!0},isPrefixOf=(e,t)=>t.startsWith(e),isEmptyOrPrefixOf=(e,t)=>0===t.length||isPrefixOf(e,t),STATE_CHANGE_EVENT=new Event("StateChange"),propagateFocus=(e,t)=>{isObject(e)&&e&&(e.focus=e=>null==t?void 0:t.focus(e))};let processEnv="development";try{processEnv="production"}catch(e){processEnv="production"}let WINDOW=null,DOCUMENT=null;const configKoliBri=e=>{e instanceof Window?(WINDOW=e,WINDOW.document instanceof Document?DOCUMENT=e.document:console.warn("The given Window has no valid Document.")):console.warn("The given Window is not valid.")},getWindow=()=>WINDOW||"undefined"==typeof window?null:window,getDocument=()=>DOCUMENT||void 0===getWindow().document?null:getWindow().document;let META_CONFIG=null,DEV_MODE=null,EXPERIMENTAL_MODE=null,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_MODE,getExperimalMode=()=>!0===EXPERIMENTAL_MODE,getColorContrastAnalysis=()=>!0===COLOR_CONTRAST_ANALYSIS;class Log{static mapToArray(e){return Array.isArray(e)?e:[e]}static handleClassifier(e){return"string"==typeof e&&e.length>0?`${Log.shield.label} | ${e}`:Log.shield.label}static getShield(e){return[Log.handleClassifier(null==e?void 0:e.classifier),`${Log.shield.style};${(null==e?void 0:e.overwriteStyle)||""}`]}static debug(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.debug(...Log.getShield(t),...Log.mapToArray(e))}static info(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.info(...Log.getShield(t),...Log.mapToArray(e))}static trace(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.trace(...Log.getShield(t),...Log.mapToArray(e))}static warn(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.warn(...Log.getShield(t),...Log.mapToArray(e))}static error(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.error(...Log.getShield(t),...Log.mapToArray(e))}static throw(e,t){if(DEV_MODE||!0===(null==t?void 0:t.forceLog))throw new Error(...Log.getShield(t),...Log.mapToArray(e))}}Log.shield={label:"%cKoliBri",style:"color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000"};const initMeta=()=>{if(null===DEV_MODE&&null===EXPERIMENTAL_MODE&&null===COLOR_CONTRAST_ANALYSIS){const e=getDocument().querySelector('meta[name="kolibri"]');e&&e.hasAttribute("content")&&(META_CONFIG=e.getAttribute("content"),"string"==typeof META_CONFIG&&(DEV_MODE=META_CONFIG.includes("dev-mode=true"),EXPERIMENTAL_MODE=META_CONFIG.includes("experimental-mode=true"),COLOR_CONTRAST_ANALYSIS=META_CONFIG.includes("color-contrast-analysis=true")))}else console.warn("You can only initialize DEV_MODE and COLOR_CONTRAST_ANALYSIS once.")};let KoliBri=null;const getKoliBri=()=>KoliBri||{},initKoliBri=()=>{if(null===KoliBri){KoliBri=getWindow().KoliBri||{};const e=new ModalService,t=new ToasterService(getDocument());Object.defineProperty(KoliBri,"Modal",{get:function(){return e}}),Object.defineProperty(KoliBri,"Toaster",{get:function(){return t}}),initMeta(),Log.debug("\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n\t| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n\t| |\\ \\ | '-' | | | | | | '--' / | | | |\n\t`--' `--´ `---´ `--' `--' `------´ `--' `--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io\n\t\t",{forceLog:!0})}else console.warn("You can only initialize KoliBri once.")},renderDevAdvice=()=>{void 0===getWindow().KoliBri&&Object.defineProperty(window,"KoliBri",{get:function(){return KoliBri}}),!0!==getKoliBri().adviceShown&&(Object.defineProperty(KoliBri,"adviceShown",{get:function(){return!0}}),Log.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let nonce=()=>Math.floor(16777215*Math.random()).toString(16);"test"===processEnv&&(nonce=()=>"nonce");const pushNodes=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},querySelectorAll=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const o=new Set;pushNodes(o,t.querySelectorAll(e));const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;pushNodes(o,querySelectorAll(e,"object"==typeof r&&null!==r?r:n[t]))}return Array.from(o)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},querySelector=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let o=t.querySelector(e);if(null===o){const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;if(o=querySelector(e,"object"==typeof r&&null!==r?r:n[t]),null!==o)break}}return o}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")};var rgbaConvert=arr,arr_1=arr,obj_1=obj,css_1=css,hex_1=hex,num_1=num;function arr(e){var t=parse(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function obj(e){var t=parse(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}}function css(e){var t=parse(e);return 3==t.length&&t.push(255),255==t[3]?"rgb("+t[0]+", "+t[1]+", "+t[2]+")":0==t[3]?"rgba("+t[0]+", "+t[1]+", "+t[2]+", 0)":"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+String(t[3]/255).substr(1)+")"}function hex(e){3==(t=parse(e)).length&&t.push(255);var t,o=255==t[3],n=num2hex(t[0]),r=num2hex(t[1]),i=num2hex(t[2]),l=isshort(n,r,i,t=num2hex(Math.round(t[3])));return o?l?"#"+n.charAt(0)+r.charAt(0)+i.charAt(0):"#"+n+r+i:l?"#"+n.charAt(0)+r.charAt(0)+i.charAt(0)+t.charAt(0):"#"+n+r+i+t}function num(e){var t=parse(e);return 3==t.length?t.push(255):t[3]=Math.round(t[3]),(t[3]<<24>>>0|t[0]<<16|t[1]<<8|t[2])>>>0}function parse(e){return"string"==typeof e?name(e=e.toLowerCase())||hex3(e)||hex6(e)||rgb(e)||rgba(e)||[0,0,0,255]:object(e)||array(e)||number(e)||[0,0,0,255]}function num2hex(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function isshort(e,t,o,n){var r=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=r.indexOf(e)&&-1!=r.indexOf(t)&&-1!=r.indexOf(o)&&-1!=r.indexOf(n)}function name(e){return"red"==e?[255,0,0]:"green"==e?[0,255,0]:"blue"==e?[0,0,255]:"black"==e?[0,0,0]:"white"==e?[255,255,255]:"cyan"==e?[0,255,255]:"gray"==e||"grey"==e?[128,128,128]:"magenta"==e||"pink"==e?[255,0,255]:"yellow"==e?[255,255,0]:void 0}function hex2num(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function hex3(e){var t=e.replace(/^#/,""),o=t.length;if(3==o||4==o){var n=hex2num(t[0]),r=hex2num(t[1]),i=hex2num(t[2]),l=3==o?255:hex2num(t[3]);if(isNaN(n)||isNaN(r)||isNaN(i)||isNaN(l))return;return[n,r,i,l]}}function hex6(e){var t=e.replace(/^#/,""),o=t.length;if(6==o||8==o){var n=hex2num(t.slice(0,2)),r=hex2num(t.slice(2,4)),i=hex2num(t.slice(4,6)),l=6==o?255:hex2num(t.slice(6,8));if(isNaN(n)||isNaN(r)||isNaN(i)||isNaN(l))return;return[n,r,i,l]}}function getnum(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}function object(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=getnum(null!=e.r?e.r:null!=e.red?e.red:0,!0),o=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),n=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),r=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),o=getnum(e[1],!0),n=getnum(e[2],!0),r=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function number(e){if("number"==typeof e&&Math.floor(e)==e&&e<=4294967295&&e>=0)return[e>>16&255,e>>8&255,255&e,e>>24&255]}function rgb(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0);if(-1!=o&&-1!=n&&-1!=r)return[o,n,r,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0),i=getnum(255*t[3]);if(-1!=o&&-1!=n&&-1!=r&&-1!=i)return[o,n,r,i]}}rgbaConvert.arr=arr_1,rgbaConvert.obj=obj_1,rgbaConvert.css=css_1,rgbaConvert.hex=hex_1,rgbaConvert.num=num_1;var n=.2126,r=.7152,t=.0722,e=1/12.92;function u(e){return Math.pow((e+.055)/1.055,2.4)}function a(o){var i=o[0]/255,l=o[1]/255,a=o[2]/255,s=i<=.03928?i*e:u(i),c=l<=.03928?l*e:u(l),d=a<=.03928?a*e:u(a);return s*n+c*r+d*t}function i(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var o=parseInt(e,16);return[o>>16,o>>8&255,255&o,t]}function c(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function o(e,t){return c(a(e),a(t))}function s(e,t){return o(i(e),i(t))}function f(e){return e>=7?"AAA":e>=4.5?"AA":e>=3?"AA Large":"Fail"}const a11yCache=new Set,a11yHint=e=>{!1===a11yCache.has(e)&&(a11yCache.add(e),Log.debug(e,{classifier:"✋ a11y",overwriteStyle:"; background-color: #09f"}))},deprecatedCache=new Set,deprecatedHint=e=>{!1===deprecatedCache.has(e)&&(deprecatedCache.add(e),Log.warn(e,{classifier:"🔥 deprecated",forceLog:!0,overwriteStyle:"; background-color: #f00"}))},devCache=new Set,devHint=e=>{!1===devCache.has(e)&&(devCache.add(e),Log.debug(e,{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},devWarning=e=>{!1===devCache.has(e)&&(devCache.add(e),Log.warn(e,{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},featureCache=new Set,featureHint=(e,t=!1)=>{!1===featureCache.has(e)&&(featureCache.add(e),e+=!0===t?" ✅":"",Log.debug(e,{classifier:"🌟 feature",overwriteStyle:"; background-color: #309"}))};devHint("Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!");const uiUxCache=new Set,uiUxHint=e=>{!1===uiUxCache.has(e)&&(uiUxCache.add(e),Log.debug(e,{classifier:"📑 ui/ux",overwriteStyle:"; background-color: #060;"}))},a11yHintDisabled=()=>{a11yHint('"Disabled" schränkt die Zugänglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},a11yHintLabelingLandmarks=e=>{"string"==typeof e&&""!==e||a11yHint("Manche Strukturelemente, wie bspw. der nav-Tag, können mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden können, ist es erforderlich ein Aria-Label zu setzen.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},uiUxHintMillerscheZahl=(e,t=8)=>{t>7&&uiUxHint(`[${e}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Menüpunkte zu verwenden.\n\nLinks:\n- https://de.ryte.com/wiki/Millersche_Zahl\n- https://de.wikipedia.org/wiki/Millersche_Zahl`)},OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTarget=(e,t)=>{getExperimalMode()&&(Log.debug([e,t]),Log.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,o,n;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,o)=>{var n;const r=t.get("beforePatch");"function"==typeof r&&r(null===(n=e.nextState)||void 0===n?void 0:n.get(o),e.nextState,e,o)})),(null===(o=e.nextState)||void 0===o?void 0:o.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(n=e.nextHooks)||void 0===n||n.forEach(((t,o)=>{const n=t.get("afterPatch");"function"==typeof n&&n(e.state[o],e.state,e,o)}))),delete e.nextHooks},setState=(e,t,o,n={})=>{var r,i;if(void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextState.get(t)!==o){e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof n.afterPatch&&(null===(r=e.nextHooks.get(t))||void 0===r||r.set("afterPatch",n.afterPatch)),"function"==typeof n.beforePatch&&(null===(i=e.nextHooks.get(t))||void 0===i||i.set("beforePatch",n.beforePatch)),e.nextState.set(t,o),patchState(e)}},logWarn=(e,t,o,n)=>{devHint(`[${e.constructor.name}] Der Property-Wert (${o}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(n).join(", ")}`)};function watchValidator(e,t,o,n,r,i={}){o(r)?setState(e,t,r,i.hooks):null!=r||i.required?(i.required||n.add(null),logWarn(e,t,r,n)):setState(e,t,i.defaultValue,i.hooks)}const watchBoolean=(e,t,o,n)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),o,n)},watchString=(e,t,o,n={})=>{const r="number"==typeof n.minLength?null==n?void 0:n.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=r&&(void 0===(null==n?void 0:n.maxLength)||e.length<=n.maxLength)),new Set(["String"]),o,n)},watchNumber=(e,t,o,n)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==n?void 0:n.min)||"number"==typeof(null==n?void 0:n.min)&&e>=n.min)&&(void 0===(null==n?void 0:n.max)||"number"==typeof(null==n?void 0:n.max)&&e<=n.max)),new Set(["Number"]),o,n)},watchJsonArrayString=(e,t,o,n,r=(e=>e==e),i={})=>{emptyStringByArrayHandler(n,(()=>{objectObjectHandler(n,(()=>{void 0===n&&(n=[]);try{try{n=parseJson(n)}catch(e){}if(Array.isArray(n)){const l=n.find((e=>!o(e)));void 0===l&&r(n)?setState(e,t,n,i.hooks):objectObjectHandler(l,(()=>{throw Log.debug(l),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else objectObjectHandler(n,(()=>{throw Log.debug(n),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){Log.debug(e)}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?(0|[1-9]\d*)$/,FLOAT=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,mapString2Unknown=e=>{const t=typeof e,o=`${e}`;if("string"==typeof e)if(BOOLEAN.test(e))e="true"===e;else if(INTEGER.test(e))e=parseInt(e);else if(FLOAT.test(e))e=parseFloat(e);else if(JSON_CHARS.test(e))try{e=parseJson(e)}catch(e){}return t!==typeof e&&devHint(`You have used a stringified property value (${o} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},stringifyJson=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw Log.warn(["stringifyJson",e]),Log.error("↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet."),new Error}},JSON_CHARS=/^[{[]/,parseJson=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(JSON_CHARS.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){Log.warn(["parseJson",e]),Log.error("↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (&#8216;).")}}throw new Error},mapBoolean2String=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,mapStringOrBoolean2String=e=>"string"==typeof e?e:mapBoolean2String(e),koliBriQuerySelector=(e,t)=>querySelector(e,t||getDocument()),koliBriQuerySelectorAll=(e,t)=>querySelectorAll(e,t||getDocument());let DEFAULT_COLOR_CONTRAST=null;const getDefaultColorContrast=()=>(DEFAULT_COLOR_CONTRAST=DEFAULT_COLOR_CONTRAST||{backgroundColor:"#00000000",color:"#00000000",domNode:getDocument().body,level:"Fail",score:1},DEFAULT_COLOR_CONTRAST),TRANSPARENT_REGEXP=/(\d+, ){3}0\)/,koliBriA11yColorContrast=(e,t=getDefaultColorContrast())=>{const o=getComputedStyle(e),n=TRANSPARENT_REGEXP.test(o.backgroundColor)?t.backgroundColor:rgbaConvert.hex(o.backgroundColor),r=TRANSPARENT_REGEXP.test(o.color)?t.color:rgbaConvert.hex(o.color),i=s(n,r),l={backgroundColor:n,color:r,domNode:e,level:f(i),score:i};return i<4.5&&Log.error(["Color-Contrast-Error",{backgroundColor:l.backgroundColor,color:l.color,level:l.level,score:l.score},l.domNode]),l},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const o=t.domNode.querySelector(e);if(null===o){const o=t.domNode.querySelectorAll('[class="hydrated"]');for(let n=0;n<o.length&&(t.domNode=o[n],null===(t=koliBriQuerySelectorColors(e,t)).domNode);n++);return t}return koliBriA11yColorContrast(o,t)},scrollByHTMLElement=(e,t=window)=>{e instanceof HTMLElement?(t.scrollTo({behavior:"smooth",top:e.getBoundingClientRect().top+getWindow().pageYOffset-50}),e.focus()):devHint("Das HTMLElement ist nicht valide, zu dem gescrollt werden soll.")},scrollBySelector=(e,t)=>{if((e instanceof Document||e instanceof HTMLElement||e instanceof ShadowRoot)&&"string"==typeof t){devHint("Bei der Methode querySelectorAll wurden die Parameter document, selector in selector, document getauscht, da der Parameter selector nicht, allerdings der Parameter document optional sein kann.");const o=`${t}`;t=e,e=o}if("string"==typeof e){const o=koliBriQuerySelector(e,t);o instanceof HTMLElement?scrollByHTMLElement(o):devHint(`Es konnte kein HTMLElement mit dem Selector (${e}) gefunden werden, zu dem gescrollt werden soll.`)}else devHint("Der Selector ist nicht valide, zu dem gescrollt werden soll.")};class KoliBriUtils{static queryHtmlElementColors(e,t,o=!1,n=!0){let r=null;if(!0===o||!1===KoliBriUtils.executionLock)if(!1===o&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===n&&Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)r=t;else{const o=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)o.add(e[t])}const n=t.domNode;if("function"==typeof n.assignedNodes){const e=n.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&o.add(e[t])}const i=t.domNode.children;for(let e=0;e<i.length;e++)o.add(i[e]);const l=Array.from(o);for(let o=0;o<l.length;o++){let n=KoliBriUtils.cache.get(l[o]);void 0===n&&(n=koliBriA11yColorContrast(l[o],t)),KoliBriUtils.cache.set(l[o],n);const i=KoliBriUtils.queryHtmlElementColors(e,n,!0,!1);if(null!==i){r=i;break}}}else Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===o&&(!0===n&&Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),r}}KoliBriUtils.executionLock=!1,KoliBriUtils.cache=new Map;class KoliBriDevHelper{}KoliBriDevHelper.patchTheme=patchTheme,KoliBriDevHelper.patchThemeTag=patchThemeTag,KoliBriDevHelper.querySelector=koliBriQuerySelector,KoliBriDevHelper.querySelectorAll=koliBriQuerySelectorAll,KoliBriDevHelper.scrollByHTMLElement=scrollByHTMLElement,KoliBriDevHelper.scrollBySelector=scrollBySelector,KoliBriDevHelper.stringifyJson=stringifyJson;export{koliBriQuerySelectorColors as $,mapBoolean2String as A,a11yHintDisabled as B,watchNumber as C,rgbaConvert as D,s as E,a11yHintLabelingLandmarks as F,watchJsonArrayString as G,uiUxHintMillerscheZahl as H,scrollBySelector as I,deprecatedHint as J,KoliBriDevHelper as K,Log as L,mapString2Unknown as M,STATE_CHANGE_EVENT as N,getKoliBri as O,emptyStringByArrayHandler as P,koliBriQuerySelector as Q,initKoliBri as R,STORE as S,ToasterService as T,getDevMode as U,renderDevAdvice as V,getColorContrastAnalysis as W,KoliBriUtils as X,koliBriA11yColorContrast as Y,KoliBri as Z,koliBriQuerySelectorAll as _,watchValidator as a,stringifyJson as a0,getDocument as b,configKoliBri as c,devHint as d,parseJson as e,isStyle as f,getThemeDetails as g,isObject as h,isString as i,a11yHint as j,isEmptyOrPrefixOf as k,watchBoolean as l,featureHint as m,nonce as n,objectObjectHandler as o,processEnv as p,setState as q,register as r,setThemeStyle as s,setEventTarget as t,uiUxHint as u,getExperimalMode as v,watchString as w,propagateFocus as x,devWarning as y,mapStringOrBoolean2String as z};
4
+ var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t,o){return e(o={path:t,exports:{},require:function(e,t){return commonjsRequire()}},o.exports),o.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var loglevel=createCommonjsModule((function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(t,o){for(var r=0;r<n.length;r++){var i=n[r];this[i]=r<t?e:this.methodFactory(i,t,o)}this.log=this.debug}function a(e,o,n){return function(){typeof console!==t&&(l.call(this,o,n),this[e].apply(this,arguments))}}function s(n,l,s){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?i:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,o,r){var i,a=this;o=null==o?"WARN":o;var c="loglevel";function u(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=o.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(o.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=r||s,a.getLevel=function(){return i},a.setLevel=function(o,r){if("string"==typeof o&&void 0!==a.levels[o.toUpperCase()]&&(o=a.levels[o.toUpperCase()]),!("number"==typeof o&&o>=0&&o<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+o;if(i=o,!1!==r&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+o+";"}catch(e){}}}(o),l.call(a,o,e),typeof console===t&&o<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){o=e,u()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(o,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var d=u();null==d&&(d=o),a.setLevel(d,!1)}var u=new c,d={};u.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new c(e,u.getLevel(),u.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return u.noConflict=function(){return typeof window!==t&&window.log===u&&(window.log=h),u},u.getLoggers=function(){return d},u.default=u,u},e.exports?e.exports=o():t.log=o()}));const STORE="object"==typeof window?window:"object"==typeof global?global:"object"==typeof self?self:{};let lockThemePatching=!0,warrentyWarning=!1;const THEME_NAME_PATTERN=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,isThemeNameValid=e=>"string"==typeof e&&THEME_NAME_PATTERN.test(e),validateThemeName=e=>{if(!1===isThemeNameValid(e))throw new Error(`[Theming] The theme identifier "${"string"==typeof e?e:""}" (Type: ${typeof e}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},patchThemeTag=(e,t,o)=>{validateThemeName(e),!0===lockThemePatching&&!1===warrentyWarning&&(warrentyWarning=!0,loglevel.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.\n\nimport { register } from '@a11y-ui/core';\nimport { defineCustomElements } from '...';\nimport { THEME } from '...';\n\nregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\tconst htmlDivElement: HTMLElement | null = document.querySelector<HTMLElement>('#my-app');\n if (htmlDivElement instanceof HTMLElement) {\n const root = createRoot(htmlDivElement);\n root.render(<App />);\n }\n })\n .catch(console.warn);`)),"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={}),"object"!=typeof STORE.A11yUi||null===STORE.A11yUi||"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes||(STORE.A11yUi.Themes={}),"object"!=typeof STORE.A11yUi||null===STORE.A11yUi||"object"!=typeof STORE.A11yUi.Themes||null===STORE.A11yUi.Themes||"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]||(STORE.A11yUi.Themes[e]={}),"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes&&"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]&&(STORE.A11yUi.Themes[e][t]=o)},patchTheme=(e,t)=>(validateThemeName(e),"object"==typeof t&&null!==t&&Object.getOwnPropertyNames(t).forEach((o=>{const n=t[o];"string"==typeof n&&n.length>0&&patchThemeTag(e,o,n)})),e),getThemeNode=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return getThemeNode(t)}}return null},getEncroachCss=(e={})=>"false"!==e.themeEncroachCss&&"true"!==e.themeReset&&{mode:"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?e.themeEncroachCssMode:"before"},isTheCurrentThemeConfigValid=()=>"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Theme&&null!==STORE.A11yUi.Theme&&"boolean"==typeof STORE.A11yUi.Theme.cache&&"object"==typeof STORE.A11yUi.Theme.encroachCss&&null!==typeof STORE.A11yUi.Theme.encroachCss&&"string"==typeof STORE.A11yUi.Theme.encroachCss.mode&&"string"==typeof STORE.A11yUi.Theme.name,getThemeDetails=e=>{if(isTheCurrentThemeConfigValid())return STORE.A11yUi.Theme;{const t={cache:!0,encroachCss:getEncroachCss(),loglevel:"silent",name:null},o=getThemeNode(e);return o instanceof HTMLElement&&(t.cache="false"!==o.dataset.themeCache,t.encroachCss=getEncroachCss(o.dataset),t.loglevel="debug"===o.dataset.themeLoglevel?o.dataset.themeLoglevel:"silent",t.name=o.dataset.theme||null),t}},getThemeOptionDefaults=(e,t)=>({cache:!1!==t.cache,detect:"auto"===t.detect?"auto":"fixed",encroachCss:!1!==t.encroachCss&&("object"!=typeof t.encroachCss||null==t.encroachCss||"after"!==t.encroachCss.mode&&"before"!==t.encroachCss.mode?{mode:"before"}:t.encroachCss),loglevel:"debug"===t.loglevel?t.loglevel:"silent",name:"string"==typeof t.name?t.name:e}),setConfigureTheme=(e,t)=>{!1!==isTheCurrentThemeConfigValid()||0!=("object"==typeof STORE.A11yUi&&null!==STORE.A11yUi)&&0!=("object"==typeof STORE.A11yUi.Theme&&null!==STORE.A11yUi.Theme)&&"default"===STORE.A11yUi.Theme.name||"object"==typeof t&&null!==t&&("fixed"===(t=getThemeOptionDefaults(e,t)).detect?(null===t.name&&"string"==typeof e&&(t.name=e),e===t.name&&("object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={}),STORE.A11yUi.Theme=t,loglevel.info(`[Theming] Theme "${e}" was set as default theme.`))):loglevel.warn("[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode."))};let registered=!1;const register=(e,t,o={})=>{!1===registered&&(registered=!0,lockThemePatching=!1),"function"==typeof e?e=new Set([e]):Array.isArray(e)&&(e=new Set(e)),e instanceof Set&&e.forEach((e=>{"function"==typeof e&&1===e.length?setConfigureTheme(e(patchTheme),{cache:o.theme?.cache,detect:o.theme?.detect,encroachCss:o.theme?.encroachCss,name:o.theme?.name}):loglevel.error("[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.")})),lockThemePatching=!0,"function"==typeof t?t=new Set([t]):Array.isArray(t)&&(t=new Set(t));const n=[];return t.forEach((e=>n.push(e()))),Promise.all(n)},STYLING_TASK_QUEUE=new Map,HYDRATED_HISTORY=[],CSS_PROPERTIES_REGISTERED=new Set,CSS_STYLE_CACHE=new Map,REGEX_CSS_PROPERTIES=/--[^;]+/g,REGEX_SPLIT_CSS_PROPERTY=/:/;"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi||(STORE.A11yUi={CSS_STYLE_CACHE:CSS_STYLE_CACHE,HYDRATED_HISTORY:HYDRATED_HISTORY,STYLING_TASK_QUEUE:STYLING_TASK_QUEUE});const extractProperties=(e,t)=>{let o=t.match(REGEX_CSS_PROPERTIES);if(Array.isArray(o)){o=o.filter((e=>REGEX_SPLIT_CSS_PROPERTY.test(e)));const t=document.createElement("style");t.innerHTML=`.${e} {${o.join(";")}}`,document.querySelector("head")?.appendChild(t)}CSS_PROPERTIES_REGISTERED.add(e)},getCssStyle=(e,t)=>"object"==typeof STORE.A11yUi&&null!==STORE.A11yUi&&"object"==typeof STORE.A11yUi.Themes&&null!==STORE.A11yUi.Themes&&"object"==typeof STORE.A11yUi.Themes[e]&&null!==STORE.A11yUi.Themes[e]&&"string"==typeof STORE.A11yUi.Themes[e][t]?STORE.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",removeStyle=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLStyleElement&&"STYLE"===t.tagName))break;e.removeChild(t)}},patchStyle=(e,t)=>{try{const o=[];t.forEach((e=>{const t=new CSSStyleSheet;t.replaceSync(e),o.push(t)})),e.adoptedStyleSheets=o}catch(o){t.reverse().forEach((t=>{const o=document.createElement("style");o.innerHTML=t,e.insertBefore(o,e.firstChild)}))}},encroachStyles=(e,t,o)=>{if(!1!==o){const n=[...Array.from(e.childNodes).filter((e=>e instanceof HTMLStyleElement&&"STYLE"===e.tagName))];let r;try{r=[...Array.from(e.adoptedStyleSheets)]}catch(e){r=[]}"before"===o?.mode?(n.reverse().forEach((e=>t.unshift(e.innerHTML))),r.reverse().forEach((e=>t.unshift(Array.from(e.cssRules).map((e=>e.cssText)).join(""))))):"after"===o?.mode&&(n.forEach((e=>t.push(e.innerHTML))),r.forEach((e=>t.push(Array.from(e.cssRules).map((e=>e.cssText)).join("")))))}},setThemeStyleAfterHydrated=(e,t,o)=>{const n=t.name||"default";let r;try{if(null===e.shadowRoot)throw new Error("ShadowRoot is null");r=e.shadowRoot}catch(t){r=e}if(CSS_STYLE_CACHE.get(n)?.has(e.tagName))switchStyle(e,r,CSS_STYLE_CACHE.get(n)?.get(e.tagName),o);else{const i=getCssStyle(n,"PROPERTIES"),l=getCssStyle(n,"GLOBAL"),a=getCssStyle(n,e.tagName);!1===CSS_PROPERTIES_REGISTERED.has(n)&&extractProperties(n,l);const s=[i,l,a];encroachStyles(r,s,t.encroachCss),"debug"===t.loglevel&&console.log(e.tagName,s),!0===t.cache&&(!1===CSS_STYLE_CACHE.has(n)&&CSS_STYLE_CACHE.set(n,new Map),CSS_STYLE_CACHE.get(n)?.set(e.tagName,s)),switchStyle(e,r,s,o)}},switchStyle=(e,t,o,n)=>{removeStyle(t),patchStyle(t,o),e.style.display=n},logHydratedHistory=e=>{"debug"===e.loglevel&&HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:STYLING_TASK_QUEUE.size})},pushToDoTask=(e,t)=>{STYLING_TASK_QUEUE.set(e,{styleDisplay:e.style.display?`${e.style.display}`:null,themeDetails:t})},loggedPushToDoTask=(e,t)=>{pushToDoTask(e,t),logHydratedHistory(t)},deleteDoneTask=e=>{STYLING_TASK_QUEUE.delete(e)},loggedDeleteDoneTask=(e,t)=>{deleteDoneTask(e),logHydratedHistory(t)},waitForHydrated=e=>{const t=setTimeout((()=>{if(clearTimeout(t),STYLING_TASK_QUEUE.has(e)&&e.classList.contains("hydrated")){const{styleDisplay:t,themeDetails:o}=STYLING_TASK_QUEUE.get(e);setThemeStyleAfterHydrated(e,o,t),loggedDeleteDoneTask(e,o)}else waitForHydrated(e)}),25)},observerCallback=e=>{for(const t of e)if(STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:e,themeDetails:o}=STYLING_TASK_QUEUE.get(t.target);setThemeStyleAfterHydrated(t.target,o,e),loggedDeleteDoneTask(t.target,o)}},observerOptions={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1};let observer;try{observer=new MutationObserver(observerCallback)}catch(e){observer=null}const setThemeStyle=(e,t)=>{loggedPushToDoTask(e,t),observer?observer.observe(e,observerOptions):waitForHydrated(e),e.style.display="none"};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){if(e!==t&&(e instanceof HTMLElement||e instanceof ShadowRoot)){e instanceof HTMLElement&&(this.lockElement(e),this.lockFocus(e.shadowRoot,t));for(let o=0;o<e.children.length;o++)this.lockFocus(e.children[o],t)}}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,o)=>{o.style.display=t===o?"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] Die DOM-Referenz des Modals ist nicht valide."):(this.modalStack.set(e,{activeElement:t}),this.renderModalIfExists())}closeModal(e){var t;if(e instanceof HTMLElement==!1)Log.warn("[KolModalService] Die DOM-Referenz des Modals ist nicht valide.");else{const o=null===(t=this.modalStack.get(e))||void 0===t?void 0:t.activeElement;this.modalStack.delete(e),this.renderModalIfExists(o)}}}class ToasterService{constructor(e){this.document=e,this.queue=new Set,this.isOpen=!1,this.toastElement=this.document.createElement("kol-toast"),this.toastElement.setAttribute("_level","3"),this.toastElement.setAttribute("_show","false"),this.toastElement.setAttribute("_show-duration","-1"),this.toastElement.setAttribute("_has-closer","true"),this.toastElement._on={onClose:()=>{const e=this.queue.values().next();e.value?(this.queue.delete(e.value),setTimeout((()=>{this.showToast(e.value)}),200)):this.isOpen=!1}},this.document.body.insertBefore(this.toastElement,this.document.body.firstChild)}enqueue(e){this.isOpen?this.queue.add(e):this.showToast(e)}showToast(e){this.toastElement.setAttribute("_heading",e.heading),this.toastElement.setAttribute("_show","true"),this.toastElement.setAttribute("_type",e.type),this.toastElement.innerText=e.description,this.isOpen=!0}}const isObject=e=>"object"==typeof e&&null!==e,isString=(e,t=0)=>"string"==typeof e&&e.length>=t,isStyle=e=>{if("object"!=typeof e||null===e)return isString(e,1);for(const t in e)if(!1===isString(t,1))return!1;return!0},isPrefixOf=(e,t)=>t.startsWith(e),isEmptyOrPrefixOf=(e,t)=>0===t.length||isPrefixOf(e,t),STATE_CHANGE_EVENT=new Event("StateChange"),propagateFocus=(e,t)=>{isObject(e)&&e&&(e.focus=e=>null==t?void 0:t.focus(e))};let processEnv="development";try{processEnv="production"}catch(e){processEnv="production"}let WINDOW=null,DOCUMENT=null;const configKoliBri=e=>{e instanceof Window?(WINDOW=e,WINDOW.document instanceof Document?DOCUMENT=e.document:console.warn("The given Window has no valid Document.")):console.warn("The given Window is not valid.")},getWindow=()=>WINDOW||"undefined"==typeof window?null:window,getDocument=()=>DOCUMENT||void 0===getWindow().document?null:getWindow().document;let META_CONFIG=null,DEV_MODE=null,EXPERIMENTAL_MODE=null,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_MODE,getExperimalMode=()=>!0===EXPERIMENTAL_MODE,getColorContrastAnalysis=()=>!0===COLOR_CONTRAST_ANALYSIS;class Log{static mapToArray(e){return Array.isArray(e)?e:[e]}static handleClassifier(e){return"string"==typeof e&&e.length>0?`${Log.shield.label} | ${e}`:Log.shield.label}static getShield(e){return[Log.handleClassifier(null==e?void 0:e.classifier),`${Log.shield.style};${(null==e?void 0:e.overwriteStyle)||""}`]}static debug(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.debug(...Log.getShield(t),...Log.mapToArray(e))}static info(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.info(...Log.getShield(t),...Log.mapToArray(e))}static trace(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.trace(...Log.getShield(t),...Log.mapToArray(e))}static warn(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.warn(...Log.getShield(t),...Log.mapToArray(e))}static error(e,t){(DEV_MODE||!0===(null==t?void 0:t.forceLog))&&console.error(...Log.getShield(t),...Log.mapToArray(e))}static throw(e,t){if(DEV_MODE||!0===(null==t?void 0:t.forceLog))throw new Error(...Log.getShield(t),...Log.mapToArray(e))}}Log.shield={label:"%cKoliBri",style:"color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000"};const initMeta=()=>{if(null===DEV_MODE&&null===EXPERIMENTAL_MODE&&null===COLOR_CONTRAST_ANALYSIS){const e=getDocument().querySelector('meta[name="kolibri"]');e&&e.hasAttribute("content")&&(META_CONFIG=e.getAttribute("content"),"string"==typeof META_CONFIG&&(DEV_MODE=META_CONFIG.includes("dev-mode=true"),EXPERIMENTAL_MODE=META_CONFIG.includes("experimental-mode=true"),COLOR_CONTRAST_ANALYSIS=META_CONFIG.includes("color-contrast-analysis=true")))}else console.warn("You can only initialize DEV_MODE and COLOR_CONTRAST_ANALYSIS once.")};let KoliBri=null;const getKoliBri=()=>KoliBri||{},initKoliBri=()=>{if(null===KoliBri){KoliBri=getWindow().KoliBri||{};const e=new ModalService,t=new ToasterService(getDocument());Object.defineProperty(KoliBri,"Modal",{get:function(){return e}}),Object.defineProperty(KoliBri,"Toaster",{get:function(){return t}}),initMeta(),Log.debug("\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n\t| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n\t| |\\ \\ | '-' | | | | | | '--' / | | | |\n\t`--' `--´ `---´ `--' `--' `------´ `--' `--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io\n\t\t",{forceLog:!0})}else console.warn("You can only initialize KoliBri once.")},renderDevAdvice=()=>{void 0===getWindow().KoliBri&&Object.defineProperty(window,"KoliBri",{get:function(){return KoliBri}}),!0!==getKoliBri().adviceShown&&(Object.defineProperty(KoliBri,"adviceShown",{get:function(){return!0}}),Log.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let nonce=()=>Math.floor(16777215*Math.random()).toString(16);"test"===processEnv&&(nonce=()=>"nonce");const pushNodes=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},querySelectorAll=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const o=new Set;pushNodes(o,t.querySelectorAll(e));const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;pushNodes(o,querySelectorAll(e,"object"==typeof r&&null!==r?r:n[t]))}return Array.from(o)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},querySelector=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let o=t.querySelector(e);if(null===o){const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const r=n[t].shadowRoot;if(o=querySelector(e,"object"==typeof r&&null!==r?r:n[t]),null!==o)break}}return o}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")};var rgbaConvert=arr,arr_1=arr,obj_1=obj,css_1=css,hex_1=hex,num_1=num;function arr(e){var t=parse(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function obj(e){var t=parse(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}}function css(e){var t=parse(e);return 3==t.length&&t.push(255),255==t[3]?"rgb("+t[0]+", "+t[1]+", "+t[2]+")":0==t[3]?"rgba("+t[0]+", "+t[1]+", "+t[2]+", 0)":"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+String(t[3]/255).substr(1)+")"}function hex(e){3==(t=parse(e)).length&&t.push(255);var t,o=255==t[3],n=num2hex(t[0]),r=num2hex(t[1]),i=num2hex(t[2]),l=isshort(n,r,i,t=num2hex(Math.round(t[3])));return o?l?"#"+n.charAt(0)+r.charAt(0)+i.charAt(0):"#"+n+r+i:l?"#"+n.charAt(0)+r.charAt(0)+i.charAt(0)+t.charAt(0):"#"+n+r+i+t}function num(e){var t=parse(e);return 3==t.length?t.push(255):t[3]=Math.round(t[3]),(t[3]<<24>>>0|t[0]<<16|t[1]<<8|t[2])>>>0}function parse(e){return"string"==typeof e?name(e=e.toLowerCase())||hex3(e)||hex6(e)||rgb(e)||rgba(e)||[0,0,0,255]:object(e)||array(e)||number(e)||[0,0,0,255]}function num2hex(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function isshort(e,t,o,n){var r=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=r.indexOf(e)&&-1!=r.indexOf(t)&&-1!=r.indexOf(o)&&-1!=r.indexOf(n)}function name(e){return"red"==e?[255,0,0]:"green"==e?[0,255,0]:"blue"==e?[0,0,255]:"black"==e?[0,0,0]:"white"==e?[255,255,255]:"cyan"==e?[0,255,255]:"gray"==e||"grey"==e?[128,128,128]:"magenta"==e||"pink"==e?[255,0,255]:"yellow"==e?[255,255,0]:void 0}function hex2num(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function hex3(e){var t=e.replace(/^#/,""),o=t.length;if(3==o||4==o){var n=hex2num(t[0]),r=hex2num(t[1]),i=hex2num(t[2]),l=3==o?255:hex2num(t[3]);if(isNaN(n)||isNaN(r)||isNaN(i)||isNaN(l))return;return[n,r,i,l]}}function hex6(e){var t=e.replace(/^#/,""),o=t.length;if(6==o||8==o){var n=hex2num(t.slice(0,2)),r=hex2num(t.slice(2,4)),i=hex2num(t.slice(4,6)),l=6==o?255:hex2num(t.slice(6,8));if(isNaN(n)||isNaN(r)||isNaN(i)||isNaN(l))return;return[n,r,i,l]}}function getnum(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}function object(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=getnum(null!=e.r?e.r:null!=e.red?e.red:0,!0),o=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),n=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),r=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),o=getnum(e[1],!0),n=getnum(e[2],!0),r=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=o&&-1!=n&&-1!=r)return[t,o,n,r]}}function number(e){if("number"==typeof e&&Math.floor(e)==e&&e<=4294967295&&e>=0)return[e>>16&255,e>>8&255,255&e,e>>24&255]}function rgb(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0);if(-1!=o&&-1!=n&&-1!=r)return[o,n,r,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=getnum(t[0],!0),n=getnum(t[1],!0),r=getnum(t[2],!0),i=getnum(255*t[3]);if(-1!=o&&-1!=n&&-1!=r&&-1!=i)return[o,n,r,i]}}rgbaConvert.arr=arr_1,rgbaConvert.obj=obj_1,rgbaConvert.css=css_1,rgbaConvert.hex=hex_1,rgbaConvert.num=num_1;var n=.2126,r=.7152,t=.0722,e=1/12.92;function u(e){return Math.pow((e+.055)/1.055,2.4)}function a(o){var i=o[0]/255,l=o[1]/255,a=o[2]/255,s=i<=.03928?i*e:u(i),c=l<=.03928?l*e:u(l),d=a<=.03928?a*e:u(a);return s*n+c*r+d*t}function i(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var o=parseInt(e,16);return[o>>16,o>>8&255,255&o,t]}function c(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function o(e,t){return c(a(e),a(t))}function s(e,t){return o(i(e),i(t))}function f(e){return e>=7?"AAA":e>=4.5?"AA":e>=3?"AA Large":"Fail"}const a11yCache=new Set,a11yHint=e=>{!1===a11yCache.has(e)&&(a11yCache.add(e),Log.debug(e,{classifier:"✋ a11y",overwriteStyle:"; background-color: #09f"}))},deprecatedCache=new Set,deprecatedHint=e=>{!1===deprecatedCache.has(e)&&(deprecatedCache.add(e),Log.warn(e,{classifier:"🔥 deprecated",forceLog:!0,overwriteStyle:"; background-color: #f00"}))},devCache=new Set,devHint=e=>{!1===devCache.has(e)&&(devCache.add(e),Log.debug(e,{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},devWarning=e=>{!1===devCache.has(e)&&(devCache.add(e),Log.warn(e,{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},featureCache=new Set,featureHint=(e,t=!1)=>{!1===featureCache.has(e)&&(featureCache.add(e),e+=!0===t?" ✅":"",Log.debug(e,{classifier:"🌟 feature",overwriteStyle:"; background-color: #309"}))};devHint("Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!");const uiUxCache=new Set,uiUxHint=e=>{!1===uiUxCache.has(e)&&(uiUxCache.add(e),Log.debug(e,{classifier:"📑 ui/ux",overwriteStyle:"; background-color: #060;"}))},a11yHintDisabled=()=>{a11yHint('"Disabled" schränkt die Zugänglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},a11yHintLabelingLandmarks=e=>{"string"==typeof e&&""!==e||a11yHint("Manche Strukturelemente, wie bspw. der nav-Tag, können mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden können, ist es erforderlich ein Aria-Label zu setzen.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},uiUxHintMillerscheZahl=(e,t=8)=>{t>7&&uiUxHint(`[${e}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Menüpunkte zu verwenden.\n\nLinks:\n- https://de.ryte.com/wiki/Millersche_Zahl\n- https://de.wikipedia.org/wiki/Millersche_Zahl`)},OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTarget=(e,t)=>{getExperimalMode()&&(Log.debug([e,t]),Log.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,o,n;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,o)=>{var n;const r=t.get("beforePatch");"function"==typeof r&&r(null===(n=e.nextState)||void 0===n?void 0:n.get(o),e.nextState,e,o)})),(null===(o=e.nextState)||void 0===o?void 0:o.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(n=e.nextHooks)||void 0===n||n.forEach(((t,o)=>{const n=t.get("afterPatch");"function"==typeof n&&n(e.state[o],e.state,e,o)}))),delete e.nextHooks},setState=(e,t,o,n={})=>{var r,i;if(void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextState.get(t)!==o){e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof n.afterPatch&&(null===(r=e.nextHooks.get(t))||void 0===r||r.set("afterPatch",n.afterPatch)),"function"==typeof n.beforePatch&&(null===(i=e.nextHooks.get(t))||void 0===i||i.set("beforePatch",n.beforePatch)),e.nextState.set(t,o),patchState(e)}},logWarn=(e,t,o,n)=>{devHint(`[${e.constructor.name}] Der Property-Wert (${o}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(n).join(", ")}`)};function watchValidator(e,t,o,n,r,i={}){o(r)?setState(e,t,r,i.hooks):null!=r||i.required?(i.required||n.add(null),logWarn(e,t,r,n)):setState(e,t,i.defaultValue,i.hooks)}const watchBoolean=(e,t,o,n)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),o,n)},watchString=(e,t,o,n={})=>{const r="number"==typeof n.minLength?null==n?void 0:n.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=r&&(void 0===(null==n?void 0:n.maxLength)||e.length<=n.maxLength)),new Set(["String"]),o,n)},watchNumber=(e,t,o,n)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==n?void 0:n.min)||"number"==typeof(null==n?void 0:n.min)&&e>=n.min)&&(void 0===(null==n?void 0:n.max)||"number"==typeof(null==n?void 0:n.max)&&e<=n.max)),new Set(["Number"]),o,n)},watchJsonArrayString=(e,t,o,n,r=(e=>e==e),i={})=>{emptyStringByArrayHandler(n,(()=>{objectObjectHandler(n,(()=>{void 0===n&&(n=[]);try{try{n=parseJson(n)}catch(e){}if(Array.isArray(n)){const l=n.find((e=>!o(e)));void 0===l&&r(n)?setState(e,t,n,i.hooks):objectObjectHandler(l,(()=>{throw Log.debug(l),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else objectObjectHandler(n,(()=>{throw Log.debug(n),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){Log.debug(e)}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?(0|[1-9]\d*)$/,FLOAT=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,mapString2Unknown=e=>{const t=typeof e,o=`${e}`;if("string"==typeof e)if(BOOLEAN.test(e))e="true"===e;else if(INTEGER.test(e))e=parseInt(e);else if(FLOAT.test(e))e=parseFloat(e);else if(JSON_CHARS.test(e))try{e=parseJson(e)}catch(e){}return t!==typeof e&&devHint(`You have used a stringified property value (${o} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},stringifyJson=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw Log.warn(["stringifyJson",e]),Log.error("↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet."),new Error}},JSON_CHARS=/^[{[]/,parseJson=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(JSON_CHARS.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){Log.warn(["parseJson",e]),Log.error("↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (&#8216;).")}}throw new Error},mapBoolean2String=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,mapStringOrBoolean2String=e=>"string"==typeof e?e:mapBoolean2String(e),koliBriQuerySelector=(e,t)=>querySelector(e,t||getDocument()),koliBriQuerySelectorAll=(e,t)=>querySelectorAll(e,t||getDocument());let DEFAULT_COLOR_CONTRAST=null;const getDefaultColorContrast=()=>(DEFAULT_COLOR_CONTRAST=DEFAULT_COLOR_CONTRAST||{backgroundColor:"#00000000",color:"#00000000",domNode:getDocument().body,level:"Fail",score:1},DEFAULT_COLOR_CONTRAST),TRANSPARENT_REGEXP=/(\d+, ){3}0\)/,koliBriA11yColorContrast=(e,t=getDefaultColorContrast())=>{const o=getComputedStyle(e),n=TRANSPARENT_REGEXP.test(o.backgroundColor)?t.backgroundColor:rgbaConvert.hex(o.backgroundColor),r=TRANSPARENT_REGEXP.test(o.color)?t.color:rgbaConvert.hex(o.color),i=s(n,r),l={backgroundColor:n,color:r,domNode:e,level:f(i),score:i};return i<4.5&&Log.error(["Color-Contrast-Error",{backgroundColor:l.backgroundColor,color:l.color,level:l.level,score:l.score},l.domNode]),l},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const o=t.domNode.querySelector(e);if(null===o){const o=t.domNode.querySelectorAll('[class="hydrated"]');for(let n=0;n<o.length&&(t.domNode=o[n],null===(t=koliBriQuerySelectorColors(e,t)).domNode);n++);return t}return koliBriA11yColorContrast(o,t)},scrollByHTMLElement=(e,t=window)=>{e instanceof HTMLElement?(t.scrollTo({behavior:"smooth",top:e.getBoundingClientRect().top+getWindow().pageYOffset-50}),e.focus()):devHint("Das HTMLElement ist nicht valide, zu dem gescrollt werden soll.")},scrollBySelector=(e,t)=>{if((e instanceof Document||e instanceof HTMLElement||e instanceof ShadowRoot)&&"string"==typeof t){devHint("Bei der Methode querySelectorAll wurden die Parameter document, selector in selector, document getauscht, da der Parameter selector nicht, allerdings der Parameter document optional sein kann.");const o=`${t}`;t=e,e=o}if("string"==typeof e){const o=koliBriQuerySelector(e,t);o instanceof HTMLElement?scrollByHTMLElement(o):devHint(`Es konnte kein HTMLElement mit dem Selector (${e}) gefunden werden, zu dem gescrollt werden soll.`)}else devHint("Der Selector ist nicht valide, zu dem gescrollt werden soll.")};class KoliBriUtils{static queryHtmlElementColors(e,t,o=!1,n=!0){let r=null;if(!0===o||!1===KoliBriUtils.executionLock)if(!1===o&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===n&&Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)r=t;else{const o=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)o.add(e[t])}const n=t.domNode;if("function"==typeof n.assignedNodes){const e=n.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&o.add(e[t])}const i=t.domNode.children;for(let e=0;e<i.length;e++)o.add(i[e]);const l=Array.from(o);for(let o=0;o<l.length;o++){let n=KoliBriUtils.cache.get(l[o]);void 0===n&&(n=koliBriA11yColorContrast(l[o],t)),KoliBriUtils.cache.set(l[o],n);const i=KoliBriUtils.queryHtmlElementColors(e,n,!0,!1);if(null!==i){r=i;break}}}else Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===o&&(!0===n&&Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),r}}KoliBriUtils.executionLock=!1,KoliBriUtils.cache=new Map;class KoliBriDevHelper{}KoliBriDevHelper.patchTheme=patchTheme,KoliBriDevHelper.patchThemeTag=patchThemeTag,KoliBriDevHelper.querySelector=koliBriQuerySelector,KoliBriDevHelper.querySelectorAll=koliBriQuerySelectorAll,KoliBriDevHelper.scrollByHTMLElement=scrollByHTMLElement,KoliBriDevHelper.scrollBySelector=scrollBySelector,KoliBriDevHelper.stringifyJson=stringifyJson;export{koliBriQuerySelectorColors as $,mapBoolean2String as A,a11yHintDisabled as B,watchNumber as C,rgbaConvert as D,s as E,a11yHintLabelingLandmarks as F,watchJsonArrayString as G,uiUxHintMillerscheZahl as H,scrollBySelector as I,deprecatedHint as J,KoliBriDevHelper as K,Log as L,mapString2Unknown as M,STATE_CHANGE_EVENT as N,getKoliBri as O,emptyStringByArrayHandler as P,koliBriQuerySelector as Q,initKoliBri as R,STORE as S,ToasterService as T,getDevMode as U,renderDevAdvice as V,getColorContrastAnalysis as W,KoliBriUtils as X,koliBriA11yColorContrast as Y,KoliBri as Z,koliBriQuerySelectorAll as _,watchValidator as a,stringifyJson as a0,getDocument as b,configKoliBri as c,devHint as d,parseJson as e,isStyle as f,getThemeDetails as g,isObject as h,isString as i,watchBoolean as j,a11yHint as k,isEmptyOrPrefixOf as l,featureHint as m,nonce as n,objectObjectHandler as o,processEnv as p,setState as q,register as r,setThemeStyle as s,setEventTarget as t,uiUxHint as u,getExperimalMode as v,watchString as w,propagateFocus as x,devWarning as y,mapStringOrBoolean2String as z};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{l as watchBoolean}from"./prop.validators.js";const validateShow=(o,a,t)=>{watchBoolean(o,"_show",a,t)};export{validateShow as v};
4
+ import{j as watchBoolean}from"./prop.validators.js";const validateShow=(o,a,t)=>{watchBoolean(o,"_show",a,t)};export{validateShow as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{C as watchNumber,j as a11yHint}from"./prop.validators.js";const options={hooks:{afterPatch:a=>{-1!==a&&0!==a&&a11yHint("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},validateTabIndex=(a,t)=>{watchNumber(a,"_tabIndex",t,options)};export{validateTabIndex as v};
4
+ import{C as watchNumber,k as a11yHint}from"./prop.validators.js";const options={hooks:{afterPatch:a=>{-1!==a&&0!==a&&a11yHint("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},validateTabIndex=(a,t)=>{watchNumber(a,"_tabIndex",t,options)};export{validateTabIndex as v};
@@ -1 +1 @@
1
- {"file":"button-link-283b2d32.js","mappings":";;;;;MAgNa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAa;EAC1G,cAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,sCAAsC,CAAC,CAAC,EACjD,KAAK,EACL;IACC,YAAY,EAAE,KAAK;GACnB,CACD,CAAC;AACH;;;;","names":[],"sources":["./src/types/button-link.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Events } from '../enums/events';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback, EventValueOrEventCallback } from './callbacks';\nimport { Stringified } from './common';\nimport { KoliBriAllIcon, KoliBriIconProp } from './icon';\nimport { Align, PropAriaCurrent, PropAriaExpanded, PropAriaSelected, PropDisabled, PropDownload, PropHideLabel, PropLabel, PropStealth } from './props';\n\nexport type AlternativButtonLinkRole = 'button' | 'link' | 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = PropLabel;\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaLabel: string;\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Align;\n\t/**\n\t * @deprecated\n\t */\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Align;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled &\n\tPropHideLabel;\n\ntype RequiredButtonAndLinkStates = {\n\ticon: KoliBriAllIcon;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaLabel: string;\n\tariaControls: string;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Align;\n\t/**\n\t * @deprecated\n\t */\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Align;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled &\n\tPropHideLabel;\n\n/**\n * Button\n */\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantPropState = {\n\tvariant: KoliBriButtonVariant;\n};\nexport type KoliBriButtonCustomClassPropState = {\n\tcustomClass: string;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tdisabled: boolean;\n\tid: string;\n\ton: KoliBriButtonCallbacks<unknown>;\n\ttype: KoliBriButtonType;\n\tvalue: Stringified<unknown>;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\ntype RequiredButtonLinkStates = RequiredButtonAndLinkStates &\n\tKoliBriButtonVariantPropState & {\n\t\ttype: KoliBriButtonType;\n\t};\ntype OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonCustomClassPropState & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tdisabled: boolean;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks<unknown>;\n\t\tvalue: unknown;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates & KoliBriButtonVariantPropState;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonCustomClassPropState;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\n/**\n * @deprecated Link should not use the on-click event. Use a button instead.\n */\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventValueOrEventCallback<Event, string>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps & {\n\thref: string;\n};\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated A link could never be disabled. Use a button instead.\n\t */\n\tdisabled: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropDownload &\n\tPropStealth;\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\nexport type RequiredLinkStates = RequiredButtonAndLinkStates & {\n\thref: string;\n};\nexport type OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropAriaSelected &\n\tPropDownload &\n\tPropStealth;\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\n// type RequiredLinkButtonStates = KoliBriButtonVariantPropState;\n// type OptionalLinkButtonStates = KoliBriButtonCustomClassPropState;\n// type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: Align): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['Alignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n"],"version":3}
1
+ {"file":"button-link-283b2d32.js","mappings":";;;;;MAiNa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAa;EAC1G,cAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,sCAAsC,CAAC,CAAC,EACjD,KAAK,EACL;IACC,YAAY,EAAE,KAAK;GACnB,CACD,CAAC;AACH;;;;","names":[],"sources":["./src/types/button-link.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Events } from '../enums/events';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback, EventValueOrEventCallback } from './callbacks';\nimport { Stringified } from './common';\nimport { KoliBriAllIcon, KoliBriIconProp } from './icon';\nimport { Align, PropAriaCurrent, PropAriaExpanded, PropAriaSelected, PropDisabled, PropDownload, PropHideLabel, PropLabel, PropStealth } from './props';\n\nexport type AlternativButtonLinkRole = 'button' | 'link' | 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = PropLabel;\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaLabel: string;\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Align;\n\t/**\n\t * @deprecated\n\t */\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Align;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled &\n\tPropHideLabel;\n\ntype RequiredButtonAndLinkStates = {\n\ticon: KoliBriAllIcon;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaLabel: string;\n\tariaControls: string;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Align;\n\t/**\n\t * @deprecated\n\t */\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Align;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled &\n\tPropHideLabel;\n\n/**\n * Button\n */\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantPropState = {\n\tvariant: KoliBriButtonVariant;\n};\nexport type KoliBriButtonCustomClassPropState = {\n\tcustomClass: string;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tdisabled: boolean;\n\tid: string;\n\ton: KoliBriButtonCallbacks<unknown>;\n\ttype: KoliBriButtonType;\n\tvalue: Stringified<unknown>;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\ntype RequiredButtonLinkStates = RequiredButtonAndLinkStates &\n\tKoliBriButtonVariantPropState & {\n\t\ttype: KoliBriButtonType;\n\t};\ntype OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonCustomClassPropState & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tdisabled: boolean;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks<unknown>;\n\t\tvalue: unknown;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates & KoliBriButtonVariantPropState;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonCustomClassPropState;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\n/**\n * @deprecated Link should not use the on-click event. Use a button instead.\n */\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventValueOrEventCallback<Event, string>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps & {\n\thref: string;\n};\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated A link could never be disabled. Use a button instead.\n\t */\n\tdisabled: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropDownload &\n\tPropStealth;\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\ntype RequiredLinkStates = RequiredButtonAndLinkStates & {\n\thref: string;\n};\ntype OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropAriaSelected &\n\tPropDownload &\n\tPropStealth;\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\nexport type KoliBriLinkAPI = Generic.Element.ComponentApi<RequiredLinkProps, OptionalLinkProps, RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\n// type RequiredLinkButtonStates = KoliBriButtonVariantPropState;\n// type OptionalLinkButtonStates = KoliBriButtonCustomClassPropState;\n// type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: Align): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['Alignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n"],"version":3}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{d as devHint}from"./a11y.tipps-2e27f8e6.js";import{b as getExperimalMode}from"./dev.utils-157f0499.js";import{f as setEventTarget,K as KoliBriDevHelper}from"./prop.validators-f81af56e.js";const searchFormElement=e=>{for(getExperimalMode()&&(devHint("↓ Search form element start."),console.log(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&"KOL-FORM"!==e.tagName;)e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null,getExperimalMode()&&console.log(e);return getExperimalMode()&&devHint("↑ Search form element finished."),e},propagateResetEventToForm=(e={})=>{var t,o;const n=searchFormElement(e.form);if(n instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===n.tagName)setEventTarget(e,n),n.dispatchEvent(e);else if("KOL-FORM"===n.tagName){setEventTarget(e,KoliBriDevHelper.querySelector("form",n));const a=n;"function"==typeof(null===(t=a._on)||void 0===t?void 0:t.onReset)&&(null===(o=a._on)||void 0===o||o.onReset(e))}}},propagateSubmitEventToForm=(e={})=>{var t,o;const n=searchFormElement(e.form);if(n instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:n});if("FORM"===n.tagName)setEventTarget(e,n),n.dispatchEvent(e);else if("KOL-FORM"===n.tagName){setEventTarget(e,KoliBriDevHelper.querySelector("form",n));const a=n;"function"==typeof(null===(t=a._on)||void 0===t?void 0:t.onSubmit)&&(null===(o=a._on)||void 0===o||o.onSubmit(e))}}};export{propagateResetEventToForm as a,propagateSubmitEventToForm as p};
@@ -0,0 +1 @@
1
+ {"file":"controller-4ec2558c.js","mappings":";;;;;;;AAKA,MAAM,iBAAiB,GAAG,CAAC,EAAoC;EAC9D,IAAI,gBAAgB,EAAE,EAAE;IACvB,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;GAChB;EACD,OAAO,EAAE,YAAY,WAAW,IAAI,EAAE,CAAC,OAAO,KAAK,MAAM,IAAI,EAAE,CAAC,OAAO,KAAK,UAAU,EAAE;IACvF,IAAI,EAAE,CAAC,aAAa,YAAY,WAAW,EAAE;MAC5C,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC;KACtB;SAAM,IAAI,EAAE,CAAC,UAAU,YAAY,UAAU,EAAE;MAC/C,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;KACxB;SAAM;MACN,EAAE,GAAG,IAAI,CAAC;KACV;IACD,IAAI,gBAAgB,EAAE,EAAE;MACvB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KAChB;GACD;EACD,IAAI,gBAAgB,EAAE,EAAE;IACvB,OAAO,CAAC,iCAAiC,CAAC,CAAC;GAC3C;EACD,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;MAEW,yBAAyB,GAAG,CACxC,UAGI,EAAE;;EAEN,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;EAC7C,IAAI,IAAI,YAAY,WAAW,EAAE;I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,OAAO,GAAG,IAAwB,CAAC;MACzC,IAAI,QAAO,MAAA,OAAO,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;QAChD,MAAA,OAAO,CAAC,GAAG,0CAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;OAC7B;KACD;GACD;AACF;;;;","names":[],"sources":["./src/components/form/controller.ts"],"sourcesContent":["import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTarget } from '../../utils/prop.validators';\nimport { KoliBriFormProps } from './types';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as KoliBriFormProps;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as KoliBriFormProps;\n\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t}\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{a as watchValidator,d as watchJsonArrayString,m as mapString2Unknown,s as setState,b as watchBoolean}from"./prop.validators-f81af56e.js";import{S as STATE_CHANGE_EVENT}from"./reuse-3a02afb9.js";import{I as InputController}from"./controller-cc18d25f.js";const fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,a)=>{const i=`${o}-${a}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,i):t.set(i,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){watchBoolean(this.component,"_required",t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchListValue=(t,e)=>{const o=e.has("_list")?e.get("_list"):this.component.state._list;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateList(t){watchJsonArrayString(this.component,"_list",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),t,void 0,{hooks:{beforePatch:this.beforePatchListValue}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchListValue}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateList(this.component._list),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f};
4
+ import{a as watchValidator,d as watchJsonArrayString,m as mapString2Unknown,s as setState,b as watchBoolean}from"./prop.validators-f81af56e.js";import{S as STATE_CHANGE_EVENT}from"./reuse-3a02afb9.js";import{I as InputController}from"./controller-8fc78dec.js";const fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,a)=>{const i=`${o}-${a}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,i):t.set(i,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){watchBoolean(this.component,"_required",t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchListValue=(t,e)=>{const o=e.has("_list")?e.get("_list"):this.component.state._list;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateList(t){watchJsonArrayString(this.component,"_list",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),t,void 0,{hooks:{beforePatch:this.beforePatchListValue}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchListValue}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateList(this.component._list),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f};
@@ -1 +1 @@
1
- {"file":"controller-5a459788.js","mappings":";;;;;;;MAWa,gBAAgB,GAAG,CAAI,YAAoC,E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,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;;;;;","names":[],"sources":["./src/components/input-radio/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { PropLabel } from '../../types/props';\nimport { W3CInputValue } from '../../types/w3c';\nimport { mapString2Unknown, setState, watchBoolean, watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabel;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchListValue = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst list = nextState.has('_list') ? nextState.get('_list') : this.component.state._list;\n\t\tif (Array.isArray(list) && list.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, list as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, list as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\tlist[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateList(value?: Stringified<Option<W3CInputValue>[]>): void {\n\t\twatchJsonArrayString(\n\t\t\tthis.component,\n\t\t\t'_list',\n\t\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\t\tvalue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateValue(value?: Stringified<unknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? value[0] : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateList(this.component._list);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-60d1d5f4.js","mappings":";;;;;;;MAWa,gBAAgB,GAAG,CAAI,YAAoC,EAAE,OAA0B,EAAE,MAAM,GAAG,EAAE;EAChH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK;IAC7B,MAAM,GAAG,GAAG,GAAG,MAAM,IAAI,KAAK,EAAE,CAAC;IACjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;MACjH,IAAI,KAAK,CAAC,OAAO,C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AAM,GAAG,CAAC,EACrI,KAAK,EACL,SAAS,EACT;MACC,KAAK,EAAE;QACN,WAAW,EAAE,IAAI,CAAC,oBAAoB;OACtC;KACD,CACD,CAAC;GACF;EAEM,aAAa,CAAC,KAA4B;IAChD,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACjC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAChD,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;MACzC,WAAW,EAAE,IAAI,CAAC,oBAAoB;KACtC,CAAC,CAAC;IACH,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,MAAgB,CAAC,CAAC;GAC7D;EAEM,iBAAiB,CAAC,QAAiC;IACzD,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAE1B,IAAI,CAAC,aAAa,GAAG;MACpB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACnC,MAAM,OAAO,GAAG,UAAU,CAAC;UAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;UACtB,QAAQ,CAAC,kBAAkB,CAAC,CAAC;SAC7B,CAAC,CAAC;OACH;KACD,CAAC;IAEF,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACtD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;;;;;","names":[],"sources":["./src/components/input-radio/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { PropLabel } from '../../types/props';\nimport { W3CInputValue } from '../../types/w3c';\nimport { mapString2Unknown, setState, watchBoolean, watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabel;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchListValue = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst list = nextState.has('_list') ? nextState.get('_list') : this.component.state._list;\n\t\tif (Array.isArray(list) && list.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, list as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, list as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\tlist[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateList(value?: Stringified<Option<W3CInputValue>[]>): void {\n\t\twatchJsonArrayString(\n\t\t\tthis.component,\n\t\t\t'_list',\n\t\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\t\tvalue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateValue(value?: Stringified<unknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? value[0] : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateList(this.component._list);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{g as a11yHintDisabled,d as devHint}from"./a11y.tipps-2e27f8e6.js";import{b as watchBoolean,w as watchString,s as setState,o as objectObjectHandler,p as parseJson}from"./prop.validators-f81af56e.js";import{v as validateTabIndex}from"./tab-index-ff5374b8.js";import{b as getExperimalMode}from"./dev.utils-157f0499.js";import{v as validateLabel}from"./label-559ca626.js";const getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,n="string"==typeof t._hint&&t._hint.length>0,o=[];return!0===e&&o.push(`${t._id}-error`),!0===n&&o.push(`${t._id}-hint`),{hasError:e,hasHint:n,ariaDescribedBy:o}},EXPERIMENTAL_MODE=getExperimalMode();function syncElementAttribute(t,e,n){EXPERIMENTAL_MODE&&("boolean"==typeof n||"number"==typeof n||"string"==typeof n?null==e||e.setAttribute(t,`${n}`):null==e||e.removeAttribute(t))}class ControlledInputController{constructor(t,e,n){var o,i,s,a,l;if(this.syncFormAssociatedName=()=>{syncElementAttribute("id",this.formAssociated,this.component.state._id),syncElementAttribute("name",this.formAssociated,this.component.state._name),syncElementAttribute("value",this.formAssociated,this.component.state._value)},this.setFormAssociatedValue=(t=null)=>{syncElementAttribute("value",this.formAssociated,t),syncElementAttribute("value",this.syncToOwnInput,t)},this.component=t,this.name=e,this.host=n,EXPERIMENTAL_MODE){this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const t=(null===(o=this.host)||void 0===o?void 0:o.children)||[];for(let e=0;e<t.length;e++)"INPUT"===(null===(i=this.host)||void 0===i?void 0:i.children[e].tagName)&&(null===(s=this.host)||void 0===s||s.removeChild(null===(a=this.host)||void 0===a?void 0:a.children[e]));null===(l=this.host)||void 0===l||l.appendChild(this.formAssociated)}}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateSyncValueBySelector(t){if(EXPERIMENTAL_MODE&&"string"==typeof t){const e=document.querySelector(t);e instanceof HTMLInputElement&&(this.syncToOwnInput=e)}}validateTouched(t){watchBoolean(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateSyncValueBySelector(this.component._syncValueBySelector),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,n){super(t,e,n),this.hideLabel=!1,this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){watchBoolean(this.component,"_adjustHeight",t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateError(t){watchString(this.component,"_error",t)}validateHideLabel(t){watchBoolean(this.component,"_hideLabel",t)}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName},minLength:1}),""!==t&&void 0!==t||devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){validateLabel(this.component,t)}validateName(t){watchString(this.component,"_name",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&devHint("Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateName(this.component._name),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),this.syncFormAssociatedName()}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const n=t.target.value;this.setFormAssociatedValue(n),this.valueChangeListeners.forEach((t=>t(n))),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,n)}onClick(t){var e;"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}setValue(t,e){var n;this.setFormAssociatedValue(e),"function"==typeof(null===(n=this.component._on)||void 0===n?void 0:n.onChange)&&this.component._on.onChange(t,e)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{InputController as I,getRenderStates as g};
@@ -0,0 +1 @@
1
+ {"file":"controller-8fc78dec.js","mappings":";;;;;;;;;MAOa,eAAe,GAAG,CAAC,KAK/B;EAKA,MAAM,QAAQ,GAAG,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,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AC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAClC;GACD;EAES,OAAO,CAAC,KAAY;;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,QAAO,MAAA,IAAI,CAAC,SAAS,CAAC,GAAG,0CAAE,OAAO,CAAA,KAAK,UAAU,EAAE;MACtD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAClC;GACD;EAEM,QAAQ,CAAC,KAAY,EAAE,KAAgC;;IAC7D,IAAI,CAAC,sBAAsB,CAAC,KAAe,CAAC,CAAC;IAC7C,IAAI,QAAO,MAAA,IAAI,CAAC,SAAS,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;MACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAC1C;GACD;EAEM,sBAAsB,CAAC,QAA6B;IAC1D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACzC;;;;;","names":[],"sources":["./src/components/input/controller.ts","./src/components/input-adapter-leanup/controller.ts","./src/components/@deprecated/input/controller.ts"],"sourcesContent":["/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_error?: string;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: boolean;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst hasError = typeof state._error === 'string' && state._error.length > 0 && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { Generic } from '@a11y-ui/core';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { Props, Watches } from './types';\n\nconst EXPERIMENTAL_MODE = getExperimalMode();\n\nfunction syncElementAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\tif (EXPERIMENTAL_MODE) {\n\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t} else {\n\t\t\telement?.removeAttribute(qualifiedName);\n\t\t}\n\t}\n}\n\nexport class ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLInputElement;\n\tpublic syncToOwnInput?: HTMLInputElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.name = name;\n\t\tthis.host = host;\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\tconst children = this.host?.children || [];\n\t\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\t\tif (this.host?.children[i].tagName === 'INPUT') {\n\t\t\t\t\tthis.host?.removeChild(this.host?.children[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tprotected readonly syncFormAssociatedName = () => {\n\t\tsyncElementAttribute('id', this.formAssociated, this.component.state._id as string);\n\t\tsyncElementAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\tsyncElementAttribute('value', this.formAssociated, this.component.state._value as string);\n\t};\n\n\tpublic readonly setFormAssociatedValue = (value: string | null = null) => {\n\t\tsyncElementAttribute('value', this.formAssociated, value as string);\n\t\tsyncElementAttribute('value', this.syncToOwnInput, value as string);\n\t};\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateSyncValueBySelector(value?: string): void {\n\t\tif (EXPERIMENTAL_MODE && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value);\n\t\t\tif (input instanceof HTMLInputElement) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\twatchBoolean(this.component, '_touched', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import { Generic } from '@a11y-ui/core';\nimport { ButtonProps } from '../../../types/button-link';\nimport { InputTypeOnDefault } from '../../../types/input/types';\nimport { a11yHintDisabled, devHint } from '../../../utils/a11y.tipps';\nimport { objectObjectHandler, parseJson, setState, watchBoolean, watchString } from '../../../utils/prop.validators';\nimport { validateTabIndex } from '../../../utils/validators/tab-index';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\nimport { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport { Props, Watches } from './types';\nimport { validateLabel } from '../../../types/props';\n\ntype ValueChangeListener = (value: string) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tpublic hideLabel = false;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this.component, '_accessKey', value);\n\t}\n\n\tpublic validateAdjustHeight(value?: boolean): void {\n\t\twatchBoolean(this.component, '_adjustHeight', value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\tpublic validateError(value?: string): void {\n\t\twatchString(this.component, '_error', value);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value);\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t\tminLength: 1,\n\t\t});\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.`);\n\t\t}\n\t}\n\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this.component, value);\n\t}\n\n\tpublic validateName(value?: string): void {\n\t\twatchString(this.component, '_name', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateLabel(this.component._label);\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t\tthis.syncFormAssociatedName();\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tthis.component._touched = true;\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\tprotected onChange(event: Event): void {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\t\tthis.setFormAssociatedValue(value);\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic setValue(event: Event, value: string | number | boolean): void {\n\t\tthis.setFormAssociatedValue(value as string);\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t};\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{d as devHint}from"./a11y.tipps-2e27f8e6.js";import{a as watchValidator,b as watchBoolean,e as watchNumber,w as watchString}from"./prop.validators-f81af56e.js";import{I as InputIconController}from"./controller-icon-65f3377a.js";class InputPasswordController extends InputIconController{constructor(e,t,a){super(e,t,a),this.handleHiddenLabelAndRequired=()=>{!0===this.component.state._hideLabel&&!0===this.component.state._required?(devHint("[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist."),this.hideLabel=!1):this.hideLabel=!0===this.component.state._hideLabel},this.component=e}validateAutoComplete(e){watchValidator(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHideLabel(e){watchBoolean(this.component,"_hideLabel",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateMaxLength(e){watchNumber(this.component,"_maxLength",e,{min:0})}validatePattern(e){watchString(this.component,"_pattern",e)}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}validateReadOnly(e){watchBoolean(this.component,"_readOnly",e)}validateRequired(e){watchBoolean(this.component,"_required",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateSize(e){watchNumber(this.component,"_size",e,{min:1})}validateValue(e){watchString(this.component,"_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateSize(this.component._size),this.validateValue(this.component._value)}onBlur(e){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(e)}onFocus(e){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(e)}}export{InputPasswordController as I};
4
+ import{d as devHint}from"./a11y.tipps-2e27f8e6.js";import{a as watchValidator,b as watchBoolean,e as watchNumber,w as watchString}from"./prop.validators-f81af56e.js";import{I as InputIconController}from"./controller-icon-7e3b404f.js";class InputPasswordController extends InputIconController{constructor(e,t,a){super(e,t,a),this.handleHiddenLabelAndRequired=()=>{!0===this.component.state._hideLabel&&!0===this.component.state._required?(devHint("[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist."),this.hideLabel=!1):this.hideLabel=!0===this.component.state._hideLabel},this.component=e}validateAutoComplete(e){watchValidator(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHideLabel(e){watchBoolean(this.component,"_hideLabel",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateMaxLength(e){watchNumber(this.component,"_maxLength",e,{min:0})}validatePattern(e){watchString(this.component,"_pattern",e)}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}validateReadOnly(e){watchBoolean(this.component,"_readOnly",e)}validateRequired(e){watchBoolean(this.component,"_required",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateSize(e){watchNumber(this.component,"_size",e,{min:1})}validateValue(e){watchString(this.component,"_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateSize(this.component._size),this.validateValue(this.component._value)}onBlur(e){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(e)}onFocus(e){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(e)}}export{InputPasswordController as I};
@@ -1 +1 @@
1
- {"file":"controller-cb6b97eb.js","mappings":";;;;;;;MAOa,uBAAwB,SAAQ,mBAAmB;EAI/D,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,iCAA4B,GAAG;MACtC,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE;QACxF,OAAO,CAAC,kIAAkI,CAAC,CAAC;QAC5I,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;OACvB;WAAM;QACN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;OAC1D;KACD,CAAC;IAVD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAWM,oBAAoB,CAAC,KAAsB;IACjD,cAAc,CACb,IAAI,CAAC,SAAS,EACd,eAAe,EACf,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,KAAK,KAAK,KAAK,IAAI,IAAI,KAAK,KA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nimport { InputTypeOnOff } from '../../types/input/types';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputIconController } from '../@deprecated/input/controller-icon';\nimport { Props, Watches } from './types';\n\nexport class InputPasswordController extends InputIconController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate placeholderCache?: string;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate handleHiddenLabelAndRequired = (): void => {\n\t\tif (this.component.state._hideLabel === true && this.component.state._required === true) {\n\t\t\tdevHint(`[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist.`);\n\t\t\tthis.hideLabel = false;\n\t\t} else {\n\t\t\tthis.hideLabel = this.component.state._hideLabel === true;\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'on' || value === 'off'),\n\t\t\tnew Set(['on | off']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\twatchString(this.component, '_pattern', value);\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateSize(value?: number): void {\n\t\twatchNumber(this.component, '_size', value, {\n\t\t\tmin: 1,\n\t\t});\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateSize(this.component._size);\n\t\tthis.validateValue(this.component._value);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\t/**\n\t\t * Beim Screenreader NVDA wird der Placeholder mit\n\t\t * vorgelesen. Somit kann es vorkommen, dass das\n\t\t * Label und der Placeholder vorgelesen werden.\n\t\t *\n\t\t * Aufgrund dessen, dass das Label immer vorgelesen\n\t\t * werden muss, kann das zusätzliche Vorlesen des\n\t\t * Placeholders störend sein.\n\t\t *\n\t\t * Damit beim Fokussieren das \"doppelte\" vorlesen\n\t\t * vermieden werden kann, wird der Placeholder für\n\t\t * den fokussierten Feldstatus entfernt.\n\t\t *\n\t\t * Hinweis: Für alle Nutzenden müssen die all dar-\n\t\t * gestellten Inhalte, also auch der Place-\n\t\t * holder, gleichermaßen zugänglich sein.\n\t\t * Das oben beschriebene Handling erfüllt\n\t\t * diese Anforderung nicht.\n\t\t */\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: this.placeholderCache,\n\t\t};\n\t\tthis.placeholderCache = undefined;\n\t\tsuper.onBlur(event);\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.placeholderCache = this.component.state._placeholder as string;\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: undefined,\n\t\t};\n\t\tsuper.onFocus(event);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-ad7fb632.js","mappings":";;;;;;;MAOa,uBAAwB,SAAQ,mBAAmB;EAI/D,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,iCAA4B,GAAG;MACtC,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE;QACxF,OAAO,CAAC,kIAAkI,CAAC,CAAC;QAC5I,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;OACvB;WAAM;QACN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;OAC1D;KACD,CAAC;IAVD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAWM,oBAAoB,CAAC,KAAsB;IACjD,cAAc,CACb,IAAI,CAAC,SAAS,EACd,eAAe,EACf,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,KAAK,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EACpF,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,EACrB,KAAK,CACL,CAAC;GACF;EAEM,iBAAiB,CAAC,KAAe;IACvC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;MACjD,KAAK,EAAE;QACN,UAAU,EAAE,IAAI,CAAC,4BAA4B;OAC7C;KACD,CAAC,CAAC;GACH;EAEM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;MAChD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BAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;EAES,MAAM,CAAC,KAAY;IAoB5B,IAAI,CAAC,SAAS,CAAC,KAAK,mCAChB,IAAI,CAAC,SAAS,CAAC,KAAK,KACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,GACnC,CAAC;IACF,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;GACpB;EAES,OAAO,CAAC,KAAY;IAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAsB,CAAC;IACpE,IAAI,CAAC,SAAS,CAAC,KAAK,mCAChB,IAAI,CAAC,SAAS,CAAC,KAAK,KACvB,YAAY,EAAE,SAAS,GACvB,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;GACrB;;;;;","names":[],"sources":["./src/components/input-password/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { InputTypeOnOff } from '../../types/input/types';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputIconController } from '../@deprecated/input/controller-icon';\nimport { Props, Watches } from './types';\n\nexport class InputPasswordController extends InputIconController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate placeholderCache?: string;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate handleHiddenLabelAndRequired = (): void => {\n\t\tif (this.component.state._hideLabel === true && this.component.state._required === true) {\n\t\t\tdevHint(`[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist.`);\n\t\t\tthis.hideLabel = false;\n\t\t} else {\n\t\t\tthis.hideLabel = this.component.state._hideLabel === true;\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'on' || value === 'off'),\n\t\t\tnew Set(['on | off']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\twatchString(this.component, '_pattern', value);\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateSize(value?: number): void {\n\t\twatchNumber(this.component, '_size', value, {\n\t\t\tmin: 1,\n\t\t});\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateSize(this.component._size);\n\t\tthis.validateValue(this.component._value);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\t/**\n\t\t * Beim Screenreader NVDA wird der Placeholder mit\n\t\t * vorgelesen. Somit kann es vorkommen, dass das\n\t\t * Label und der Placeholder vorgelesen werden.\n\t\t *\n\t\t * Aufgrund dessen, dass das Label immer vorgelesen\n\t\t * werden muss, kann das zusätzliche Vorlesen des\n\t\t * Placeholders störend sein.\n\t\t *\n\t\t * Damit beim Fokussieren das \"doppelte\" vorlesen\n\t\t * vermieden werden kann, wird der Placeholder für\n\t\t * den fokussierten Feldstatus entfernt.\n\t\t *\n\t\t * Hinweis: Für alle Nutzenden müssen die all dar-\n\t\t * gestellten Inhalte, also auch der Place-\n\t\t * holder, gleichermaßen zugänglich sein.\n\t\t * Das oben beschriebene Handling erfüllt\n\t\t * diese Anforderung nicht.\n\t\t */\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: this.placeholderCache,\n\t\t};\n\t\tthis.placeholderCache = undefined;\n\t\tsuper.onBlur(event);\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.placeholderCache = this.component.state._placeholder as string;\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: undefined,\n\t\t};\n\t\tsuper.onFocus(event);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{a as watchValidator,d as watchJsonArrayString}from"./prop.validators-f81af56e.js";import{I as InputPasswordController}from"./controller-cb6b97eb.js";class InputTextEmailController extends InputPasswordController{constructor(t,o,e){super(t,o,e),this.component=t}validateList(t){watchJsonArrayString(this.component,"_list",(t=>"string"==typeof t),t)}componentWillLoad(){super.componentWillLoad(),this.validateList(this.component._list)}}class InputTextController extends InputTextEmailController{constructor(t,o,e){super(t,o,e),this.hasError=!1,this.hasList=!1,this.component=t}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&("text"===t||"search"===t||"url"===t||"tel"===t)),new Set(["String {text, search, url, tel}"]),t)}componentWillLoad(){super.componentWillLoad(),this.validateType(this.component._type)}}export{InputTextEmailController as I,InputTextController as a};
4
+ import{a as watchValidator,d as watchJsonArrayString}from"./prop.validators-f81af56e.js";import{I as InputPasswordController}from"./controller-ad7fb632.js";class InputTextEmailController extends InputPasswordController{constructor(t,o,e){super(t,o,e),this.component=t}validateList(t){watchJsonArrayString(this.component,"_list",(t=>"string"==typeof t),t)}componentWillLoad(){super.componentWillLoad(),this.validateList(this.component._list)}}class InputTextController extends InputTextEmailController{constructor(t,o,e){super(t,o,e),this.hasError=!1,this.hasList=!1,this.component=t}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&("text"===t||"search"===t||"url"===t||"tel"===t)),new Set(["String {text, search, url, tel}"]),t)}componentWillLoad(){super.componentWillLoad(),this.validateType(this.component._type)}}export{InputTextEmailController as I,InputTextController as a};