@public-ui/components 1.7.4 → 1.7.6-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (719) hide show
  1. package/custom-elements.json +8 -3
  2. package/dist/cjs/{a11y.tipps-fb1b7a5e.js → a11y.tipps-511a20c0.js} +1 -1
  3. package/dist/cjs/{a11y.tipps-fb1b7a5e.js.map → a11y.tipps-511a20c0.js.map} +1 -1
  4. package/dist/cjs/align-d899d1f6.js +4 -0
  5. package/dist/cjs/{align-d43fb2e6.js.map → align-d899d1f6.js.map} +1 -1
  6. package/dist/cjs/{alignment-aaabbbdd.js → alignment-a2d567b4.js} +1 -1
  7. package/dist/cjs/{alignment-aaabbbdd.js.map → alignment-a2d567b4.js.map} +1 -1
  8. package/dist/cjs/{app-globals-567cee65.js → app-globals-850ab8db.js} +1 -1
  9. package/dist/cjs/{app-globals-567cee65.js.map → app-globals-850ab8db.js.map} +1 -1
  10. package/dist/cjs/{aria-current-15ac658e.js → aria-current-9890abe4.js} +1 -1
  11. package/dist/cjs/{aria-current-15ac658e.js.map → aria-current-9890abe4.js.map} +1 -1
  12. package/dist/cjs/{associated.controller-48c1c5e7.js → associated.controller-a84cba63.js} +1 -1
  13. package/dist/cjs/{associated.controller-48c1c5e7.js.map → associated.controller-a84cba63.js.map} +1 -1
  14. package/dist/cjs/{color-830bebd1.js → color-3b69a291.js} +1 -1
  15. package/dist/cjs/{color-830bebd1.js.map → color-3b69a291.js.map} +1 -1
  16. package/dist/cjs/{controller-a9d694b3.js → controller-006e08a4.js} +1 -1
  17. package/dist/cjs/{controller-a9d694b3.js.map → controller-006e08a4.js.map} +1 -1
  18. package/dist/cjs/{controller-fd982fbd.js → controller-0eed2d0a.js} +1 -1
  19. package/dist/cjs/{controller-fd982fbd.js.map → controller-0eed2d0a.js.map} +1 -1
  20. package/dist/cjs/{controller-69fcf8c1.js → controller-32fffcef.js} +1 -1
  21. package/dist/cjs/{controller-69fcf8c1.js.map → controller-32fffcef.js.map} +1 -1
  22. package/dist/cjs/{controller-16e90d86.js → controller-74f7bed5.js} +1 -1
  23. package/dist/cjs/{controller-16e90d86.js.map → controller-74f7bed5.js.map} +1 -1
  24. package/dist/cjs/{controller-208b180e.js → controller-dd5e25b1.js} +1 -1
  25. package/dist/cjs/{controller-208b180e.js.map → controller-dd5e25b1.js.map} +1 -1
  26. package/dist/cjs/{controller-icon-3d1d50a0.js → controller-icon-a611545e.js} +1 -1
  27. package/dist/cjs/{controller-icon-3d1d50a0.js.map → controller-icon-a611545e.js.map} +1 -1
  28. package/dist/cjs/{custom-class-de1d31c6.js → custom-class-fbc34b29.js} +1 -1
  29. package/dist/cjs/{custom-class-de1d31c6.js.map → custom-class-fbc34b29.js.map} +1 -1
  30. package/dist/cjs/{dev.utils-94b44997.js → dev.utils-a3719b3e.js} +1 -1
  31. package/dist/cjs/{dev.utils-94b44997.js.map → dev.utils-a3719b3e.js.map} +1 -1
  32. package/dist/cjs/{devtools-27937a42.js → devtools-907d4ff9.js} +1 -1
  33. package/dist/cjs/{devtools-27937a42.js.map → devtools-907d4ff9.js.map} +1 -1
  34. package/dist/cjs/has-closer-5041fdbb.js +4 -0
  35. package/dist/cjs/{has-closer-f38cfe7e.js.map → has-closer-5041fdbb.js.map} +1 -1
  36. package/dist/cjs/hide-label-52359bcc.js +4 -0
  37. package/dist/cjs/{hide-label-0213dc75.js.map → hide-label-52359bcc.js.map} +1 -1
  38. package/dist/cjs/{i18n-e3a3e281.js → i18n-587b015d.js} +1 -1
  39. package/dist/cjs/{i18n-e3a3e281.js.map → i18n-587b015d.js.map} +1 -1
  40. package/dist/cjs/{icons-351a0e6d.js → icons-976e1e5c.js} +1 -1
  41. package/dist/cjs/{icons-351a0e6d.js.map → icons-976e1e5c.js.map} +1 -1
  42. package/dist/cjs/image-source-31b17eca.js +4 -0
  43. package/dist/cjs/{image-source-7d1a9b1b.js.map → image-source-31b17eca.js.map} +1 -1
  44. package/dist/cjs/index-0d2cfb70.js +4 -0
  45. package/dist/cjs/index-0d2cfb70.js.map +1 -0
  46. package/dist/cjs/index-758f4a8c.js +4 -0
  47. package/dist/cjs/index-758f4a8c.js.map +1 -0
  48. package/dist/cjs/index-a0085191.js +5 -0
  49. package/dist/cjs/index-a0085191.js.map +1 -0
  50. package/dist/cjs/index.cjs.js +1 -1
  51. package/dist/cjs/index.cjs.js.map +1 -1
  52. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-avatar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  64. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  66. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-button-link-text-switch.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  74. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  76. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  81. package/dist/cjs/kol-icon-font-awesome.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-icon-icofont.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  86. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-indented-text.cjs.entry.js.map +1 -1
  88. package/dist/cjs/kol-input-adapter-leanup.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  91. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  93. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  99. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  101. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  103. package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  108. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
  113. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  115. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
  117. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  120. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  124. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  126. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  128. package/dist/cjs/kol-popover-wc.cjs.entry.js +4 -0
  129. package/dist/cjs/kol-popover-wc.cjs.entry.js.map +1 -0
  130. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  132. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-quote.cjs.entry.js.map +1 -1
  134. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  135. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  136. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  137. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  138. package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
  139. package/dist/cjs/kol-span-wc_2.cjs.entry.js.map +1 -1
  140. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  141. package/dist/cjs/kol-span.cjs.entry.js.map +1 -1
  142. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  143. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  144. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  145. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  146. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  147. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  148. package/dist/cjs/kol-table.cjs.entry.js.map +1 -1
  149. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  150. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  151. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  152. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  153. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  154. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  155. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  156. package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
  157. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  158. package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
  159. package/dist/cjs/kolibri.cjs.js +1 -1
  160. package/dist/cjs/kolibri.cjs.js.map +1 -1
  161. package/dist/cjs/{label-2a477c99.js → label-ae238590.js} +1 -1
  162. package/dist/cjs/{label-2a477c99.js.map → label-ae238590.js.map} +1 -1
  163. package/dist/cjs/loader.cjs.js +1 -1
  164. package/dist/cjs/open-8b727a85.js +4 -0
  165. package/dist/cjs/{open-094dce9b.js.map → open-8b727a85.js.map} +1 -1
  166. package/dist/cjs/{prop.validators-db3c44d7.js → prop.validators-810536ed.js} +1 -1
  167. package/dist/cjs/{prop.validators-db3c44d7.js.map → prop.validators-810536ed.js.map} +1 -1
  168. package/dist/cjs/rows-e362e9d4.js +4 -0
  169. package/dist/cjs/{rows-8fef3ed1.js.map → rows-e362e9d4.js.map} +1 -1
  170. package/dist/cjs/show-3f606fbf.js +4 -0
  171. package/dist/cjs/{show-24e6ed74.js.map → show-3f606fbf.js.map} +1 -1
  172. package/dist/cjs/{suggestions-87a7966a.js → suggestions-64ac25be.js} +1 -1
  173. package/dist/cjs/{suggestions-87a7966a.js.map → suggestions-64ac25be.js.map} +1 -1
  174. package/dist/cjs/{tab-index-510637f6.js → tab-index-83d00612.js} +1 -1
  175. package/dist/cjs/{tab-index-510637f6.js.map → tab-index-83d00612.js.map} +1 -1
  176. package/dist/cjs/{tooltip-align-75fdd33d.js → tooltip-align-615218fa.js} +1 -1
  177. package/dist/cjs/{tooltip-align-75fdd33d.js.map → tooltip-align-615218fa.js.map} +1 -1
  178. package/dist/cjs/{validation-b0506a58.js → validation-a5877483.js} +1 -1
  179. package/dist/cjs/{validation-b0506a58.js.map → validation-a5877483.js.map} +1 -1
  180. package/dist/cjs/{validation-c95c5334.js → validation-c5d1ebc7.js} +1 -1
  181. package/dist/cjs/{validation-c95c5334.js.map → validation-c5d1ebc7.js.map} +1 -1
  182. package/dist/components/color.js +1 -1
  183. package/dist/components/component12.js +1 -1
  184. package/dist/components/component12.js.map +1 -1
  185. package/dist/components/component14.js +1 -1
  186. package/dist/components/component14.js.map +1 -1
  187. package/dist/components/component15.js +1 -1
  188. package/dist/components/component15.js.map +1 -1
  189. package/dist/components/component16.js +1 -1
  190. package/dist/components/component16.js.map +1 -1
  191. package/dist/components/component2.js +1 -1
  192. package/dist/components/component3.js +1 -1
  193. package/dist/components/component3.js.map +1 -1
  194. package/dist/components/component5.js +1 -1
  195. package/dist/components/component6.js +1 -1
  196. package/dist/components/component8.js +1 -1
  197. package/dist/components/component8.js.map +1 -1
  198. package/dist/components/component9.js +1 -1
  199. package/dist/components/controller.js +1 -1
  200. package/dist/components/controller2.js +1 -1
  201. package/dist/components/devtools.js +1 -1
  202. package/dist/components/i18n.js +1 -1
  203. package/dist/components/i18n.js.map +1 -1
  204. package/dist/components/index.js +1 -1
  205. package/dist/components/index.js.map +1 -1
  206. package/dist/components/kol-abbr.js +1 -1
  207. package/dist/components/kol-abbr.js.map +1 -1
  208. package/dist/components/kol-accordion.js +1 -1
  209. package/dist/components/kol-accordion.js.map +1 -1
  210. package/dist/components/kol-avatar.js +1 -1
  211. package/dist/components/kol-avatar.js.map +1 -1
  212. package/dist/components/kol-breadcrumb.js +1 -1
  213. package/dist/components/kol-breadcrumb.js.map +1 -1
  214. package/dist/components/kol-button-group.js +1 -1
  215. package/dist/components/kol-button-group.js.map +1 -1
  216. package/dist/components/kol-button-link.js +1 -1
  217. package/dist/components/kol-button-link.js.map +1 -1
  218. package/dist/components/kol-card.js +1 -1
  219. package/dist/components/kol-card.js.map +1 -1
  220. package/dist/components/kol-details.js +1 -1
  221. package/dist/components/kol-details.js.map +1 -1
  222. package/dist/components/kol-heading.js +1 -1
  223. package/dist/components/kol-heading.js.map +1 -1
  224. package/dist/components/kol-image.js +1 -1
  225. package/dist/components/kol-image.js.map +1 -1
  226. package/dist/components/kol-input-checkbox.js +1 -1
  227. package/dist/components/kol-input-checkbox.js.map +1 -1
  228. package/dist/components/kol-input-color.js +1 -1
  229. package/dist/components/kol-input-color.js.map +1 -1
  230. package/dist/components/kol-input-date.js +1 -1
  231. package/dist/components/kol-input-date.js.map +1 -1
  232. package/dist/components/kol-input-email.js +1 -1
  233. package/dist/components/kol-input-email.js.map +1 -1
  234. package/dist/components/kol-input-file.js +1 -1
  235. package/dist/components/kol-input-file.js.map +1 -1
  236. package/dist/components/kol-input-number.js +1 -1
  237. package/dist/components/kol-input-number.js.map +1 -1
  238. package/dist/components/kol-input-password.js +1 -1
  239. package/dist/components/kol-input-password.js.map +1 -1
  240. package/dist/components/kol-input-range.js +1 -1
  241. package/dist/components/kol-input-range.js.map +1 -1
  242. package/dist/components/kol-input-text.js +1 -1
  243. package/dist/components/kol-input-text.js.map +1 -1
  244. package/dist/components/kol-kolibri.js +1 -1
  245. package/dist/components/kol-kolibri.js.map +1 -1
  246. package/dist/components/kol-link-button.js +1 -1
  247. package/dist/components/kol-link-button.js.map +1 -1
  248. package/dist/components/kol-link-group.js +1 -1
  249. package/dist/components/kol-link-group.js.map +1 -1
  250. package/dist/components/kol-logo.js +1 -1
  251. package/dist/components/kol-logo.js.map +1 -1
  252. package/dist/components/kol-modal.js +1 -1
  253. package/dist/components/kol-modal.js.map +1 -1
  254. package/dist/components/kol-nav.js +1 -1
  255. package/dist/components/kol-nav.js.map +1 -1
  256. package/dist/components/{kol-popover.d.ts → kol-popover-wc.d.ts} +4 -4
  257. package/dist/components/kol-popover-wc.js +4 -0
  258. package/dist/components/kol-popover-wc.js.map +1 -0
  259. package/dist/components/kol-progress.js +1 -1
  260. package/dist/components/kol-progress.js.map +1 -1
  261. package/dist/components/kol-quote.js +1 -1
  262. package/dist/components/kol-quote.js.map +1 -1
  263. package/dist/components/kol-skip-nav.js +1 -1
  264. package/dist/components/kol-skip-nav.js.map +1 -1
  265. package/dist/components/kol-span.js +1 -1
  266. package/dist/components/kol-span.js.map +1 -1
  267. package/dist/components/kol-spin.js +1 -1
  268. package/dist/components/kol-spin.js.map +1 -1
  269. package/dist/components/kol-split-button.js +1 -1
  270. package/dist/components/kol-split-button.js.map +1 -1
  271. package/dist/components/kol-table.js +1 -1
  272. package/dist/components/kol-table.js.map +1 -1
  273. package/dist/components/kol-tabs.js +1 -1
  274. package/dist/components/kol-tabs.js.map +1 -1
  275. package/dist/components/kol-textarea.js +1 -1
  276. package/dist/components/kol-textarea.js.map +1 -1
  277. package/dist/components/kol-toast-container.js +1 -1
  278. package/dist/components/kol-toast-container.js.map +1 -1
  279. package/dist/components/kol-toast.js +1 -1
  280. package/dist/components/kol-toast.js.map +1 -1
  281. package/dist/components/kol-version.js +1 -1
  282. package/dist/components/kol-version.js.map +1 -1
  283. package/dist/components/prop.validators.js +1 -1
  284. package/dist/components/prop.validators.js.map +1 -1
  285. package/dist/components/shadow.js +1 -1
  286. package/dist/components/shadow.js.map +1 -1
  287. package/dist/components/shadow2.js +1 -1
  288. package/dist/components/shadow2.js.map +1 -1
  289. package/dist/components/shadow3.js +1 -1
  290. package/dist/components/shadow3.js.map +1 -1
  291. package/dist/esm/{a11y.tipps-d4474fb4.js → a11y.tipps-804709ed.js} +1 -1
  292. package/dist/esm/{a11y.tipps-d4474fb4.js.map → a11y.tipps-804709ed.js.map} +1 -1
  293. package/dist/esm/{align-f80b127b.js → align-0e99cc3b.js} +1 -1
  294. package/dist/esm/{align-f80b127b.js.map → align-0e99cc3b.js.map} +1 -1
  295. package/dist/esm/{alignment-f20c3db4.js → alignment-effd7416.js} +1 -1
  296. package/dist/esm/{alignment-f20c3db4.js.map → alignment-effd7416.js.map} +1 -1
  297. package/dist/esm/{app-globals-41dc96d7.js → app-globals-faf0bae3.js} +1 -1
  298. package/dist/esm/{app-globals-41dc96d7.js.map → app-globals-faf0bae3.js.map} +1 -1
  299. package/dist/esm/{aria-current-1f41adc0.js → aria-current-10160ab2.js} +1 -1
  300. package/dist/esm/{aria-current-1f41adc0.js.map → aria-current-10160ab2.js.map} +1 -1
  301. package/dist/esm/{associated.controller-b9904b17.js → associated.controller-fdb7b5fd.js} +1 -1
  302. package/dist/esm/{associated.controller-b9904b17.js.map → associated.controller-fdb7b5fd.js.map} +1 -1
  303. package/dist/esm/{color-85b10e1d.js → color-ad663c35.js} +1 -1
  304. package/dist/esm/{color-85b10e1d.js.map → color-ad663c35.js.map} +1 -1
  305. package/dist/esm/{controller-b995efab.js → controller-1f17a764.js} +1 -1
  306. package/dist/esm/{controller-b995efab.js.map → controller-1f17a764.js.map} +1 -1
  307. package/dist/esm/{controller-a2596b56.js → controller-3a7db3af.js} +1 -1
  308. package/dist/esm/{controller-a2596b56.js.map → controller-3a7db3af.js.map} +1 -1
  309. package/dist/esm/{controller-5e3e32ca.js → controller-80cfae4b.js} +1 -1
  310. package/dist/esm/{controller-5e3e32ca.js.map → controller-80cfae4b.js.map} +1 -1
  311. package/dist/esm/{controller-3aa75da4.js → controller-9bc0e5a3.js} +1 -1
  312. package/dist/esm/{controller-3aa75da4.js.map → controller-9bc0e5a3.js.map} +1 -1
  313. package/dist/esm/{controller-da5ff8d9.js → controller-f4895089.js} +1 -1
  314. package/dist/esm/{controller-da5ff8d9.js.map → controller-f4895089.js.map} +1 -1
  315. package/dist/esm/{controller-icon-67650274.js → controller-icon-d0dbedbe.js} +1 -1
  316. package/dist/esm/{controller-icon-67650274.js.map → controller-icon-d0dbedbe.js.map} +1 -1
  317. package/dist/esm/{custom-class-1cf5081e.js → custom-class-1ec79846.js} +1 -1
  318. package/dist/esm/{custom-class-1cf5081e.js.map → custom-class-1ec79846.js.map} +1 -1
  319. package/dist/esm/{dev.utils-6644fc40.js → dev.utils-89ea0d85.js} +1 -1
  320. package/dist/esm/{dev.utils-6644fc40.js.map → dev.utils-89ea0d85.js.map} +1 -1
  321. package/dist/esm/{devtools-5c70a1f5.js → devtools-4b5eb4a4.js} +1 -1
  322. package/dist/esm/{devtools-5c70a1f5.js.map → devtools-4b5eb4a4.js.map} +1 -1
  323. package/dist/esm/{has-closer-d68572b5.js → has-closer-6e81759e.js} +1 -1
  324. package/dist/esm/{has-closer-d68572b5.js.map → has-closer-6e81759e.js.map} +1 -1
  325. package/dist/esm/{hide-label-f8e6542d.js → hide-label-9229685b.js} +1 -1
  326. package/dist/esm/{hide-label-f8e6542d.js.map → hide-label-9229685b.js.map} +1 -1
  327. package/dist/esm/{i18n-604b0def.js → i18n-26e5959d.js} +1 -1
  328. package/dist/esm/{i18n-604b0def.js.map → i18n-26e5959d.js.map} +1 -1
  329. package/dist/esm/{icons-a0f3f5e9.js → icons-336848af.js} +1 -1
  330. package/dist/esm/{icons-a0f3f5e9.js.map → icons-336848af.js.map} +1 -1
  331. package/dist/esm/{image-source-c214bb84.js → image-source-80bc78a8.js} +1 -1
  332. package/dist/esm/{image-source-c214bb84.js.map → image-source-80bc78a8.js.map} +1 -1
  333. package/dist/esm/index-0bc40dc4.js +5 -0
  334. package/dist/esm/index-0bc40dc4.js.map +1 -0
  335. package/dist/esm/index-d56bfd0f.js +4 -0
  336. package/dist/esm/index-d56bfd0f.js.map +1 -0
  337. package/dist/esm/index-ec1baafd.js +4 -0
  338. package/dist/esm/index-ec1baafd.js.map +1 -0
  339. package/dist/esm/index.js +1 -1
  340. package/dist/esm/index.js.map +1 -1
  341. package/dist/esm/kol-abbr.entry.js +1 -1
  342. package/dist/esm/kol-abbr.entry.js.map +1 -1
  343. package/dist/esm/kol-accordion.entry.js +1 -1
  344. package/dist/esm/kol-accordion.entry.js.map +1 -1
  345. package/dist/esm/kol-alert-wc_3.entry.js +1 -1
  346. package/dist/esm/kol-alert.entry.js +1 -1
  347. package/dist/esm/kol-alert.entry.js.map +1 -1
  348. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  349. package/dist/esm/kol-avatar.entry.js +1 -1
  350. package/dist/esm/kol-avatar.entry.js.map +1 -1
  351. package/dist/esm/kol-badge.entry.js +1 -1
  352. package/dist/esm/kol-badge.entry.js.map +1 -1
  353. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  354. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  355. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  356. package/dist/esm/kol-button-group.entry.js +1 -1
  357. package/dist/esm/kol-button-group.entry.js.map +1 -1
  358. package/dist/esm/kol-button-link-text-switch.entry.js +1 -1
  359. package/dist/esm/kol-button-link.entry.js +1 -1
  360. package/dist/esm/kol-button-link.entry.js.map +1 -1
  361. package/dist/esm/kol-button.entry.js +1 -1
  362. package/dist/esm/kol-button.entry.js.map +1 -1
  363. package/dist/esm/kol-card.entry.js +1 -1
  364. package/dist/esm/kol-card.entry.js.map +1 -1
  365. package/dist/esm/kol-details.entry.js +1 -1
  366. package/dist/esm/kol-details.entry.js.map +1 -1
  367. package/dist/esm/kol-form.entry.js +1 -1
  368. package/dist/esm/kol-heading.entry.js +1 -1
  369. package/dist/esm/kol-heading.entry.js.map +1 -1
  370. package/dist/esm/kol-icon-font-awesome.entry.js +1 -1
  371. package/dist/esm/kol-icon-icofont.entry.js +1 -1
  372. package/dist/esm/kol-icon.entry.js +1 -1
  373. package/dist/esm/kol-image.entry.js +1 -1
  374. package/dist/esm/kol-image.entry.js.map +1 -1
  375. package/dist/esm/kol-indented-text.entry.js +1 -1
  376. package/dist/esm/kol-indented-text.entry.js.map +1 -1
  377. package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
  378. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  379. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  380. package/dist/esm/kol-input-color.entry.js +1 -1
  381. package/dist/esm/kol-input-color.entry.js.map +1 -1
  382. package/dist/esm/kol-input-date.entry.js +1 -1
  383. package/dist/esm/kol-input-date.entry.js.map +1 -1
  384. package/dist/esm/kol-input-email.entry.js +1 -1
  385. package/dist/esm/kol-input-email.entry.js.map +1 -1
  386. package/dist/esm/kol-input-file.entry.js +1 -1
  387. package/dist/esm/kol-input-file.entry.js.map +1 -1
  388. package/dist/esm/kol-input-number.entry.js +1 -1
  389. package/dist/esm/kol-input-number.entry.js.map +1 -1
  390. package/dist/esm/kol-input-password.entry.js +1 -1
  391. package/dist/esm/kol-input-password.entry.js.map +1 -1
  392. package/dist/esm/kol-input-radio-group.entry.js +1 -1
  393. package/dist/esm/kol-input-radio.entry.js +1 -1
  394. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  395. package/dist/esm/kol-input-range.entry.js +1 -1
  396. package/dist/esm/kol-input-range.entry.js.map +1 -1
  397. package/dist/esm/kol-input-text.entry.js +1 -1
  398. package/dist/esm/kol-input-text.entry.js.map +1 -1
  399. package/dist/esm/kol-input.entry.js +1 -1
  400. package/dist/esm/kol-kolibri.entry.js +1 -1
  401. package/dist/esm/kol-kolibri.entry.js.map +1 -1
  402. package/dist/esm/kol-link-button.entry.js +1 -1
  403. package/dist/esm/kol-link-button.entry.js.map +1 -1
  404. package/dist/esm/kol-link-group.entry.js +1 -1
  405. package/dist/esm/kol-link-group.entry.js.map +1 -1
  406. package/dist/esm/kol-link-wc.entry.js +1 -1
  407. package/dist/esm/kol-link.entry.js +1 -1
  408. package/dist/esm/kol-link.entry.js.map +1 -1
  409. package/dist/esm/kol-logo.entry.js +1 -1
  410. package/dist/esm/kol-logo.entry.js.map +1 -1
  411. package/dist/esm/kol-modal.entry.js +1 -1
  412. package/dist/esm/kol-modal.entry.js.map +1 -1
  413. package/dist/esm/kol-nav.entry.js +1 -1
  414. package/dist/esm/kol-nav.entry.js.map +1 -1
  415. package/dist/esm/kol-pagination.entry.js +1 -1
  416. package/dist/esm/kol-pagination.entry.js.map +1 -1
  417. package/dist/esm/kol-popover-wc.entry.js +4 -0
  418. package/dist/esm/kol-popover-wc.entry.js.map +1 -0
  419. package/dist/esm/kol-progress.entry.js +1 -1
  420. package/dist/esm/kol-progress.entry.js.map +1 -1
  421. package/dist/esm/kol-quote.entry.js +1 -1
  422. package/dist/esm/kol-quote.entry.js.map +1 -1
  423. package/dist/esm/kol-select.entry.js +1 -1
  424. package/dist/esm/kol-select.entry.js.map +1 -1
  425. package/dist/esm/kol-skip-nav.entry.js +1 -1
  426. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  427. package/dist/esm/kol-span-wc_2.entry.js +1 -1
  428. package/dist/esm/kol-span-wc_2.entry.js.map +1 -1
  429. package/dist/esm/kol-span.entry.js +1 -1
  430. package/dist/esm/kol-span.entry.js.map +1 -1
  431. package/dist/esm/kol-spin.entry.js +1 -1
  432. package/dist/esm/kol-spin.entry.js.map +1 -1
  433. package/dist/esm/kol-split-button.entry.js +1 -1
  434. package/dist/esm/kol-split-button.entry.js.map +1 -1
  435. package/dist/esm/kol-symbol.entry.js +1 -1
  436. package/dist/esm/kol-table.entry.js +1 -1
  437. package/dist/esm/kol-table.entry.js.map +1 -1
  438. package/dist/esm/kol-tabs.entry.js +1 -1
  439. package/dist/esm/kol-tabs.entry.js.map +1 -1
  440. package/dist/esm/kol-textarea.entry.js +1 -1
  441. package/dist/esm/kol-textarea.entry.js.map +1 -1
  442. package/dist/esm/kol-toast-container.entry.js +1 -1
  443. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  444. package/dist/esm/kol-toast.entry.js +1 -1
  445. package/dist/esm/kol-toast.entry.js.map +1 -1
  446. package/dist/esm/kol-version.entry.js +1 -1
  447. package/dist/esm/kol-version.entry.js.map +1 -1
  448. package/dist/esm/kolibri.js +1 -1
  449. package/dist/esm/kolibri.js.map +1 -1
  450. package/dist/esm/{label-dd0fc95b.js → label-708d4611.js} +1 -1
  451. package/dist/esm/{label-dd0fc95b.js.map → label-708d4611.js.map} +1 -1
  452. package/dist/esm/loader.js +1 -1
  453. package/dist/esm/{open-d9d85c3d.js → open-cd386fb2.js} +1 -1
  454. package/dist/esm/{open-d9d85c3d.js.map → open-cd386fb2.js.map} +1 -1
  455. package/dist/esm/{prop.validators-a681ba79.js → prop.validators-50c7d885.js} +1 -1
  456. package/dist/esm/{prop.validators-a681ba79.js.map → prop.validators-50c7d885.js.map} +1 -1
  457. package/dist/esm/{rows-c95ad23c.js → rows-eee702b3.js} +1 -1
  458. package/dist/esm/{rows-c95ad23c.js.map → rows-eee702b3.js.map} +1 -1
  459. package/dist/esm/{show-f6f9dd70.js → show-7588def9.js} +1 -1
  460. package/dist/esm/{show-f6f9dd70.js.map → show-7588def9.js.map} +1 -1
  461. package/dist/esm/{suggestions-73dd0819.js → suggestions-c70e1994.js} +1 -1
  462. package/dist/esm/{suggestions-73dd0819.js.map → suggestions-c70e1994.js.map} +1 -1
  463. package/dist/esm/{tab-index-f01a4299.js → tab-index-5dd7efc3.js} +1 -1
  464. package/dist/esm/{tab-index-f01a4299.js.map → tab-index-5dd7efc3.js.map} +1 -1
  465. package/dist/esm/{tooltip-align-db40ed75.js → tooltip-align-9f6e72c2.js} +1 -1
  466. package/dist/esm/{tooltip-align-db40ed75.js.map → tooltip-align-9f6e72c2.js.map} +1 -1
  467. package/dist/esm/validation-1e5fdf52.js +4 -0
  468. package/dist/esm/{validation-e4e29b6a.js.map → validation-1e5fdf52.js.map} +1 -1
  469. package/dist/esm/validation-eb20e4ad.js +4 -0
  470. package/dist/esm/{validation-b7903abd.js.map → validation-eb20e4ad.js.map} +1 -1
  471. package/dist/kolibri/{a11y.tipps-d4474fb4.js → a11y.tipps-804709ed.js} +1 -1
  472. package/dist/kolibri/align-0e99cc3b.js +4 -0
  473. package/dist/kolibri/alignment-effd7416.js +4 -0
  474. package/dist/kolibri/app-globals-faf0bae3.js +4 -0
  475. package/dist/kolibri/{aria-current-1f41adc0.js → aria-current-10160ab2.js} +1 -1
  476. package/dist/kolibri/{associated.controller-b9904b17.js → associated.controller-fdb7b5fd.js} +1 -1
  477. package/dist/kolibri/{color-85b10e1d.js → color-ad663c35.js} +1 -1
  478. package/dist/kolibri/{controller-b995efab.js → controller-1f17a764.js} +1 -1
  479. package/dist/kolibri/{controller-a2596b56.js → controller-3a7db3af.js} +1 -1
  480. package/dist/kolibri/{controller-5e3e32ca.js → controller-80cfae4b.js} +1 -1
  481. package/dist/kolibri/controller-9bc0e5a3.js +4 -0
  482. package/dist/kolibri/{controller-3aa75da4.js.map → controller-9bc0e5a3.js.map} +1 -1
  483. package/dist/kolibri/{controller-da5ff8d9.js → controller-f4895089.js} +1 -1
  484. package/dist/kolibri/controller-icon-d0dbedbe.js +4 -0
  485. package/dist/kolibri/{custom-class-1cf5081e.js → custom-class-1ec79846.js} +1 -1
  486. package/dist/kolibri/{dev.utils-6644fc40.js → dev.utils-89ea0d85.js} +1 -1
  487. package/dist/kolibri/{dev.utils-6644fc40.js.map → dev.utils-89ea0d85.js.map} +1 -1
  488. package/dist/kolibri/devtools-4b5eb4a4.js +4 -0
  489. package/dist/kolibri/has-closer-6e81759e.js +4 -0
  490. package/dist/kolibri/{has-closer-d68572b5.js.map → has-closer-6e81759e.js.map} +1 -1
  491. package/dist/kolibri/hide-label-9229685b.js +4 -0
  492. package/dist/kolibri/{i18n-604b0def.js → i18n-26e5959d.js} +1 -1
  493. package/dist/kolibri/icons-336848af.js +4 -0
  494. package/dist/kolibri/image-source-80bc78a8.js +4 -0
  495. package/dist/kolibri/index-0bc40dc4.js +5 -0
  496. package/dist/kolibri/index-0bc40dc4.js.map +1 -0
  497. package/dist/kolibri/index-d56bfd0f.js +4 -0
  498. package/dist/kolibri/index-d56bfd0f.js.map +1 -0
  499. package/dist/kolibri/index-ec1baafd.js +4 -0
  500. package/dist/kolibri/index-ec1baafd.js.map +1 -0
  501. package/dist/kolibri/index.esm.js +1 -1
  502. package/dist/kolibri/index.esm.js.map +1 -1
  503. package/dist/kolibri/kol-abbr.entry.js +1 -1
  504. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  505. package/dist/kolibri/kol-accordion.entry.js +1 -1
  506. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  507. package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
  508. package/dist/kolibri/kol-alert.entry.js +1 -1
  509. package/dist/kolibri/kol-alert.entry.js.map +1 -1
  510. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  511. package/dist/kolibri/kol-avatar-wc.entry.js.map +1 -1
  512. package/dist/kolibri/kol-avatar.entry.js +1 -1
  513. package/dist/kolibri/kol-avatar.entry.js.map +1 -1
  514. package/dist/kolibri/kol-badge.entry.js +1 -1
  515. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  516. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  517. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  518. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  519. package/dist/kolibri/kol-button-group.entry.js +1 -1
  520. package/dist/kolibri/kol-button-group.entry.js.map +1 -1
  521. package/dist/kolibri/kol-button-link-text-switch.entry.js +1 -1
  522. package/dist/kolibri/kol-button-link.entry.js +1 -1
  523. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  524. package/dist/kolibri/kol-button.entry.js +1 -1
  525. package/dist/kolibri/kol-button.entry.js.map +1 -1
  526. package/dist/kolibri/kol-card.entry.js +1 -1
  527. package/dist/kolibri/kol-card.entry.js.map +1 -1
  528. package/dist/kolibri/kol-details.entry.js +1 -1
  529. package/dist/kolibri/kol-details.entry.js.map +1 -1
  530. package/dist/kolibri/kol-form.entry.js +1 -1
  531. package/dist/kolibri/kol-heading.entry.js +1 -1
  532. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  533. package/dist/kolibri/kol-icon-font-awesome.entry.js +1 -1
  534. package/dist/kolibri/kol-icon-icofont.entry.js +1 -1
  535. package/dist/kolibri/kol-icon.entry.js +1 -1
  536. package/dist/kolibri/kol-image.entry.js +1 -1
  537. package/dist/kolibri/kol-image.entry.js.map +1 -1
  538. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  539. package/dist/kolibri/kol-indented-text.entry.js.map +1 -1
  540. package/dist/kolibri/kol-input-adapter-leanup.entry.js +1 -1
  541. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  542. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  543. package/dist/kolibri/kol-input-color.entry.js +1 -1
  544. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  545. package/dist/kolibri/kol-input-date.entry.js +1 -1
  546. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  547. package/dist/kolibri/kol-input-email.entry.js +1 -1
  548. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  549. package/dist/kolibri/kol-input-file.entry.js +1 -1
  550. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  551. package/dist/kolibri/kol-input-number.entry.js +1 -1
  552. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  553. package/dist/kolibri/kol-input-password.entry.js +1 -1
  554. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  555. package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
  556. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  557. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  558. package/dist/kolibri/kol-input-range.entry.js +1 -1
  559. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  560. package/dist/kolibri/kol-input-text.entry.js +1 -1
  561. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  562. package/dist/kolibri/kol-input.entry.js +1 -1
  563. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  564. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  565. package/dist/kolibri/kol-link-button.entry.js +1 -1
  566. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  567. package/dist/kolibri/kol-link-group.entry.js +1 -1
  568. package/dist/kolibri/kol-link-group.entry.js.map +1 -1
  569. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  570. package/dist/kolibri/kol-link.entry.js +1 -1
  571. package/dist/kolibri/kol-link.entry.js.map +1 -1
  572. package/dist/kolibri/kol-logo.entry.js +1 -1
  573. package/dist/kolibri/kol-logo.entry.js.map +1 -1
  574. package/dist/kolibri/kol-modal.entry.js +1 -1
  575. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  576. package/dist/kolibri/kol-nav.entry.js +1 -1
  577. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  578. package/dist/kolibri/kol-pagination.entry.js +1 -1
  579. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  580. package/dist/kolibri/kol-popover-wc.entry.js +4 -0
  581. package/dist/kolibri/kol-popover-wc.entry.js.map +1 -0
  582. package/dist/kolibri/kol-progress.entry.js +1 -1
  583. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  584. package/dist/kolibri/kol-quote.entry.js +1 -1
  585. package/dist/kolibri/kol-quote.entry.js.map +1 -1
  586. package/dist/kolibri/kol-select.entry.js +1 -1
  587. package/dist/kolibri/kol-select.entry.js.map +1 -1
  588. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  589. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  590. package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
  591. package/dist/kolibri/kol-span-wc_2.entry.js.map +1 -1
  592. package/dist/kolibri/kol-span.entry.js +1 -1
  593. package/dist/kolibri/kol-span.entry.js.map +1 -1
  594. package/dist/kolibri/kol-spin.entry.js +1 -1
  595. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  596. package/dist/kolibri/kol-split-button.entry.js +1 -1
  597. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  598. package/dist/kolibri/kol-symbol.entry.js +1 -1
  599. package/dist/kolibri/kol-table.entry.js +1 -1
  600. package/dist/kolibri/kol-table.entry.js.map +1 -1
  601. package/dist/kolibri/kol-tabs.entry.js +1 -1
  602. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  603. package/dist/kolibri/kol-textarea.entry.js +1 -1
  604. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  605. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  606. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  607. package/dist/kolibri/kol-toast.entry.js +1 -1
  608. package/dist/kolibri/kol-toast.entry.js.map +1 -1
  609. package/dist/kolibri/kol-version.entry.js +1 -1
  610. package/dist/kolibri/kol-version.entry.js.map +1 -1
  611. package/dist/kolibri/kolibri.esm.js +1 -1
  612. package/dist/kolibri/kolibri.esm.js.map +1 -1
  613. package/dist/kolibri/{label-dd0fc95b.js → label-708d4611.js} +1 -1
  614. package/dist/kolibri/open-cd386fb2.js +4 -0
  615. package/dist/kolibri/{open-d9d85c3d.js.map → open-cd386fb2.js.map} +1 -1
  616. package/dist/kolibri/prop.validators-50c7d885.js +4 -0
  617. package/dist/kolibri/rows-eee702b3.js +4 -0
  618. package/dist/kolibri/show-7588def9.js +4 -0
  619. package/dist/kolibri/{show-f6f9dd70.js.map → show-7588def9.js.map} +1 -1
  620. package/dist/kolibri/{suggestions-73dd0819.js → suggestions-c70e1994.js} +1 -1
  621. package/dist/kolibri/tab-index-5dd7efc3.js +4 -0
  622. package/dist/kolibri/{tab-index-f01a4299.js.map → tab-index-5dd7efc3.js.map} +1 -1
  623. package/dist/kolibri/tooltip-align-9f6e72c2.js +4 -0
  624. package/dist/kolibri/validation-1e5fdf52.js +4 -0
  625. package/dist/kolibri/validation-eb20e4ad.js +4 -0
  626. package/dist/types/components/accordion/component.d.ts +2 -0
  627. package/dist/types/components/button/shadow.d.ts +0 -1
  628. package/dist/types/components/button-link/component.d.ts +0 -1
  629. package/dist/types/components/details/component.d.ts +1 -0
  630. package/dist/types/components/input-checkbox/component.d.ts +0 -1
  631. package/dist/types/components/input-radio/component.d.ts +0 -1
  632. package/dist/types/components/link/shadow.d.ts +0 -1
  633. package/dist/types/components/link-button/component.d.ts +0 -1
  634. package/dist/types/components/toaster/component.d.ts +2 -2
  635. package/dist/types/components/toaster/toaster.d.ts +2 -1
  636. package/dist/types/components.d.ts +11 -10
  637. package/dist/types/stencil-public-runtime.d.ts +21 -0
  638. package/dist/types/utils/prop.validators.d.ts +2 -2
  639. package/doc/toaster.md +19 -2
  640. package/package.json +1 -1
  641. package/vscode-custom-data.json +1 -1
  642. package/dist/cjs/align-d43fb2e6.js +0 -4
  643. package/dist/cjs/has-closer-f38cfe7e.js +0 -4
  644. package/dist/cjs/hide-label-0213dc75.js +0 -4
  645. package/dist/cjs/image-source-7d1a9b1b.js +0 -4
  646. package/dist/cjs/index-2feae351.js +0 -5
  647. package/dist/cjs/index-2feae351.js.map +0 -1
  648. package/dist/cjs/index-82aca647.js +0 -4
  649. package/dist/cjs/index-82aca647.js.map +0 -1
  650. package/dist/cjs/index-f96a013d.js +0 -4
  651. package/dist/cjs/index-f96a013d.js.map +0 -1
  652. package/dist/cjs/kol-popover.cjs.entry.js +0 -4
  653. package/dist/cjs/kol-popover.cjs.entry.js.map +0 -1
  654. package/dist/cjs/open-094dce9b.js +0 -4
  655. package/dist/cjs/rows-8fef3ed1.js +0 -4
  656. package/dist/cjs/show-24e6ed74.js +0 -4
  657. package/dist/components/kol-popover.js +0 -4
  658. package/dist/components/kol-popover.js.map +0 -1
  659. package/dist/esm/index-23225963.js +0 -4
  660. package/dist/esm/index-23225963.js.map +0 -1
  661. package/dist/esm/index-3822b0c5.js +0 -4
  662. package/dist/esm/index-3822b0c5.js.map +0 -1
  663. package/dist/esm/index-536799d5.js +0 -5
  664. package/dist/esm/index-536799d5.js.map +0 -1
  665. package/dist/esm/kol-popover.entry.js +0 -4
  666. package/dist/esm/kol-popover.entry.js.map +0 -1
  667. package/dist/esm/validation-b7903abd.js +0 -4
  668. package/dist/esm/validation-e4e29b6a.js +0 -4
  669. package/dist/kolibri/align-f80b127b.js +0 -4
  670. package/dist/kolibri/alignment-f20c3db4.js +0 -4
  671. package/dist/kolibri/app-globals-41dc96d7.js +0 -4
  672. package/dist/kolibri/controller-3aa75da4.js +0 -4
  673. package/dist/kolibri/controller-icon-67650274.js +0 -4
  674. package/dist/kolibri/devtools-5c70a1f5.js +0 -4
  675. package/dist/kolibri/has-closer-d68572b5.js +0 -4
  676. package/dist/kolibri/hide-label-f8e6542d.js +0 -4
  677. package/dist/kolibri/icons-a0f3f5e9.js +0 -4
  678. package/dist/kolibri/image-source-c214bb84.js +0 -4
  679. package/dist/kolibri/index-23225963.js +0 -4
  680. package/dist/kolibri/index-23225963.js.map +0 -1
  681. package/dist/kolibri/index-3822b0c5.js +0 -4
  682. package/dist/kolibri/index-3822b0c5.js.map +0 -1
  683. package/dist/kolibri/index-536799d5.js +0 -5
  684. package/dist/kolibri/index-536799d5.js.map +0 -1
  685. package/dist/kolibri/kol-popover.entry.js +0 -4
  686. package/dist/kolibri/kol-popover.entry.js.map +0 -1
  687. package/dist/kolibri/open-d9d85c3d.js +0 -4
  688. package/dist/kolibri/prop.validators-a681ba79.js +0 -4
  689. package/dist/kolibri/rows-c95ad23c.js +0 -4
  690. package/dist/kolibri/show-f6f9dd70.js +0 -4
  691. package/dist/kolibri/tab-index-f01a4299.js +0 -4
  692. package/dist/kolibri/tooltip-align-db40ed75.js +0 -4
  693. package/dist/kolibri/validation-b7903abd.js +0 -4
  694. package/dist/kolibri/validation-e4e29b6a.js +0 -4
  695. /package/dist/kolibri/{a11y.tipps-d4474fb4.js.map → a11y.tipps-804709ed.js.map} +0 -0
  696. /package/dist/kolibri/{align-f80b127b.js.map → align-0e99cc3b.js.map} +0 -0
  697. /package/dist/kolibri/{alignment-f20c3db4.js.map → alignment-effd7416.js.map} +0 -0
  698. /package/dist/kolibri/{app-globals-41dc96d7.js.map → app-globals-faf0bae3.js.map} +0 -0
  699. /package/dist/kolibri/{aria-current-1f41adc0.js.map → aria-current-10160ab2.js.map} +0 -0
  700. /package/dist/kolibri/{associated.controller-b9904b17.js.map → associated.controller-fdb7b5fd.js.map} +0 -0
  701. /package/dist/kolibri/{color-85b10e1d.js.map → color-ad663c35.js.map} +0 -0
  702. /package/dist/kolibri/{controller-b995efab.js.map → controller-1f17a764.js.map} +0 -0
  703. /package/dist/kolibri/{controller-a2596b56.js.map → controller-3a7db3af.js.map} +0 -0
  704. /package/dist/kolibri/{controller-5e3e32ca.js.map → controller-80cfae4b.js.map} +0 -0
  705. /package/dist/kolibri/{controller-da5ff8d9.js.map → controller-f4895089.js.map} +0 -0
  706. /package/dist/kolibri/{controller-icon-67650274.js.map → controller-icon-d0dbedbe.js.map} +0 -0
  707. /package/dist/kolibri/{custom-class-1cf5081e.js.map → custom-class-1ec79846.js.map} +0 -0
  708. /package/dist/kolibri/{devtools-5c70a1f5.js.map → devtools-4b5eb4a4.js.map} +0 -0
  709. /package/dist/kolibri/{hide-label-f8e6542d.js.map → hide-label-9229685b.js.map} +0 -0
  710. /package/dist/kolibri/{i18n-604b0def.js.map → i18n-26e5959d.js.map} +0 -0
  711. /package/dist/kolibri/{icons-a0f3f5e9.js.map → icons-336848af.js.map} +0 -0
  712. /package/dist/kolibri/{image-source-c214bb84.js.map → image-source-80bc78a8.js.map} +0 -0
  713. /package/dist/kolibri/{label-dd0fc95b.js.map → label-708d4611.js.map} +0 -0
  714. /package/dist/kolibri/{prop.validators-a681ba79.js.map → prop.validators-50c7d885.js.map} +0 -0
  715. /package/dist/kolibri/{rows-c95ad23c.js.map → rows-eee702b3.js.map} +0 -0
  716. /package/dist/kolibri/{suggestions-73dd0819.js.map → suggestions-c70e1994.js.map} +0 -0
  717. /package/dist/kolibri/{tooltip-align-db40ed75.js.map → tooltip-align-9f6e72c2.js.map} +0 -0
  718. /package/dist/kolibri/{validation-e4e29b6a.js.map → validation-1e5fdf52.js.map} +0 -0
  719. /package/dist/kolibri/{validation-b7903abd.js.map → validation-eb20e4ad.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{c as computePosition,a as autoUpdate,b as validateAlign,o as offset,f as flip,s as shift,d as arrow}from"./align.js";import{b as watchString,m as getDocument,n as nonce,p as processEnv}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{d as defineCustomElement$2}from"./component.js";import{d as defineCustomElement$1}from"./component2.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const styleCss=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}kol-tooltip-wc .tooltip-floating{animation-duration:0.5s;animation-iteration-count:1;animation-name:fadeInOpacity;animation-timing-function:ease-in;box-sizing:border-box;display:none;position:absolute;visibility:hidden;top:0;left:0;max-width:90vw;max-height:90vh}kol-tooltip-wc .tooltip-area{background-color:#fff;color:#000}kol-tooltip-wc .tooltip-arrow{height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip-wc .tooltip-content{position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.alignTooltip=()=>{var t;if("test"!==processEnv&&this.previousSibling&&this.tooltipElement){const e=this.previousSibling,i=this.tooltipElement,o=this.arrowElement,s=[offset(null!==(t=null==o?void 0:o.offsetHeight)&&void 0!==t?t:10),flip(),shift()];o&&s.push(arrow({element:o})),computePosition(e,i,{placement:this.state._align,middleware:s}).then((({x:t,y:e,middlewareData:s,placement:n})=>{var l,a;Object.assign(i.style,{left:`${t}px`,top:`${e}px`,visibility:"visible"}),o&&((null===(l=s.arrow)||void 0===l?void 0:l.x)?Object.assign(o.style,{left:`${s.arrow.x}px`,top:"bottom"===n?-o.offsetHeight/2+"px":"",bottom:"top"===n?-o.offsetHeight/2+"px":""}):(null===(a=s.arrow)||void 0===a?void 0:a.y)&&Object.assign(o.style,{left:"right"===n?-o.offsetWidth/2+"px":"",right:"left"===n?-o.offsetWidth/2+"px":"",top:`${s.arrow.y}px`}))}))}},this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,this.alignTooltip)}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("focusin",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("focusin",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:"…"}}render(){return h(Host,null,""!==this.state._label&&h("div",{class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h("kol-span-wc",{class:"tooltip-area tooltip-content",id:this.state._id,_label:this.state._label})))}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,this.handleEventListeners()}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return styleCss}},[0,"kol-tooltip-wc",{_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip-wc","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip-wc":customElements.get(t)||customElements.define(t,KolTooltip);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};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{c as computePosition,a as autoUpdate,b as validateAlign,o as offset,f as flip,s as shift,d as arrow}from"./align.js";import{b as watchString,m as getDocument,n as nonce,p as processEnv}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{d as defineCustomElement$2}from"./component.js";import{d as defineCustomElement$1}from"./component2.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const styleCss=":host{--a11y-min-size:44px;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>kol-span-wc>span>span{display:none}kol-tooltip-wc .tooltip-floating{animation-duration:0.5s;animation-iteration-count:1;animation-name:fadeInOpacity;animation-timing-function:ease-in;box-sizing:border-box;display:none;position:absolute;visibility:hidden;top:0;left:0;max-width:90vw;max-height:90vh}kol-tooltip-wc .tooltip-area{background-color:#fff;color:#000}kol-tooltip-wc .tooltip-arrow{height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip-wc .tooltip-content{position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.alignTooltip=()=>{var t;if("test"!==processEnv&&this.previousSibling&&this.tooltipElement){const e=this.previousSibling,i=this.tooltipElement,o=this.arrowElement,s=[offset(null!==(t=null==o?void 0:o.offsetHeight)&&void 0!==t?t:10),flip(),shift()];o&&s.push(arrow({element:o})),computePosition(e,i,{placement:this.state._align,middleware:s}).then((({x:t,y:e,middlewareData:s,placement:n})=>{var l,a;Object.assign(i.style,{left:`${t}px`,top:`${e}px`,visibility:"visible"}),o&&((null===(l=s.arrow)||void 0===l?void 0:l.x)?Object.assign(o.style,{left:`${s.arrow.x}px`,top:"bottom"===n?-o.offsetHeight/2+"px":"",bottom:"top"===n?-o.offsetHeight/2+"px":""}):(null===(a=s.arrow)||void 0===a?void 0:a.y)&&Object.assign(o.style,{left:"right"===n?-o.offsetWidth/2+"px":"",right:"left"===n?-o.offsetWidth/2+"px":"",top:`${s.arrow.y}px`}))}))}},this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,this.alignTooltip)}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("focusin",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("focusin",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:"…"}}render(){return h(Host,null,""!==this.state._label&&h("div",{class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h("kol-span-wc",{class:"tooltip-area tooltip-content",id:this.state._id,_label:this.state._label})))}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,this.handleEventListeners()}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return styleCss}},[0,"kol-tooltip-wc",{_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip-wc","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip-wc":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)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oBAAoB;IAC1B,IAAI,IAAI,CAAC,eAAe,EAAmC;MAC1D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;MAC3C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;KACjC;IACD,IAAI,IAAI,CAAC,cAAc,EAAmC;MACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAC1C;IACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;MAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC9B;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/types/props/id.ts","src/utils/overlay.ts","src/components/tooltip/style.css?tag=kol-tooltip-wc","src/components/tooltip/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","@import url(../style.css);\nkol-tooltip-wc .tooltip-floating {\n\tanimation-duration: 0.5s;\n\tanimation-iteration-count: 1;\n\tanimation-name: fadeInOpacity;\n\tanimation-timing-function: ease-in;\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tposition: absolute;\n\tvisibility: hidden;\n\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\ttop: 0;\n\tleft: 0;\n\tmax-width: 90vw;\n\tmax-height: 90vh;\n}\n/* Shared between content and arrow */\nkol-tooltip-wc .tooltip-area {\n\tbackground-color: #fff;\n\tcolor: #000;\n}\nkol-tooltip-wc .tooltip-arrow {\n\theight: 10px;\n\tposition: absolute;\n\ttransform: rotate(45deg);\n\twidth: 10px;\n\tz-index: 999;\n}\nkol-tooltip-wc .tooltip-content {\n\tposition: relative;\n\tz-index: 1000;\n}\n@keyframes fadeInOpacity {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n","import { arrow, autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';\nimport { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { AlignPropType, validateAlign } from '../../types/props/align';\nimport { IdPropType, validateId } from '../../types/props/id';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { processEnv } from '../../utils/reuse';\nimport { API, States } from './types';\n\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tstyleUrl: './style.css',\n\tshadow: false,\n})\nexport class KolTooltip implements API {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate alignTooltip = (): void => {\n\t\tif (processEnv !== 'test' && this.previousSibling /* SSR instanceof HTMLElement */ && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tconst arrowEl = this.arrowElement;\n\n\t\t\tconst middleware = [offset(arrowEl?.offsetHeight ?? 10), flip(), shift()];\n\t\t\tif (arrowEl) {\n\t\t\t\tmiddleware.push(arrow({ element: arrowEl }));\n\t\t\t}\n\n\t\t\tvoid computePosition(target, tooltipEl, {\n\t\t\t\tplacement: this.state._align,\n\t\t\t\tmiddleware: middleware,\n\t\t\t}).then(({ x, y, middlewareData, placement }) => {\n\t\t\t\tObject.assign(tooltipEl.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t});\n\n\t\t\t\tif (arrowEl) {\n\t\t\t\t\tif (middlewareData.arrow?.x) {\n\t\t\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\t\t\tleft: `${middlewareData.arrow.x}px`,\n\t\t\t\t\t\t\ttop: placement === 'bottom' ? `${-arrowEl.offsetHeight / 2}px` : '',\n\t\t\t\t\t\t\tbottom: placement === 'top' ? `${-arrowEl.offsetHeight / 2}px` : '',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (middlewareData.arrow?.y) {\n\t\t\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\t\t\tleft: placement === 'right' ? `${-arrowEl.offsetWidth / 2}px` : '',\n\t\t\t\t\t\t\tright: placement === 'left' ? `${-arrowEl.offsetWidth / 2}px` : '',\n\t\t\t\t\t\t\ttop: `${middlewareData.arrow.y}px`,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().body.addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tgetDocument().body.removeEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.addEventListener('focus', this.incrementOverFocusCount);\n\t\tel.addEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.addEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.addEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focus', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.removeEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.removeEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"tooltip-floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"tooltip-area tooltip-arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<kol-span-wc class=\"tooltip-area tooltip-content\" id={this.state._id} _label={this.state._label}></kol-span-wc>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '…', // ⚠ required\n\t};\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tprivate overFocusCount = 0;\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate incrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount++;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate decrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount--;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.overFocusTimeout);\n\t\t\tif (this.overFocusCount > 0) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}, 250);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t\tthis.handleEventListeners();\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"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D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;MAC3C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;KACjC;IACD,IAAI,IAAI,CAAC,cAAc,EAAmC;MACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAC1C;IACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;MAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC9B;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/types/props/id.ts","src/utils/overlay.ts","src/components/tooltip/style.css?tag=kol-tooltip-wc","src/components/tooltip/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","@import url(../style.css);\nkol-tooltip-wc .tooltip-floating {\n\tanimation-duration: 0.5s;\n\tanimation-iteration-count: 1;\n\tanimation-name: fadeInOpacity;\n\tanimation-timing-function: ease-in;\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tposition: absolute;\n\tvisibility: hidden;\n\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\ttop: 0;\n\tleft: 0;\n\tmax-width: 90vw;\n\tmax-height: 90vh;\n}\n/* Shared between content and arrow */\nkol-tooltip-wc .tooltip-area {\n\tbackground-color: #fff;\n\tcolor: #000;\n}\nkol-tooltip-wc .tooltip-arrow {\n\theight: 10px;\n\tposition: absolute;\n\ttransform: rotate(45deg);\n\twidth: 10px;\n\tz-index: 999;\n}\nkol-tooltip-wc .tooltip-content {\n\tposition: relative;\n\tz-index: 1000;\n}\n@keyframes fadeInOpacity {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n","import { arrow, autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';\nimport { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { AlignPropType, validateAlign } from '../../types/props/align';\nimport { IdPropType, validateId } from '../../types/props/id';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { processEnv } from '../../utils/reuse';\nimport { API, States } from './types';\n\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tstyleUrl: './style.css',\n\tshadow: false,\n})\nexport class KolTooltip implements API {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate alignTooltip = (): void => {\n\t\tif (processEnv !== 'test' && this.previousSibling /* SSR instanceof HTMLElement */ && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tconst arrowEl = this.arrowElement;\n\n\t\t\tconst middleware = [offset(arrowEl?.offsetHeight ?? 10), flip(), shift()];\n\t\t\tif (arrowEl) {\n\t\t\t\tmiddleware.push(arrow({ element: arrowEl }));\n\t\t\t}\n\n\t\t\tvoid computePosition(target, tooltipEl, {\n\t\t\t\tplacement: this.state._align,\n\t\t\t\tmiddleware: middleware,\n\t\t\t}).then(({ x, y, middlewareData, placement }) => {\n\t\t\t\tObject.assign(tooltipEl.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t});\n\n\t\t\t\tif (arrowEl) {\n\t\t\t\t\tif (middlewareData.arrow?.x) {\n\t\t\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\t\t\tleft: `${middlewareData.arrow.x}px`,\n\t\t\t\t\t\t\ttop: placement === 'bottom' ? `${-arrowEl.offsetHeight / 2}px` : '',\n\t\t\t\t\t\t\tbottom: placement === 'top' ? `${-arrowEl.offsetHeight / 2}px` : '',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (middlewareData.arrow?.y) {\n\t\t\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\t\t\tleft: placement === 'right' ? `${-arrowEl.offsetWidth / 2}px` : '',\n\t\t\t\t\t\t\tright: placement === 'left' ? `${-arrowEl.offsetWidth / 2}px` : '',\n\t\t\t\t\t\t\ttop: `${middlewareData.arrow.y}px`,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().body.addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tgetDocument().body.removeEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.addEventListener('focus', this.incrementOverFocusCount);\n\t\tel.addEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.addEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.addEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focus', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.removeEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.removeEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"tooltip-floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"tooltip-area tooltip-arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<kol-span-wc class=\"tooltip-area tooltip-content\" id={this.state._id} _label={this.state._label}></kol-span-wc>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '…', // ⚠ required\n\t};\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tprivate overFocusCount = 0;\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate incrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount++;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate decrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount--;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.overFocusTimeout);\n\t\t\tif (this.overFocusCount > 0) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}, 250);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t\tthis.handleEventListeners();\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement as HTMLElement$1,h,Host}from"@stencil/core/internal/client";import{v as validateAriaControls,a as validateAriaCurrent,b as validateAlternativeButtonLinkRole,c as validateTabIndex}from"./tab-index.js";import{e as watchBoolean,w as watchValidator,b as watchString,v as setEventTarget,K as KoliBriDevHelper,x as getExperimentalMode,d as devHint,y as devWarning,z as mapStringOrBoolean2String,A as mapBoolean2String,B as propagateFocus,C as a11yHintDisabled,t as setState,l as showExpertSlot}from"./prop.validators.js";import{v as validateHideLabel,a as validateIcons,w as watchIconAlign,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const validateAriaExpanded=(t,e)=>{watchBoolean(t,"_ariaExpanded",e)},validateButtonCallbacks=(t,e)=>{watchValidator(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)},validateButtonType=(t,e)=>{watchValidator(t,"_type",(t=>"button"===t||"reset"===t||"submit"===t),new Set(["KoliBriButtonType {button, reset, submit}"]),e)},validateButtonVariant=(t,e)=>{watchValidator(t,"_variant",(t=>"primary"===t||"secondary"===t||"normal"===t||"danger"===t||"ghost"===t||"custom"===t),new Set(["KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}"]),e,{defaultValue:"normal"})},validateCustomClass=(t,e)=>{watchString(t,"_customClass",e,{defaultValue:void 0})},validateDisabled=(t,e)=>{watchBoolean(t,"_disabled",e)},searchFormElement=t=>{for(getExperimentalMode()&&(devHint("↓ Search form element start."),console.log(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&"KOL-FORM"!==t.tagName;)t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null,getExperimentalMode()&&console.log(t);return getExperimentalMode()&&devHint("↑ Search form element finished."),t},propagateResetEventToForm=(t={})=>{var e,a;const i=searchFormElement(t.form);if(i instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===i.tagName)setEventTarget(t,i),i.dispatchEvent(t);else if("KOL-FORM"===i.tagName){setEventTarget(t,KoliBriDevHelper.querySelector("form",i));const s=i;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onReset)&&(null===(a=s._on)||void 0===a||a.onReset(t))}}},propagateSubmitEventToForm=(t={})=>{var e,a;const i=searchFormElement(t.form);if(i instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:i});if("FORM"===i.tagName)setEventTarget(t,i),i.dispatchEvent(t);else if("KOL-FORM"===i.tagName){setEventTarget(t,KoliBriDevHelper.querySelector("form",i));const s=i;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onSubmit)&&(null===(a=s._on)||void 0===a||a.onSubmit(t))}}},validateName=(t,e,a)=>{watchString(t,"_name",e,a)},EXPERIMENTAL_MODE=getExperimentalMode();class AssociatedInputController{constructor(t,e,a){var i,s;if(this.setFormAssociatedValue=t=>{var e;const a=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==a&&""!==a||devHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(a),this.name=e,EXPERIMENTAL_MODE){switch(null===(i=this.host)||void 0===i||i.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.name){case"button":this.formAssociated=document.createElement("button");break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(s=this.host)||void 0===s||s.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,a){if(EXPERIMENTAL_MODE)try{if("boolean"!=typeof(a="object"==typeof a&&null!==a?JSON.stringify(a):a)&&"number"!=typeof a&&"string"!=typeof a)throw new Error("Invalid value type: "+typeof a);null==e||e.setAttribute(t,`${a}`)}catch(a){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,a){if(a)if("select"===this.name)a.querySelectorAll("option").forEach((t=>{a.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),a.appendChild(t)}}));else"string"==typeof e?(a.setAttribute("value",e),a.value=e):(a.removeAttribute("value"),a.value="")}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&devHint("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(EXPERIMENTAL_MODE&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}const KolButtonWc=proxyCustomElement(class extends HTMLElement$1{render(){const t=showExpertSlot(this.state._label);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":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":mapStringOrBoolean2String(this.state._ariaSelected),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._hideLabel,"hide-label":!0===this.state._hideLabel},disabled:this.state._disabled,id:this.state._id,name:this.state._name},this.state._on,{onClick:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type}),h("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:t?"":this.state._label},h("slot",{name:"expert",slot:"expert"}))),h("kol-tooltip-wc",{"aria-hidden":"true",hidden:t||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}))}constructor(){super(),this.__registerHost(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onClick=t=>{var e,a;"submit"===this.state._type?propagateSubmitEventToForm({form:this.host,ref:this.ref}):"reset"===this.state._type?propagateResetEventToForm({form:this.host,ref:this.ref}):(stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host,this.state._value),this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&(setEventTarget(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._value)))},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new AssociatedInputController(this,"button",this.host)}validateAccessKey(t){watchString(this,"_accessKey",t)}validateAriaControls(t){validateAriaControls(this,t)}validateAriaCurrent(t){validateAriaCurrent(this,t)}validateAriaExpanded(t){validateAriaExpanded(this,t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){watchBoolean(this,"_ariaSelected",t)}validateCustomClass(t){validateCustomClass(this,t)}validateDisabled(t){validateDisabled(this,t),!0===t&&a11yHintDisabled()}validateHideLabel(t){validateHideLabel(this,t)}validateIcon(t){validateIcons(this,t)}validateIcons(t){validateIcons(this,t)}validateIconAlign(t){watchIconAlign(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateName(t){this.controller.validateName(t)}validateOn(t){validateButtonCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){validateTabIndex(this,t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}validateType(t){validateButtonType(this,t)}validateValue(t){setState(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){validateButtonVariant(this,t)}componentWillLoad(){var t;this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateIcons(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateId(this._id),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}},[4,"kol-button-wc",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaCurrent:[8,"_aria-current"],_ariaExpanded:[4,"_aria-expanded"],_ariaLabel:[1,"_aria-label"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icon:[1],_icons:[1],_iconAlign:[1,"_icon-align"],_iconOnly:[4,"_icon-only"],_id:[1],_label:[1],_name:[1],_on:[16],_role:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-button-wc":customElements.get(t)||customElements.define(t,KolButtonWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{AssociatedInputController as A,KolButtonWc as K,validateButtonVariant as a,defineCustomElement as d,propagateSubmitEventToForm as p,validateCustomClass as v};
4
+ import{proxyCustomElement,HTMLElement as HTMLElement$1,h,Host}from"@stencil/core/internal/client";import{v as validateAriaControls,a as validateAriaCurrent,b as validateAlternativeButtonLinkRole,c as validateTabIndex}from"./tab-index.js";import{e as watchBoolean,w as watchValidator,b as watchString,x as setEventTarget,K as KoliBriDevHelper,y as getExperimentalMode,d as devHint,z as devWarning,A as mapStringOrBoolean2String,B as mapBoolean2String,t as propagateFocus,C as a11yHintDisabled,v as setState,l as showExpertSlot}from"./prop.validators.js";import{v as validateHideLabel,a as validateIcons,w as watchIconAlign,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const validateAriaExpanded=(t,e)=>{watchBoolean(t,"_ariaExpanded",e)},validateButtonCallbacks=(t,e)=>{watchValidator(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)},validateButtonType=(t,e)=>{watchValidator(t,"_type",(t=>"button"===t||"reset"===t||"submit"===t),new Set(["KoliBriButtonType {button, reset, submit}"]),e)},validateButtonVariant=(t,e)=>{watchValidator(t,"_variant",(t=>"primary"===t||"secondary"===t||"normal"===t||"danger"===t||"ghost"===t||"custom"===t),new Set(["KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}"]),e,{defaultValue:"normal"})},validateCustomClass=(t,e)=>{watchString(t,"_customClass",e,{defaultValue:void 0})},validateDisabled=(t,e)=>{watchBoolean(t,"_disabled",e)},searchFormElement=t=>{for(getExperimentalMode()&&(devHint("↓ Search form element start."),console.log(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&"KOL-FORM"!==t.tagName;)t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null,getExperimentalMode()&&console.log(t);return getExperimentalMode()&&devHint("↑ Search form element finished."),t},propagateResetEventToForm=(t={})=>{var e,a;const i=searchFormElement(t.form);if(i instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===i.tagName)setEventTarget(t,i),i.dispatchEvent(t);else if("KOL-FORM"===i.tagName){setEventTarget(t,KoliBriDevHelper.querySelector("form",i));const s=i;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onReset)&&(null===(a=s._on)||void 0===a||a.onReset(t))}}},propagateSubmitEventToForm=(t={})=>{var e,a;const i=searchFormElement(t.form);if(i instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:i});if("FORM"===i.tagName)setEventTarget(t,i),i.dispatchEvent(t);else if("KOL-FORM"===i.tagName){setEventTarget(t,KoliBriDevHelper.querySelector("form",i));const s=i;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onSubmit)&&(null===(a=s._on)||void 0===a||a.onSubmit(t))}}},validateName=(t,e,a)=>{watchString(t,"_name",e,a)},EXPERIMENTAL_MODE=getExperimentalMode();class AssociatedInputController{constructor(t,e,a){var i,s;if(this.setFormAssociatedValue=t=>{var e;const a=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==a&&""!==a||devHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(a),this.name=e,EXPERIMENTAL_MODE){switch(null===(i=this.host)||void 0===i||i.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.name){case"button":this.formAssociated=document.createElement("button");break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(s=this.host)||void 0===s||s.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,a){if(EXPERIMENTAL_MODE)try{if("boolean"!=typeof(a="object"==typeof a&&null!==a?JSON.stringify(a):a)&&"number"!=typeof a&&"string"!=typeof a)throw new Error("Invalid value type: "+typeof a);null==e||e.setAttribute(t,`${a}`)}catch(a){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,a){if(a)if("select"===this.name)a.querySelectorAll("option").forEach((t=>{a.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),a.appendChild(t)}}));else"string"==typeof e?(a.setAttribute("value",e),a.value=e):(a.removeAttribute("value"),a.value="")}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&devHint("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(EXPERIMENTAL_MODE&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}const KolButtonWc=proxyCustomElement(class extends HTMLElement$1{render(){const t=showExpertSlot(this.state._label);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":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":mapStringOrBoolean2String(this.state._ariaSelected),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._hideLabel,"hide-label":!0===this.state._hideLabel},disabled:this.state._disabled,id:this.state._id,name:this.state._name},this.state._on,{onClick:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type}),h("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:t?"":this.state._label},h("slot",{name:"expert",slot:"expert"}))),h("kol-tooltip-wc",{"aria-hidden":"true",hidden:t||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}))}constructor(){super(),this.__registerHost(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onClick=t=>{var e,a;"submit"===this.state._type?propagateSubmitEventToForm({form:this.host,ref:this.ref}):"reset"===this.state._type?propagateResetEventToForm({form:this.host,ref:this.ref}):(stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host,this.state._value),this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&(setEventTarget(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._value)))},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new AssociatedInputController(this,"button",this.host)}validateAccessKey(t){watchString(this,"_accessKey",t)}validateAriaControls(t){validateAriaControls(this,t)}validateAriaCurrent(t){validateAriaCurrent(this,t)}validateAriaExpanded(t){validateAriaExpanded(this,t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){watchBoolean(this,"_ariaSelected",t)}validateCustomClass(t){validateCustomClass(this,t)}validateDisabled(t){validateDisabled(this,t),!0===t&&a11yHintDisabled()}validateHideLabel(t){validateHideLabel(this,t)}validateIcon(t){validateIcons(this,t)}validateIcons(t){validateIcons(this,t)}validateIconAlign(t){watchIconAlign(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateName(t){this.controller.validateName(t)}validateOn(t){validateButtonCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){validateTabIndex(this,t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}validateType(t){validateButtonType(this,t)}validateValue(t){setState(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){validateButtonVariant(this,t)}componentWillLoad(){var t;this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateIcons(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateId(this._id),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}},[4,"kol-button-wc",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaCurrent:[8,"_aria-current"],_ariaExpanded:[4,"_aria-expanded"],_ariaLabel:[1,"_aria-label"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icon:[1],_icons:[1],_iconAlign:[1,"_icon-align"],_iconOnly:[4,"_icon-only"],_id:[1],_label:[1],_name:[1],_on:[16],_role:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-button-wc":customElements.get(t)||customElements.define(t,KolButtonWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{AssociatedInputController as A,KolButtonWc as K,validateButtonVariant as a,defineCustomElement as d,propagateSubmitEventToForm as p,validateCustomClass as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";import{L as Log,e as watchBoolean,t as setState,w as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$4}from"./component4.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const Icon=e=>h("kol-icon",{class:"heading-icon",_ariaLabel:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),AlertIcon=e=>{switch(e.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e.label})}},KolAlertWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{class:{[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{class:"heading"},h(AlertIcon,{label:this.state._label,type:this.state._type}),h("div",null,"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&h("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&h("div",{class:"content"},h("slot",null))),this.state._hasCloser&&h("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&h("div",{class:"content"},h("slot",null)))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&("default"===e||"error"===e||"info"===e||"success"===e||"warning"===e)),new Set("String {success, info, warning, error}"),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"card"===e||"msg"===e),new Set("AlertVariant {card, msg}"),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((e=>{switch(e){case"kol-alert-wc":customElements.get(e)||customElements.define(e,KolAlertWc);break;case"kol-button-wc":customElements.get(e)||defineCustomElement$5();break;case"kol-heading-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-icon":customElements.get(e)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(e)||defineCustomElement$1()}}))}export{KolAlertWc as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";import{L as Log,e as watchBoolean,v as setState,w as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$4}from"./component4.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const Icon=e=>h("kol-icon",{class:"heading-icon",_ariaLabel:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),AlertIcon=e=>{switch(e.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e.label})}},KolAlertWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{class:{[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{class:"heading"},h(AlertIcon,{label:this.state._label,type:this.state._type}),h("div",null,"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&h("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&h("div",{class:"content"},h("slot",null))),this.state._hasCloser&&h("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&h("div",{class:"content"},h("slot",null)))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&("default"===e||"error"===e||"info"===e||"success"===e||"warning"===e)),new Set("String {success, info, warning, error}"),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"card"===e||"msg"===e),new Set("AlertVariant {card, msg}"),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((e=>{switch(e){case"kol-alert-wc":customElements.get(e)||customElements.define(e,KolAlertWc);break;case"kol-button-wc":customElements.get(e)||defineCustomElement$5();break;case"kol-heading-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-icon":customElements.get(e)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(e)||defineCustomElement$1()}}))}export{KolAlertWc as K,defineCustomElement as d};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as handleColorChange,v as validateColor}from"./color.js";import{q as featureHint,n as nonce,o as objectObjectHandler,f as parseJson,t as setState}from"./prop.validators.js";import{d as defineCustomElement$4}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const defaultStyleCss=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host>span{display:inline-flex;place-items:center}:host>span>kol-button-wc button{color:inherit}";featureHint("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const KolBadge=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.bgColorStr="#000",this.colorStr="#fff",this.id=nonce(),this.handleColorChange=t=>{const o=handleColorChange(t);this.bgColorStr=o.backgroundColor,this.colorStr=o.foregroundColor},this._color="#000",this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(t){return h("kol-button-wc",{_ariaControls:this.id,_customClass:t._customClass,_disabled:t._disabled,_hideLabel:!0,_icons:t._icons||t._icon,_id:t._id,_label:t._label,_on:t._on,_tooltipAlign:t._tooltipAlign,_variant:t._variant})}render(){const t="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return h(Host,null,h("span",{class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},h("kol-span-wc",{id:t?this.id:void 0,_allowMarkdown:!0,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_label:this._label}),t&&this.renderSmartButton(this.state._smartButton)))}validateColor(t){validateColor(this,t,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this,"_smartButton",t)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-badge",{_color:[1],_hideLabel:[4,"_hide-label"],_icon:[1],_icons:[1],_iconOnly:[4,"_icon-only"],_label:[1],_smartButton:[1,"_smart-button"],state:[32]},void 0,{_color:["validateColor"],_smartButton:["validateSmartButton"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-badge","kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-badge":customElements.get(t)||customElements.define(t,KolBadge);break;case"kol-button-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolBadge as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as handleColorChange,v as validateColor}from"./color.js";import{q as featureHint,n as nonce,o as objectObjectHandler,f as parseJson,v as setState}from"./prop.validators.js";import{d as defineCustomElement$4}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const defaultStyleCss=":host{--a11y-min-size:44px;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>kol-span-wc>span>span{display:none}:host>span{display:inline-flex;place-items:center}:host>span>kol-button-wc button{color:inherit}";featureHint("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const KolBadge=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.bgColorStr="#000",this.colorStr="#fff",this.id=nonce(),this.handleColorChange=t=>{const o=handleColorChange(t);this.bgColorStr=o.backgroundColor,this.colorStr=o.foregroundColor},this._color="#000",this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(t){return h("kol-button-wc",{_ariaControls:this.id,_customClass:t._customClass,_disabled:t._disabled,_hideLabel:!0,_icons:t._icons||t._icon,_id:t._id,_label:t._label,_on:t._on,_tooltipAlign:t._tooltipAlign,_variant:t._variant})}render(){const t="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return h(Host,null,h("span",{class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},h("kol-span-wc",{id:t?this.id:void 0,_allowMarkdown:!0,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_label:this._label}),t&&this.renderSmartButton(this.state._smartButton)))}validateColor(t){validateColor(this,t,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this,"_smartButton",t)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-badge",{_color:[1],_hideLabel:[4,"_hide-label"],_icon:[1],_icons:[1],_iconOnly:[4,"_icon-only"],_label:[1],_smartButton:[1,"_smart-button"],state:[32]},void 0,{_color:["validateColor"],_smartButton:["validateSmartButton"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-badge","kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-badge":customElements.get(t)||customElements.define(t,KolBadge);break;case"kol-button-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolBadge as K,defineCustomElement as d};
@@ -1 +1 @@
1
- {"file":"component8.js","mappings":";;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,0yBAA0yB;;ACYl0B,WAAW,CAAC,qEAAqE,CAAC,CAAC;MAStE,QAAQ;;;;;IACZ,eAAU,GAAG,MAAM,CAAC;IACpB,aAAQ,GAAG,MAAM,CAAC;IACT,OAAE,GAAG,KAAK,EAAE,CAAC;IA8FtB,sBAAiB,GAAG,CAAC,KAAc;MAC1C,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;MAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,eAAe,CAAC;MAC5C,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,eAAyB,CAAC;KACpD,CAAC;kBAlD+C,MAAM;sBAUjB,KAAK;;;;;;iBA6BX;MAC/B,MAAM,EAAE;QACP,eAAe,EAAE,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C,KAA8B;IAClD,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;MAC1B,YAAY,EAAE,MAAM;MACpB,KAAK,EAAE;QACN,WAAW,EAAE,IAAI,CAAC,iBAAiB;OACnC;KACD,CAAC,CAAC;GACH;EAGM,mBAAmB,CAAC,KAA4B;IACtD,mBAAmB,CAAC,KAAK,EAAE;MAC1B,IAAI;QACH,KAAK,GAAG,SAAS,CAAc,KAAe,CAAC,CAAC;OAEhD;MAAC,OAAO,CAAC,EAAE;OAEX;MACD,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;KACtC,CAAC,CAAC;GACH;EAEM,iBAAiB;IACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge/style.css?tag=kol-badge&mode=default&encapsulation=shadow","src/components/badge/component.tsx"],"sourcesContent":["@import url(../style.css);\n:host > span {\n\tdisplay: inline-flex;\n\tplace-items: center;\n}\n:host > span > kol-button-wc button {\n\tcolor: inherit;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconsProp } from '../../types/icons';\nimport { handleColorChange, PropColor, validateColor } from '../../types/props/color';\nimport { LabelPropType } from '../../types/props/label';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { objectObjectHandler, parseJson, setState } from '../../utils/prop.validators';\nimport { ButtonProps } from '../button/types';\nimport { API, States } from './types';\n\nfeatureHint(`[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).`);\n\n@Component({\n\ttag: 'kol-badge',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolBadge implements API {\n\tprivate bgColorStr = '#000';\n\tprivate colorStr = '#fff';\n\tprivate readonly id = nonce();\n\n\tprivate renderSmartButton(props: ButtonProps): JSX.Element {\n\t\treturn (\n\t\t\t<kol-button-wc\n\t\t\t\t_ariaControls={this.id}\n\t\t\t\t_customClass={props._customClass}\n\t\t\t\t_disabled={props._disabled}\n\t\t\t\t_hideLabel={true}\n\t\t\t\t_icons={props._icons || props._icon}\n\t\t\t\t_id={props._id}\n\t\t\t\t_label={props._label}\n\t\t\t\t_on={props._on}\n\t\t\t\t_tooltipAlign={props._tooltipAlign}\n\t\t\t\t_variant={props._variant}\n\t\t\t></kol-button-wc>\n\t\t);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasSmartButton = typeof this.state._smartButton === 'object' && this.state._smartButton !== null;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<span\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t'smart-button': typeof this.state._smartButton === 'object' && this.state._smartButton !== null,\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackgroundColor: this.bgColorStr,\n\t\t\t\t\t\tcolor: this.colorStr,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc\n\t\t\t\t\t\tid={hasSmartButton ? this.id : undefined}\n\t\t\t\t\t\t_allowMarkdown\n\t\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t\t_icons={this._icons || this._icon}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-span-wc>\n\t\t\t\t\t{hasSmartButton && this.renderSmartButton(this.state._smartButton as ButtonProps)}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the backgroundColor and foregroundColor.\n\t */\n\t@Prop() public _color?: Stringified<PropColor> = '#000';\n\n\t/**\n\t * Deprecated:\n\t * ⚠️ We do not support the `_hide-label` property for the `kol-badge` element,\n\t * since it would not be accessible without visible labeling. A separate tooltip\n\t * is not planed, because a badge is not an interactive element.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t *\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t@State() public state: States = {\n\t\t_color: {\n\t\t\tbackgroundColor: '#000',\n\t\t\tforegroundColor: '#fff',\n\t\t},\n\t};\n\n\tprivate handleColorChange = (value: unknown) => {\n\t\tconst colorPair = handleColorChange(value);\n\t\tthis.bgColorStr = colorPair.backgroundColor;\n\t\tthis.colorStr = colorPair.foregroundColor as string;\n\t};\n\n\t@Watch('_color')\n\tpublic validateColor(value?: Stringified<PropColor>): void {\n\t\tvalidateColor(this, value, {\n\t\t\tdefaultValue: '#000',\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateColor(this._color);\n\t\tthis.validateSmartButton(this._smartButton);\n\t}\n}\n"],"version":3}
1
+ {"file":"component8.js","mappings":";;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,guBAAguB;;ACYxvB,WAAW,CAAC,qEAAqE,CAAC,CAAC;MAStE,QAAQ;;;;;IACZ,eAAU,GAAG,MAAM,CAAC;IACpB,aAAQ,GAAG,MAAM,CAAC;IACT,OAAE,GAAG,KAAK,EAAE,CAAC;IA8FtB,sBAAiB,GAAG,CAAC,KAAc;MAC1C,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;MAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,eAAe,CAAC;MAC5C,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,eAAyB,CAAC;KACpD,CAAC;kBAlD+C,MAAM;sBAUjB,KAAK;;;;;;iBA6BX;MAC/B,MAAM,EAAE;QACP,eAAe,EAAE,MAAM;QACvB,eAAe,EAAE,MAAM;OACvB;KACD;;EA1FO,iBAAiB,CAAC,KAAkB;IAC3C,QACC,qBACC,aAAa,EAAE,IAAI,CAAC,EAAE,EACtB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,EACnC,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,aAAa,EAAE,KAAK,CAAC,aAAa,EAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACR,EAChB;GACF;EAEM,MAAM;IACZ,MAAM,cAAc,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK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;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge/style.css?tag=kol-badge&mode=default&encapsulation=shadow","src/components/badge/component.tsx"],"sourcesContent":["@import url(../style.css);\n:host > span {\n\tdisplay: inline-flex;\n\tplace-items: center;\n}\n:host > span > kol-button-wc button {\n\tcolor: inherit;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconsProp } from '../../types/icons';\nimport { handleColorChange, PropColor, validateColor } from '../../types/props/color';\nimport { LabelPropType } from '../../types/props/label';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { objectObjectHandler, parseJson, setState } from '../../utils/prop.validators';\nimport { ButtonProps } from '../button/types';\nimport { API, States } from './types';\n\nfeatureHint(`[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).`);\n\n@Component({\n\ttag: 'kol-badge',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolBadge implements API {\n\tprivate bgColorStr = '#000';\n\tprivate colorStr = '#fff';\n\tprivate readonly id = nonce();\n\n\tprivate renderSmartButton(props: ButtonProps): JSX.Element {\n\t\treturn (\n\t\t\t<kol-button-wc\n\t\t\t\t_ariaControls={this.id}\n\t\t\t\t_customClass={props._customClass}\n\t\t\t\t_disabled={props._disabled}\n\t\t\t\t_hideLabel={true}\n\t\t\t\t_icons={props._icons || props._icon}\n\t\t\t\t_id={props._id}\n\t\t\t\t_label={props._label}\n\t\t\t\t_on={props._on}\n\t\t\t\t_tooltipAlign={props._tooltipAlign}\n\t\t\t\t_variant={props._variant}\n\t\t\t></kol-button-wc>\n\t\t);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasSmartButton = typeof this.state._smartButton === 'object' && this.state._smartButton !== null;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<span\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t'smart-button': typeof this.state._smartButton === 'object' && this.state._smartButton !== null,\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackgroundColor: this.bgColorStr,\n\t\t\t\t\t\tcolor: this.colorStr,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc\n\t\t\t\t\t\tid={hasSmartButton ? this.id : undefined}\n\t\t\t\t\t\t_allowMarkdown\n\t\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t\t_icons={this._icons || this._icon}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-span-wc>\n\t\t\t\t\t{hasSmartButton && this.renderSmartButton(this.state._smartButton as ButtonProps)}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the backgroundColor and foregroundColor.\n\t */\n\t@Prop() public _color?: Stringified<PropColor> = '#000';\n\n\t/**\n\t * Deprecated:\n\t * ⚠️ We do not support the `_hide-label` property for the `kol-badge` element,\n\t * since it would not be accessible without visible labeling. A separate tooltip\n\t * is not planed, because a badge is not an interactive element.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t *\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t@State() public state: States = {\n\t\t_color: {\n\t\t\tbackgroundColor: '#000',\n\t\t\tforegroundColor: '#fff',\n\t\t},\n\t};\n\n\tprivate handleColorChange = (value: unknown) => {\n\t\tconst colorPair = handleColorChange(value);\n\t\tthis.bgColorStr = colorPair.backgroundColor;\n\t\tthis.colorStr = colorPair.foregroundColor as string;\n\t};\n\n\t@Watch('_color')\n\tpublic validateColor(value?: Stringified<PropColor>): void {\n\t\tvalidateColor(this, value, {\n\t\t\tdefaultValue: '#000',\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateColor(this._color);\n\t\tthis.validateSmartButton(this._smartButton);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateAriaControls,a as validateAriaCurrent,d as validateListenAriaCurrent,b as validateAlternativeButtonLinkRole,c as validateTabIndex}from"./tab-index.js";import{e as watchBoolean,b as watchString,B as propagateFocus,v as setEventTarget,d as devHint,J as ariaCurrentSubject,y as devWarning,A as mapBoolean2String,C as a11yHintDisabled,M as scrollBySelector,l as showExpertSlot}from"./prop.validators.js";import{v as validateHideLabel,a as validateIcons,w as watchIconAlign,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const validateAriaSelected=(t,e)=>{watchBoolean(t,"_ariaSelected",e)},validateDownload=(t,e)=>{watchString(t,"_download",e)},validateHref=(t,e,a={})=>{watchString(t,"_href",e,a)},validateLinkCallbacks=(t,e)=>{"object"==typeof e&&"function"==typeof(null==e?void 0:e.onClick)&&(t.state=Object.assign(Object.assign({},t.state),{_on:e}))},validateLinkTarget=(t,e)=>{watchString(t,"_target",e)},validateStealth=(t,e)=>{watchBoolean(t,"_stealth",e)},KolLinkWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onClick=t=>{var e,a;"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&(t.preventDefault(),t.stopPropagation(),setEventTarget(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._href))},this.getRenderValues=()=>{let t={};"string"==typeof this.state._selector&&(t={role:"link",tabIndex:0,onClick:()=>{scrollBySelector(this.state._selector)},onKeyPress:()=>{scrollBySelector(this.state._selector)}});const e="string"==typeof this.state._target&&"_self"!==this.state._target,a={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:e?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return"image"!==this.state._useCase&&!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] Es muss ein Aria-Label gesetzt werden, wenn eine Grafik verlinkt oder der _hide-label gesetzt ist."),{isExternal:e,tagAttrs:a,goToProps:t}},this.unsubscribeAriaCurrentSubject=ariaCurrentSubject.subscribe((t=>{try{this.state._listenAriaCurrent&&this.state._listenAriaCurrent===t.ariaCurrent&&(this.state._href===t.href?this.validateAriaCurrent(t.ariaCurrent):this.validateAriaCurrent(!1))}catch(t){devWarning("The aria-current event is not valid.")}})),this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._label=void 0,this._listenAriaCurrent=void 0,this._on=void 0,this._role=void 0,this._selector=void 0,this._stealth=!1,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this._useCase="text",this.state={_href:"…",_icons:{}}}render(){const{isExternal:t,tagAttrs:e,goToProps:a}=this.getRenderValues(),i=showExpertSlot(this.state._label);return h(Host,null,h("a",Object.assign({ref:this.catchRef},e,{"aria-controls":this.state._ariaControls,"aria-current":this.state._ariaCurrent,"aria-expanded":mapBoolean2String(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":mapBoolean2String(this.state._ariaSelected),class:{disabled:!0===this.state._disabled,"skip ":!1!==this.state._stealth,"icon-only":!0===this.state._hideLabel,"hide-label":!0===this.state._hideLabel,"external-link":t}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick},a,{role:this.state._role,tabIndex:this.state._tabIndex}),h("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:i?"":this.state._label||this.state._href},h("slot",{name:"expert",slot:"expert"})),t&&h("kol-icon",{class:"external-link-icon",_label:this.state._targetDescription,_icons:"codicon codicon-link-external"})),h("kol-tooltip-wc",{"aria-hidden":"true",hidden:i||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}))}validateAriaControls(t){validateAriaControls(this,t)}validateAriaCurrent(t){validateAriaCurrent(this,t)}validateAriaExpanded(t){watchBoolean(this,"_ariaExpanded",t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){validateAriaSelected(this,t)}validateDisabled(t){watchBoolean(this,"_disabled",t),!0===t&&a11yHintDisabled()}validateDownload(t){validateDownload(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateHref(t){validateHref(this,t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){validateIcons(this,t)}validateIconAlign(t){watchIconAlign(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateListenAriaCurrent(t){validateListenAriaCurrent(this,t)}validateOn(t){validateLinkCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateSelector(t){watchString(this,"_selector",t)}validateStealth(t){validateStealth(this,t)}validateTabIndex(t){validateTabIndex(this,t)}validateTarget(t){validateLinkTarget(this,t)}validateTargetDescription(t){watchString(this,"_targetDescription",t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}validateUseCase(t){"string"==typeof t&&(this.state=Object.assign(Object.assign({},this.state),{_useCase:t}))}componentWillLoad(){var t;this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateHref(this._href),this.validateIcon(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateListenAriaCurrent(this._listenAriaCurrent),this.validateOn(this._on),this.validateRole(this._role),this.validateSelector(this._selector),this.validateStealth(this._stealth),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTargetDescription(this._targetDescription),this.validateTooltipAlign(this._tooltipAlign),this.validateUseCase(this._useCase)}disconnectedCallback(){this.unsubscribeAriaCurrentSubject.unsubscribe()}get host(){return this}static get watchers(){return{_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_label:["validateLabel"],_listenAriaCurrent:["validateListenAriaCurrent"],_on:["validateOn"],_role:["validateRole"],_selector:["validateSelector"],_stealth:["validateStealth"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"],_useCase:["validateUseCase"]}}},[4,"kol-link-wc",{_ariaControls:[1,"_aria-controls"],_ariaCurrent:[8,"_aria-current"],_ariaExpanded:[4,"_aria-expanded"],_ariaLabel:[1,"_aria-label"],_ariaSelected:[4,"_aria-selected"],_disabled:[4],_download:[1],_hideLabel:[4,"_hide-label"],_href:[1],_icon:[1],_icons:[1],_iconAlign:[1,"_icon-align"],_iconOnly:[4,"_icon-only"],_label:[1],_listenAriaCurrent:[8,"_listen-aria-current"],_on:[16],_role:[1],_selector:[1],_stealth:[4],_tabIndex:[2,"_tab-index"],_target:[1],_targetDescription:[1,"_target-description"],_tooltipAlign:[1,"_tooltip-align"],_useCase:[1,"_use-case"],state:[32]},void 0,{_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_label:["validateLabel"],_listenAriaCurrent:["validateListenAriaCurrent"],_on:["validateOn"],_role:["validateRole"],_selector:["validateSelector"],_stealth:["validateStealth"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"],_useCase:["validateUseCase"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-link-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-link-wc":customElements.get(t)||customElements.define(t,KolLinkWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolLinkWc as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateAriaControls,a as validateAriaCurrent,d as validateListenAriaCurrent,b as validateAlternativeButtonLinkRole,c as validateTabIndex}from"./tab-index.js";import{e as watchBoolean,b as watchString,t as propagateFocus,x as setEventTarget,d as devHint,J as ariaCurrentSubject,z as devWarning,B as mapBoolean2String,C as a11yHintDisabled,M as scrollBySelector,l as showExpertSlot}from"./prop.validators.js";import{v as validateHideLabel,a as validateIcons,w as watchIconAlign,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const validateAriaSelected=(t,e)=>{watchBoolean(t,"_ariaSelected",e)},validateDownload=(t,e)=>{watchString(t,"_download",e)},validateHref=(t,e,a={})=>{watchString(t,"_href",e,a)},validateLinkCallbacks=(t,e)=>{"object"==typeof e&&"function"==typeof(null==e?void 0:e.onClick)&&(t.state=Object.assign(Object.assign({},t.state),{_on:e}))},validateLinkTarget=(t,e)=>{watchString(t,"_target",e)},validateStealth=(t,e)=>{watchBoolean(t,"_stealth",e)},KolLinkWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onClick=t=>{var e,a;"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&(t.preventDefault(),t.stopPropagation(),setEventTarget(t,this.ref),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._href))},this.getRenderValues=()=>{let t={};"string"==typeof this.state._selector&&(t={role:"link",tabIndex:0,onClick:()=>{scrollBySelector(this.state._selector)},onKeyPress:()=>{scrollBySelector(this.state._selector)}});const e="string"==typeof this.state._target&&"_self"!==this.state._target,a={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:e?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return"image"!==this.state._useCase&&!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] Es muss ein Aria-Label gesetzt werden, wenn eine Grafik verlinkt oder der _hide-label gesetzt ist."),{isExternal:e,tagAttrs:a,goToProps:t}},this.unsubscribeAriaCurrentSubject=ariaCurrentSubject.subscribe((t=>{try{this.state._listenAriaCurrent&&this.state._listenAriaCurrent===t.ariaCurrent&&(this.state._href===t.href?this.validateAriaCurrent(t.ariaCurrent):this.validateAriaCurrent(!1))}catch(t){devWarning("The aria-current event is not valid.")}})),this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._label=void 0,this._listenAriaCurrent=void 0,this._on=void 0,this._role=void 0,this._selector=void 0,this._stealth=!1,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this._useCase="text",this.state={_href:"…",_icons:{}}}render(){const{isExternal:t,tagAttrs:e,goToProps:a}=this.getRenderValues(),i=showExpertSlot(this.state._label);return h(Host,null,h("a",Object.assign({ref:this.catchRef},e,{"aria-controls":this.state._ariaControls,"aria-current":this.state._ariaCurrent,"aria-expanded":mapBoolean2String(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":mapBoolean2String(this.state._ariaSelected),class:{disabled:!0===this.state._disabled,"skip ":!1!==this.state._stealth,"icon-only":!0===this.state._hideLabel,"hide-label":!0===this.state._hideLabel,"external-link":t}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick},a,{role:this.state._role,tabIndex:this.state._tabIndex}),h("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:i?"":this.state._label||this.state._href},h("slot",{name:"expert",slot:"expert"})),t&&h("kol-icon",{class:"external-link-icon",_label:this.state._targetDescription,_icons:"codicon codicon-link-external"})),h("kol-tooltip-wc",{"aria-hidden":"true",hidden:i||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}))}validateAriaControls(t){validateAriaControls(this,t)}validateAriaCurrent(t){validateAriaCurrent(this,t)}validateAriaExpanded(t){watchBoolean(this,"_ariaExpanded",t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){validateAriaSelected(this,t)}validateDisabled(t){watchBoolean(this,"_disabled",t),!0===t&&a11yHintDisabled()}validateDownload(t){validateDownload(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateHref(t){validateHref(this,t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){validateIcons(this,t)}validateIconAlign(t){watchIconAlign(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateListenAriaCurrent(t){validateListenAriaCurrent(this,t)}validateOn(t){validateLinkCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateSelector(t){watchString(this,"_selector",t)}validateStealth(t){validateStealth(this,t)}validateTabIndex(t){validateTabIndex(this,t)}validateTarget(t){validateLinkTarget(this,t)}validateTargetDescription(t){watchString(this,"_targetDescription",t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}validateUseCase(t){"string"==typeof t&&(this.state=Object.assign(Object.assign({},this.state),{_useCase:t}))}componentWillLoad(){var t;this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateHref(this._href),this.validateIcon(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateListenAriaCurrent(this._listenAriaCurrent),this.validateOn(this._on),this.validateRole(this._role),this.validateSelector(this._selector),this.validateStealth(this._stealth),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTargetDescription(this._targetDescription),this.validateTooltipAlign(this._tooltipAlign),this.validateUseCase(this._useCase)}disconnectedCallback(){this.unsubscribeAriaCurrentSubject.unsubscribe()}get host(){return this}static get watchers(){return{_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_label:["validateLabel"],_listenAriaCurrent:["validateListenAriaCurrent"],_on:["validateOn"],_role:["validateRole"],_selector:["validateSelector"],_stealth:["validateStealth"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"],_useCase:["validateUseCase"]}}},[4,"kol-link-wc",{_ariaControls:[1,"_aria-controls"],_ariaCurrent:[8,"_aria-current"],_ariaExpanded:[4,"_aria-expanded"],_ariaLabel:[1,"_aria-label"],_ariaSelected:[4,"_aria-selected"],_disabled:[4],_download:[1],_hideLabel:[4,"_hide-label"],_href:[1],_icon:[1],_icons:[1],_iconAlign:[1,"_icon-align"],_iconOnly:[4,"_icon-only"],_label:[1],_listenAriaCurrent:[8,"_listen-aria-current"],_on:[16],_role:[1],_selector:[1],_stealth:[4],_tabIndex:[2,"_tab-index"],_target:[1],_targetDescription:[1,"_target-description"],_tooltipAlign:[1,"_tooltip-align"],_useCase:[1,"_use-case"],state:[32]},void 0,{_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_label:["validateLabel"],_listenAriaCurrent:["validateListenAriaCurrent"],_on:["validateOn"],_role:["validateRole"],_selector:["validateSelector"],_stealth:["validateStealth"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"],_useCase:["validateUseCase"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-link-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-link-wc":customElements.get(t)||customElements.define(t,KolLinkWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolLinkWc as K,defineCustomElement as d};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{e as watchBoolean,b as watchString,C as a11yHintDisabled,a as a11yHint,d as devHint,t as setState,o as objectObjectHandler,f as parseJson}from"./prop.validators.js";import{v as validateHideLabel}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{c as validateTabIndex}from"./tab-index.js";import{A as AssociatedInputController}from"./component5.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,ariaDescribedBy:n}},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateTouched=(t,e)=>{watchBoolean(t,"_touched",e)};class ControlledInputController extends AssociatedInputController{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){validateTouched(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){validateAdjustHeight(this.component,t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateError(t){watchString(this.component,"_error",t)}validateHideLabel(t){validateHideLabel(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&a11yHint("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){validateLabelWithExpertSlot(this.component,t)}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,stopPropagation(t),tryToDispatchKoliBriEvent("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host),"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,stopPropagation(t),tryToDispatchKoliBriEvent("focus",this.host),"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)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{InputController as I,getRenderStates as g,validateHideError as v};
4
+ import{e as watchBoolean,b as watchString,C as a11yHintDisabled,a as a11yHint,d as devHint,v as setState,o as objectObjectHandler,f as parseJson}from"./prop.validators.js";import{v as validateHideLabel}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{c as validateTabIndex}from"./tab-index.js";import{A as AssociatedInputController}from"./component5.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,ariaDescribedBy:n}},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateTouched=(t,e)=>{watchBoolean(t,"_touched",e)};class ControlledInputController extends AssociatedInputController{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){validateTouched(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){validateAdjustHeight(this.component,t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateError(t){watchString(this.component,"_error",t)}validateHideLabel(t){validateHideLabel(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&a11yHint("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){validateLabelWithExpertSlot(this.component,t)}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,stopPropagation(t),tryToDispatchKoliBriEvent("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host),"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,stopPropagation(t),tryToDispatchKoliBriEvent("focus",this.host),"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)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{InputController as I,getRenderStates as g,validateHideError as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{I as InputController,v as validateHideError}from"./controller.js";import{a as a11yHint,H as watchJsonArrayString,e as watchBoolean,w as watchValidator,P as mapString2Unknown,t as setState,Q as STATE_CHANGE_EVENT}from"./prop.validators.js";import{h as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label.js";const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&a11yHint(`Ein abweichendes Aria-Label (${t.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},validateRequired=(t,e)=>{watchBoolean(t,"_required",e)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateOptions(t){validateOptions(this.component,t,{hooks:{beforePatch:this.beforePatchOptions}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchOptions}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options||this.component._list),this.validateHideError(this.component._hideError),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
4
+ import{I as InputController,v as validateHideError}from"./controller.js";import{a as a11yHint,H as watchJsonArrayString,e as watchBoolean,w as watchValidator,P as mapString2Unknown,v as setState,Q as STATE_CHANGE_EVENT}from"./prop.validators.js";import{h as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label.js";const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&a11yHint(`Ein abweichendes Aria-Label (${t.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},validateRequired=(t,e)=>{watchBoolean(t,"_required",e)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateOptions(t){validateOptions(this.component,t,{hooks:{beforePatch:this.beforePatchOptions}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchOptions}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options||this.component._list),this.validateHideError(this.component._hideError),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{V as initKoliBri,W as getDevMode,X as renderDevAdvice,m as getDocument,L as Log,x as getExperimentalMode,Y as getColorContrastAnalysis,Z as KoliBriUtils,_ as koliBriA11yColorContrast,$ as KoliBri,U as koliBriQuerySelector,a0 as koliBriQuerySelectorAll,a1 as koliBriQuerySelectorColors,f as parseJson,a2 as stringifyJson}from"./prop.validators.js";function prototypeKoliBri(o,e){try{Object.defineProperty(KoliBri,o,{get:function(){return e}})}catch(e){Log.debug(`KoliBri property ${o} is already bind.`)}}const metaModeLog=(o,e)=>Log.debug(`${o} ${e?"":"not "}activated`),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 o=getDocument().body,e=getDocument().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>',getDocument().body.appendChild(e),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(o),!1,!1)}),1e4)}),2500)}}};export{initialize};
4
+ import{V as initKoliBri,W as getDevMode,X as renderDevAdvice,m as getDocument,L as Log,y as getExperimentalMode,Y as getColorContrastAnalysis,Z as KoliBriUtils,_ as koliBriA11yColorContrast,$ as KoliBri,U as koliBriQuerySelector,a0 as koliBriQuerySelectorAll,a1 as koliBriQuerySelectorColors,f as parseJson,a2 as stringifyJson}from"./prop.validators.js";function prototypeKoliBri(o,e){try{Object.defineProperty(KoliBri,o,{get:function(){return e}})}catch(e){Log.debug(`KoliBri property ${o} is already bind.`)}}const metaModeLog=(o,e)=>Log.debug(`${o} ${e?"":"not "}activated`),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 o=getDocument().body,e=getDocument().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>',getDocument().body.appendChild(e),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(o),!1,!1)}),1e4)}),2500)}}};export{initialize};