@public-ui/components 1.1.15-rc.4 → 1.1.15-rc.6

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 (322) hide show
  1. package/cheat-sheet.html +46 -24
  2. package/custom-elements.json +7 -1
  3. package/dist/cjs/{a11y.tipps-df3024df.js → a11y.tipps-e1770acf.js} +1 -1
  4. package/dist/cjs/{app-globals-ecd5cf81.js → app-globals-0afb74ff.js} +1 -1
  5. package/dist/cjs/{button-link-a5704422.js → button-link-53dceb58.js} +1 -1
  6. package/dist/cjs/{controller-2055b473.js → controller-79725777.js} +1 -1
  7. package/dist/cjs/{controller-f2f8800b.js → controller-9c3fb07f.js} +1 -1
  8. package/dist/cjs/controller-deac578d.js +4 -0
  9. package/dist/cjs/{controller-69fb7984.js → controller-e4ec0893.js} +1 -1
  10. package/dist/cjs/controller-f272d74e.js +4 -0
  11. package/dist/cjs/{controller-ecd4b3bf.js → controller-f3a48fd9.js} +1 -1
  12. package/dist/cjs/dev.utils-2353100d.js +4 -0
  13. package/dist/cjs/devtools-62a24a78.js +4 -0
  14. package/dist/cjs/index.cjs.js +1 -1
  15. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  16. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  17. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  19. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  20. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  21. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-button-wc_2.cjs.entry.js +4 -0
  23. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  25. package/dist/cjs/kol-color.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-heading-wc_2.cjs.entry.js +4 -0
  29. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-input-adapter-leanup.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  65. package/dist/cjs/kolibri.cjs.js +1 -1
  66. package/dist/cjs/{label-4175574d.js → label-f7d91f42.js} +1 -1
  67. package/dist/cjs/loader.cjs.js +1 -1
  68. package/dist/cjs/prop.validators-8ddaf00e.js +4 -0
  69. package/dist/cjs/{icon-b3c58fc8.js → tab-index-6d58aaf6.js} +1 -1
  70. package/dist/cjs/validation-1d0eba3e.js +4 -0
  71. package/dist/cjs/{validation-a9dd4aa1.js → validation-7fc058fe.js} +1 -1
  72. package/dist/components/component.js +1 -1
  73. package/dist/components/component10.js +1 -1
  74. package/dist/components/component11.js +1 -1
  75. package/dist/components/component12.js +1 -1
  76. package/dist/components/component13.js +1 -1
  77. package/dist/components/component2.js +1 -1
  78. package/dist/components/component4.js +1 -1
  79. package/dist/components/component5.js +1 -1
  80. package/dist/components/component6.js +1 -1
  81. package/dist/components/component7.js +1 -1
  82. package/dist/components/component8.js +1 -1
  83. package/dist/components/component9.js +1 -1
  84. package/dist/components/controller.js +1 -1
  85. package/dist/components/controller2.js +1 -1
  86. package/dist/components/controller3.js +1 -1
  87. package/dist/components/controller4.js +1 -1
  88. package/dist/components/devtools.js +1 -1
  89. package/dist/components/kol-abbr.js +1 -1
  90. package/dist/components/kol-accordion.js +1 -1
  91. package/dist/components/kol-badge.js +1 -1
  92. package/dist/components/kol-breadcrumb.js +1 -1
  93. package/dist/components/kol-button-group.js +1 -1
  94. package/dist/components/kol-button-link.js +1 -1
  95. package/dist/components/kol-button-wc.js +1 -1
  96. package/dist/components/kol-card.js +1 -1
  97. package/dist/components/kol-color.js +1 -1
  98. package/dist/components/kol-details.js +1 -1
  99. package/dist/components/kol-form.js +1 -1
  100. package/dist/components/kol-heading-wc.js +1 -1
  101. package/dist/components/kol-heading.js +1 -1
  102. package/dist/components/kol-icon-font-awesome.js +1 -1
  103. package/dist/components/kol-icon-icofont.js +1 -1
  104. package/dist/components/kol-icon.js +1 -1
  105. package/dist/components/kol-indented-text.js +1 -1
  106. package/dist/components/kol-input-adapter-leanup.js +1 -1
  107. package/dist/components/kol-input-checkbox.js +1 -1
  108. package/dist/components/kol-input-color.js +1 -1
  109. package/dist/components/kol-input-date.js +1 -1
  110. package/dist/components/kol-input-email.js +1 -1
  111. package/dist/components/kol-input-file.js +1 -1
  112. package/dist/components/kol-input-number.js +1 -1
  113. package/dist/components/kol-input-password.js +1 -1
  114. package/dist/components/kol-input-radio-group.js +1 -1
  115. package/dist/components/kol-input-radio.js +1 -1
  116. package/dist/components/kol-input-range.js +1 -1
  117. package/dist/components/kol-input-text.js +1 -1
  118. package/dist/components/kol-input.js +1 -1
  119. package/dist/components/kol-kolibri.js +1 -1
  120. package/dist/components/kol-link-button.js +1 -1
  121. package/dist/components/kol-link-group.js +1 -1
  122. package/dist/components/kol-link-wc.js +1 -1
  123. package/dist/components/kol-logo.js +1 -1
  124. package/dist/components/kol-modal.js +1 -1
  125. package/dist/components/kol-nav.js +1 -1
  126. package/dist/components/kol-pagination.js +1 -1
  127. package/dist/components/kol-select.js +1 -1
  128. package/dist/components/kol-skip-nav.js +1 -1
  129. package/dist/components/kol-span-wc.js +1 -1
  130. package/dist/components/kol-span.js +1 -1
  131. package/dist/components/kol-spin.js +1 -1
  132. package/dist/components/kol-table.js +1 -1
  133. package/dist/components/kol-tabs.js +1 -1
  134. package/dist/components/kol-textarea.js +1 -1
  135. package/dist/components/kol-toast.js +1 -1
  136. package/dist/components/kol-tooltip.js +1 -1
  137. package/dist/components/kol-version.js +1 -1
  138. package/dist/components/prop.validators.js +1 -1
  139. package/dist/components/shadow.js +1 -1
  140. package/dist/components/shadow2.js +1 -1
  141. package/dist/esm/{a11y.tipps-7e981511.js → a11y.tipps-d591ee77.js} +1 -1
  142. package/dist/esm/{app-globals-d76669fa.js → app-globals-478a6001.js} +1 -1
  143. package/dist/esm/{button-link-b8b2a2cf.js → button-link-0e3aab16.js} +1 -1
  144. package/dist/esm/controller-014fc17e.js +4 -0
  145. package/dist/esm/{controller-fd64712e.js → controller-0a259caf.js} +1 -1
  146. package/dist/esm/{controller-ce8de601.js → controller-1e0ec378.js} +1 -1
  147. package/dist/esm/controller-563ae343.js +4 -0
  148. package/dist/esm/{controller-6dc0b79d.js → controller-ca25e97c.js} +1 -1
  149. package/dist/esm/{controller-157ac6c5.js → controller-f46df1f0.js} +1 -1
  150. package/dist/esm/dev.utils-daaf2f39.js +4 -0
  151. package/dist/esm/devtools-cc50ca43.js +4 -0
  152. package/dist/esm/index.js +1 -1
  153. package/dist/esm/kol-abbr.entry.js +1 -1
  154. package/dist/esm/kol-accordion.entry.js +1 -1
  155. package/dist/esm/kol-alert.entry.js +1 -1
  156. package/dist/esm/kol-badge.entry.js +1 -1
  157. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  158. package/dist/esm/kol-button-group.entry.js +1 -1
  159. package/dist/esm/kol-button-link.entry.js +1 -1
  160. package/dist/esm/kol-button-wc_2.entry.js +4 -0
  161. package/dist/esm/kol-button.entry.js +1 -1
  162. package/dist/esm/kol-card.entry.js +1 -1
  163. package/dist/esm/kol-color.entry.js +1 -1
  164. package/dist/esm/kol-details.entry.js +1 -1
  165. package/dist/esm/kol-form.entry.js +1 -1
  166. package/dist/esm/kol-heading-wc_2.entry.js +4 -0
  167. package/dist/esm/kol-heading.entry.js +1 -1
  168. package/dist/esm/kol-icon.entry.js +1 -1
  169. package/dist/esm/kol-indented-text.entry.js +1 -1
  170. package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
  171. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  172. package/dist/esm/kol-input-color.entry.js +1 -1
  173. package/dist/esm/kol-input-date.entry.js +1 -1
  174. package/dist/esm/kol-input-email.entry.js +1 -1
  175. package/dist/esm/kol-input-file.entry.js +1 -1
  176. package/dist/esm/kol-input-number.entry.js +1 -1
  177. package/dist/esm/kol-input-password.entry.js +1 -1
  178. package/dist/esm/kol-input-radio-group.entry.js +1 -1
  179. package/dist/esm/kol-input-radio.entry.js +1 -1
  180. package/dist/esm/kol-input-range.entry.js +1 -1
  181. package/dist/esm/kol-input-text.entry.js +1 -1
  182. package/dist/esm/kol-kolibri.entry.js +1 -1
  183. package/dist/esm/kol-link-button.entry.js +1 -1
  184. package/dist/esm/kol-link-group.entry.js +1 -1
  185. package/dist/esm/kol-link-wc.entry.js +1 -1
  186. package/dist/esm/kol-link.entry.js +1 -1
  187. package/dist/esm/kol-logo.entry.js +1 -1
  188. package/dist/esm/kol-modal.entry.js +1 -1
  189. package/dist/esm/kol-nav.entry.js +1 -1
  190. package/dist/esm/kol-pagination.entry.js +1 -1
  191. package/dist/esm/kol-progress.entry.js +1 -1
  192. package/dist/esm/kol-select.entry.js +1 -1
  193. package/dist/esm/kol-skip-nav.entry.js +1 -1
  194. package/dist/esm/kol-span.entry.js +1 -1
  195. package/dist/esm/kol-spin.entry.js +1 -1
  196. package/dist/esm/kol-symbol.entry.js +1 -1
  197. package/dist/esm/kol-table.entry.js +1 -1
  198. package/dist/esm/kol-tabs.entry.js +1 -1
  199. package/dist/esm/kol-textarea.entry.js +1 -1
  200. package/dist/esm/kol-toast.entry.js +1 -1
  201. package/dist/esm/kol-tooltip.entry.js +1 -1
  202. package/dist/esm/kol-version.entry.js +1 -1
  203. package/dist/esm/kolibri.js +1 -1
  204. package/dist/esm/{label-48702aa0.js → label-6aec7f29.js} +1 -1
  205. package/dist/esm/loader.js +1 -1
  206. package/dist/esm/prop.validators-82b345aa.js +4 -0
  207. package/dist/esm/tab-index-7a782a55.js +4 -0
  208. package/dist/esm/validation-50c2f4e0.js +4 -0
  209. package/dist/esm/validation-54731d67.js +4 -0
  210. package/dist/kolibri/{a11y.tipps-7e981511.js → a11y.tipps-d591ee77.js} +1 -1
  211. package/dist/kolibri/{app-globals-d76669fa.js → app-globals-478a6001.js} +1 -1
  212. package/dist/kolibri/assets/form-simulation.js +1 -1
  213. package/dist/kolibri/button-link-0e3aab16.js +4 -0
  214. package/dist/kolibri/controller-014fc17e.js +4 -0
  215. package/dist/kolibri/{controller-fd64712e.js → controller-0a259caf.js} +1 -1
  216. package/dist/kolibri/controller-1e0ec378.js +4 -0
  217. package/dist/kolibri/controller-563ae343.js +4 -0
  218. package/dist/kolibri/{controller-6dc0b79d.js → controller-ca25e97c.js} +1 -1
  219. package/dist/kolibri/{controller-157ac6c5.js → controller-f46df1f0.js} +1 -1
  220. package/dist/kolibri/{dev.utils-d28700ca.js → dev.utils-daaf2f39.js} +1 -1
  221. package/dist/kolibri/devtools-cc50ca43.js +4 -0
  222. package/dist/kolibri/index.esm.js +1 -1
  223. package/dist/kolibri/kol-abbr.entry.js +1 -1
  224. package/dist/kolibri/kol-accordion.entry.js +1 -1
  225. package/dist/kolibri/kol-alert.entry.js +1 -1
  226. package/dist/kolibri/kol-badge.entry.js +1 -1
  227. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  228. package/dist/kolibri/kol-button-group.entry.js +1 -1
  229. package/dist/kolibri/kol-button-link.entry.js +1 -1
  230. package/dist/kolibri/kol-button-wc_2.entry.js +4 -0
  231. package/dist/kolibri/kol-button.entry.js +1 -1
  232. package/dist/kolibri/kol-card.entry.js +1 -1
  233. package/dist/kolibri/kol-color.entry.js +1 -1
  234. package/dist/kolibri/kol-details.entry.js +1 -1
  235. package/dist/kolibri/kol-form.entry.js +1 -1
  236. package/dist/kolibri/kol-heading-wc_2.entry.js +4 -0
  237. package/dist/kolibri/kol-heading.entry.js +1 -1
  238. package/dist/kolibri/kol-icon.entry.js +1 -1
  239. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  240. package/dist/kolibri/kol-input-adapter-leanup.entry.js +1 -1
  241. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  242. package/dist/kolibri/kol-input-color.entry.js +1 -1
  243. package/dist/kolibri/kol-input-date.entry.js +1 -1
  244. package/dist/kolibri/kol-input-email.entry.js +1 -1
  245. package/dist/kolibri/kol-input-file.entry.js +1 -1
  246. package/dist/kolibri/kol-input-number.entry.js +1 -1
  247. package/dist/kolibri/kol-input-password.entry.js +1 -1
  248. package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
  249. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  250. package/dist/kolibri/kol-input-range.entry.js +1 -1
  251. package/dist/kolibri/kol-input-text.entry.js +1 -1
  252. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  253. package/dist/kolibri/kol-link-button.entry.js +1 -1
  254. package/dist/kolibri/kol-link-group.entry.js +1 -1
  255. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  256. package/dist/kolibri/kol-link.entry.js +1 -1
  257. package/dist/kolibri/kol-logo.entry.js +1 -1
  258. package/dist/kolibri/kol-modal.entry.js +1 -1
  259. package/dist/kolibri/kol-nav.entry.js +1 -1
  260. package/dist/kolibri/kol-pagination.entry.js +1 -1
  261. package/dist/kolibri/kol-progress.entry.js +1 -1
  262. package/dist/kolibri/kol-select.entry.js +1 -1
  263. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  264. package/dist/kolibri/kol-span.entry.js +1 -1
  265. package/dist/kolibri/kol-spin.entry.js +1 -1
  266. package/dist/kolibri/kol-symbol.entry.js +1 -1
  267. package/dist/kolibri/kol-table.entry.js +1 -1
  268. package/dist/kolibri/kol-tabs.entry.js +1 -1
  269. package/dist/kolibri/kol-textarea.entry.js +1 -1
  270. package/dist/kolibri/kol-toast.entry.js +1 -1
  271. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  272. package/dist/kolibri/kol-version.entry.js +1 -1
  273. package/dist/kolibri/kolibri.esm.js +1 -1
  274. package/dist/kolibri/{label-48702aa0.js → label-6aec7f29.js} +1 -1
  275. package/dist/kolibri/prop.validators-82b345aa.js +4 -0
  276. package/dist/kolibri/tab-index-7a782a55.js +4 -0
  277. package/dist/kolibri/validation-50c2f4e0.js +4 -0
  278. package/dist/kolibri/validation-54731d67.js +4 -0
  279. package/dist/types/components/badge/component.d.ts +9 -3
  280. package/dist/types/components/input-adapter-leanup/controller.d.ts +1 -1
  281. package/dist/types/components.d.ts +9 -1
  282. package/dist/types/utils/dev.utils.d.ts +1 -0
  283. package/jest-test-results.json +1 -1
  284. package/package.json +1 -1
  285. package/vscode-custom-data.json +4 -0
  286. package/dist/cjs/controller-981f525f.js +0 -4
  287. package/dist/cjs/controller-a5f27620.js +0 -4
  288. package/dist/cjs/dev.utils-a119191e.js +0 -4
  289. package/dist/cjs/devtools-3ac979bd.js +0 -4
  290. package/dist/cjs/kol-button-wc_3.cjs.entry.js +0 -4
  291. package/dist/cjs/kol-span-wc.cjs.entry.js +0 -4
  292. package/dist/cjs/prop.validators-87697c25.js +0 -4
  293. package/dist/cjs/tab-index-1a067f70.js +0 -4
  294. package/dist/cjs/validation-0c402ff8.js +0 -4
  295. package/dist/components/component14.js +0 -4
  296. package/dist/components/component15.js +0 -4
  297. package/dist/components/controller5.js +0 -4
  298. package/dist/components/controller6.js +0 -4
  299. package/dist/components/tab-index.js +0 -4
  300. package/dist/esm/controller-5baf841b.js +0 -4
  301. package/dist/esm/controller-e77a2ece.js +0 -4
  302. package/dist/esm/dev.utils-d28700ca.js +0 -4
  303. package/dist/esm/devtools-267e429f.js +0 -4
  304. package/dist/esm/icon-1e6842f0.js +0 -4
  305. package/dist/esm/kol-button-wc_3.entry.js +0 -4
  306. package/dist/esm/kol-span-wc.entry.js +0 -4
  307. package/dist/esm/prop.validators-6128c2dd.js +0 -4
  308. package/dist/esm/tab-index-e911109b.js +0 -4
  309. package/dist/esm/validation-6efef46a.js +0 -4
  310. package/dist/esm/validation-ca65ff34.js +0 -4
  311. package/dist/kolibri/button-link-b8b2a2cf.js +0 -4
  312. package/dist/kolibri/controller-5baf841b.js +0 -4
  313. package/dist/kolibri/controller-ce8de601.js +0 -4
  314. package/dist/kolibri/controller-e77a2ece.js +0 -4
  315. package/dist/kolibri/devtools-267e429f.js +0 -4
  316. package/dist/kolibri/icon-1e6842f0.js +0 -4
  317. package/dist/kolibri/kol-button-wc_3.entry.js +0 -4
  318. package/dist/kolibri/kol-span-wc.entry.js +0 -4
  319. package/dist/kolibri/prop.validators-6128c2dd.js +0 -4
  320. package/dist/kolibri/tab-index-e911109b.js +0 -4
  321. package/dist/kolibri/validation-6efef46a.js +0 -4
  322. package/dist/kolibri/validation-ca65ff34.js +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/components",
3
- "version": "1.1.15-rc.4",
3
+ "version": "1.1.15-rc.6",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "bugs": { "url": "https://github.com/public-ui/kolibri/issues", "email": "kolibri@itzbund.de" },
@@ -145,6 +145,10 @@
145
145
  {
146
146
  "name": "_label",
147
147
  "description": "Gibt den Label-Text des Badges an."
148
+ },
149
+ {
150
+ "name": "_smart-button",
151
+ "description": "Ermöglicht einen Schalter ins das Eingabefeld mit einer beliebigen Aktion zu einzufügen (nur Icon-Only)."
148
152
  }
149
153
  ]
150
154
  },
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const a11y_tipps=require("./a11y.tipps-df3024df.js"),prop_validators=require("./prop.validators-87697c25.js"),validator=require("./validator-3162f24c.js"),icon=require("./icon-b3c58fc8.js"),tabIndex=require("./tab-index-1a067f70.js"),getRenderStates=t=>{const o="string"==typeof t._error&&t._error.length>0&&!0===t._touched,e="string"==typeof t._hint&&t._hint.length>0,i=[];return!0===o&&i.push(`${t._id}-error`),!0===e&&i.push(`${t._id}-hint`),{hasError:o,hasHint:e,ariaDiscribedBy:i}};class ControlledInputController{constructor(t,o,e){var i,n,a,s,r;this.syncFormAssociatedName=()=>{this.formAssociated.setAttribute("name",this.component.state._name||this.component.state._id)},this.setFormAssociatedValue=(t=null)=>{this.formAssociated.setAttribute("value",t)},this.component=t,this.name=o,this.host=e,this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const d=(null===(i=this.host)||void 0===i?void 0:i.children)||[];for(let t=0;t<d.length;t++)"INPUT"===(null===(n=this.host)||void 0===n?void 0:n.children[t].tagName)&&(null===(a=this.host)||void 0===a||a.removeChild(null===(s=this.host)||void 0===s?void 0:s.children[t]));null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}validateAlert(t){prop_validators.watchBoolean(this.component,"_alert",t)}validateTouched(t){prop_validators.watchBoolean(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}const beforePatchIcon=(t,o)=>{const e=t;"object"==typeof e&&null!==e&&(validator.isString(e.right,1)&&(e.right={icon:e.right}),validator.isString(e.left,1)&&(e.left={icon:e.left}),o.set("_icon",e))};class InputController extends ControlledInputController{constructor(t,o,e){super(t,o,e),this.hideLabel=!1,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){prop_validators.watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){prop_validators.watchBoolean(this.component,"_adjustHeight",t)}validateDisabled(t){prop_validators.watchBoolean(this.component,"_disabled",t),!0===t&&a11y_tipps.a11yHintDisabled()}validateError(t){prop_validators.watchString(this.component,"_error",t)}validateHideLabel(t){prop_validators.watchBoolean(this.component,"_hideLabel",t)}validateHint(t){prop_validators.watchString(this.component,"_hint",t)}validateIcon(t){prop_validators.objectObjectHandler(t,(()=>{try{t=prop_validators.parseJson(t)}catch(t){}prop_validators.watchValidator(this.component,"_icon",(t=>"object"==typeof t&&null!==t&&(validator.isString(t.left,1)||icon.isIcon(t.left)||validator.isString(t.right,1)||icon.isIcon(t.right))),new Set(["KoliBriInputIcon"]),t,{hooks:{beforePatch:beforePatchIcon},required:!0})}))}validateId(t){prop_validators.watchString(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&a11y_tipps.devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateName(t){prop_validators.watchString(this.component,"_name",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&a11y_tipps.devHint("Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion des Eingabefeldes relevant sein.")}validateOn(t){"object"==typeof t&&prop_validators.setState(this.component,"_on",t)}validateSmartButton(t){prop_validators.objectObjectHandler(t,(()=>{try{t=prop_validators.parseJson(t)}catch(t){}prop_validators.setState(this.component,"_smartButton",t)}))}validateTabIndex(t){tabIndex.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.validateIcon(this.component._icon),this.validateId(this.component._id),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 o;this.component._alert=!0,this.component._touched=!0,"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onBlur)&&this.component._on.onBlur(t)}onChange(t){var o;this.setFormAssociatedValue(t.target.value),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,t.target.value)}onClick(t){var o;"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onClick)&&this.component._on.onClick(t)}onFocus(t){var o;this.component._alert=!0,"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onFocus)&&this.component._on.onFocus(t)}setValue(t,o){var e;this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o)}}exports.InputController=InputController,exports.getRenderStates=getRenderStates;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const prop_validators=require("./prop.validators-87697c25.js"),propergateResetEventToForm=(o={})=>{for(;o.form instanceof HTMLElement&&"FORM"!==o.form.tagName&&"KOL-FORM"!==o.form.tagName;)o.form.parentElement instanceof HTMLElement?o.form=o.form.parentElement:o.form.parentNode instanceof ShadowRoot?o.form=o.form.parentNode.host:o.form=null;if(o.form instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===o.form.tagName)prop_validators.setEventTargetAndStopPropagation(e,o.form),o.form.dispatchEvent(e);else if("KOL-FORM"===o.form.tagName){prop_validators.setEventTargetAndStopPropagation(e,prop_validators.KoliBriDevHelper.querySelector("form",o.form));const t=o.form;"object"==typeof t._on&&null!==typeof t._on&&"function"==typeof t._on.onReset&&t._on.onReset(e)}}},propergateSubmitEventToForm=(o={})=>{for(;o.form instanceof HTMLElement&&"FORM"!==o.form.tagName&&"KOL-FORM"!==o.form.tagName;)o.form.parentElement instanceof HTMLElement?o.form=o.form.parentElement:o.form.parentNode instanceof ShadowRoot?o.form=o.form.parentNode.host:o.form=null;if(o.form instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:o.form});if("FORM"===o.form.tagName)prop_validators.setEventTargetAndStopPropagation(e,o.form),o.form.dispatchEvent(e);else if("KOL-FORM"===o.form.tagName){prop_validators.setEventTargetAndStopPropagation(e,prop_validators.KoliBriDevHelper.querySelector("form",o.form));const t=o.form;"object"==typeof t._on&&null!==typeof t._on&&"function"==typeof t._on.onSubmit&&t._on.onSubmit(e)}}};exports.propergateResetEventToForm=propergateResetEventToForm,exports.propergateSubmitEventToForm=propergateSubmitEventToForm;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";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}}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,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_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.log(...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===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"),COLOR_CONTRAST_ANALYSIS=META_CONFIG.includes("color-contrast-analysis=true")))}else console.warn("You can only initialize DEV_MODE and COLOR_CONTRAST_ANALYSIS once.")};exports.KoliBri=null;const getKoliBri=()=>exports.KoliBri||{},initKoliBri=()=>{if(null===exports.KoliBri){exports.KoliBri=getWindow().KoliBri||{};const e=new ModalService,t=new ToasterService(getDocument());Object.defineProperty(exports.KoliBri,"Modal",{get:function(){return e}}),Object.defineProperty(exports.KoliBri,"Toaster",{get:function(){return t}}),initMeta()}else console.warn("You can only initialize KoliBri once.")},renderDevAdvice=()=>{void 0===getWindow().KoliBri&&Object.defineProperty(window,"KoliBri",{get:function(){return exports.KoliBri}}),!0!==getKoliBri().adviceShown&&(Object.defineProperty(exports.KoliBri,"adviceShown",{get:function(){return!0}}),Log.debug("\n\nSie verwenden die KoliBri-Komponenten-Bibliothek. Sollten Sie Verbesserungsvorschläge haben oder ein Problem feststellen, dann wenden Sie sich gerne an kolibri@itzbund.de.\n\nHinweise:\n- WAI Web Accessibility Tutorials (https://www.w3.org/WAI/tutorials/)\n- The first rule of ARIA is “Don't use ARIA” (https://cccaccessibility.org/web-1/web-developer-tutorials/how-not-to-use-aria)\n- BIK BITV-Test (https://www.bitvtest.de/bitv_test.html)\n- A11y-Checkliste (https://www.a11yproject.com/checklist/)\n- BSI CON.10: Entwicklung von Webanwendungen (Edition 2021)\n\n"))};let nonce=()=>Math.floor(16777215*Math.random()).toString(16);exports.Log=Log,exports.ToasterService=ToasterService,exports.configKoliBri=configKoliBri,exports.getColorContrastAnalysis=getColorContrastAnalysis,exports.getDevMode=getDevMode,exports.getDocument=getDocument,exports.getKoliBri=getKoliBri,exports.getWindow=getWindow,exports.initKoliBri=initKoliBri,exports.nonce=nonce,exports.renderDevAdvice=renderDevAdvice;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const dev_utils=require("./dev.utils-a119191e.js"),prop_validators=require("./prop.validators-87697c25.js");function prototypeKoliBri(t,i){try{Object.defineProperty(dev_utils.KoliBri,t,{get:function(){return i}})}catch(i){dev_utils.Log.debug(`KoliBri property ${t} is already bind.`)}}require("./index.m-21aa1255.js"),require("./a11y.tipps-df3024df.js"),require("./index-adbf25b5.js");const initialize=()=>{if(dev_utils.initKoliBri(),dev_utils.getDevMode()){dev_utils.renderDevAdvice(),prototypeKoliBri("a11yColorContrast",prop_validators.koliBriA11yColorContrast),prototypeKoliBri("querySelector",prop_validators.koliBriQuerySelector),prototypeKoliBri("querySelectorAll",prop_validators.koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",prop_validators.koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return prop_validators.KoliBriUtils})),prototypeKoliBri("parseJson",prop_validators.parseJson),prototypeKoliBri("stringifyJson",prop_validators.stringifyJson);const t=dev_utils.getDocument().body,i=dev_utils.getDocument().createElement("svg");if(i.setAttribute("aria-label","KoliBri-DevTools"),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("role","toolbar"),i.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),i.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',dev_utils.getDocument().body.appendChild(i),dev_utils.getColorContrastAnalysis()){dev_utils.Log.debug("Color-Contrast-Analysis activated");const i=setTimeout((()=>{clearTimeout(i),setInterval((()=>{prop_validators.KoliBriUtils.queryHtmlElementColors(dev_utils.getDocument().createElement("div"),prop_validators.koliBriA11yColorContrast(t),!1,!1)}),1e4)}),2500)}else dev_utils.Log.debug("Color-Contrast-Analysis not activated")}};exports.initialize=initialize;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-59a3234b.js"),buttonLink=require("./button-link-a5704422.js"),a11y_tipps=require("./a11y.tipps-df3024df.js"),dev_utils=require("./dev.utils-a119191e.js"),prop_validators=require("./prop.validators-87697c25.js"),icon=require("./icon-b3c58fc8.js"),label=require("./label-4175574d.js"),tabIndex=require("./tab-index-1a067f70.js"),controller=require("./controller-a5f27620.js"),controller$1=require("./controller-2055b473.js"),validation=require("./validation-a9dd4aa1.js");require("./index.m-21aa1255.js"),require("./index-adbf25b5.js"),require("./validator-3162f24c.js");const KolButtonWc=class{constructor(t){index.registerInstance(this,t),this.nonce=dev_utils.nonce(),this.catchRef=t=>{this.forwardedRef=t,this.ref=t},this.onClick=t=>{var i,a;"submit"===this.state._type?controller.propergateSubmitEventToForm({form:this.host,ref:this.ref}):"reset"===this.state._type?controller.propergateResetEventToForm({form:this.host,ref:this.ref}):"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onClick)?(prop_validators.setEventTargetAndStopPropagation(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t)):a11y_tipps.devHint("It is no button click callback configured!")},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_ariaLabel:"",_icon:{},_iconAlign:"left",_label:"",_on:{},_type:"button"}}render(){return index.h(index.Host,null,index.h("button",Object.assign({ref:this.catchRef,accessKey:this.state._accessKey,"aria-controls":this.state._ariaControls,"aria-current":prop_validators.mapStringOrBoolean2String(this.state._ariaCurrent),"aria-expanded":prop_validators.mapBoolean2String(this.state._ariaExpanded),"aria-label":!1===this.state._iconOnly?this.state._ariaLabel||this.state._label:void 0,"aria-labelledby":!0===this.state._iconOnly?this.nonce:void 0,class:{[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"icon-only":!0===this.state._iconOnly},disabled:this.state._disabled,id:this.state._id},this.state._on,{onClick:this.onClick,style:{width:"inherit"},tabIndex:this.state._tabIndex,type:this.state._type}),index.h("kol-span-wc",{_icon:this._icon,_iconOnly:this._iconOnly,_label:this.state._ariaLabel||this.state._label},index.h("slot",{name:"expert",slot:"expert"}))),!0===this.state._iconOnly&&index.h("kol-tooltip",{_align:this.state._tooltipAlign,_id:this.nonce,_label:this.state._ariaLabel||this.state._label}))}async getInteractiveElementRef(){return Promise.resolve(this.ref)}validateAccessKey(t){prop_validators.watchString(this,"_accessKey",t)}validateAriaControls(t){prop_validators.watchString(this,"_ariaControls",t)}validateAriaCurrent(t){prop_validators.watchValidator(this,"_ariaControls",(t=>!0===t||"date"===t||"location"===t||"page"===t||"step"===t||"time"===t),new Set(["boolean","String {data, location, page, step, time}"]),t)}validateAriaExpanded(t){prop_validators.watchBoolean(this,"_ariaExpanded",t)}validateAriaLabel(t){label.validateAriaLabel(this,t)}validateCustomClass(t){prop_validators.watchString(this,"_customClass",t,{defaultValue:void 0})}validateDisabled(t){prop_validators.watchBoolean(this,"_disabled",t),!0===t&&a11y_tipps.a11yHintDisabled()}validateIcon(t){icon.validateIcon(this,t)}validateIconAlign(t){icon.watchIconAlign(this,t)}validateIconOnly(t){prop_validators.watchBoolean(this,"_iconOnly",t,{defaultValue:!1})}validateId(t){prop_validators.watchString(this,"_id",t)}validateLabel(t){label.validateLabel(this,t)}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateTabIndex(t){tabIndex.validateTabIndex(this,t)}validateTooltipAlign(t){buttonLink.watchTooltipAlignment(this,"_tooltipAlign",t)}validateType(t){controller$1.watchButtonType(this,"_type",t)}validateVariant(t){controller$1.watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaLabel(this._ariaLabel),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateId(this._id),this.validateLabel(this._label),this.validateOn(this._on),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateVariant(this._variant),0===Date.now()&&console.log(this.forwardedRef,this.ref)}get host(){return index.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_icon:["validateIcon"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_on:["validateOn"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_variant:["validateVariant"]}}},KolHeadingWc=class{constructor(t){index.registerInstance(this,t),this._level=1,this.state={}}validateLevel(t){validation.watchHeadingLevel(this,t)}componentWillLoad(){this.validateLevel(this._level)}render(){switch(this.state._level){case 2:return index.h("h2",null,index.h("slot",null));case 3:return index.h("h3",null,index.h("slot",null));case 4:return index.h("h4",null,index.h("slot",null));case 5:return index.h("h5",null,index.h("slot",null));case 6:return index.h("h6",null,index.h("slot",null));default:return index.h("h1",null,index.h("slot",null))}}static get watchers(){return{_level:["validateLevel"]}}},KolInput=class{constructor(t){index.registerInstance(this,t),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,i,a,e;const s="string"==typeof this._error&&this._error.length>0&&!0===this._touched,l="string"==typeof this._hint&&this._hint.length>0,n=!0===this._hideLabel&&!0!==this._required;return index.h(index.Host,{class:{disabled:!0===this._disabled,error:!0===s,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&index.h("label",{htmlFor:this._id,id:`${this._id}-label`,style:{height:n?"0":void 0,margin:n?"0":void 0,padding:n?"0":void 0,visibility:n?"hidden":void 0}},index.h("span",null,index.h("slot",{name:"label"}))),l&&index.h("span",{class:"hint",id:`${this._id}-hint`},this._hint),index.h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(i=this._icon)||void 0===i?void 0:i.right)}},index.h("div",{class:"icons"},(null===(a=this._icon)||void 0===a?void 0:a.left)?index.h("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):index.h("i",null),(null===(e=this._icon)||void 0===e?void 0:e.right)?index.h("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):index.h("i",null)),index.h("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&index.h("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),s&&index.h("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&index.h("datalist",{id:`${this._id}-list`},this._list.map((t=>index.h("option",{value:t})))))}};exports.kol_button_wc=KolButtonWc,exports.kol_heading_wc=KolHeadingWc,exports.kol_input=KolInput;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-59a3234b.js"),prop_validators=require("./prop.validators-87697c25.js"),icon=require("./icon-b3c58fc8.js"),label=require("./label-4175574d.js");require("./index.m-21aa1255.js"),require("./a11y.tipps-df3024df.js"),require("./dev.utils-a119191e.js"),require("./index-adbf25b5.js"),require("./validator-3162f24c.js");const removeNode=t=>{t instanceof Node&&setTimeout((()=>{var e,i;null===(e=t.parentElement)||void 0===e||e.removeChild(t),null===(i=t.parentNode)||void 0===i||i.removeChild(t)}))},KolSpanWc=class{constructor(t){index.registerInstance(this,t),this._icon=void 0,this._iconOnly=!1,this._label=void 0,this.state={_icon:{},_iconOnly:!1,_label:""}}render(){return index.h(index.Host,{class:{"icon-only":this.state._iconOnly}},this.state._icon.top&&index.h("kol-icon",{class:{"icon top":!0},style:this.state._icon.top.style,_ariaLabel:"",_icon:this.state._icon.top.icon}),index.h("span",{class:"flex items-center"},this.state._icon.left&&index.h("kol-icon",{class:{"icon left":!0,"mr-2":this.state._iconOnly},style:this.state._icon.left.style,_ariaLabel:"",_icon:this.state._icon.left.icon}),index.h("span",null,!0!==this.state._iconOnly&&this.state._label.length>0?this.state._label:""),index.h("span",{ref:this.state._label.length>0?removeNode:void 0},index.h("slot",{name:"expert"})),this.state._icon.right&&index.h("kol-icon",{class:{"icon right":!0,"ml-2":this.state._iconOnly},style:this.state._icon.right.style,_ariaLabel:"",_icon:this.state._icon.right.icon})),this.state._icon.bottom&&index.h("kol-icon",{class:{"icon bottom":!0},style:this.state._icon.bottom.style,_ariaLabel:"",_icon:this.state._icon.bottom.icon}))}validateIcon(t){icon.validateIcon(this,t)}validateIconOnly(t){prop_validators.watchBoolean(this,"_iconOnly",t)}validateLabel(t){label.validateLabel(this,t)}componentWillLoad(){this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateLabel(this._label)}static get watchers(){return{_icon:["validateIcon"],_iconOnly:["validateIconOnly"],_label:["validateLabel"]}}};exports.kol_span_wc=KolSpanWc;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const index_m=require("./index.m-21aa1255.js"),a11y_tipps=require("./a11y.tipps-df3024df.js"),dev_utils=require("./dev.utils-a119191e.js"),index=require("./index-adbf25b5.js"),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 r=new Set;pushNodes(r,t.querySelectorAll(e));const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;pushNodes(r,querySelectorAll(e,"object"==typeof n&&null!==n?n:o[t]))}return Array.from(r)}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 r=t.querySelector(e);if(null===r){const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;if(r=querySelector(e,"object"==typeof n&&null!==n?n:o[t]),null!==r)break}}return r}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,r=255==t[3],o=num2hex(t[0]),n=num2hex(t[1]),l=num2hex(t[2]),i=isshort(o,n,l,t=num2hex(Math.round(t[3])));return r?i?"#"+o.charAt(0)+n.charAt(0)+l.charAt(0):"#"+o+n+l:i?"#"+o.charAt(0)+n.charAt(0)+l.charAt(0)+t.charAt(0):"#"+o+n+l+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,r,o){var n=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=n.indexOf(e)&&-1!=n.indexOf(t)&&-1!=n.indexOf(r)&&-1!=n.indexOf(o)}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(/^#/,""),r=t.length;if(3==r||4==r){var o=hex2num(t[0]),n=hex2num(t[1]),l=hex2num(t[2]),i=3==r?255:hex2num(t[3]);if(isNaN(o)||isNaN(n)||isNaN(l)||isNaN(i))return;return[o,n,l,i]}}function hex6(e){var t=e.replace(/^#/,""),r=t.length;if(6==r||8==r){var o=hex2num(t.slice(0,2)),n=hex2num(t.slice(2,4)),l=hex2num(t.slice(4,6)),i=6==r?255:hex2num(t.slice(6,8));if(isNaN(o)||isNaN(n)||isNaN(l)||isNaN(i))return;return[o,n,l,i]}}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),r=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),o=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),n=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),r=getnum(e[1],!0),o=getnum(e[2],!0),n=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}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),r=getnum(t[0],!0),o=getnum(t[1],!0),n=getnum(t[2],!0);if(-1!=r&&-1!=o&&-1!=n)return[r,o,n,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=getnum(t[0],!0),o=getnum(t[1],!0),n=getnum(t[2],!0),l=getnum(255*t[3]);if(-1!=r&&-1!=o&&-1!=n&&-1!=l)return[r,o,n,l]}}rgbaConvert.arr=arr_1,rgbaConvert.obj=obj_1,rgbaConvert.css=css_1,rgbaConvert.hex=hex_1,rgbaConvert.num=num_1;const OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTargetAndStopPropagation=(e,t)=>{Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,r,o;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,r)=>{var o;const n=t.get("beforePatch");"function"==typeof n&&n(null===(o=e.nextState)||void 0===o?void 0:o.get(r),e.nextState,e,r)})),(null===(r=e.nextState)||void 0===r?void 0:r.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(o=e.nextHooks)||void 0===o||o.forEach(((t,r)=>{const o=t.get("afterPatch");"function"==typeof o&&o(e.state[r],e.state,e,r)}))),delete e.nextHooks},setState=(e,t,r,o={})=>{var n,l;if(void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextState.get(t)!==r){e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof o.afterPatch&&(null===(n=e.nextHooks.get(t))||void 0===n||n.set("afterPatch",o.afterPatch)),"function"==typeof o.beforePatch&&(null===(l=e.nextHooks.get(t))||void 0===l||l.set("beforePatch",o.beforePatch)),e.nextState.set(t,r),patchState(e)}},logWarn=(e,t,r,o)=>{a11y_tipps.devHint(`[${e.constructor.name}] Der Property-Wert (${r}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(o).join(", ")}`)},watchValidator=(e,t,r,o,n,l={})=>{r(n)?setState(e,t,n,null==l?void 0:l.hooks):void 0===n||null===n&&(void 0===(null==l?void 0:l.required)||!1===(null==l?void 0:l.required))?setState(e,t,null==l?void 0:l.defaultValue,null==l?void 0:l.hooks):(void 0!==(null==l?void 0:l.required)&&!1!==(null==l?void 0:l.required)||o.add(null),logWarn(e,t,n,o))},watchBoolean=(e,t,r,o)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),r,o)},watchString=(e,t,r,o={})=>{const n="number"==typeof o.minLength?null==o?void 0:o.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=n),new Set([`String (Mindestlänge ${n})`]),r,o)},watchNumber=(e,t,r,o)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==o?void 0:o.min)||"number"==typeof(null==o?void 0:o.min)&&e>=o.min)&&(void 0===(null==o?void 0:o.max)||"number"==typeof(null==o?void 0:o.max)&&e<=o.max)),new Set(["Number"]),r,o)},watchJsonArrayString=(e,t,r,o,n=(e=>e==e),l={})=>{emptyStringByArrayHandler(o,(()=>{objectObjectHandler(o,(()=>{void 0===o&&(o=[]);try{try{o=parseJson(o)}catch(e){}if(Array.isArray(o)){const i=o.find((e=>!r(e)));void 0===i&&n(o)?setState(e,t,o,l.hooks):objectObjectHandler(i,(()=>{throw console.log(i),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else objectObjectHandler(o,(()=>{throw console.log(o),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){a11y_tipps.devHint("Known bug: Zeichenkettenliste (string[])")}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?\d+$/,FLOAT=/^-?\d+(.\d+)$/,mapString2Unknown=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 try{e=parseJson(e)}catch(e){}return e},stringifyJson=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw dev_utils.Log.warn(["stringifyJson",e]),dev_utils.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){dev_utils.Log.warn(["parseJson",e]),dev_utils.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||dev_utils.getDocument()),koliBriQuerySelectorAll=(e,t)=>querySelectorAll(e,t||dev_utils.getDocument());let DEFAULT_COLOR_CONTRAST=null;const getDefaultColorContrast=()=>(DEFAULT_COLOR_CONTRAST=DEFAULT_COLOR_CONTRAST||{backgroundColor:"#00000000",color:"#00000000",domNode:dev_utils.getDocument().body,level:"Fail",score:1},DEFAULT_COLOR_CONTRAST),TRANSPARENT_REGEXP=/(\d+, ){3}0\)/,koliBriA11yColorContrast=(e,t=getDefaultColorContrast())=>{const r=getComputedStyle(e),o=TRANSPARENT_REGEXP.test(r.backgroundColor)?t.backgroundColor:rgbaConvert.hex(r.backgroundColor),n=TRANSPARENT_REGEXP.test(r.color)?t.color:rgbaConvert.hex(r.color),l=index_m.s(o,n),i={backgroundColor:o,color:n,domNode:e,level:index_m.f(l),score:l};return l<4.5&&dev_utils.Log.error(["Color-Contrast-Error",{backgroundColor:i.backgroundColor,color:i.color,level:i.level,score:i.score},i.domNode]),i},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const r=t.domNode.querySelector(e);if(null===r){const r=t.domNode.querySelectorAll('[class="hydrated"]');for(let o=0;o<r.length&&(t.domNode=r[o],null===(t=koliBriQuerySelectorColors(e,t)).domNode);o++);return t}return koliBriA11yColorContrast(r,t)},scrollByHTMLElement=(e,t=window)=>{e instanceof HTMLElement?(t.scrollTo({behavior:"smooth",top:e.getBoundingClientRect().top+dev_utils.getWindow().pageYOffset-50}),e.focus()):a11y_tipps.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){a11y_tipps.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 r=`${t}`;t=e,e=r}if("string"==typeof e){const r=koliBriQuerySelector(e,t);r instanceof HTMLElement?scrollByHTMLElement(r):a11y_tipps.devHint(`Es konnte kein HTMLElement mit dem Selector (${e}) gefunden werden, zu dem gescrollt werden soll.`)}else a11y_tipps.devHint("Der Selector ist nicht valide, zu dem gescrollt werden soll.")};class KoliBriUtils{static queryHtmlElementColors(e,t,r=!1,o=!0){let n=null;if(!0===r||!1===KoliBriUtils.executionLock)if(!1===r&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===o&&dev_utils.Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)n=t;else{const r=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)r.add(e[t])}const o=t.domNode;if("function"==typeof o.assignedNodes){const e=o.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&r.add(e[t])}const l=t.domNode.children;for(let e=0;e<l.length;e++)r.add(l[e]);const i=Array.from(r);for(let r=0;r<i.length;r++){let o=KoliBriUtils.cache.get(i[r]);void 0===o&&(o=koliBriA11yColorContrast(i[r],t)),KoliBriUtils.cache.set(i[r],o);const l=KoliBriUtils.queryHtmlElementColors(e,o,!0,!1);if(null!==l){n=l;break}}}else dev_utils.Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===r&&(!0===o&&dev_utils.Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),n}}KoliBriUtils.executionLock=!1,KoliBriUtils.cache=new Map;class KoliBriDevHelper{}KoliBriDevHelper.patchTheme=index.patchTheme,KoliBriDevHelper.patchThemeTag=index.patchThemeTag,KoliBriDevHelper.querySelector=koliBriQuerySelector,KoliBriDevHelper.querySelectorAll=koliBriQuerySelectorAll,KoliBriDevHelper.scrollByHTMLElement=scrollByHTMLElement,KoliBriDevHelper.scrollBySelector=scrollBySelector,KoliBriDevHelper.stringifyJson=stringifyJson,exports.KoliBriDevHelper=KoliBriDevHelper,exports.KoliBriUtils=KoliBriUtils,exports.emptyStringByArrayHandler=emptyStringByArrayHandler,exports.koliBriA11yColorContrast=koliBriA11yColorContrast,exports.koliBriQuerySelector=koliBriQuerySelector,exports.koliBriQuerySelectorAll=koliBriQuerySelectorAll,exports.koliBriQuerySelectorColors=koliBriQuerySelectorColors,exports.mapBoolean2String=mapBoolean2String,exports.mapString2Unknown=mapString2Unknown,exports.mapStringOrBoolean2String=mapStringOrBoolean2String,exports.objectObjectHandler=objectObjectHandler,exports.parseJson=parseJson,exports.rgbaConvert=rgbaConvert,exports.scrollBySelector=scrollBySelector,exports.setEventTargetAndStopPropagation=setEventTargetAndStopPropagation,exports.setState=setState,exports.stringifyJson=stringifyJson,exports.watchBoolean=watchBoolean,exports.watchJsonArrayString=watchJsonArrayString,exports.watchNumber=watchNumber,exports.watchString=watchString,exports.watchValidator=watchValidator;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const a11y_tipps=require("./a11y.tipps-df3024df.js"),prop_validators=require("./prop.validators-87697c25.js"),options={hooks:{afterPatch:a=>{-1!==a&&0!==a&&a11y_tipps.a11yHint("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},validateTabIndex=(a,t)=>{prop_validators.watchNumber(a,"_tabIndex",t,options)};exports.validateTabIndex=validateTabIndex;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const a11y_tipps=require("./a11y.tipps-df3024df.js"),prop_validators=require("./prop.validators-87697c25.js"),watchNavLinks=(t,s,a)=>{prop_validators.watchJsonArrayString(s,"_links",(t=>"object"==typeof t&&"string"==typeof t._label),a),a11y_tipps.uiUxHintMillerscheZahl(t,s.state._links.length)};exports.watchNavLinks=watchNavLinks;
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as objectObjectHandler,l as deprecatedHint,j as watchValidator,u as parseJson,w as watchString,A as a11yHint,b as watchBoolean}from"./prop.validators.js";import{d as defineCustomElement$1}from"./component6.js";const isObject=t=>"object"==typeof t&&null!==t,isString=(t,e=0)=>"string"==typeof t&&t.length>=e,isStyle=t=>{if("object"!=typeof t||null===t)return isString(t,1);for(const e in t)if(!1===isString(e,1))return!1;return!0},STATE_CHANGE_EVENT=new Event("StateChange"),mapCustomIcon=(t,e,i)=>{var n;"object"==typeof(n=i)&&null!==n?t[e]=i:isString(i,1)&&(t[e]={icon:i})},mapIconProp2State=(t,e)=>{let i={};if(isString(t,1))if("right"===e)i={right:{icon:t}};else i={left:{icon:t}};else"object"==typeof t&&null!==t&&(mapCustomIcon(i,"top",t.top),mapCustomIcon(i,"right",t.right),mapCustomIcon(i,"bottom",t.bottom),mapCustomIcon(i,"left",t.left));return i},beforePatchIcon=t=>{var e,i,n,o,a,l,s;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icon")){const e=null===(i=t.nextState)||void 0===i?void 0:i.get("_icon"),a=(null===(n=t.nextState)||void 0===n?void 0:n.get("_iconAlign"))||t.state._iconAlign;null===(o=t.nextState)||void 0===o||o.set("_icon",mapIconProp2State(e,a))}else if(null===(a=t.nextState)||void 0===a?void 0:a.has("_iconAlign")){const e=t.state._iconAlign;null===(l=t.nextState)||void 0===l||l.set("_icon",{[e]:void 0,[null===(s=t.nextState)||void 0===s?void 0:s.get("_iconAlign")]:t.state._icon[e]})}},isIcon=t=>"object"==typeof t&&null!==t&&(void 0===t.style||isStyle(t.style))&&isString(t.icon,1),validateIcon=(t,e)=>{objectObjectHandler(e,(()=>{try{e=parseJson(e)}catch(t){}watchValidator(t,"_icon",(t=>null===t||isString(t,1)||"object"==typeof t&&null!==t&&(isString(t.left,1)||isIcon(t.left)||isString(t.right,1)||isIcon(t.right)||isString(t.top,1)||isIcon(t.top)||isString(t.bottom,1)||isIcon(t.bottom))),new Set(["KoliBriIcon"]),e,{hooks:{beforePatch:(e,i)=>{null===e&&i.set("_icon",{}),beforePatchIcon(t)}},required:!0})}))},watchIconAlign=(t,e)=>{deprecatedHint("Das Property _icon-align bzw. _iconAlign ist veraltet. Die Ausrichtung der Icon's kann jetzt direkt über das _icon-Property vorgenommen werden. (v1.1.10: https://public-ui.github.io/?path=/story/backlog-und-changelog--page)"),watchValidator(t,"_iconAlign",(t=>"left"===t||"right"===t),new Set(["Alignment {left, right, top, bottom}"]),e,{hooks:{beforePatch:()=>{beforePatchIcon(t)}}})},syncAriaLabelBeforePatch=(t,e,i,n)=>{const o=e.has("_ariaLabel")?e.get("_ariaLabel"):i.state._ariaLabel;if("string"==typeof o&&o.length>0){const t=e.has("_label")?e.get("_label"):i.state._label;!1===new RegExp(`^${t}`).test(o)&&("_ariaLabel"===n?(e.set("_label",o),i._label=o):(e.set("_ariaLabel",t),i._ariaLabel=t),a11yHint("Das abweichende Aria-Label am Schalter ist nicht barrierefrei. Ein abweichendes Aria-Label muss aus Barrierefreiheitsgründen für die Sprachsteuerung mit dem Label-Text beginnen."))}},validateAriaLabel=(t,e)=>{watchString(t,"_ariaLabel",e,{hooks:{beforePatch:syncAriaLabelBeforePatch}})},validateLabel=(t,e)=>{watchString(t,"_label",e,{hooks:{beforePatch:syncAriaLabelBeforePatch},required:!0})},removeNode=t=>{t instanceof Node&&setTimeout((()=>{var e,i;null===(e=t.parentElement)||void 0===e||e.removeChild(t),null===(i=t.parentNode)||void 0===i||i.removeChild(t)}))},KolSpanWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._icon=void 0,this._iconOnly=!1,this._label=void 0,this.state={_icon:{},_iconOnly:!1,_label:""}}render(){return h(Host,{class:{"icon-only":this.state._iconOnly}},this.state._icon.top&&h("kol-icon",{class:{"icon top":!0},style:this.state._icon.top.style,_ariaLabel:"",_icon:this.state._icon.top.icon}),h("span",{class:"flex items-center"},this.state._icon.left&&h("kol-icon",{class:{"icon left":!0,"mr-2":this.state._iconOnly},style:this.state._icon.left.style,_ariaLabel:"",_icon:this.state._icon.left.icon}),h("span",null,!0!==this.state._iconOnly&&this.state._label.length>0?this.state._label:""),h("span",{ref:this.state._label.length>0?removeNode:void 0},h("slot",{name:"expert"})),this.state._icon.right&&h("kol-icon",{class:{"icon right":!0,"ml-2":this.state._iconOnly},style:this.state._icon.right.style,_ariaLabel:"",_icon:this.state._icon.right.icon})),this.state._icon.bottom&&h("kol-icon",{class:{"icon bottom":!0},style:this.state._icon.bottom.style,_ariaLabel:"",_icon:this.state._icon.bottom.icon}))}validateIcon(t){validateIcon(this,t)}validateIconOnly(t){watchBoolean(this,"_iconOnly",t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateLabel(this._label)}static get watchers(){return{_icon:["validateIcon"],_iconOnly:["validateIconOnly"],_label:["validateLabel"]}}},[4,"kol-span-wc",{_icon:[1],_iconOnly:[516,"_icon-only"],_label:[1],state:[32]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-span-wc","kol-icon"].forEach((t=>{switch(t){case"kol-span-wc":customElements.get(t)||customElements.define(t,KolSpanWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$1()}}))}export{KolSpanWc as K,STATE_CHANGE_EVENT as S,validateIcon as a,validateLabel as b,isIcon as c,defineCustomElement as d,isString as i,validateAriaLabel as v,watchIconAlign as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{j as watchValidator,B as getDocument,n as nonce,w as watchString}from"./prop.validators.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component6.js";import{d as defineCustomElement$1}from"./component14.js";const watchTooltipAlignment=(t,e,o)=>{watchValidator(t,e,(t=>"top"===t||"right"===t||"bottom"===t||"left"===t),new Set(["TooltipAlignment {top, right, buttom, left}"]),o,{defaultValue:"top"})},defaultStyleCss='kol-badge,.tooltip{font-size:1rem;position:fixed;animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;display:none;z-index:1000;max-width:300px;box-shadow:0 0 0.15rem rgba(255, 255, 255, 0.8)}kol-badge::after,.tooltip::after{content:" ";position:absolute;border-style:solid;border-width:5px}kol-badge.arrow-left::after,.tooltip.arrow-left::after{margin-top:-5px;top:50%;right:100%;border-color:transparent black transparent transparent}kol-badge.arrow-right::after,.tooltip.arrow-right::after{margin-top:-5px;top:50%;left:100%;border-color:transparent transparent transparent black}kol-badge.arrow-top::after,.tooltip.arrow-top::after{margin-left:-5px;left:50%;bottom:100%;border-color:transparent transparent black transparent}kol-badge.arrow-bottom::after,.tooltip.arrow-bottom::after{margin-left:-5px;left:50%;top:100%;border-color:black transparent transparent transparent}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}',KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.hydrated=!1,this.hostElement=null,this.childElements=[],this.alignTooltip=()=>{const t=this.childElements[0];{const e=t.getBoundingClientRect();if(this.tooltipElement instanceof HTMLElement){switch(this.state._align){case"top":case"bottom":this.tooltipElement.style.left=e.left+t.offsetWidth/2-this.tooltipElement.offsetWidth/2+"px";break;default:this.tooltipElement.style.top=e.top+e.height/2-this.tooltipElement.offsetHeight/2+"px"}switch(this.state._align){case"left":this.tooltipElement.style.left=`calc(${e.left-this.tooltipElement.offsetWidth}px - 0.5em)`;break;case"right":this.tooltipElement.style.left=`calc(${e.right}px + 0.5em)`;break;case"bottom":this.tooltipElement.style.top=`calc(${e.bottom}px + 0.5em)`;break;default:this.tooltipElement.style.top=`calc(${e.top-this.tooltipElement.offsetHeight}px - 0.5em)`}}}},this.showTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.catchHostElement=t=>{if(this.hostElement=t,this.hostElement instanceof HTMLElement){const t=this.hostElement.previousElementSibling;t instanceof HTMLElement&&(t.removeEventListener("mouseover",this.showTooltip),t.addEventListener("mouseover",this.showTooltip),t.removeEventListener("focus",this.showTooltip),t.addEventListener("focus",this.showTooltip),t.removeEventListener("mouseout",this.hideTooltip),t.addEventListener("mouseout",this.hideTooltip),t.removeEventListener("blur",this.hideTooltip),t.addEventListener("blur",this.hideTooltip),this.childElements.push(t))}},this.catchTooltipElement=t=>{this.tooltipElement=t},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:""}}render(){const t=setTimeout((()=>{clearTimeout(t),this.alignTooltip()}),250);return h(Host,{ref:this.catchHostElement,style:{maxWidth:"300px"}},""!==this.state._label&&h("kol-badge",{class:{"arrow-bottom":"top"===this.state._align,"arrow-left":"right"===this.state._align,"arrow-top":"bottom"===this.state._align,"arrow-right":"left"===this.state._align},id:this.state._id,ref:this.catchTooltipElement,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label}))}validateAlign(t){watchTooltipAlignment(this,"_align",t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label),this.hydrated=!0}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return{default:defaultStyleCss}}},[32,"kol-tooltip",{_align:[1],_id:[1],_label:[1],state:[32]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip","kol-badge","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-badge":customElements.get(t)||defineCustomElement$3();break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolTooltip as K,defineCustomElement as d,watchTooltipAlignment as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{j as watchValidator,o as watchJsonArrayString,C as mapString2Unknown,a as setState,b as watchBoolean}from"./prop.validators.js";import{S as STATE_CHANGE_EVENT}from"./component14.js";import{I as InputController}from"./controller3.js";const fillKeyOptionMap=(t,o,e="")=>{o.forEach(((o,a)=>{const i=`${e}-${a}`;"object"==typeof o&&null!==o&&"string"==typeof o.label&&o.label.length>0&&(Array.isArray(o.options)?fillKeyOptionMap(t,o.options,i):t.set(i,o))}))};class InputCheckboxRadioController extends InputController{constructor(t,o,e){super(t,o,e),this.component=t}validateRequired(t){watchBoolean(this.component,"_required",t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,o,e){super(t,o,e),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,o)=>void 0!==o.find((o=>o.value===t)),this.beforePatchListValue=(t,o)=>{const e=o.has("_list")?o.get("_list"):this.component.state._list;if(Array.isArray(e)&&e.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,e);const t=o.has("_value")?o.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,e)){const t=e[0].value;o.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 o=setTimeout((()=>{clearTimeout(o),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,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{j as watchValidator,o as watchJsonArrayString}from"./prop.validators.js";import{I as InputPasswordController}from"./controller4.js";class InputTextEmailController extends InputPasswordController{constructor(t,o,r){super(t,o,r),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,r){super(t,o,r),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};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{p as watchNumber,A 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,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{d as setEventTargetAndStopPropagation,K as KoliBriDevHelper}from"./prop.validators-6128c2dd.js";const propergateResetEventToForm=(e={})=>{for(;e.form instanceof HTMLElement&&"FORM"!==e.form.tagName&&"KOL-FORM"!==e.form.tagName;)e.form.parentElement instanceof HTMLElement?e.form=e.form.parentElement:e.form.parentNode instanceof ShadowRoot?e.form=e.form.parentNode.host:e.form=null;if(e.form instanceof HTMLElement){const o=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===e.form.tagName)setEventTargetAndStopPropagation(o,e.form),e.form.dispatchEvent(o);else if("KOL-FORM"===e.form.tagName){setEventTargetAndStopPropagation(o,KoliBriDevHelper.querySelector("form",e.form));const t=e.form;"object"==typeof t._on&&null!==typeof t._on&&"function"==typeof t._on.onReset&&t._on.onReset(o)}}},propergateSubmitEventToForm=(e={})=>{for(;e.form instanceof HTMLElement&&"FORM"!==e.form.tagName&&"KOL-FORM"!==e.form.tagName;)e.form.parentElement instanceof HTMLElement?e.form=e.form.parentElement:e.form.parentNode instanceof ShadowRoot?e.form=e.form.parentNode.host:e.form=null;if(e.form instanceof HTMLElement){const o=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e.form});if("FORM"===e.form.tagName)setEventTargetAndStopPropagation(o,e.form),e.form.dispatchEvent(o);else if("KOL-FORM"===e.form.tagName){setEventTargetAndStopPropagation(o,KoliBriDevHelper.querySelector("form",e.form));const t=e.form;"object"==typeof t._on&&null!==typeof t._on&&"function"==typeof t._on.onSubmit&&t._on.onSubmit(o)}}};export{propergateResetEventToForm as a,propergateSubmitEventToForm as p};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{b as a11yHintDisabled,d as devHint}from"./a11y.tipps-7e981511.js";import{b as watchBoolean,w as watchString,o as objectObjectHandler,p as parseJson,a as watchValidator,s as setState}from"./prop.validators-6128c2dd.js";import{i as isString}from"./validator-fe8c60ef.js";import{i as isIcon}from"./icon-1e6842f0.js";import{v as validateTabIndex}from"./tab-index-e911109b.js";const getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDiscribedBy:n}};class ControlledInputController{constructor(t,e,o){var n,i,s,a,h;this.syncFormAssociatedName=()=>{this.formAssociated.setAttribute("name",this.component.state._name||this.component.state._id)},this.setFormAssociatedValue=(t=null)=>{this.formAssociated.setAttribute("value",t)},this.component=t,this.name=e,this.host=o,this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const c=(null===(n=this.host)||void 0===n?void 0:n.children)||[];for(let t=0;t<c.length;t++)"INPUT"===(null===(i=this.host)||void 0===i?void 0:i.children[t].tagName)&&(null===(s=this.host)||void 0===s||s.removeChild(null===(a=this.host)||void 0===a?void 0:a.children[t]));null===(h=this.host)||void 0===h||h.appendChild(this.formAssociated)}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){watchBoolean(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}const beforePatchIcon=(t,e)=>{const o=t;"object"==typeof o&&null!==o&&(isString(o.right,1)&&(o.right={icon:o.right}),isString(o.left,1)&&(o.left={icon:o.left}),e.set("_icon",o))};class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.hideLabel=!1,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)}validateIcon(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this.component,"_icon",(t=>"object"==typeof t&&null!==t&&(isString(t.left,1)||isIcon(t.left)||isString(t.right,1)||isIcon(t.right))),new Set(["KoliBriInputIcon"]),t,{hooks:{beforePatch:beforePatchIcon},required:!0})}))}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}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 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.validateIcon(this.component._icon),this.validateId(this.component._id),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;this.setFormAssociatedValue(t.target.value),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,t.target.value)}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 o;this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e)}}export{InputController as I,getRenderStates as g};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- 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}}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,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_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.log(...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===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"),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()}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("\n\nSie verwenden die KoliBri-Komponenten-Bibliothek. Sollten Sie Verbesserungsvorschläge haben oder ein Problem feststellen, dann wenden Sie sich gerne an kolibri@itzbund.de.\n\nHinweise:\n- WAI Web Accessibility Tutorials (https://www.w3.org/WAI/tutorials/)\n- The first rule of ARIA is “Don't use ARIA” (https://cccaccessibility.org/web-1/web-developer-tutorials/how-not-to-use-aria)\n- BIK BITV-Test (https://www.bitvtest.de/bitv_test.html)\n- A11y-Checkliste (https://www.a11yproject.com/checklist/)\n- BSI CON.10: Entwicklung von Webanwendungen (Edition 2021)\n\n"))};let nonce=()=>Math.floor(16777215*Math.random()).toString(16);export{KoliBri as K,Log as L,ToasterService as T,getWindow as a,getKoliBri as b,configKoliBri as c,getDevMode as d,getColorContrastAnalysis as e,getDocument as g,initKoliBri as i,nonce as n,renderDevAdvice as r};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{i as initKoliBri,d as getDevMode,r as renderDevAdvice,g as getDocument,e as getColorContrastAnalysis,L as Log,K as KoliBri}from"./dev.utils-d28700ca.js";import{j as KoliBriUtils,l as koliBriA11yColorContrast,k as koliBriQuerySelector,n as koliBriQuerySelectorAll,q as koliBriQuerySelectorColors,p as parseJson,t as stringifyJson}from"./prop.validators-6128c2dd.js";import"./index.m-86dc8c44.js";import"./a11y.tipps-7e981511.js";import"./index-d870d3e1.js";function prototypeKoliBri(t,o){try{Object.defineProperty(KoliBri,t,{get:function(){return o}})}catch(o){Log.debug(`KoliBri property ${t} is already bind.`)}}const initialize=()=>{if(initKoliBri(),getDevMode()){renderDevAdvice(),prototypeKoliBri("a11yColorContrast",koliBriA11yColorContrast),prototypeKoliBri("querySelector",koliBriQuerySelector),prototypeKoliBri("querySelectorAll",koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return KoliBriUtils})),prototypeKoliBri("parseJson",parseJson),prototypeKoliBri("stringifyJson",stringifyJson);const t=getDocument().body,o=getDocument().createElement("svg");if(o.setAttribute("aria-label","KoliBri-DevTools"),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("role","toolbar"),o.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),o.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',getDocument().body.appendChild(o),getColorContrastAnalysis()){Log.debug("Color-Contrast-Analysis activated");const o=setTimeout((()=>{clearTimeout(o),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(t),!1,!1)}),1e4)}),2500)}else Log.debug("Color-Contrast-Analysis not activated")}};export{initialize};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{c as deprecatedHint}from"./a11y.tipps-7e981511.js";import{o as objectObjectHandler,a as watchValidator,p as parseJson}from"./prop.validators-6128c2dd.js";import{i as isString,a as isStyle,b as isObject}from"./validator-fe8c60ef.js";const mapCustomIcon=(t,o,i)=>{isObject(i)?t[o]=i:isString(i,1)&&(t[o]={icon:i})},mapIconProp2State=(t,o)=>{let i={};if(isString(t,1))if("right"===o)i={right:{icon:t}};else i={left:{icon:t}};else"object"==typeof t&&null!==t&&(mapCustomIcon(i,"top",t.top),mapCustomIcon(i,"right",t.right),mapCustomIcon(i,"bottom",t.bottom),mapCustomIcon(i,"left",t.left));return i},beforePatchIcon=t=>{var o,i,e,n,a,c,s;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icon")){const o=null===(i=t.nextState)||void 0===i?void 0:i.get("_icon"),a=(null===(e=t.nextState)||void 0===e?void 0:e.get("_iconAlign"))||t.state._iconAlign;null===(n=t.nextState)||void 0===n||n.set("_icon",mapIconProp2State(o,a))}else if(null===(a=t.nextState)||void 0===a?void 0:a.has("_iconAlign")){const o=t.state._iconAlign;null===(c=t.nextState)||void 0===c||c.set("_icon",{[o]:void 0,[null===(s=t.nextState)||void 0===s?void 0:s.get("_iconAlign")]:t.state._icon[o]})}},isIcon=t=>"object"==typeof t&&null!==t&&(void 0===t.style||isStyle(t.style))&&isString(t.icon,1),validateIcon=(t,o)=>{objectObjectHandler(o,(()=>{try{o=parseJson(o)}catch(t){}watchValidator(t,"_icon",(t=>null===t||isString(t,1)||"object"==typeof t&&null!==t&&(isString(t.left,1)||isIcon(t.left)||isString(t.right,1)||isIcon(t.right)||isString(t.top,1)||isIcon(t.top)||isString(t.bottom,1)||isIcon(t.bottom))),new Set(["KoliBriIcon"]),o,{hooks:{beforePatch:(o,i)=>{null===o&&i.set("_icon",{}),beforePatchIcon(t)}},required:!0})}))},watchIconAlign=(t,o)=>{deprecatedHint("Das Property _icon-align bzw. _iconAlign ist veraltet. Die Ausrichtung der Icon's kann jetzt direkt über das _icon-Property vorgenommen werden. (v1.1.10: https://public-ui.github.io/?path=/story/backlog-und-changelog--page)"),watchValidator(t,"_iconAlign",(t=>"left"===t||"right"===t),new Set(["Alignment {left, right, top, bottom}"]),o,{hooks:{beforePatch:()=>{beforePatchIcon(t)}}})};export{isIcon as i,validateIcon as v,watchIconAlign as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-a9774259.js";import{w as watchTooltipAlignment}from"./button-link-b8b2a2cf.js";import{d as devHint,b as a11yHintDisabled}from"./a11y.tipps-7e981511.js";import{n as nonce}from"./dev.utils-d28700ca.js";import{d as setEventTargetAndStopPropagation,m as mapStringOrBoolean2String,e as mapBoolean2String,w as watchString,a as watchValidator,b as watchBoolean}from"./prop.validators-6128c2dd.js";import{v as validateIcon,w as watchIconAlign}from"./icon-1e6842f0.js";import{v as validateAriaLabel,a as validateLabel}from"./label-48702aa0.js";import{v as validateTabIndex}from"./tab-index-e911109b.js";import{p as propergateSubmitEventToForm,a as propergateResetEventToForm}from"./controller-5baf841b.js";import{w as watchButtonType,a as watchButtonVariant}from"./controller-ce8de601.js";import{w as watchHeadingLevel}from"./validation-ca65ff34.js";import"./index.m-86dc8c44.js";import"./index-d870d3e1.js";import"./validator-fe8c60ef.js";const KolButtonWc=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this.catchRef=t=>{this.forwardedRef=t,this.ref=t},this.onClick=t=>{var i,a;"submit"===this.state._type?propergateSubmitEventToForm({form:this.host,ref:this.ref}):"reset"===this.state._type?propergateResetEventToForm({form:this.host,ref:this.ref}):"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onClick)?(setEventTargetAndStopPropagation(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t)):devHint("It is no button click callback configured!")},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_ariaLabel:"",_icon:{},_iconAlign:"left",_label:"",_on:{},_type:"button"}}render(){return h(Host,null,h("button",Object.assign({ref:this.catchRef,accessKey:this.state._accessKey,"aria-controls":this.state._ariaControls,"aria-current":mapStringOrBoolean2String(this.state._ariaCurrent),"aria-expanded":mapBoolean2String(this.state._ariaExpanded),"aria-label":!1===this.state._iconOnly?this.state._ariaLabel||this.state._label:void 0,"aria-labelledby":!0===this.state._iconOnly?this.nonce:void 0,class:{[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"icon-only":!0===this.state._iconOnly},disabled:this.state._disabled,id:this.state._id},this.state._on,{onClick:this.onClick,style:{width:"inherit"},tabIndex:this.state._tabIndex,type:this.state._type}),h("kol-span-wc",{_icon:this._icon,_iconOnly:this._iconOnly,_label:this.state._ariaLabel||this.state._label},h("slot",{name:"expert",slot:"expert"}))),!0===this.state._iconOnly&&h("kol-tooltip",{_align:this.state._tooltipAlign,_id:this.nonce,_label:this.state._ariaLabel||this.state._label}))}async getInteractiveElementRef(){return Promise.resolve(this.ref)}validateAccessKey(t){watchString(this,"_accessKey",t)}validateAriaControls(t){watchString(this,"_ariaControls",t)}validateAriaCurrent(t){watchValidator(this,"_ariaControls",(t=>!0===t||"date"===t||"location"===t||"page"===t||"step"===t||"time"===t),new Set(["boolean","String {data, location, page, step, time}"]),t)}validateAriaExpanded(t){watchBoolean(this,"_ariaExpanded",t)}validateAriaLabel(t){validateAriaLabel(this,t)}validateCustomClass(t){watchString(this,"_customClass",t,{defaultValue:void 0})}validateDisabled(t){watchBoolean(this,"_disabled",t),!0===t&&a11yHintDisabled()}validateIcon(t){validateIcon(this,t)}validateIconAlign(t){watchIconAlign(this,t)}validateIconOnly(t){watchBoolean(this,"_iconOnly",t,{defaultValue:!1})}validateId(t){watchString(this,"_id",t)}validateLabel(t){validateLabel(this,t)}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateTabIndex(t){validateTabIndex(this,t)}validateTooltipAlign(t){watchTooltipAlignment(this,"_tooltipAlign",t)}validateType(t){watchButtonType(this,"_type",t)}validateVariant(t){watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaLabel(this._ariaLabel),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateId(this._id),this.validateLabel(this._label),this.validateOn(this._on),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateVariant(this._variant),0===Date.now()&&console.log(this.forwardedRef,this.ref)}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_icon:["validateIcon"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_on:["validateOn"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_variant:["validateVariant"]}}},KolHeadingWc=class{constructor(t){registerInstance(this,t),this._level=1,this.state={}}validateLevel(t){watchHeadingLevel(this,t)}componentWillLoad(){this.validateLevel(this._level)}render(){switch(this.state._level){case 2:return h("h2",null,h("slot",null));case 3:return h("h3",null,h("slot",null));case 4:return h("h4",null,h("slot",null));case 5:return h("h5",null,h("slot",null));case 6:return h("h6",null,h("slot",null));default:return h("h1",null,h("slot",null))}}static get watchers(){return{_level:["validateLevel"]}}},KolInput=class{constructor(t){registerInstance(this,t),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,i,a,e;const s="string"==typeof this._error&&this._error.length>0&&!0===this._touched,l="string"==typeof this._hint&&this._hint.length>0,o=!0===this._hideLabel&&!0!==this._required;return h(Host,{class:{disabled:!0===this._disabled,error:!0===s,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&h("label",{htmlFor:this._id,id:`${this._id}-label`,style:{height:o?"0":void 0,margin:o?"0":void 0,padding:o?"0":void 0,visibility:o?"hidden":void 0}},h("span",null,h("slot",{name:"label"}))),l&&h("span",{class:"hint",id:`${this._id}-hint`},this._hint),h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(i=this._icon)||void 0===i?void 0:i.right)}},h("div",{class:"icons"},(null===(a=this._icon)||void 0===a?void 0:a.left)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):h("i",null),(null===(e=this._icon)||void 0===e?void 0:e.right)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):h("i",null)),h("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&h("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),s&&h("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&h("datalist",{id:`${this._id}-list`},this._list.map((t=>h("option",{value:t})))))}};export{KolButtonWc as kol_button_wc,KolHeadingWc as kol_heading_wc,KolInput as kol_input};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{r as registerInstance,h,H as Host}from"./index-a9774259.js";import{b as watchBoolean}from"./prop.validators-6128c2dd.js";import{v as validateIcon}from"./icon-1e6842f0.js";import{a as validateLabel}from"./label-48702aa0.js";import"./index.m-86dc8c44.js";import"./a11y.tipps-7e981511.js";import"./dev.utils-d28700ca.js";import"./index-d870d3e1.js";import"./validator-fe8c60ef.js";const removeNode=t=>{t instanceof Node&&setTimeout((()=>{var i,e;null===(i=t.parentElement)||void 0===i||i.removeChild(t),null===(e=t.parentNode)||void 0===e||e.removeChild(t)}))},KolSpanWc=class{constructor(t){registerInstance(this,t),this._icon=void 0,this._iconOnly=!1,this._label=void 0,this.state={_icon:{},_iconOnly:!1,_label:""}}render(){return h(Host,{class:{"icon-only":this.state._iconOnly}},this.state._icon.top&&h("kol-icon",{class:{"icon top":!0},style:this.state._icon.top.style,_ariaLabel:"",_icon:this.state._icon.top.icon}),h("span",{class:"flex items-center"},this.state._icon.left&&h("kol-icon",{class:{"icon left":!0,"mr-2":this.state._iconOnly},style:this.state._icon.left.style,_ariaLabel:"",_icon:this.state._icon.left.icon}),h("span",null,!0!==this.state._iconOnly&&this.state._label.length>0?this.state._label:""),h("span",{ref:this.state._label.length>0?removeNode:void 0},h("slot",{name:"expert"})),this.state._icon.right&&h("kol-icon",{class:{"icon right":!0,"ml-2":this.state._iconOnly},style:this.state._icon.right.style,_ariaLabel:"",_icon:this.state._icon.right.icon})),this.state._icon.bottom&&h("kol-icon",{class:{"icon bottom":!0},style:this.state._icon.bottom.style,_ariaLabel:"",_icon:this.state._icon.bottom.icon}))}validateIcon(t){validateIcon(this,t)}validateIconOnly(t){watchBoolean(this,"_iconOnly",t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateLabel(this._label)}static get watchers(){return{_icon:["validateIcon"],_iconOnly:["validateIconOnly"],_label:["validateLabel"]}}};export{KolSpanWc as kol_span_wc};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{s,f}from"./index.m-86dc8c44.js";import{d as devHint}from"./a11y.tipps-7e981511.js";import{L as Log,g as getDocument,a as getWindow}from"./dev.utils-d28700ca.js";import{p as patchTheme,a as patchThemeTag}from"./index-d870d3e1.js";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 r=new Set;pushNodes(r,t.querySelectorAll(e));const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;pushNodes(r,querySelectorAll(e,"object"==typeof n&&null!==n?n:o[t]))}return Array.from(r)}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 r=t.querySelector(e);if(null===r){const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;if(r=querySelector(e,"object"==typeof n&&null!==n?n:o[t]),null!==r)break}}return r}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,r=255==t[3],o=num2hex(t[0]),n=num2hex(t[1]),l=num2hex(t[2]),a=isshort(o,n,l,t=num2hex(Math.round(t[3])));return r?a?"#"+o.charAt(0)+n.charAt(0)+l.charAt(0):"#"+o+n+l:a?"#"+o.charAt(0)+n.charAt(0)+l.charAt(0)+t.charAt(0):"#"+o+n+l+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,r,o){var n=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=n.indexOf(e)&&-1!=n.indexOf(t)&&-1!=n.indexOf(r)&&-1!=n.indexOf(o)}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(/^#/,""),r=t.length;if(3==r||4==r){var o=hex2num(t[0]),n=hex2num(t[1]),l=hex2num(t[2]),a=3==r?255:hex2num(t[3]);if(isNaN(o)||isNaN(n)||isNaN(l)||isNaN(a))return;return[o,n,l,a]}}function hex6(e){var t=e.replace(/^#/,""),r=t.length;if(6==r||8==r){var o=hex2num(t.slice(0,2)),n=hex2num(t.slice(2,4)),l=hex2num(t.slice(4,6)),a=6==r?255:hex2num(t.slice(6,8));if(isNaN(o)||isNaN(n)||isNaN(l)||isNaN(a))return;return[o,n,l,a]}}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),r=getnum(null!=e.g?e.g:null!=e.green?e.green:0,!0),o=getnum(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),n=getnum(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}function array(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=getnum(e[0],!0),r=getnum(e[1],!0),o=getnum(e[2],!0),n=getnum(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}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),r=getnum(t[0],!0),o=getnum(t[1],!0),n=getnum(t[2],!0);if(-1!=r&&-1!=o&&-1!=n)return[r,o,n,255]}}function rgba(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=getnum(t[0],!0),o=getnum(t[1],!0),n=getnum(t[2],!0),l=getnum(255*t[3]);if(-1!=r&&-1!=o&&-1!=n&&-1!=l)return[r,o,n,l]}}rgbaConvert.arr=arr_1,rgbaConvert.obj=obj_1,rgbaConvert.css=css_1,rgbaConvert.hex=hex_1,rgbaConvert.num=num_1;const OBJECT_OBJECT=/\[object Object\]/,objectObjectHandler=(e,t)=>{"string"==typeof e&&OBJECT_OBJECT.test(e)||t()},emptyStringByArrayHandler=(e,t)=>{"string"==typeof e&&""===e||t()},setEventTargetAndStopPropagation=(e,t)=>{Object.defineProperty(e,"target",{value:t,writable:!1})},patchState=e=>{var t,r,o;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,r)=>{var o;const n=t.get("beforePatch");"function"==typeof n&&n(null===(o=e.nextState)||void 0===o?void 0:o.get(r),e.nextState,e,r)})),(null===(r=e.nextState)||void 0===r?void 0:r.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(o=e.nextHooks)||void 0===o||o.forEach(((t,r)=>{const o=t.get("afterPatch");"function"==typeof o&&o(e.state[r],e.state,e,r)}))),delete e.nextHooks},setState=(e,t,r,o={})=>{var n,l;if(void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextState.get(t)!==r){e.nextHooks.get(t)instanceof Map==!1&&e.nextHooks.set(t,new Map),"function"==typeof o.afterPatch&&(null===(n=e.nextHooks.get(t))||void 0===n||n.set("afterPatch",o.afterPatch)),"function"==typeof o.beforePatch&&(null===(l=e.nextHooks.get(t))||void 0===l||l.set("beforePatch",o.beforePatch)),e.nextState.set(t,r),patchState(e)}},logWarn=(e,t,r,o)=>{devHint(`[${e.constructor.name}] Der Property-Wert (${r}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(o).join(", ")}`)},watchValidator=(e,t,r,o,n,l={})=>{r(n)?setState(e,t,n,null==l?void 0:l.hooks):void 0===n||null===n&&(void 0===(null==l?void 0:l.required)||!1===(null==l?void 0:l.required))?setState(e,t,null==l?void 0:l.defaultValue,null==l?void 0:l.hooks):(void 0!==(null==l?void 0:l.required)&&!1!==(null==l?void 0:l.required)||o.add(null),logWarn(e,t,n,o))},watchBoolean=(e,t,r,o)=>{watchValidator(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),r,o)},watchString=(e,t,r,o={})=>{const n="number"==typeof o.minLength?null==o?void 0:o.minLength:0;watchValidator(e,t,(e=>"string"==typeof e&&e.length>=n),new Set([`String (Mindestlänge ${n})`]),r,o)},watchNumber=(e,t,r,o)=>{watchValidator(e,t,(e=>"number"==typeof e&&(void 0===(null==o?void 0:o.min)||"number"==typeof(null==o?void 0:o.min)&&e>=o.min)&&(void 0===(null==o?void 0:o.max)||"number"==typeof(null==o?void 0:o.max)&&e<=o.max)),new Set(["Number"]),r,o)},watchJsonArrayString=(e,t,r,o,n=(e=>e==e),l={})=>{emptyStringByArrayHandler(o,(()=>{objectObjectHandler(o,(()=>{void 0===o&&(o=[]);try{try{o=parseJson(o)}catch(e){}if(Array.isArray(o)){const a=o.find((e=>!r(e)));void 0===a&&n(o)?setState(e,t,o,l.hooks):objectObjectHandler(a,(()=>{throw console.log(a),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else objectObjectHandler(o,(()=>{throw console.log(o),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){devHint("Known bug: Zeichenkettenliste (string[])")}}))}))},BOOLEAN=/^(true|false)$/,INTEGER=/^-?\d+$/,FLOAT=/^-?\d+(.\d+)$/,mapString2Unknown=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 try{e=parseJson(e)}catch(e){}return 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 r=getComputedStyle(e),o=TRANSPARENT_REGEXP.test(r.backgroundColor)?t.backgroundColor:rgbaConvert.hex(r.backgroundColor),n=TRANSPARENT_REGEXP.test(r.color)?t.color:rgbaConvert.hex(r.color),l=s(o,n),a={backgroundColor:o,color:n,domNode:e,level:f(l),score:l};return l<4.5&&Log.error(["Color-Contrast-Error",{backgroundColor:a.backgroundColor,color:a.color,level:a.level,score:a.score},a.domNode]),a},koliBriQuerySelectorColors=(e,t=getDefaultColorContrast())=>{t.domNode instanceof HTMLElement&&(t=koliBriA11yColorContrast(t.domNode,t));const r=t.domNode.querySelector(e);if(null===r){const r=t.domNode.querySelectorAll('[class="hydrated"]');for(let o=0;o<r.length&&(t.domNode=r[o],null===(t=koliBriQuerySelectorColors(e,t)).domNode);o++);return t}return koliBriA11yColorContrast(r,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 r=`${t}`;t=e,e=r}if("string"==typeof e){const r=koliBriQuerySelector(e,t);r instanceof HTMLElement?scrollByHTMLElement(r):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,r=!1,o=!0){let n=null;if(!0===r||!1===KoliBriUtils.executionLock)if(!1===r&&(KoliBriUtils.cache.clear(),KoliBriUtils.cache.set(t.domNode,t),KoliBriUtils.executionLock=!0,!0===o&&Log.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)n=t;else{const r=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)r.add(e[t])}const o=t.domNode;if("function"==typeof o.assignedNodes){const e=o.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&r.add(e[t])}const l=t.domNode.children;for(let e=0;e<l.length;e++)r.add(l[e]);const a=Array.from(r);for(let r=0;r<a.length;r++){let o=KoliBriUtils.cache.get(a[r]);void 0===o&&(o=koliBriA11yColorContrast(a[r],t)),KoliBriUtils.cache.set(a[r],o);const l=KoliBriUtils.queryHtmlElementColors(e,o,!0,!1);if(null!==l){n=l;break}}}else Log.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===r&&(!0===o&&Log.debug(`[KoliBriUtils] Color contrast analysis finished (${KoliBriUtils.cache.size} DOM elements are analysed).`),KoliBriUtils.executionLock=!1,KoliBriUtils.cache.clear()),n}}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{KoliBriDevHelper as K,watchValidator as a,watchBoolean as b,watchJsonArrayString as c,setEventTargetAndStopPropagation as d,mapBoolean2String as e,watchNumber as f,mapString2Unknown as g,scrollBySelector as h,emptyStringByArrayHandler as i,KoliBriUtils as j,koliBriQuerySelector as k,koliBriA11yColorContrast as l,mapStringOrBoolean2String as m,koliBriQuerySelectorAll as n,objectObjectHandler as o,parseJson as p,koliBriQuerySelectorColors as q,rgbaConvert as r,setState as s,stringifyJson as t,watchString as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{e as a11yHint}from"./a11y.tipps-7e981511.js";import{f as watchNumber}from"./prop.validators-6128c2dd.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,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{u as uiUxHintMillerscheZahl}from"./a11y.tipps-7e981511.js";import{c as watchJsonArrayString}from"./prop.validators-6128c2dd.js";const watchNavLinks=(t,a,s)=>{watchJsonArrayString(a,"_links",(t=>"object"==typeof t&&"string"==typeof t._label),s),uiUxHintMillerscheZahl(t,a.state._links.length)};export{watchNavLinks as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{a as watchValidator}from"./prop.validators-6128c2dd.js";const watchHeadingLevel=(e,a)=>{watchValidator(e,"_level",(e=>"number"==typeof e&&1<=e&&e<=6),new Set(["Number {1, 2, 3, 4, 5, 6}"]),a,{defaultValue:1,required:!0})};export{watchHeadingLevel as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{a as t}from"./prop.validators-6128c2dd.js";const o=(o,e,p)=>{t(o,e,(t=>"top"===t||"right"===t||"bottom"===t||"left"===t),new Set(["TooltipAlignment {top, right, buttom, left}"]),p,{defaultValue:"top"})};export{o as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{d as e,K as n}from"./prop.validators-6128c2dd.js";const t=(o={})=>{for(;o.form instanceof HTMLElement&&"FORM"!==o.form.tagName&&"KOL-FORM"!==o.form.tagName;)o.form=o.form.parentElement instanceof HTMLElement?o.form.parentElement:o.form.parentNode instanceof ShadowRoot?o.form.parentNode.host:null;if(o.form instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===o.form.tagName)e(t,o.form),o.form.dispatchEvent(t);else if("KOL-FORM"===o.form.tagName){e(t,n.querySelector("form",o.form));const f=o.form;"object"==typeof f._on&&null!==typeof f._on&&"function"==typeof f._on.onReset&&f._on.onReset(t)}}},o=(o={})=>{for(;o.form instanceof HTMLElement&&"FORM"!==o.form.tagName&&"KOL-FORM"!==o.form.tagName;)o.form=o.form.parentElement instanceof HTMLElement?o.form.parentElement:o.form.parentNode instanceof ShadowRoot?o.form.parentNode.host:null;if(o.form instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:o.form});if("FORM"===o.form.tagName)e(t,o.form),o.form.dispatchEvent(t);else if("KOL-FORM"===o.form.tagName){e(t,n.querySelector("form",o.form));const f=o.form;"object"==typeof f._on&&null!==typeof f._on&&"function"==typeof f._on.onSubmit&&f._on.onSubmit(t)}}};export{t as a,o as p};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{a as t}from"./prop.validators-6128c2dd.js";const o=(o,r,a)=>{t(o,r,(t=>"button"===t||"reset"===t||"submit"===t),new Set(["KoliBriButtonType {button, reset, submit}"]),a)},r=(o,r,a)=>{t(o,r,(t=>"primary"===t||"secondary"===t||"normal"===t||"danger"===t||"ghost"===t||"custom"===t),new Set(["KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}"]),a,{defaultValue:"normal"})};export{r as a,o as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{b as t,d as i}from"./a11y.tipps-7e981511.js";import{b as s,w as e,o as h,p as o,a as n,s as a}from"./prop.validators-6128c2dd.js";import{i as d}from"./validator-fe8c60ef.js";import{i as r}from"./icon-1e6842f0.js";import{v as l}from"./tab-index-e911109b.js";const c=t=>{const o="string"==typeof t._error&&t._error.length>0&&!0===t._touched,e="string"==typeof t._hint&&t._hint.length>0,i=[];return!0===o&&i.push(`${t._id}-error`),!0===e&&i.push(`${t._id}-hint`),{hasError:o,hasHint:e,ariaDiscribedBy:i}},v=(t,o)=>{const e=t;"object"==typeof e&&null!==e&&(d(e.right,1)&&(e.right={icon:e.right}),d(e.left,1)&&(e.left={icon:e.left}),o.set("_icon",e))};class u extends class{constructor(t,o,e){var i,n,s,a,h;this.syncFormAssociatedName=()=>{this.formAssociated.setAttribute("name",this.component.state._name||this.component.state._id)},this.setFormAssociatedValue=(t=null)=>{this.formAssociated.setAttribute("value",t)},this.component=t,this.name=o,this.host=e,this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const c=(null===(i=this.host)||void 0===i?void 0:i.children)||[];for(let t=0;t<c.length;t++)"INPUT"===(null===(n=this.host)||void 0===n?void 0:n.children[t].tagName)&&(null===(s=this.host)||void 0===s||s.removeChild(null===(a=this.host)||void 0===a?void 0:a.children[t]));null===(h=this.host)||void 0===h||h.appendChild(this.formAssociated)}validateAlert(t){s(this.component,"_alert",t)}validateTouched(t){s(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}{constructor(t,o,e){super(t,o,e),this.hideLabel=!1,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){e(this.component,"_accessKey",t)}validateAdjustHeight(t){s(this.component,"_adjustHeight",t)}validateDisabled(o){s(this.component,"_disabled",o),!0===o&&t()}validateError(t){e(this.component,"_error",t)}validateHideLabel(t){s(this.component,"_hideLabel",t)}validateHint(t){e(this.component,"_hint",t)}validateIcon(t){h(t,(()=>{try{t=o(t)}catch(t){}n(this.component,"_icon",(t=>"object"==typeof t&&null!==t&&(d(t.left,1)||r(t.left)||d(t.right,1)||r(t.right))),new Set(["KoliBriInputIcon"]),t,{hooks:{beforePatch:v},required:!0})}))}validateId(t){e(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&i("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateName(t){e(this.component,"_name",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&i("Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion des Eingabefeldes relevant sein.")}validateOn(t){"object"==typeof t&&a(this.component,"_on",t)}validateSmartButton(t){h(t,(()=>{try{t=o(t)}catch(t){}a(this.component,"_smartButton",t)}))}validateTabIndex(t){l(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.validateIcon(this.component._icon),this.validateId(this.component._id),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 o;this.component._alert=!0,this.component._touched=!0,"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onBlur)&&this.component._on.onBlur(t)}onChange(t){var o;this.setFormAssociatedValue(t.target.value),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,t.target.value)}onClick(t){var o;"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onClick)&&this.component._on.onClick(t)}onFocus(t){var o;this.component._alert=!0,"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onFocus)&&this.component._on.onFocus(t)}setValue(t,o){var e;this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o)}}export{u as I,c as g};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{i as t,d as o,r as s,g as i,e as r,L as a,K as e}from"./dev.utils-d28700ca.js";import{j as l,l as n,k as d,n as p,q as c,p as L,t as f}from"./prop.validators-6128c2dd.js";import"./index.m-86dc8c44.js";import"./a11y.tipps-7e981511.js";import"./index-d870d3e1.js";function m(t,i){try{Object.defineProperty(e,t,{get:function(){return i}})}catch(i){a.debug(`KoliBri property ${t} is already bind.`)}}const h=()=>{if(t(),o()){s(),m("a11yColorContrast",n),m("querySelector",d),m("querySelectorAll",p),m("querySelectorColors",c),m("utils",(function(){return l})),m("parseJson",L),m("stringifyJson",f);const t=i().body,e=i().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',i().body.appendChild(e),r()){a.debug("Color-Contrast-Analysis activated");const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{l.queryHtmlElementColors(i().createElement("div"),n(t),!1,!1)}),1e4)}),2500)}else a.debug("Color-Contrast-Analysis not activated")}};export{h as initialize};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{c as o}from"./a11y.tipps-7e981511.js";import{o as i,a as t,p as n}from"./prop.validators-6128c2dd.js";import{i as e,a as l,b as c}from"./validator-fe8c60ef.js";const r=(t,o,i)=>{c(i)?t[o]=i:e(i,1)&&(t[o]={icon:i})},a=t=>{var o,i,n,l,s,a,c;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icon")){const o=null===(i=t.nextState)||void 0===i?void 0:i.get("_icon"),s=(null===(n=t.nextState)||void 0===n?void 0:n.get("_iconAlign"))||t.state._iconAlign;null===(l=t.nextState)||void 0===l||l.set("_icon",((t,o)=>{let i={};if(e(t,1))if("right"===o)i={right:{icon:t}};else i={left:{icon:t}};else"object"==typeof t&&null!==t&&(r(i,"top",t.top),r(i,"right",t.right),r(i,"bottom",t.bottom),r(i,"left",t.left));return i})(o,s))}else if(null===(s=t.nextState)||void 0===s?void 0:s.has("_iconAlign")){const o=t.state._iconAlign;null===(a=t.nextState)||void 0===a||a.set("_icon",{[o]:void 0,[null===(c=t.nextState)||void 0===c?void 0:c.get("_iconAlign")]:t.state._icon[o]})}},s=t=>"object"==typeof t&&null!==t&&(void 0===t.style||l(t.style))&&e(t.icon,1),d=(o,l)=>{i(l,(()=>{try{l=n(l)}catch(t){}t(o,"_icon",(t=>null===t||e(t,1)||"object"==typeof t&&null!==t&&(e(t.left,1)||s(t.left)||e(t.right,1)||s(t.right)||e(t.top,1)||s(t.top)||e(t.bottom,1)||s(t.bottom))),new Set(["KoliBriIcon"]),l,{hooks:{beforePatch:(t,e)=>{null===t&&e.set("_icon",{}),a(o)}},required:!0})}))},u=(e,i)=>{o("Das Property _icon-align bzw. _iconAlign ist veraltet. Die Ausrichtung der Icon's kann jetzt direkt über das _icon-Property vorgenommen werden. (v1.1.10: https://public-ui.github.io/?path=/story/backlog-und-changelog--page)"),t(e,"_iconAlign",(t=>"left"===t||"right"===t),new Set(["Alignment {left, right, top, bottom}"]),i,{hooks:{beforePatch:()=>{a(e)}}})};export{s as i,d as v,u as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{r as t,h as i,H as s,g as a}from"./index-a9774259.js";import{w as l}from"./button-link-b8b2a2cf.js";import{d as e,b as o}from"./a11y.tipps-7e981511.js";import{n as h}from"./dev.utils-d28700ca.js";import{d as n,m as r,e as d,w as c,a as v,b as u}from"./prop.validators-6128c2dd.js";import{v as _,w as p}from"./icon-1e6842f0.js";import{v as b,a as m}from"./label-48702aa0.js";import{v as f}from"./tab-index-e911109b.js";import{p as y,a as g}from"./controller-5baf841b.js";import{w as j,a as A}from"./controller-ce8de601.js";import{w as x}from"./validation-ca65ff34.js";import"./index.m-86dc8c44.js";import"./index-d870d3e1.js";import"./validator-fe8c60ef.js";const C=class{constructor(i){t(this,i),this.nonce=h(),this.catchRef=t=>{this.forwardedRef=t,this.ref=t},this.onClick=t=>{var i,a;"submit"===this.state._type?y({form:this.host,ref:this.ref}):"reset"===this.state._type?g({form:this.host,ref:this.ref}):"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onClick)?(n(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t)):e("It is no button click callback configured!")},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_ariaLabel:"",_icon:{},_iconAlign:"left",_label:"",_on:{},_type:"button"}}render(){return i(s,null,i("button",Object.assign({ref:this.catchRef,accessKey:this.state._accessKey,"aria-controls":this.state._ariaControls,"aria-current":r(this.state._ariaCurrent),"aria-expanded":d(this.state._ariaExpanded),"aria-label":!1===this.state._iconOnly?this.state._ariaLabel||this.state._label:void 0,"aria-labelledby":!0===this.state._iconOnly?this.nonce:void 0,class:{[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"icon-only":!0===this.state._iconOnly},disabled:this.state._disabled,id:this.state._id},this.state._on,{onClick:this.onClick,style:{width:"inherit"},tabIndex:this.state._tabIndex,type:this.state._type}),i("kol-span-wc",{_icon:this._icon,_iconOnly:this._iconOnly,_label:this.state._ariaLabel||this.state._label},i("slot",{name:"expert",slot:"expert"}))),!0===this.state._iconOnly&&i("kol-tooltip",{_align:this.state._tooltipAlign,_id:this.nonce,_label:this.state._ariaLabel||this.state._label}))}async getInteractiveElementRef(){return Promise.resolve(this.ref)}validateAccessKey(t){c(this,"_accessKey",t)}validateAriaControls(t){c(this,"_ariaControls",t)}validateAriaCurrent(t){v(this,"_ariaControls",(t=>!0===t||"date"===t||"location"===t||"page"===t||"step"===t||"time"===t),new Set(["boolean","String {data, location, page, step, time}"]),t)}validateAriaExpanded(t){u(this,"_ariaExpanded",t)}validateAriaLabel(t){b(this,t)}validateCustomClass(t){c(this,"_customClass",t,{defaultValue:void 0})}validateDisabled(t){u(this,"_disabled",t),!0===t&&o()}validateIcon(t){_(this,t)}validateIconAlign(t){p(this,t)}validateIconOnly(t){u(this,"_iconOnly",t,{defaultValue:!1})}validateId(t){c(this,"_id",t)}validateLabel(t){m(this,t)}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateTabIndex(t){f(this,t)}validateTooltipAlign(t){l(this,"_tooltipAlign",t)}validateType(t){j(this,"_type",t)}validateVariant(t){A(this,"_variant",t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaLabel(this._ariaLabel),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateId(this._id),this.validateLabel(this._label),this.validateOn(this._on),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateVariant(this._variant),0===Date.now()&&console.log(this.forwardedRef,this.ref)}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_icon:["validateIcon"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_on:["validateOn"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_variant:["validateVariant"]}}},w=class{constructor(i){t(this,i),this._level=1,this.state={}}validateLevel(t){x(this,t)}componentWillLoad(){this.validateLevel(this._level)}render(){switch(this.state._level){case 2:return i("h2",null,i("slot",null));case 3:return i("h3",null,i("slot",null));case 4:return i("h4",null,i("slot",null));case 5:return i("h5",null,i("slot",null));case 6:return i("h6",null,i("slot",null));default:return i("h1",null,i("slot",null))}}static get watchers(){return{_level:["validateLevel"]}}},I=class{constructor(i){t(this,i),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,a,e,l;const o="string"==typeof this._error&&this._error.length>0&&!0===this._touched,n="string"==typeof this._hint&&this._hint.length>0,r=!0===this._hideLabel&&!0!==this._required;return i(s,{class:{disabled:!0===this._disabled,error:!0===o,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&i("label",{htmlFor:this._id,id:`${this._id}-label`,style:{height:r?"0":void 0,margin:r?"0":void 0,padding:r?"0":void 0,visibility:r?"hidden":void 0}},i("span",null,i("slot",{name:"label"}))),n&&i("span",{class:"hint",id:`${this._id}-hint`},this._hint),i("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(a=this._icon)||void 0===a?void 0:a.right)}},i("div",{class:"icons"},(null===(e=this._icon)||void 0===e?void 0:e.left)?i("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):i("i",null),(null===(l=this._icon)||void 0===l?void 0:l.right)?i("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):i("i",null)),i("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&i("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),o&&i("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&i("datalist",{id:`${this._id}-list`},this._list.map((t=>i("option",{value:t})))))}};export{C as kol_button_wc,w as kol_heading_wc,I as kol_input};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{r as i,h as s,H as t}from"./index-a9774259.js";import{b as o}from"./prop.validators-6128c2dd.js";import{v as a}from"./icon-1e6842f0.js";import{a as l}from"./label-48702aa0.js";import"./index.m-86dc8c44.js";import"./a11y.tipps-7e981511.js";import"./dev.utils-d28700ca.js";import"./index-d870d3e1.js";import"./validator-fe8c60ef.js";const n=t=>{t instanceof Node&&setTimeout((()=>{var i,s;null===(i=t.parentElement)||void 0===i||i.removeChild(t),null===(s=t.parentNode)||void 0===s||s.removeChild(t)}))},e=class{constructor(t){i(this,t),this._icon=void 0,this._iconOnly=!1,this._label=void 0,this.state={_icon:{},_iconOnly:!1,_label:""}}render(){return s(t,{class:{"icon-only":this.state._iconOnly}},this.state._icon.top&&s("kol-icon",{class:{"icon top":!0},style:this.state._icon.top.style,_ariaLabel:"",_icon:this.state._icon.top.icon}),s("span",{class:"flex items-center"},this.state._icon.left&&s("kol-icon",{class:{"icon left":!0,"mr-2":this.state._iconOnly},style:this.state._icon.left.style,_ariaLabel:"",_icon:this.state._icon.left.icon}),s("span",null,!0!==this.state._iconOnly&&this.state._label.length>0?this.state._label:""),s("span",{ref:this.state._label.length>0?n:void 0},s("slot",{name:"expert"})),this.state._icon.right&&s("kol-icon",{class:{"icon right":!0,"ml-2":this.state._iconOnly},style:this.state._icon.right.style,_ariaLabel:"",_icon:this.state._icon.right.icon})),this.state._icon.bottom&&s("kol-icon",{class:{"icon bottom":!0},style:this.state._icon.bottom.style,_ariaLabel:"",_icon:this.state._icon.bottom.icon}))}validateIcon(t){a(this,t)}validateIconOnly(t){o(this,"_iconOnly",t)}validateLabel(t){l(this,t)}componentWillLoad(){this.validateIcon(this._icon),this.validateIconOnly(this._iconOnly),this.validateLabel(this._label)}static get watchers(){return{_icon:["validateIcon"],_iconOnly:["validateIconOnly"],_label:["validateLabel"]}}};export{e as kol_span_wc};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{s as e,f as t}from"./index.m-86dc8c44.js";import{d as n}from"./a11y.tipps-7e981511.js";import{L as r,g as o,a}from"./dev.utils-d28700ca.js";import{p as i,a as l}from"./index-d870d3e1.js";const s=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},c=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const o=new Set;s(o,t.querySelectorAll(e));const r=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<r.length;t++){const n=r[t].shadowRoot;s(o,c(e,"object"==typeof n&&null!==n?n:r[t]))}return Array.from(o)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},u=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let o=t.querySelector(e);if(null===o){const r=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<r.length;t++){const n=r[t].shadowRoot;if(o=u(e,"object"==typeof n&&null!==n?n:r[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 f=d;function d(e){var t=m(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function m(e){return"string"==typeof e?("red"==(t=e=e.toLowerCase())?[255,0,0]:"green"==t?[0,255,0]:"blue"==t?[0,0,255]:"black"==t?[0,0,0]:"white"==t?[255,255,255]:"cyan"==t?[0,255,255]:"gray"==t||"grey"==t?[128,128,128]:"magenta"==t||"pink"==t?[255,0,255]:"yellow"==t?[255,255,0]:void 0)||function(e){var t=e.replace(/^#/,""),o=t.length;if(3==o||4==o){var r=h(t[0]),n=h(t[1]),a=h(t[2]),l=3==o?255:h(t[3]);if(isNaN(r)||isNaN(n)||isNaN(a)||isNaN(l))return;return[r,n,a,l]}}(e)||function(e){var t=e.replace(/^#/,""),o=t.length;if(6==o||8==o){var r=h(t.slice(0,2)),n=h(t.slice(2,4)),a=h(t.slice(4,6)),l=6==o?255:h(t.slice(6,8));if(isNaN(r)||isNaN(n)||isNaN(a)||isNaN(l))return;return[r,n,a,l]}}(e)||function(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=y(t[0],!0),r=y(t[1],!0),n=y(t[2],!0);if(-1!=o&&-1!=r&&-1!=n)return[o,r,n,255]}}(e)||function(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),o=y(t[0],!0),r=y(t[1],!0),n=y(t[2],!0),a=y(255*t[3]);if(-1!=o&&-1!=r&&-1!=n&&-1!=a)return[o,r,n,a]}}(e)||[0,0,0,255]:function(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=y(null!=e.r?e.r:null!=e.red?e.red:0,!0),o=y(null!=e.g?e.g:null!=e.green?e.green:0,!0),r=y(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),n=y(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=o&&-1!=r&&-1!=n)return[t,o,r,n]}}(e)||function(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=y(e[0],!0),o=y(e[1],!0),r=y(e[2],!0),n=y(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=o&&-1!=r&&-1!=n)return[t,o,r,n]}}(e)||function(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]}(e)||[0,0,0,255];var t}function v(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function h(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function y(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}f.arr=d,f.obj=function(e){var t=m(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}},f.css=function(e){var t=m(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)+")"},f.hex=function(e){3==(a=m(e)).length&&a.push(255);var t=255==a[3],o=v(a[0]),r=v(a[1]),n=v(a[2]),a=v(Math.round(a[3])),l=function(e,t,o,r){var n=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=n.indexOf(e)&&-1!=n.indexOf(t)&&-1!=n.indexOf(o)&&-1!=n.indexOf(r)}(o,r,n,a);return t?l?"#"+o.charAt(0)+r.charAt(0)+n.charAt(0):"#"+o+r+n:l?"#"+o.charAt(0)+r.charAt(0)+n.charAt(0)+a.charAt(0):"#"+o+r+n+a},f.num=function(e){var t=m(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};const p=/\[object Object\]/,b=(e,t)=>{"string"==typeof e&&p.test(e)||t()},g=(e,t)=>{"string"==typeof e&&""===e||t()},w=(e,t)=>{Object.defineProperty(e,"target",{value:t,writable:!1})},S=(e,t,o,r={})=>{var n,a;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==0&&e.nextHooks.set(t,new Map),"function"==typeof r.afterPatch&&(null===(n=e.nextHooks.get(t))||void 0===n||n.set("afterPatch",r.afterPatch)),"function"==typeof r.beforePatch&&(null===(a=e.nextHooks.get(t))||void 0===a||a.set("beforePatch",r.beforePatch)),e.nextState.set(t,o),(e=>{var t,o,r;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,o)=>{var r;const n=t.get("beforePatch");"function"==typeof n&&n(null===(r=e.nextState)||void 0===r?void 0:r.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===(r=e.nextHooks)||void 0===r||r.forEach(((t,o)=>{const r=t.get("afterPatch");"function"==typeof r&&r(e.state[o],e.state,e,o)}))),delete e.nextHooks})(e))},N=(e,t,o,r,a,l={})=>{o(a)?S(e,t,a,null==l?void 0:l.hooks):void 0===a||null===a&&(void 0===(null==l?void 0:l.required)||!1===(null==l?void 0:l.required))?S(e,t,null==l?void 0:l.defaultValue,null==l?void 0:l.hooks):(void 0!==(null==l?void 0:l.required)&&!1!==(null==l?void 0:l.required)||r.add(null),((e,t,o,r)=>{n(`[${e.constructor.name}] Der Property-Wert (${o}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(r).join(", ")}`)})(e,t,a,r))},M=(e,t,o,r)=>{N(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),o,r)},E=(e,t,o,r={})=>{const n="number"==typeof r.minLength?null==r?void 0:r.minLength:0;N(e,t,(e=>"string"==typeof e&&e.length>=n),new Set([`String (Mindestlänge ${n})`]),o,r)},j=(e,t,o,r)=>{N(e,t,(e=>"number"==typeof e&&(void 0===(null==r?void 0:r.min)||"number"==typeof(null==r?void 0:r.min)&&e>=r.min)&&(void 0===(null==r?void 0:r.max)||"number"==typeof(null==r?void 0:r.max)&&e<=r.max)),new Set(["Number"]),o,r)},O=(e,t,o,r,a=(e=>e==e),l={})=>{g(r,(()=>{b(r,(()=>{void 0===r&&(r=[]);try{try{r=C(r)}catch(e){}if(Array.isArray(r)){const n=r.find((e=>!o(e)));void 0===n&&a(r)?S(e,t,r,l.hooks):b(n,(()=>{throw console.log(n),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else b(r,(()=>{throw console.log(r),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){n("Known bug: Zeichenkettenliste (string[])")}}))}))},k=/^(true|false)$/,D=/^-?\d+$/,T=/^-?\d+(.\d+)$/,H=e=>{if("string"==typeof e)if(k.test(e))e="true"===e;else if(D.test(e))e=parseInt(e);else if(T.test(e))e=parseFloat(e);else try{e=C(e)}catch(e){}return e},L=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw r.warn(["stringifyJson",e]),r.error("↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet."),new Error}},$=/^[{[]/,C=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if($.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){r.warn(["parseJson",e]),r.error("↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (&#8216;).")}}throw new Error},P=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,A=e=>"string"==typeof e?e:P(e),J=(e,t)=>u(e,t||o()),q=(e,t)=>c(e,t||o());let x=null;const z=()=>(x=x||{backgroundColor:"#00000000",color:"#00000000",domNode:o().body,level:"Fail",score:1},x),B=/(\d+, ){3}0\)/,K=(o,n=z())=>{const a=getComputedStyle(o),l=B.test(a.backgroundColor)?n.backgroundColor:f.hex(a.backgroundColor),s=B.test(a.color)?n.color:f.hex(a.color),i=e(l,s),c={backgroundColor:l,color:s,domNode:o,level:t(i),score:i};return i<4.5&&r.error(["Color-Contrast-Error",{backgroundColor:c.backgroundColor,color:c.color,level:c.level,score:c.score},c.domNode]),c},R=(e,t=z())=>{t.domNode instanceof HTMLElement&&(t=K(t.domNode,t));const o=t.domNode.querySelector(e);if(null===o){const o=t.domNode.querySelectorAll('[class="hydrated"]');for(let r=0;r<o.length&&(t.domNode=o[r],null===(t=R(e,t)).domNode);r++);return t}return K(o,t)},W=(e,t=window)=>{e instanceof HTMLElement?(t.scrollTo({behavior:"smooth",top:e.getBoundingClientRect().top+a().pageYOffset-50}),e.focus()):n("Das HTMLElement ist nicht valide, zu dem gescrollt werden soll.")},F=(e,t)=>{if((e instanceof Document||e instanceof HTMLElement||e instanceof ShadowRoot)&&"string"==typeof t){n("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=J(e,t);o instanceof HTMLElement?W(o):n(`Es konnte kein HTMLElement mit dem Selector (${e}) gefunden werden, zu dem gescrollt werden soll.`)}else n("Der Selector ist nicht valide, zu dem gescrollt werden soll.")};class I{static queryHtmlElementColors(e,t,o=!1,n=!0){let a=null;if(!0===o||!1===I.executionLock)if(!1===o&&(I.cache.clear(),I.cache.set(t.domNode,t),I.executionLock=!0,!0===n&&r.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)a=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 r=t.domNode;if("function"==typeof r.assignedNodes){const e=r.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&o.add(e[t])}const n=t.domNode.children;for(let e=0;e<n.length;e++)o.add(n[e]);const l=Array.from(o);for(let o=0;o<l.length;o++){let r=I.cache.get(l[o]);void 0===r&&(r=K(l[o],t)),I.cache.set(l[o],r);const n=I.queryHtmlElementColors(e,r,!0,!1);if(null!==n){a=n;break}}}else r.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===o&&(!0===n&&r.debug(`[KoliBriUtils] Color contrast analysis finished (${I.cache.size} DOM elements are analysed).`),I.executionLock=!1,I.cache.clear()),a}}I.executionLock=!1,I.cache=new Map;class U{}U.patchTheme=i,U.patchThemeTag=l,U.querySelector=J,U.querySelectorAll=q,U.scrollByHTMLElement=W,U.scrollBySelector=F,U.stringifyJson=L;export{U as K,N as a,M as b,O as c,w as d,P as e,j as f,H as g,F as h,g as i,I as j,J as k,K as l,A as m,q as n,b as o,C as p,R as q,f as r,S as s,L as t,E as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{e as t}from"./a11y.tipps-7e981511.js";import{f as a}from"./prop.validators-6128c2dd.js";const e={hooks:{afterPatch:a=>{-1!==a&&0!==a&&t("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},o=(t,o)=>{a(t,"_tabIndex",o,e)};export{o as v};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{u as o}from"./a11y.tipps-7e981511.js";import{c as s}from"./prop.validators-6128c2dd.js";const t=(t,p,a)=>{s(p,"_links",(t=>"object"==typeof t&&"string"==typeof t._label),a),o(t,p.state._links.length)};export{t as w};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{a as e}from"./prop.validators-6128c2dd.js";const r=(r,a)=>{e(r,"_level",(e=>"number"==typeof e&&1<=e&&e<=6),new Set(["Number {1, 2, 3, 4, 5, 6}"]),a,{defaultValue:1,required:!0})};export{r as w};