@public-ui/components 1.7.0 → 1.7.2-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 (389) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{a11y.tipps-36c446cd.js → a11y.tipps-20bd827e.js} +1 -1
  3. package/dist/cjs/{a11y.tipps-36c446cd.js.map → a11y.tipps-20bd827e.js.map} +1 -1
  4. package/dist/cjs/{align-53333fc0.js → align-c615467e.js} +1 -1
  5. package/dist/cjs/{align-53333fc0.js.map → align-c615467e.js.map} +1 -1
  6. package/dist/cjs/{alignment-f24f0db3.js → alignment-c3d8299d.js} +1 -1
  7. package/dist/cjs/{alignment-f24f0db3.js.map → alignment-c3d8299d.js.map} +1 -1
  8. package/dist/cjs/{app-globals-19d94d0f.js → app-globals-02609afb.js} +1 -1
  9. package/dist/cjs/{app-globals-19d94d0f.js.map → app-globals-02609afb.js.map} +1 -1
  10. package/dist/cjs/{aria-current-1d86fcf2.js → aria-current-bf82eb71.js} +1 -1
  11. package/dist/cjs/{aria-current-1d86fcf2.js.map → aria-current-bf82eb71.js.map} +1 -1
  12. package/dist/cjs/{associated.controller-d4bd3a15.js → associated.controller-2dd7773f.js} +1 -1
  13. package/dist/cjs/{associated.controller-d4bd3a15.js.map → associated.controller-2dd7773f.js.map} +1 -1
  14. package/dist/cjs/{color-ac1a7758.js → color-1bf0d8bb.js} +1 -1
  15. package/dist/cjs/{color-ac1a7758.js.map → color-1bf0d8bb.js.map} +1 -1
  16. package/dist/cjs/{controller-3665d3ce.js → controller-50fb2d61.js} +1 -1
  17. package/dist/cjs/{controller-3665d3ce.js.map → controller-50fb2d61.js.map} +1 -1
  18. package/dist/cjs/{controller-c1e976a7.js → controller-a46514a3.js} +1 -1
  19. package/dist/cjs/{controller-c1e976a7.js.map → controller-a46514a3.js.map} +1 -1
  20. package/dist/cjs/{controller-4eb3ef58.js → controller-b83c9c07.js} +1 -1
  21. package/dist/cjs/{controller-4eb3ef58.js.map → controller-b83c9c07.js.map} +1 -1
  22. package/dist/cjs/{controller-71cf630b.js → controller-d0a5d421.js} +1 -1
  23. package/dist/cjs/{controller-71cf630b.js.map → controller-d0a5d421.js.map} +1 -1
  24. package/dist/cjs/{controller-9f972370.js → controller-eb9541ad.js} +1 -1
  25. package/dist/cjs/{controller-9f972370.js.map → controller-eb9541ad.js.map} +1 -1
  26. package/dist/cjs/{controller-icon-dcb3bc57.js → controller-icon-d6dcfaed.js} +1 -1
  27. package/dist/cjs/{controller-icon-dcb3bc57.js.map → controller-icon-d6dcfaed.js.map} +1 -1
  28. package/dist/cjs/{custom-class-df8786ee.js → custom-class-797d23e1.js} +1 -1
  29. package/dist/cjs/{custom-class-df8786ee.js.map → custom-class-797d23e1.js.map} +1 -1
  30. package/dist/cjs/{dev.utils-99246414.js → dev.utils-c7621892.js} +1 -1
  31. package/dist/cjs/{dev.utils-99246414.js.map → dev.utils-c7621892.js.map} +1 -1
  32. package/dist/cjs/{devtools-4bd98bcb.js → devtools-fb4454af.js} +1 -1
  33. package/dist/cjs/{devtools-4bd98bcb.js.map → devtools-fb4454af.js.map} +1 -1
  34. package/dist/cjs/has-closer-479d4658.js +4 -0
  35. package/dist/cjs/{has-closer-132155e4.js.map → has-closer-479d4658.js.map} +1 -1
  36. package/dist/cjs/hide-label-624ed0df.js +4 -0
  37. package/dist/cjs/{hide-label-7f2a1936.js.map → hide-label-624ed0df.js.map} +1 -1
  38. package/dist/cjs/{i18n-e7bd3548.js → i18n-2342e202.js} +1 -1
  39. package/dist/cjs/{i18n-e7bd3548.js.map → i18n-2342e202.js.map} +1 -1
  40. package/dist/cjs/{icons-8f77bb40.js → icons-2ee332dc.js} +1 -1
  41. package/dist/cjs/{icons-8f77bb40.js.map → icons-2ee332dc.js.map} +1 -1
  42. package/dist/cjs/image-source-cf8ab51e.js +4 -0
  43. package/dist/cjs/{image-source-95b8723d.js.map → image-source-cf8ab51e.js.map} +1 -1
  44. package/dist/cjs/index.cjs.js +1 -1
  45. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-alert-wc_3.cjs.entry.js.map +1 -1
  49. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-input-adapter-leanup.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-popover.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  97. package/dist/cjs/kolibri.cjs.js +1 -1
  98. package/dist/cjs/{label-d1037148.js → label-960c33d0.js} +1 -1
  99. package/dist/cjs/{label-d1037148.js.map → label-960c33d0.js.map} +1 -1
  100. package/dist/cjs/loader.cjs.js +1 -1
  101. package/dist/cjs/open-aa7908fd.js +4 -0
  102. package/dist/cjs/{open-d4c06e3e.js.map → open-aa7908fd.js.map} +1 -1
  103. package/dist/cjs/{prop.validators-d574659e.js → prop.validators-edbcdb8f.js} +1 -1
  104. package/dist/cjs/{prop.validators-d574659e.js.map → prop.validators-edbcdb8f.js.map} +1 -1
  105. package/dist/cjs/rows-691988d0.js +4 -0
  106. package/dist/cjs/{rows-cc432a31.js.map → rows-691988d0.js.map} +1 -1
  107. package/dist/cjs/show-9affcee7.js +4 -0
  108. package/dist/cjs/{show-fb2f90b3.js.map → show-9affcee7.js.map} +1 -1
  109. package/dist/cjs/{suggestions-a20c409e.js → suggestions-22073ba6.js} +1 -1
  110. package/dist/cjs/{suggestions-a20c409e.js.map → suggestions-22073ba6.js.map} +1 -1
  111. package/dist/cjs/{tab-index-1011831b.js → tab-index-4a2d5e81.js} +1 -1
  112. package/dist/cjs/{tab-index-1011831b.js.map → tab-index-4a2d5e81.js.map} +1 -1
  113. package/dist/cjs/{tooltip-align-b40f952f.js → tooltip-align-8d8541c4.js} +1 -1
  114. package/dist/cjs/{tooltip-align-b40f952f.js.map → tooltip-align-8d8541c4.js.map} +1 -1
  115. package/dist/cjs/{validation-226165e1.js → validation-2b1f8e24.js} +1 -1
  116. package/dist/cjs/{validation-226165e1.js.map → validation-2b1f8e24.js.map} +1 -1
  117. package/dist/cjs/{validation-a2f9984c.js → validation-d21a48de.js} +1 -1
  118. package/dist/cjs/{validation-a2f9984c.js.map → validation-d21a48de.js.map} +1 -1
  119. package/dist/components/component13.js +1 -1
  120. package/dist/components/component13.js.map +1 -1
  121. package/dist/components/component5.js +1 -1
  122. package/dist/components/component5.js.map +1 -1
  123. package/dist/components/component9.js +1 -1
  124. package/dist/components/component9.js.map +1 -1
  125. package/dist/components/kol-input-range.js +1 -1
  126. package/dist/components/kol-input-range.js.map +1 -1
  127. package/dist/components/kol-modal.js +1 -1
  128. package/dist/components/kol-modal.js.map +1 -1
  129. package/dist/components/prop.validators.js +1 -1
  130. package/dist/components/prop.validators.js.map +1 -1
  131. package/dist/esm/{a11y.tipps-96a0d55e.js → a11y.tipps-27b2bac3.js} +1 -1
  132. package/dist/esm/{a11y.tipps-96a0d55e.js.map → a11y.tipps-27b2bac3.js.map} +1 -1
  133. package/dist/esm/{align-82e23120.js → align-403e4c28.js} +1 -1
  134. package/dist/esm/{align-82e23120.js.map → align-403e4c28.js.map} +1 -1
  135. package/dist/esm/{alignment-60e80b38.js → alignment-f6c39ec3.js} +1 -1
  136. package/dist/esm/{alignment-60e80b38.js.map → alignment-f6c39ec3.js.map} +1 -1
  137. package/dist/esm/{app-globals-0aa726e9.js → app-globals-e8a987cd.js} +1 -1
  138. package/dist/esm/{app-globals-0aa726e9.js.map → app-globals-e8a987cd.js.map} +1 -1
  139. package/dist/esm/{aria-current-918c3eeb.js → aria-current-25867d42.js} +1 -1
  140. package/dist/esm/{aria-current-918c3eeb.js.map → aria-current-25867d42.js.map} +1 -1
  141. package/dist/esm/{associated.controller-587d895e.js → associated.controller-c38365b9.js} +1 -1
  142. package/dist/esm/{associated.controller-587d895e.js.map → associated.controller-c38365b9.js.map} +1 -1
  143. package/dist/esm/{color-9c9594f2.js → color-88367b45.js} +1 -1
  144. package/dist/esm/{color-9c9594f2.js.map → color-88367b45.js.map} +1 -1
  145. package/dist/esm/{controller-c9d9d6fb.js → controller-35349212.js} +1 -1
  146. package/dist/esm/{controller-c9d9d6fb.js.map → controller-35349212.js.map} +1 -1
  147. package/dist/esm/{controller-59de7c75.js → controller-46ce7055.js} +1 -1
  148. package/dist/esm/{controller-59de7c75.js.map → controller-46ce7055.js.map} +1 -1
  149. package/dist/esm/{controller-f7ad800b.js → controller-72e997fa.js} +1 -1
  150. package/dist/esm/{controller-f7ad800b.js.map → controller-72e997fa.js.map} +1 -1
  151. package/dist/esm/{controller-b76e8e72.js → controller-bf4c7374.js} +1 -1
  152. package/dist/esm/{controller-b76e8e72.js.map → controller-bf4c7374.js.map} +1 -1
  153. package/dist/esm/{controller-ca5fb95d.js → controller-d0bb59bd.js} +1 -1
  154. package/dist/esm/{controller-ca5fb95d.js.map → controller-d0bb59bd.js.map} +1 -1
  155. package/dist/esm/{controller-icon-47f395ec.js → controller-icon-c4fcbb01.js} +1 -1
  156. package/dist/esm/{controller-icon-47f395ec.js.map → controller-icon-c4fcbb01.js.map} +1 -1
  157. package/dist/esm/{custom-class-1c04cb15.js → custom-class-408bcebb.js} +1 -1
  158. package/dist/esm/{custom-class-1c04cb15.js.map → custom-class-408bcebb.js.map} +1 -1
  159. package/dist/esm/{dev.utils-7238d735.js → dev.utils-5e2f4fb8.js} +1 -1
  160. package/dist/esm/{dev.utils-7238d735.js.map → dev.utils-5e2f4fb8.js.map} +1 -1
  161. package/dist/esm/{devtools-71e88c8a.js → devtools-47712aae.js} +1 -1
  162. package/dist/esm/{devtools-71e88c8a.js.map → devtools-47712aae.js.map} +1 -1
  163. package/dist/esm/{has-closer-36836ae9.js → has-closer-24e1c604.js} +1 -1
  164. package/dist/esm/{has-closer-36836ae9.js.map → has-closer-24e1c604.js.map} +1 -1
  165. package/dist/esm/{hide-label-5160b357.js → hide-label-d3233b54.js} +1 -1
  166. package/dist/esm/{hide-label-5160b357.js.map → hide-label-d3233b54.js.map} +1 -1
  167. package/dist/esm/{i18n-eeac63d8.js → i18n-8a2a41a4.js} +1 -1
  168. package/dist/esm/{i18n-eeac63d8.js.map → i18n-8a2a41a4.js.map} +1 -1
  169. package/dist/esm/{icons-7745834b.js → icons-c37d9e06.js} +1 -1
  170. package/dist/esm/{icons-7745834b.js.map → icons-c37d9e06.js.map} +1 -1
  171. package/dist/esm/{image-source-57df388e.js → image-source-a3f9dd93.js} +1 -1
  172. package/dist/esm/{image-source-57df388e.js.map → image-source-a3f9dd93.js.map} +1 -1
  173. package/dist/esm/index.js +1 -1
  174. package/dist/esm/kol-abbr.entry.js +1 -1
  175. package/dist/esm/kol-accordion.entry.js +1 -1
  176. package/dist/esm/kol-alert-wc_3.entry.js +1 -1
  177. package/dist/esm/kol-alert-wc_3.entry.js.map +1 -1
  178. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  179. package/dist/esm/kol-badge.entry.js +1 -1
  180. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  181. package/dist/esm/kol-card.entry.js +1 -1
  182. package/dist/esm/kol-details.entry.js +1 -1
  183. package/dist/esm/kol-form.entry.js +1 -1
  184. package/dist/esm/kol-icon.entry.js +1 -1
  185. package/dist/esm/kol-image.entry.js +1 -1
  186. package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
  187. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  188. package/dist/esm/kol-input-color.entry.js +1 -1
  189. package/dist/esm/kol-input-date.entry.js +1 -1
  190. package/dist/esm/kol-input-email.entry.js +1 -1
  191. package/dist/esm/kol-input-file.entry.js +1 -1
  192. package/dist/esm/kol-input-number.entry.js +1 -1
  193. package/dist/esm/kol-input-password.entry.js +1 -1
  194. package/dist/esm/kol-input-radio-group.entry.js +1 -1
  195. package/dist/esm/kol-input-radio.entry.js +1 -1
  196. package/dist/esm/kol-input-range.entry.js +1 -1
  197. package/dist/esm/kol-input-range.entry.js.map +1 -1
  198. package/dist/esm/kol-input-text.entry.js +1 -1
  199. package/dist/esm/kol-input.entry.js +1 -1
  200. package/dist/esm/kol-input.entry.js.map +1 -1
  201. package/dist/esm/kol-kolibri.entry.js +1 -1
  202. package/dist/esm/kol-link-button.entry.js +1 -1
  203. package/dist/esm/kol-link-group.entry.js +1 -1
  204. package/dist/esm/kol-link-wc.entry.js +1 -1
  205. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  206. package/dist/esm/kol-logo.entry.js +1 -1
  207. package/dist/esm/kol-modal.entry.js +1 -1
  208. package/dist/esm/kol-modal.entry.js.map +1 -1
  209. package/dist/esm/kol-nav.entry.js +1 -1
  210. package/dist/esm/kol-pagination.entry.js +1 -1
  211. package/dist/esm/kol-popover.entry.js +1 -1
  212. package/dist/esm/kol-progress.entry.js +1 -1
  213. package/dist/esm/kol-quote.entry.js +1 -1
  214. package/dist/esm/kol-select.entry.js +1 -1
  215. package/dist/esm/kol-skip-nav.entry.js +1 -1
  216. package/dist/esm/kol-span-wc_2.entry.js +1 -1
  217. package/dist/esm/kol-spin.entry.js +1 -1
  218. package/dist/esm/kol-split-button.entry.js +1 -1
  219. package/dist/esm/kol-symbol.entry.js +1 -1
  220. package/dist/esm/kol-table.entry.js +1 -1
  221. package/dist/esm/kol-tabs.entry.js +1 -1
  222. package/dist/esm/kol-textarea.entry.js +1 -1
  223. package/dist/esm/kol-toast-container.entry.js +1 -1
  224. package/dist/esm/kol-toast.entry.js +1 -1
  225. package/dist/esm/kol-version.entry.js +1 -1
  226. package/dist/esm/kolibri.js +1 -1
  227. package/dist/esm/{label-6773f794.js → label-6c8b047b.js} +1 -1
  228. package/dist/esm/{label-6773f794.js.map → label-6c8b047b.js.map} +1 -1
  229. package/dist/esm/loader.js +1 -1
  230. package/dist/esm/{open-f61e2b66.js → open-6de0da43.js} +1 -1
  231. package/dist/esm/{open-f61e2b66.js.map → open-6de0da43.js.map} +1 -1
  232. package/dist/esm/{prop.validators-3b95d09c.js → prop.validators-267b95be.js} +1 -1
  233. package/dist/esm/{prop.validators-3b95d09c.js.map → prop.validators-267b95be.js.map} +1 -1
  234. package/dist/esm/{rows-a65ea911.js → rows-24029f2f.js} +1 -1
  235. package/dist/esm/{rows-a65ea911.js.map → rows-24029f2f.js.map} +1 -1
  236. package/dist/esm/{show-12d1301e.js → show-f0fa30a6.js} +1 -1
  237. package/dist/esm/{show-12d1301e.js.map → show-f0fa30a6.js.map} +1 -1
  238. package/dist/esm/{suggestions-743c78a3.js → suggestions-64d4ab73.js} +1 -1
  239. package/dist/esm/{suggestions-743c78a3.js.map → suggestions-64d4ab73.js.map} +1 -1
  240. package/dist/esm/{tab-index-f2ab48fc.js → tab-index-acb6cd17.js} +1 -1
  241. package/dist/esm/{tab-index-f2ab48fc.js.map → tab-index-acb6cd17.js.map} +1 -1
  242. package/dist/esm/{tooltip-align-ab20ae60.js → tooltip-align-82f781a7.js} +1 -1
  243. package/dist/esm/{tooltip-align-ab20ae60.js.map → tooltip-align-82f781a7.js.map} +1 -1
  244. package/dist/esm/validation-75f5ccf7.js +4 -0
  245. package/dist/esm/{validation-d644b903.js.map → validation-75f5ccf7.js.map} +1 -1
  246. package/dist/esm/{validation-c982337d.js → validation-eb847346.js} +1 -1
  247. package/dist/esm/{validation-c982337d.js.map → validation-eb847346.js.map} +1 -1
  248. package/dist/kolibri/{a11y.tipps-96a0d55e.js → a11y.tipps-27b2bac3.js} +1 -1
  249. package/dist/kolibri/align-403e4c28.js +4 -0
  250. package/dist/kolibri/{alignment-60e80b38.js → alignment-f6c39ec3.js} +1 -1
  251. package/dist/kolibri/{app-globals-0aa726e9.js → app-globals-e8a987cd.js} +1 -1
  252. package/dist/kolibri/aria-current-25867d42.js +4 -0
  253. package/dist/kolibri/{associated.controller-587d895e.js → associated.controller-c38365b9.js} +1 -1
  254. package/dist/kolibri/{color-9c9594f2.js → color-88367b45.js} +1 -1
  255. package/dist/kolibri/{controller-c9d9d6fb.js → controller-35349212.js} +1 -1
  256. package/dist/kolibri/{controller-59de7c75.js → controller-46ce7055.js} +1 -1
  257. package/dist/kolibri/{controller-f7ad800b.js → controller-72e997fa.js} +1 -1
  258. package/dist/kolibri/{controller-b76e8e72.js → controller-bf4c7374.js} +1 -1
  259. package/dist/kolibri/controller-d0bb59bd.js +4 -0
  260. package/dist/kolibri/{controller-ca5fb95d.js.map → controller-d0bb59bd.js.map} +1 -1
  261. package/dist/kolibri/controller-icon-c4fcbb01.js +4 -0
  262. package/dist/kolibri/{custom-class-1c04cb15.js → custom-class-408bcebb.js} +1 -1
  263. package/dist/kolibri/{dev.utils-7238d735.js → dev.utils-5e2f4fb8.js} +1 -1
  264. package/dist/kolibri/{dev.utils-7238d735.js.map → dev.utils-5e2f4fb8.js.map} +1 -1
  265. package/dist/kolibri/{devtools-71e88c8a.js → devtools-47712aae.js} +1 -1
  266. package/dist/kolibri/has-closer-24e1c604.js +4 -0
  267. package/dist/kolibri/hide-label-d3233b54.js +4 -0
  268. package/dist/kolibri/{i18n-eeac63d8.js → i18n-8a2a41a4.js} +1 -1
  269. package/dist/kolibri/icons-c37d9e06.js +4 -0
  270. package/dist/kolibri/image-source-a3f9dd93.js +4 -0
  271. package/dist/kolibri/index.esm.js +1 -1
  272. package/dist/kolibri/kol-abbr.entry.js +1 -1
  273. package/dist/kolibri/kol-accordion.entry.js +1 -1
  274. package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
  275. package/dist/kolibri/kol-alert-wc_3.entry.js.map +1 -1
  276. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  277. package/dist/kolibri/kol-avatar-wc.entry.js.map +1 -1
  278. package/dist/kolibri/kol-badge.entry.js +1 -1
  279. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  280. package/dist/kolibri/kol-card.entry.js +1 -1
  281. package/dist/kolibri/kol-details.entry.js +1 -1
  282. package/dist/kolibri/kol-form.entry.js +1 -1
  283. package/dist/kolibri/kol-icon.entry.js +1 -1
  284. package/dist/kolibri/kol-image.entry.js +1 -1
  285. package/dist/kolibri/kol-input-adapter-leanup.entry.js +1 -1
  286. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  287. package/dist/kolibri/kol-input-color.entry.js +1 -1
  288. package/dist/kolibri/kol-input-date.entry.js +1 -1
  289. package/dist/kolibri/kol-input-email.entry.js +1 -1
  290. package/dist/kolibri/kol-input-file.entry.js +1 -1
  291. package/dist/kolibri/kol-input-number.entry.js +1 -1
  292. package/dist/kolibri/kol-input-password.entry.js +1 -1
  293. package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
  294. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  295. package/dist/kolibri/kol-input-range.entry.js +1 -1
  296. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  297. package/dist/kolibri/kol-input-text.entry.js +1 -1
  298. package/dist/kolibri/kol-input.entry.js +1 -1
  299. package/dist/kolibri/kol-input.entry.js.map +1 -1
  300. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  301. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  302. package/dist/kolibri/kol-link-button.entry.js +1 -1
  303. package/dist/kolibri/kol-link-group.entry.js +1 -1
  304. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  305. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  306. package/dist/kolibri/kol-logo.entry.js +1 -1
  307. package/dist/kolibri/kol-modal.entry.js +1 -1
  308. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  309. package/dist/kolibri/kol-nav.entry.js +1 -1
  310. package/dist/kolibri/kol-pagination.entry.js +1 -1
  311. package/dist/kolibri/kol-popover.entry.js +1 -1
  312. package/dist/kolibri/kol-progress.entry.js +1 -1
  313. package/dist/kolibri/kol-quote.entry.js +1 -1
  314. package/dist/kolibri/kol-select.entry.js +1 -1
  315. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  316. package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
  317. package/dist/kolibri/kol-spin.entry.js +1 -1
  318. package/dist/kolibri/kol-split-button.entry.js +1 -1
  319. package/dist/kolibri/kol-symbol.entry.js +1 -1
  320. package/dist/kolibri/kol-table.entry.js +1 -1
  321. package/dist/kolibri/kol-tabs.entry.js +1 -1
  322. package/dist/kolibri/kol-textarea.entry.js +1 -1
  323. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  324. package/dist/kolibri/kol-toast.entry.js +1 -1
  325. package/dist/kolibri/kol-version.entry.js +1 -1
  326. package/dist/kolibri/kolibri.esm.js +1 -1
  327. package/dist/kolibri/{label-6773f794.js → label-6c8b047b.js} +1 -1
  328. package/dist/kolibri/open-6de0da43.js +4 -0
  329. package/dist/kolibri/{prop.validators-3b95d09c.js → prop.validators-267b95be.js} +1 -1
  330. package/dist/kolibri/rows-24029f2f.js +4 -0
  331. package/dist/kolibri/show-f0fa30a6.js +4 -0
  332. package/dist/kolibri/{suggestions-743c78a3.js → suggestions-64d4ab73.js} +1 -1
  333. package/dist/kolibri/{tab-index-f2ab48fc.js → tab-index-acb6cd17.js} +1 -1
  334. package/dist/kolibri/tooltip-align-82f781a7.js +4 -0
  335. package/dist/kolibri/validation-75f5ccf7.js +4 -0
  336. package/dist/kolibri/{validation-c982337d.js → validation-eb847346.js} +1 -1
  337. package/dist/types/components/input/component.d.ts +1 -0
  338. package/dist/types/types/modal.d.ts +1 -2
  339. package/doc/modal.md +7 -7
  340. package/package.json +1 -1
  341. package/dist/cjs/has-closer-132155e4.js +0 -4
  342. package/dist/cjs/hide-label-7f2a1936.js +0 -4
  343. package/dist/cjs/image-source-95b8723d.js +0 -4
  344. package/dist/cjs/open-d4c06e3e.js +0 -4
  345. package/dist/cjs/rows-cc432a31.js +0 -4
  346. package/dist/cjs/show-fb2f90b3.js +0 -4
  347. package/dist/esm/validation-d644b903.js +0 -4
  348. package/dist/kolibri/align-82e23120.js +0 -4
  349. package/dist/kolibri/aria-current-918c3eeb.js +0 -4
  350. package/dist/kolibri/controller-ca5fb95d.js +0 -4
  351. package/dist/kolibri/controller-icon-47f395ec.js +0 -4
  352. package/dist/kolibri/has-closer-36836ae9.js +0 -4
  353. package/dist/kolibri/hide-label-5160b357.js +0 -4
  354. package/dist/kolibri/icons-7745834b.js +0 -4
  355. package/dist/kolibri/image-source-57df388e.js +0 -4
  356. package/dist/kolibri/open-f61e2b66.js +0 -4
  357. package/dist/kolibri/rows-a65ea911.js +0 -4
  358. package/dist/kolibri/show-12d1301e.js +0 -4
  359. package/dist/kolibri/tooltip-align-ab20ae60.js +0 -4
  360. package/dist/kolibri/validation-d644b903.js +0 -4
  361. /package/dist/kolibri/{a11y.tipps-96a0d55e.js.map → a11y.tipps-27b2bac3.js.map} +0 -0
  362. /package/dist/kolibri/{align-82e23120.js.map → align-403e4c28.js.map} +0 -0
  363. /package/dist/kolibri/{alignment-60e80b38.js.map → alignment-f6c39ec3.js.map} +0 -0
  364. /package/dist/kolibri/{app-globals-0aa726e9.js.map → app-globals-e8a987cd.js.map} +0 -0
  365. /package/dist/kolibri/{aria-current-918c3eeb.js.map → aria-current-25867d42.js.map} +0 -0
  366. /package/dist/kolibri/{associated.controller-587d895e.js.map → associated.controller-c38365b9.js.map} +0 -0
  367. /package/dist/kolibri/{color-9c9594f2.js.map → color-88367b45.js.map} +0 -0
  368. /package/dist/kolibri/{controller-c9d9d6fb.js.map → controller-35349212.js.map} +0 -0
  369. /package/dist/kolibri/{controller-59de7c75.js.map → controller-46ce7055.js.map} +0 -0
  370. /package/dist/kolibri/{controller-f7ad800b.js.map → controller-72e997fa.js.map} +0 -0
  371. /package/dist/kolibri/{controller-b76e8e72.js.map → controller-bf4c7374.js.map} +0 -0
  372. /package/dist/kolibri/{controller-icon-47f395ec.js.map → controller-icon-c4fcbb01.js.map} +0 -0
  373. /package/dist/kolibri/{custom-class-1c04cb15.js.map → custom-class-408bcebb.js.map} +0 -0
  374. /package/dist/kolibri/{devtools-71e88c8a.js.map → devtools-47712aae.js.map} +0 -0
  375. /package/dist/kolibri/{has-closer-36836ae9.js.map → has-closer-24e1c604.js.map} +0 -0
  376. /package/dist/kolibri/{hide-label-5160b357.js.map → hide-label-d3233b54.js.map} +0 -0
  377. /package/dist/kolibri/{i18n-eeac63d8.js.map → i18n-8a2a41a4.js.map} +0 -0
  378. /package/dist/kolibri/{icons-7745834b.js.map → icons-c37d9e06.js.map} +0 -0
  379. /package/dist/kolibri/{image-source-57df388e.js.map → image-source-a3f9dd93.js.map} +0 -0
  380. /package/dist/kolibri/{label-6773f794.js.map → label-6c8b047b.js.map} +0 -0
  381. /package/dist/kolibri/{open-f61e2b66.js.map → open-6de0da43.js.map} +0 -0
  382. /package/dist/kolibri/{prop.validators-3b95d09c.js.map → prop.validators-267b95be.js.map} +0 -0
  383. /package/dist/kolibri/{rows-a65ea911.js.map → rows-24029f2f.js.map} +0 -0
  384. /package/dist/kolibri/{show-12d1301e.js.map → show-f0fa30a6.js.map} +0 -0
  385. /package/dist/kolibri/{suggestions-743c78a3.js.map → suggestions-64d4ab73.js.map} +0 -0
  386. /package/dist/kolibri/{tab-index-f2ab48fc.js.map → tab-index-acb6cd17.js.map} +0 -0
  387. /package/dist/kolibri/{tooltip-align-ab20ae60.js.map → tooltip-align-82f781a7.js.map} +0 -0
  388. /package/dist/kolibri/{validation-d644b903.js.map → validation-75f5ccf7.js.map} +0 -0
  389. /package/dist/kolibri/{validation-c982337d.js.map → validation-eb847346.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"validation-226165e1.js","mappings":";;;;;;;;MAUa,aAAa,GAAG,CAC5B,SAAiB,EACjB,SAIC,EACD,KAAsC;EAEtCA,oCAAoB,CACnB,SAAS,EACT,QAAQ,EACR,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,KAAK,OAAQ,IAAiB,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAQ,IAAkB,CAAC,MAAM,KAAK,QAAQ,CAAC,EACtI,KAAK,CACL,CAAC;EACFC,iCAAsB,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClE;;;;","names":["watchJsonArrayString","uiUxHintMillerscheZahl"],"sources":["src/components/nav/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { HrefProp } from '../../types/props/href';\nimport { LabelProp } from '../../types/props/label';\nimport { uiUxHintMillerscheZahl } from '../../utils/a11y.tipps';\nimport { watchJsonArrayString } from '../../utils/prop.validators';\n\ntype HrefOrLabelProp = HrefProp | LabelProp;\n\nexport const watchNavLinks = (\n\tclassName: string,\n\tcomponent: Generic.Element.Component & {\n\t\tstate: {\n\t\t\t_links: HrefOrLabelProp[];\n\t\t};\n\t},\n\tvalue?: Stringified<HrefOrLabelProp[]>\n): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_links',\n\t\t(link) => typeof link === 'object' && (typeof (link as HrefProp)._href === 'string' || typeof (link as LabelProp)._label === 'string'),\n\t\tvalue\n\t);\n\tuiUxHintMillerscheZahl(className, component.state._links.length);\n};\n"],"version":3}
1
+ {"file":"validation-2b1f8e24.js","mappings":";;;;;;;;MAUa,aAAa,GAAG,CAC5B,SAAiB,EACjB,SAIC,EACD,KAAsC;EAEtCA,oCAAoB,CACnB,SAAS,EACT,QAAQ,EACR,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,KAAK,OAAQ,IAAiB,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAQ,IAAkB,CAAC,MAAM,KAAK,QAAQ,CAAC,EACtI,KAAK,CACL,CAAC;EACFC,iCAAsB,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClE;;;;","names":["watchJsonArrayString","uiUxHintMillerscheZahl"],"sources":["src/components/nav/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { HrefProp } from '../../types/props/href';\nimport { LabelProp } from '../../types/props/label';\nimport { uiUxHintMillerscheZahl } from '../../utils/a11y.tipps';\nimport { watchJsonArrayString } from '../../utils/prop.validators';\n\ntype HrefOrLabelProp = HrefProp | LabelProp;\n\nexport const watchNavLinks = (\n\tclassName: string,\n\tcomponent: Generic.Element.Component & {\n\t\tstate: {\n\t\t\t_links: HrefOrLabelProp[];\n\t\t};\n\t},\n\tvalue?: Stringified<HrefOrLabelProp[]>\n): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_links',\n\t\t(link) => typeof link === 'object' && (typeof (link as HrefProp)._href === 'string' || typeof (link as LabelProp)._label === 'string'),\n\t\tvalue\n\t);\n\tuiUxHintMillerscheZahl(className, component.state._links.length);\n};\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const prop_validators=require("./prop.validators-d574659e.js"),watchHeadingLevel=(e,a)=>{prop_validators.watchValidator(e,"_level",(e=>"number"==typeof e&&0<=e&&e<=6),new Set(["Number {0, 1, 2, 3, 4, 5, 6}"]),a,{defaultValue:1,required:!0})};exports.watchHeadingLevel=watchHeadingLevel;
4
+ "use strict";const prop_validators=require("./prop.validators-edbcdb8f.js"),watchHeadingLevel=(e,a)=>{prop_validators.watchValidator(e,"_level",(e=>"number"==typeof e&&0<=e&&e<=6),new Set(["Number {0, 1, 2, 3, 4, 5, 6}"]),a,{defaultValue:1,required:!0})};exports.watchHeadingLevel=watchHeadingLevel;
@@ -1 +1 @@
1
- {"file":"validation-a2f9984c.js","mappings":";;;;;;;MAIa,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAc;EACrFA,8BAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK;IACL,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC;GAC7D,EACD,IAAI,GAAG,CAAC,CAAC,8BAA8B,CAAC,CAAC,EACzC,KAAK,EACL;IAEC,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,IAAI;GACd,CACD,CAAC;AACH;;;;","names":["watchValidator"],"sources":["src/components/heading/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport const watchHeadingLevel = (component: Generic.Element.Component, value?: number): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_level',\n\t\t(value): boolean => {\n\t\t\treturn typeof value === 'number' && 0 <= value && value <= 6;\n\t\t},\n\t\tnew Set(['Number {0, 1, 2, 3, 4, 5, 6}']),\n\t\tvalue,\n\t\t{\n\t\t\t// TODO: options not in the validator\n\t\t\tdefaultValue: 1,\n\t\t\trequired: true,\n\t\t}\n\t);\n};\n"],"version":3}
1
+ {"file":"validation-d21a48de.js","mappings":";;;;;;;MAIa,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAc;EACrFA,8BAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK;IACL,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC;GAC7D,EACD,IAAI,GAAG,CAAC,CAAC,8BAA8B,CAAC,CAAC,EACzC,KAAK,EACL;IAEC,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,IAAI;GACd,CACD,CAAC;AACH;;;;","names":["watchValidator"],"sources":["src/components/heading/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport const watchHeadingLevel = (component: Generic.Element.Component, value?: number): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_level',\n\t\t(value): boolean => {\n\t\t\treturn typeof value === 'number' && 0 <= value && value <= 6;\n\t\t},\n\t\tnew Set(['Number {0, 1, 2, 3, 4, 5, 6}']),\n\t\tvalue,\n\t\t{\n\t\t\t// TODO: options not in the validator\n\t\t\tdefaultValue: 1,\n\t\t\trequired: true,\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,h,Host,Fragment}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{N as handleSlotContent,l as showExpertSlot}from"./prop.validators.js";import{d as defineCustomElement$7}from"./shadow.js";import{d as defineCustomElement$6}from"./component6.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$4}from"./component4.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 KolInput=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.slotName="input",this.catchInputSlot=t=>{handleSlotContent(this.host,t,this.slotName)},this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._error="",this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icon=void 0,this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconsProp(){return this._icons||this._icon}render(){var t,e,o,i,s,n;const l="string"==typeof this._error&&this._error.length>0&&!0===this._touched,r=showExpertSlot(this._label),a="string"==typeof this._hint&&this._hint.length>0,d=!r&&this._hideLabel;return h(Host,{class:{disabled:!0===this._disabled,error:!0===l,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError}},h("label",{id:d?void 0:`${this._id}-label`,hidden:d,htmlFor:this._id},h("span",null,h("slot",{name:"label"}))),a&&h("span",{class:"hint",id:`${this._id}-hint`},this._hint),h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this.getIconsProp())||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(e=this.getIconsProp())||void 0===e?void 0:e.right)}},(null===(o=this.getIconsProp())||void 0===o?void 0:o.left)&&h("kol-icon",{_ariaLabel:"",_icons:(null===(i=this.getIconsProp())||void 0===i?void 0:i.left).icon}),h("div",{ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&h("kol-button-wc",{_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(s=this.getIconsProp())||void 0===s?void 0:s.right)&&h("kol-icon",{_ariaLabel:"",_icons:(null===(n=this.getIconsProp())||void 0===n?void 0:n.right).icon})),d&&h("kol-tooltip-wc",{"aria-hidden":"true",class:"input-tooltip",_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),l&&h("kol-alert",{_alert:this._alert,_type:"error",_variant:"msg","aria-hidden":this._hideError,class:"error"+(this._hideError?" hidden":""),id:`${this._id}-error`},this._error),Array.isArray(this._suggestions)&&this._suggestions.length>0&&h("datalist",{id:`${this._id}-list`},this._suggestions.map((t=>h("option",{value:t})))),this._hasCounter&&h("span",{class:"counter","aria-atomic":"true","aria-live":"polite"},this._currentLength,this._maxLength&&h(Fragment,null,h("span",{"aria-label":translate("kol-of"),role:"img"},"/"),this._maxLength)," ",h("span",null,translate("kol-characters"))))}get host(){return this}},[4,"kol-input",{_alert:[4],_currentLength:[2,"_current-length"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[4,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icon:[16],_icons:[16],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_readOnly:[4,"_read-only"],_renderNoLabel:[4,"_render-no-label"],_required:[4],_slotName:[1,"_slot-name"],_suggestions:[1],_smartButton:[1,"_smart-button"],_tooltipAlign:[1,"_tooltip-align"],_touched:[4]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-input","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-input":customElements.get(t)||customElements.define(t,KolInput);break;case"kol-alert":customElements.get(t)||defineCustomElement$7();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-heading-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{KolInput as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{N as handleSlotContent,l as showExpertSlot}from"./prop.validators.js";import{d as defineCustomElement$7}from"./shadow.js";import{d as defineCustomElement$6}from"./component6.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$4}from"./component4.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 KolInput=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.slotName="input",this.catchInputSlot=t=>{handleSlotContent(this.host,t,this.slotName)},this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._error="",this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icon=void 0,this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconsProp(){return this._icons||this._icon}getIconStyles(t){return t&&"object"==typeof t&&t.style?t.style:{}}render(){var t,e,o,s,i,n,l,r;const a="string"==typeof this._error&&this._error.length>0&&!0===this._touched,d=showExpertSlot(this._label),_="string"==typeof this._hint&&this._hint.length>0,m=!d&&this._hideLabel;return h(Host,{class:{disabled:!0===this._disabled,error:!0===a,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError}},h("label",{id:m?void 0:`${this._id}-label`,hidden:m,htmlFor:this._id},h("span",null,h("slot",{name:"label"}))),_&&h("span",{class:"hint",id:`${this._id}-hint`},this._hint),h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this.getIconsProp())||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(e=this.getIconsProp())||void 0===e?void 0:e.right)}},(null===(o=this.getIconsProp())||void 0===o?void 0:o.left)&&h("kol-icon",{_ariaLabel:"",_icons:(null===(s=this.getIconsProp())||void 0===s?void 0:s.left).icon,style:this.getIconStyles(null===(i=this.getIconsProp())||void 0===i?void 0:i.left)}),h("div",{ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&h("kol-button-wc",{_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(n=this.getIconsProp())||void 0===n?void 0:n.right)&&h("kol-icon",{_ariaLabel:"",_icons:(null===(l=this.getIconsProp())||void 0===l?void 0:l.right).icon,style:this.getIconStyles(null===(r=this.getIconsProp())||void 0===r?void 0:r.right)})),m&&h("kol-tooltip-wc",{"aria-hidden":"true",class:"input-tooltip",_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),a&&h("kol-alert",{_alert:this._alert,_type:"error",_variant:"msg","aria-hidden":this._hideError,class:"error"+(this._hideError?" hidden":""),id:`${this._id}-error`},this._error),Array.isArray(this._suggestions)&&this._suggestions.length>0&&h("datalist",{id:`${this._id}-list`},this._suggestions.map((t=>h("option",{value:t})))),this._hasCounter&&h("span",{class:"counter","aria-atomic":"true","aria-live":"polite"},this._currentLength,this._maxLength&&h(Fragment,null,h("span",{"aria-label":translate("kol-of"),role:"img"},"/"),this._maxLength)," ",h("span",null,translate("kol-characters"))))}get host(){return this}},[4,"kol-input",{_alert:[4],_currentLength:[2,"_current-length"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[4,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icon:[16],_icons:[16],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_readOnly:[4,"_read-only"],_renderNoLabel:[4,"_render-no-label"],_required:[4],_slotName:[1,"_slot-name"],_suggestions:[1],_smartButton:[1,"_smart-button"],_tooltipAlign:[1,"_tooltip-align"],_touched:[4]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-input","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-input":customElements.get(t)||customElements.define(t,KolInput);break;case"kol-alert":customElements.get(t)||defineCustomElement$7();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-heading-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{KolInput as K,defineCustomElement as d};
@@ -1 +1 @@
1
- {"file":"component13.js","mappings":";;;;;;;;;;;;;;MAsBa,QAAQ;;;;IAGZ,aAAQ,GAAW,OAAO,CAAC;IAM3B,mBAAc,GAAG,CAAC,IAAqB;MAC9C,iBAAiB,CAAC,IAAI,CAAC,IAAK,EAAE,IAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpD,CAAC;kBAiHgC,IAAI;;qBAWD,KAAK;kBAKT,EAAE;uBAMI,KAAK;sBAMN,KAAK;sBAOL,KAAK;iBAKX,EAAE;;;;;;qBA+BG,KAAK;0BAKA,KAAK;qBAMV,KAAK;;;;yBAqBY,KAAK;oBAMvB,KAAK;;EApOlC,mBAAmB;IACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;GAC1D;EAMO,YAAY;IACnB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC;GACjC;EAEM,MAAM;;IACZ,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IACrG,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACxE,MAAM,wBAAwB,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC;IAEnE,QACC,EAAC,I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,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,IAC9B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAqB,MAC5C,cAAQ,KAAK,EAAE,MAAM,GAAI,CACzB,CAAC,CACQ,CACX,EACA,IAAI,CAAC,WAAW,KAChB,YAAM,KAAK,EAAC,SAAS,iBAAa,MAAM,eAAW,QAAQ,IACzD,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,UAAU,KACf,EAAC,QAAQ,QACR,0BAAkB,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC,KAAK,QAE1C,EACN,IAAI,CAAC,UAAU,CACN,CACX,EAAE,GAAG,EACN,gBAAO,SAAS,CAAC,gBAAgB,CAAC,CAAQ,CACpC,CACP,CACK,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, Element, Fragment, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon, KoliBriHorizontalIcons } from '../../types/icons';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { W3CInputValue } from '../../types/w3c';\nimport { handleSlotContent, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tprivate getIconsProp(): KoliBriHorizontalIcons | undefined {\n\t\treturn this._icons || this._icon;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<label id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this.getIconsProp()?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this.getIconsProp()?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this.getIconsProp()?.left && <kol-icon _ariaLabel=\"\" _icons={(this.getIconsProp()?.left as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icons={this._smartButton._icons}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t\t{this.getIconsProp()?.right && <kol-icon _ariaLabel=\"\" _icons={(this.getIconsProp()?.right as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-tooltip-wc>\n\t\t\t\t)}\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t_alert={this._alert}\n\t\t\t\t\t\t_type=\"error\"\n\t\t\t\t\t\t_variant=\"msg\"\n\t\t\t\t\t\taria-hidden={this._hideError}\n\t\t\t\t\t\tclass={`error${this._hideError ? ' hidden' : ''}`}\n\t\t\t\t\t\tid={`${this._id}-error`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id!: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _touched?: boolean = false;\n}\n"],"version":3}
1
+ {"file":"component13.js","mappings":";;;;;;;;;;;;;;MAsBa,QAAQ;;;;IAGZ,aAAQ,GAAW,OAAO,CAAC;IAM3B,mBAAc,GAAG,CAAC,IAAqB;MAC9C,iBAAiB,CAAC,IAAI,CAAC,IAAK,EAAE,IAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpD,CAAC;kBAiIgC,IAAI;;qBAWD,KAAK;kBAKT,EAAE;uBAMI,KAAK;sBAMN,KAAK;sBAOL,KAAK;iBAKX,EAAE;;;;;;qBA+BG,KAAK;0BAKA,KAAK;qBAMV,KAAK;;;;yBAqBY,KAAK;oBAMvB,KAAK;;EApPlC,mBAAmB;IACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;GAC1D;EAMO,YAAY;IACnB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC;GACjC;EAEO,aAAa,CAAC,IAA2C;IAChE,OAAO,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;GACxE;EAEM,MAAM;;IACZ,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI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AG,QAAQ,GAAG,SAAS,EACtD,MAAM,EAAE,IAAI,CAAC,MAAM,GACF,CAClB,EACA,QAAQ,KACR,iBACC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,KAAK,iBACD,IAAI,CAAC,UAAU,EAC5B,KAAK,EAAE,QAAQ,IAAI,CAAC,UAAU,GAAG,SAAS,GAAG,EAAE,EAAE,EACjD,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,IAEtB,IAAI,CAAC,MAAM,CACD,CACZ,EACA,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,KAChE,gBAAU,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,IAC9B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAqB,MAC5C,cAAQ,KAAK,EAAE,MAAM,GAAI,CACzB,CAAC,CACQ,CACX,EACA,IAAI,CAAC,WAAW,KAChB,YAAM,KAAK,EAAC,SAAS,iBAAa,MAAM,eAAW,QAAQ,IACzD,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,UAAU,KACf,EAAC,QAAQ,QACR,0BAAkB,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC,KAAK,QAE1C,EACN,IAAI,CAAC,UAAU,CACN,CACX,EAAE,GAAG,EACN,gBAAO,SAAS,CAAC,gBAAgB,CAAC,CAAQ,CACpC,CACP,CACK,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, Element, Fragment, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { AnyIconFontClass, KoliBriCustomIcon, KoliBriHorizontalIcons } from '../../types/icons';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { W3CInputValue } from '../../types/w3c';\nimport { handleSlotContent, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tprivate getIconsProp(): KoliBriHorizontalIcons | undefined {\n\t\treturn this._icons || this._icon;\n\t}\n\n\tprivate getIconStyles(icon?: AnyIconFontClass | KoliBriCustomIcon): Record<string, string> {\n\t\treturn icon && typeof icon === 'object' && icon.style ? icon.style : {};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<label id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this.getIconsProp()?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this.getIconsProp()?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this.getIconsProp()?.left && (\n\t\t\t\t\t\t<kol-icon\n\t\t\t\t\t\t\t_ariaLabel=\"\"\n\t\t\t\t\t\t\t_icons={(this.getIconsProp()?.left as KoliBriCustomIcon).icon}\n\t\t\t\t\t\t\tstyle={this.getIconStyles(this.getIconsProp()?.left)}\n\t\t\t\t\t\t></kol-icon>\n\t\t\t\t\t)}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icons={this._smartButton._icons}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t\t{this.getIconsProp()?.right && (\n\t\t\t\t\t\t<kol-icon\n\t\t\t\t\t\t\t_ariaLabel=\"\"\n\t\t\t\t\t\t\t_icons={(this.getIconsProp()?.right as KoliBriCustomIcon).icon}\n\t\t\t\t\t\t\tstyle={this.getIconStyles(this.getIconsProp()?.right)}\n\t\t\t\t\t\t></kol-icon>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-tooltip-wc>\n\t\t\t\t)}\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t_alert={this._alert}\n\t\t\t\t\t\t_type=\"error\"\n\t\t\t\t\t\t_variant=\"msg\"\n\t\t\t\t\t\taria-hidden={this._hideError}\n\t\t\t\t\t\tclass={`error${this._hideError ? ' hidden' : ''}`}\n\t\t\t\t\t\tid={`${this._id}-error`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id!: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _touched?: boolean = false;\n}\n"],"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(){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(this._label||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,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};
@@ -1 +1 @@
1
- {"file":"component5.js","mappings":";;;;;;;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;EACtG,YAAY,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC;;ACCM,MAAM,uBAAuB,GAAG,CAAC,SAAoC,EAAE,KAA+C;EAC5H,cAAc,CACb,SAAS,EACT,KAAK,EACL,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EACtD,IAAI,GAAG,CAAC,CAAC,8DAA8D,CAAC,CAAC,EACzE,KAAK,CACL,CAAC;AACH,CAAC;;ACdM,MAAM,kBAAkB,G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AAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC5D,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/types/props/aria-expanded.ts","src/types/props/button-callbacks.ts","src/types/props/button-type.ts","src/types/props/button-variant.ts","src/types/props/custom-class.ts","src/types/props/disabled.ts","src/components/form/controller.ts","src/types/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts","src/components/button/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\ntype AriaExpandedPropType = boolean;\n\n/**\n * Marks this element as open/expanded, or that the connected element (aria-controls/aria-owns) is open/expanded.\n * (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * @deprecated\n */\nexport type PropAriaExpanded = {\n\tariaExpanded: AriaExpandedPropType;\n};\n\n/* validator */\nexport const validateAriaExpanded = (component: Generic.Element.Component, value?: AriaExpandedPropType): void => {\n\twatchBoolean(component, '_ariaExpanded', value);\n};\n","import { Events } from '../../enums/events';\nimport { EventCallback, EventValueOrEventCallback } from '../callbacks';\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\nimport { StencilUnknown } from '../unknown';\n\n/* types */\nexport type ButtonCallbacksPropType<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\n/**\n * Defines the callback functions for button events.\n */\nexport type PropButtonCallbacks<T> = {\n\ton: ButtonCallbacksPropType<T>;\n};\n\n/* validator */\nexport const validateButtonCallbacks = (component: Generic.Element.Component, value?: ButtonCallbacksPropType<StencilUnknown>): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_on`,\n\t\t(value) => typeof value === 'object' && value !== null,\n\t\tnew Set(['ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}']),\n\t\tvalue\n\t);\n};\n","/* types */\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport type ButtonTypePropType = 'button' | 'reset' | 'submit';\n\n/**\n * Defines either the type of the component or of the components interactive element.\n */\nexport type PropButtonType = {\n\ttype: ButtonTypePropType;\n};\n\n/* validator */\nexport const validateButtonType = (component: Generic.Element.Component, value?: ButtonTypePropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_type`,\n\t\t(value) => value === 'button' || value === 'reset' || value === 'submit',\n\t\tnew Set(['KoliBriButtonType {button, reset, submit}']),\n\t\tvalue\n\t);\n};\n","/* types */\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport type ButtonVariantPropType = 'primary' | 'secondary' | 'normal' | 'tertiary' | 'danger' | 'ghost' | 'custom';\n\n/**\n * Defines which variant should be used for presentation.\n */\nexport type PropButtonVariant = {\n\tvariant: ButtonVariantPropType;\n};\n\n/* validator */\nexport const validateButtonVariant = (component: Generic.Element.Component, value?: ButtonVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_variant`,\n\t\t(value) => value === 'primary' || value === 'secondary' || value === 'normal' || value === 'danger' || value === 'ghost' || value === 'custom',\n\t\tnew Set(['KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'normal',\n\t\t}\n\t);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type CustomClassPropType = string;\n\n/**\n * Defines the custom class attribute.\n */\nexport type PropCustomClass = {\n\tcustomClass: CustomClassPropType;\n};\n\n/* validator */\nexport const validateCustomClass = (component: Generic.Element.Component, value?: CustomClassPropType): void => {\n\twatchString(component, '_customClass', value, {\n\t\tdefaultValue: undefined,\n\t});\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type DisabledPropType = boolean;\n\n/**\n * Makes the element not focusable and ignore all events.\n */\nexport type PropDisabled = {\n\tdisabled: DisabledPropType;\n};\n\n/* validator */\nexport const validateDisabled = (component: Generic.Element.Component, value?: DisabledPropType): void => {\n\twatchBoolean(component, '_disabled', value);\n};\n","import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTarget } from '../../utils/prop.validators';\nimport { Props } from './types';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimentalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t}\n\t\t}\n\t}\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchString, WatchStringOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { NamePropType, validateName } from '../../types/props/name';\nimport { PropSyncValueBySelector, SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { StencilUnknown } from '../../types/unknown';\nimport { devHint, devWarning } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\n\nconst EXPERIMENTAL_MODE = getExperimentalMode();\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.name = name;\n\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'button':\n\t\t\t\t\tthis.formAssociated = document.createElement('button');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('aria-hidden', 'true');\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`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.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (EXPERIMENTAL_MODE && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { States as ButtonStates } from '../../components/button/types';\nimport { Stringified } from '../../types/common';\nimport { AlignPropType } from '../../types/props/align';\nimport { AlternativeButtonLinkRolePropType, validateAlternativeButtonLinkRole } from '../../types/props/alternative-button-link-role';\nimport { validateAriaControls } from '../../types/props/aria-controls';\nimport { AriaCurrentPropType, validateAriaCurrent } from '../../types/props/aria-current';\nimport { validateAriaExpanded } from '../../types/props/aria-expanded';\nimport { ButtonCallbacksPropType, validateButtonCallbacks } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType, validateButtonType } from '../../types/props/button-type';\nimport { ButtonVariantPropType, validateButtonVariant } from '../../types/props/button-variant';\nimport { CustomClassPropType, validateCustomClass } from '../../types/props/custom-class';\nimport { DisabledPropType, validateDisabled } from '../../types/props/disabled';\nimport { validateHideLabel } from '../../types/props/hide-label';\nimport { IconsPropType, validateIcons, watchIconAlign } from '../../types/props/icons';\nimport { LabelWithExpertSlotPropType, validateLabelWithExpertSlot } from '../../types/props/label';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType, validateTooltipAlign } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { a11yHintDisabled } from '../../utils/a11y.tipps';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { mapBoolean2String, mapStringOrBoolean2String, setEventTarget, setState, watchBoolean, watchString } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { propagateResetEventToForm, propagateSubmitEventToForm } from '../form/controller';\nimport { AssociatedInputController } from '../input-adapter-leanup/associated.controller';\nimport { API } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-button-wc',\n\tshadow: false,\n})\nexport class KolButtonWc implements API {\n\t@Element() private readonly host?: HTMLKolButtonWcElement;\n\tprivate ref?: HTMLButtonElement;\n\n\tprivate readonly catchRef = (ref?: HTMLButtonElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: MouseEvent) => {\n\t\tif (this.state._type === 'submit') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (this.state._type === 'reset') {\n\t\t\tpropagateResetEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else {\n\t\t\t// Event handling\n\t\t\tstopPropagation(event);\n\t\t\ttryToDispatchKoliBriEvent('click', this.host, this.state._value);\n\n\t\t\t// TODO: Static form handling\n\t\t\tthis.controller.setFormAssociatedValue(this.state._value);\n\n\t\t\t// Callback\n\t\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\t\tsetEventTarget(event, this.ref);\n\t\t\t\tthis.state._on?.onClick(event, this.state._value);\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<button\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={mapStringOrBoolean2String(this.state._ariaCurrent)}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\taria-selected={mapStringOrBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t\t'icon-only': this.state._hideLabel === true, // @deprecated in v2\n\t\t\t\t\t\t'hide-label': this.state._hideLabel === true,\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\tid={this.state._id}\n\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\ttype={this.state._type}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icons={this.state._icons} _hideLabel={this.state._hideLabel} _label={hasExpertSlot ? '' : this.state._label}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t</button>\n\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t/**\n\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t */\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\thidden={hasExpertSlot || !this.state._hideLabel}\n\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t_label={typeof this.state._label === 'string' ? this.state._label : ''}\n\t\t\t\t></kol-tooltip-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: AssociatedInputController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: AlignPropType;\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 internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: ButtonStates = {\n\t\t_icons: {}, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_on: {},\n\t\t_type: 'button', // ⚠ required\n\t\t_variant: 'normal', // ⚠ required\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new AssociatedInputController(this, 'button', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this, '_accessKey', value);\n\t}\n\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\tvalidateAriaControls(this, value);\n\t}\n\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrentPropType): void {\n\t\tvalidateAriaCurrent(this, value);\n\t}\n\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\tvalidateAriaExpanded(this, value);\n\t}\n\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaSelected', value);\n\t}\n\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: CustomClassPropType): void {\n\t\tvalidateCustomClass(this, value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: DisabledPropType): void {\n\t\tvalidateDisabled(this, value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this, value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: IconsPropType): void {\n\t\tvalidateIcons(this, value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: IconsPropType): void {\n\t\tvalidateIcons(this, value);\n\t}\n\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: AlignPropType): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\tthis.validateHideLabel(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this, value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: ButtonCallbacksPropType<StencilUnknown>): void {\n\t\tvalidateButtonCallbacks(this, value);\n\t}\n\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativeButtonLinkRolePropType): void {\n\t\tvalidateAlternativeButtonLinkRole(this, value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tvalidateTooltipAlign(this, value);\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: ButtonTypePropType): void {\n\t\tvalidateButtonType(this, value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this, '_value', value);\n\t\tthis.controller.setFormAssociatedValue(this.state._value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: ButtonVariantPropType): void {\n\t\tvalidateButtonVariant(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateHideLabel(this._hideLabel || this._iconOnly);\n\t\tthis.validateIcons(this._icons || this._icon);\n\t\tthis.validateIconAlign(this._iconAlign);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label || this._ariaLabel);\n\t\tthis.validateName(this._name);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateSyncValueBySelector(this._syncValueBySelector);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateType(this._type);\n\t\tthis.validateValue(this._value);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.ts","src/types/props/button-variant.ts","src/types/props/custom-class.ts","src/types/props/disabled.ts","src/components/form/controller.ts","src/types/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts","src/components/button/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\ntype AriaExpandedPropType = boolean;\n\n/**\n * Marks this element as open/expanded, or that the connected element (aria-controls/aria-owns) is open/expanded.\n * (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * @deprecated\n */\nexport type PropAriaExpanded = {\n\tariaExpanded: AriaExpandedPropType;\n};\n\n/* validator */\nexport const validateAriaExpanded = (component: Generic.Element.Component, value?: AriaExpandedPropType): void => {\n\twatchBoolean(component, '_ariaExpanded', value);\n};\n","import { Events } from '../../enums/events';\nimport { EventCallback, EventValueOrEventCallback } from '../callbacks';\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\nimport { StencilUnknown } from '../unknown';\n\n/* types */\nexport type ButtonCallbacksPropType<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\n/**\n * Defines the callback functions for button events.\n */\nexport type PropButtonCallbacks<T> = {\n\ton: ButtonCallbacksPropType<T>;\n};\n\n/* validator */\nexport const validateButtonCallbacks = (component: Generic.Element.Component, value?: ButtonCallbacksPropType<StencilUnknown>): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_on`,\n\t\t(value) => typeof value === 'object' && value !== null,\n\t\tnew Set(['ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}']),\n\t\tvalue\n\t);\n};\n","/* types */\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport type ButtonTypePropType = 'button' | 'reset' | 'submit';\n\n/**\n * Defines either the type of the component or of the components interactive element.\n */\nexport type PropButtonType = {\n\ttype: ButtonTypePropType;\n};\n\n/* validator */\nexport const validateButtonType = (component: Generic.Element.Component, value?: ButtonTypePropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_type`,\n\t\t(value) => value === 'button' || value === 'reset' || value === 'submit',\n\t\tnew Set(['KoliBriButtonType {button, reset, submit}']),\n\t\tvalue\n\t);\n};\n","/* types */\nimport { Generic } from '@a11y-ui/core';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport type ButtonVariantPropType = 'primary' | 'secondary' | 'normal' | 'tertiary' | 'danger' | 'ghost' | 'custom';\n\n/**\n * Defines which variant should be used for presentation.\n */\nexport type PropButtonVariant = {\n\tvariant: ButtonVariantPropType;\n};\n\n/* validator */\nexport const validateButtonVariant = (component: Generic.Element.Component, value?: ButtonVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_variant`,\n\t\t(value) => value === 'primary' || value === 'secondary' || value === 'normal' || value === 'danger' || value === 'ghost' || value === 'custom',\n\t\tnew Set(['KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'normal',\n\t\t}\n\t);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type CustomClassPropType = string;\n\n/**\n * Defines the custom class attribute.\n */\nexport type PropCustomClass = {\n\tcustomClass: CustomClassPropType;\n};\n\n/* validator */\nexport const validateCustomClass = (component: Generic.Element.Component, value?: CustomClassPropType): void => {\n\twatchString(component, '_customClass', value, {\n\t\tdefaultValue: undefined,\n\t});\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type DisabledPropType = boolean;\n\n/**\n * Makes the element not focusable and ignore all events.\n */\nexport type PropDisabled = {\n\tdisabled: DisabledPropType;\n};\n\n/* validator */\nexport const validateDisabled = (component: Generic.Element.Component, value?: DisabledPropType): void => {\n\twatchBoolean(component, '_disabled', value);\n};\n","import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTarget } from '../../utils/prop.validators';\nimport { Props } from './types';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimentalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t}\n\t\t}\n\t}\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchString, WatchStringOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { NamePropType, validateName } from '../../types/props/name';\nimport { PropSyncValueBySelector, SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { StencilUnknown } from '../../types/unknown';\nimport { devHint, devWarning } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\n\nconst EXPERIMENTAL_MODE = getExperimentalMode();\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.name = name;\n\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'button':\n\t\t\t\t\tthis.formAssociated = document.createElement('button');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('aria-hidden', 'true');\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`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.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (EXPERIMENTAL_MODE && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { States as ButtonStates } from '../../components/button/types';\nimport { Stringified } from '../../types/common';\nimport { AlignPropType } from '../../types/props/align';\nimport { AlternativeButtonLinkRolePropType, validateAlternativeButtonLinkRole } from '../../types/props/alternative-button-link-role';\nimport { validateAriaControls } from '../../types/props/aria-controls';\nimport { AriaCurrentPropType, validateAriaCurrent } from '../../types/props/aria-current';\nimport { validateAriaExpanded } from '../../types/props/aria-expanded';\nimport { ButtonCallbacksPropType, validateButtonCallbacks } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType, validateButtonType } from '../../types/props/button-type';\nimport { ButtonVariantPropType, validateButtonVariant } from '../../types/props/button-variant';\nimport { CustomClassPropType, validateCustomClass } from '../../types/props/custom-class';\nimport { DisabledPropType, validateDisabled } from '../../types/props/disabled';\nimport { validateHideLabel } from '../../types/props/hide-label';\nimport { IconsPropType, validateIcons, watchIconAlign } from '../../types/props/icons';\nimport { LabelWithExpertSlotPropType, validateLabelWithExpertSlot } from '../../types/props/label';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType, validateTooltipAlign } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { a11yHintDisabled } from '../../utils/a11y.tipps';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { mapBoolean2String, mapStringOrBoolean2String, setEventTarget, setState, watchBoolean, watchString } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { propagateResetEventToForm, propagateSubmitEventToForm } from '../form/controller';\nimport { AssociatedInputController } from '../input-adapter-leanup/associated.controller';\nimport { API } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-button-wc',\n\tshadow: false,\n})\nexport class KolButtonWc implements API {\n\t@Element() private readonly host?: HTMLKolButtonWcElement;\n\tprivate ref?: HTMLButtonElement;\n\n\tprivate readonly catchRef = (ref?: HTMLButtonElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: MouseEvent) => {\n\t\tif (this.state._type === 'submit') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (this.state._type === 'reset') {\n\t\t\tpropagateResetEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else {\n\t\t\t// Event handling\n\t\t\tstopPropagation(event);\n\t\t\ttryToDispatchKoliBriEvent('click', this.host, this.state._value);\n\n\t\t\t// TODO: Static form handling\n\t\t\tthis.controller.setFormAssociatedValue(this.state._value);\n\n\t\t\t// Callback\n\t\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\t\tsetEventTarget(event, this.ref);\n\t\t\t\tthis.state._on?.onClick(event, this.state._value);\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<button\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={mapStringOrBoolean2String(this.state._ariaCurrent)}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\taria-selected={mapStringOrBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t\t'icon-only': this.state._hideLabel === true, // @deprecated in v2\n\t\t\t\t\t\t'hide-label': this.state._hideLabel === true,\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\tid={this.state._id}\n\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\ttype={this.state._type}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icons={this.state._icons} _hideLabel={this.state._hideLabel} _label={hasExpertSlot ? '' : this.state._label}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t</button>\n\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t/**\n\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t */\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\thidden={hasExpertSlot || !this.state._hideLabel}\n\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t_label={typeof this.state._label === 'string' ? this.state._label : ''}\n\t\t\t\t></kol-tooltip-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: AssociatedInputController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: AlignPropType;\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 internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: ButtonStates = {\n\t\t_icons: {}, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_on: {},\n\t\t_type: 'button', // ⚠ required\n\t\t_variant: 'normal', // ⚠ required\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new AssociatedInputController(this, 'button', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this, '_accessKey', value);\n\t}\n\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\tvalidateAriaControls(this, value);\n\t}\n\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrentPropType): void {\n\t\tvalidateAriaCurrent(this, value);\n\t}\n\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\tvalidateAriaExpanded(this, value);\n\t}\n\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaSelected', value);\n\t}\n\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: CustomClassPropType): void {\n\t\tvalidateCustomClass(this, value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: DisabledPropType): void {\n\t\tvalidateDisabled(this, value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this, value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: IconsPropType): void {\n\t\tvalidateIcons(this, value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: IconsPropType): void {\n\t\tvalidateIcons(this, value);\n\t}\n\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: AlignPropType): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\tthis.validateHideLabel(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this, value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: ButtonCallbacksPropType<StencilUnknown>): void {\n\t\tvalidateButtonCallbacks(this, value);\n\t}\n\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativeButtonLinkRolePropType): void {\n\t\tvalidateAlternativeButtonLinkRole(this, value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tvalidateTooltipAlign(this, value);\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: ButtonTypePropType): void {\n\t\tvalidateButtonType(this, value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this, '_value', value);\n\t\tthis.controller.setFormAssociatedValue(this.state._value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: ButtonVariantPropType): void {\n\t\tvalidateButtonVariant(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateHideLabel(this._hideLabel || this._iconOnly);\n\t\tthis.validateIcons(this._icons || this._icon);\n\t\tthis.validateIconAlign(this._iconAlign);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label ?? this._ariaLabel); // explicitly allow empty string labels\n\t\tthis.validateName(this._name);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateSyncValueBySelector(this._syncValueBySelector);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateType(this._type);\n\t\tthis.validateValue(this._value);\n\t\tthis.validateVariant(this._variant);\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(){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(this._label||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,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};