@public-ui/components 2.0.1 → 2.0.2

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 (495) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js → InternalUnderlinedAccessKey-6642b2c7.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js.map → InternalUnderlinedAccessKey-6642b2c7.js.map} +1 -1
  4. package/dist/cjs/{a11y.tipps-5093e030.js → a11y.tipps-bde4c917.js} +1 -1
  5. package/dist/cjs/{a11y.tipps-5093e030.js.map → a11y.tipps-bde4c917.js.map} +1 -1
  6. package/dist/cjs/access-key-0cc8c925.js +4 -0
  7. package/dist/cjs/{access-key-08e22c70.js.map → access-key-0cc8c925.js.map} +1 -1
  8. package/dist/cjs/{align-floating-elements-dca98687.js → align-floating-elements-656b8edb.js} +1 -1
  9. package/dist/cjs/align-floating-elements-656b8edb.js.map +1 -0
  10. package/dist/cjs/{alignment-da95c567.js → alignment-ed625336.js} +1 -1
  11. package/dist/cjs/{alignment-da95c567.js.map → alignment-ed625336.js.map} +1 -1
  12. package/dist/cjs/alternative-button-link-role-d4424d08.js +4 -0
  13. package/dist/cjs/{alternative-button-link-role-46c7e9ff.js.map → alternative-button-link-role-d4424d08.js.map} +1 -1
  14. package/dist/cjs/{app-globals-dbba0fd7.js → app-globals-0b0132d3.js} +1 -1
  15. package/dist/cjs/{app-globals-dbba0fd7.js.map → app-globals-0b0132d3.js.map} +1 -1
  16. package/dist/cjs/{associated.controller-665c978d.js → associated.controller-b24b75d0.js} +1 -1
  17. package/dist/cjs/{associated.controller-665c978d.js.map → associated.controller-b24b75d0.js.map} +1 -1
  18. package/dist/cjs/{color-f3eb202a.js → color-7a4690e4.js} +1 -1
  19. package/dist/cjs/{color-f3eb202a.js.map → color-7a4690e4.js.map} +1 -1
  20. package/dist/cjs/{controller-3a053b42.js → controller-0ccb739c.js} +1 -1
  21. package/dist/cjs/{controller-3a053b42.js.map → controller-0ccb739c.js.map} +1 -1
  22. package/dist/cjs/{controller-318aaac7.js → controller-2d5e8b0b.js} +1 -1
  23. package/dist/cjs/{controller-318aaac7.js.map → controller-2d5e8b0b.js.map} +1 -1
  24. package/dist/cjs/{controller-5a5b8671.js → controller-3c7a8401.js} +1 -1
  25. package/dist/cjs/{controller-5a5b8671.js.map → controller-3c7a8401.js.map} +1 -1
  26. package/dist/cjs/{controller-8f3bdef3.js → controller-924d172b.js} +1 -1
  27. package/dist/cjs/{controller-8f3bdef3.js.map → controller-924d172b.js.map} +1 -1
  28. package/dist/cjs/{controller-644ec366.js → controller-e36ad432.js} +1 -1
  29. package/dist/cjs/{controller-644ec366.js.map → controller-e36ad432.js.map} +1 -1
  30. package/dist/cjs/{controller-icon-870a91fe.js → controller-icon-71e37377.js} +1 -1
  31. package/dist/cjs/{controller-icon-870a91fe.js.map → controller-icon-71e37377.js.map} +1 -1
  32. package/dist/cjs/custom-class-00d4c432.js +4 -0
  33. package/dist/cjs/{custom-class-fe018ec9.js.map → custom-class-00d4c432.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-dd133f0a.js → dev.utils-a6b6f115.js} +1 -1
  35. package/dist/cjs/dev.utils-a6b6f115.js.map +1 -0
  36. package/dist/cjs/devtools-5d316ec1.js +4 -0
  37. package/dist/cjs/devtools-5d316ec1.js.map +1 -0
  38. package/dist/cjs/has-closer-135c8b18.js +4 -0
  39. package/dist/cjs/{has-closer-e0792c7f.js.map → has-closer-135c8b18.js.map} +1 -1
  40. package/dist/cjs/hide-label-869c662f.js +4 -0
  41. package/dist/cjs/{hide-label-69a12ef6.js.map → hide-label-869c662f.js.map} +1 -1
  42. package/dist/cjs/{i18n-9b1797b5.js → i18n-3094a3c4.js} +1 -1
  43. package/dist/cjs/{i18n-9b1797b5.js.map → i18n-3094a3c4.js.map} +1 -1
  44. package/dist/cjs/{icons-7d782feb.js → icons-cd5e767b.js} +1 -1
  45. package/dist/cjs/{icons-7d782feb.js.map → icons-cd5e767b.js.map} +1 -1
  46. package/dist/cjs/image-source-4b6e0c0e.js +4 -0
  47. package/dist/cjs/{image-source-9b7df5ba.js.map → image-source-4b6e0c0e.js.map} +1 -1
  48. package/dist/cjs/index-3145a30d.js +4 -0
  49. package/dist/cjs/index-3145a30d.js.map +1 -0
  50. package/dist/cjs/{index-814a048a.js → index-e779e8b0.js} +1 -1
  51. package/dist/cjs/{index-814a048a.js.map → index-e779e8b0.js.map} +1 -1
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc_2.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-button-link-text-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  94. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  111. package/dist/cjs/kolibri.cjs.js +1 -1
  112. package/dist/cjs/kolibri.cjs.js.map +1 -1
  113. package/dist/cjs/{label-1ffb616a.js → label-a5fa1288.js} +1 -1
  114. package/dist/cjs/{label-1ffb616a.js.map → label-a5fa1288.js.map} +1 -1
  115. package/dist/cjs/loader.cjs.js +1 -1
  116. package/dist/cjs/open-ca19e687.js +4 -0
  117. package/dist/cjs/{open-4fe1ba4b.js.map → open-ca19e687.js.map} +1 -1
  118. package/dist/cjs/{prop.validators-85dcd797.js → prop.validators-03eee51d.js} +1 -1
  119. package/dist/cjs/{prop.validators-85dcd797.js.map → prop.validators-03eee51d.js.map} +1 -1
  120. package/dist/cjs/rows-7e3a7f8b.js +4 -0
  121. package/dist/cjs/{rows-e1b2cbc4.js.map → rows-7e3a7f8b.js.map} +1 -1
  122. package/dist/cjs/show-48f559f5.js +4 -0
  123. package/dist/cjs/{show-5514164d.js.map → show-48f559f5.js.map} +1 -1
  124. package/dist/cjs/suggestions-2d56c664.js +4 -0
  125. package/dist/cjs/{suggestions-c6f511ef.js.map → suggestions-2d56c664.js.map} +1 -1
  126. package/dist/cjs/{tab-index-9a2f9acd.js → tab-index-3943c150.js} +1 -1
  127. package/dist/cjs/{tab-index-9a2f9acd.js.map → tab-index-3943c150.js.map} +1 -1
  128. package/dist/cjs/{tooltip-align-231659b9.js → tooltip-align-d904bd68.js} +1 -1
  129. package/dist/cjs/{tooltip-align-231659b9.js.map → tooltip-align-d904bd68.js.map} +1 -1
  130. package/dist/cjs/{validation-fb5cac9f.js → validation-a0c362ef.js} +1 -1
  131. package/dist/cjs/{validation-fb5cac9f.js.map → validation-a0c362ef.js.map} +1 -1
  132. package/dist/cjs/{validation-ffe8a5ab.js → validation-c3b2105a.js} +1 -1
  133. package/dist/cjs/{validation-ffe8a5ab.js.map → validation-c3b2105a.js.map} +1 -1
  134. package/dist/components/align-floating-elements.js +1 -1
  135. package/dist/components/align-floating-elements.js.map +1 -1
  136. package/dist/components/color.js +1 -1
  137. package/dist/components/component.js +1 -1
  138. package/dist/components/component15.js +1 -1
  139. package/dist/components/component2.js +1 -1
  140. package/dist/components/component3.js +1 -1
  141. package/dist/components/component3.js.map +1 -1
  142. package/dist/components/component4.js +1 -1
  143. package/dist/components/component5.js +1 -1
  144. package/dist/components/component6.js +1 -1
  145. package/dist/components/component9.js +1 -1
  146. package/dist/components/controller.js +1 -1
  147. package/dist/components/controller2.js +1 -1
  148. package/dist/components/controller4.js +1 -1
  149. package/dist/components/devtools.js +1 -1
  150. package/dist/components/devtools.js.map +1 -1
  151. package/dist/components/has-closer.js +1 -1
  152. package/dist/components/i18n.js +1 -1
  153. package/dist/components/i18n.js.map +1 -1
  154. package/dist/components/image-source.js +1 -1
  155. package/dist/components/kol-form.js +1 -1
  156. package/dist/components/kol-image.js +1 -1
  157. package/dist/components/kol-input-checkbox.js +1 -1
  158. package/dist/components/kol-input-color.js +1 -1
  159. package/dist/components/kol-input-date.js +1 -1
  160. package/dist/components/kol-input-email.js +1 -1
  161. package/dist/components/kol-input-file.js +1 -1
  162. package/dist/components/kol-input-number.js +1 -1
  163. package/dist/components/kol-input-text.js +1 -1
  164. package/dist/components/kol-kolibri.js +1 -1
  165. package/dist/components/kol-modal.js +1 -1
  166. package/dist/components/kol-modal.js.map +1 -1
  167. package/dist/components/kol-nav.js +1 -1
  168. package/dist/components/kol-progress.js +1 -1
  169. package/dist/components/kol-quote.js +1 -1
  170. package/dist/components/kol-symbol.js +1 -1
  171. package/dist/components/kol-table.js +1 -1
  172. package/dist/components/kol-textarea.js +1 -1
  173. package/dist/components/label.js +1 -1
  174. package/dist/components/open.js +1 -1
  175. package/dist/components/prop.validators.js +1 -1
  176. package/dist/components/prop.validators.js.map +1 -1
  177. package/dist/components/show.js +1 -1
  178. package/dist/components/suggestions.js +1 -1
  179. package/dist/components/tab-index.js +1 -1
  180. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js → InternalUnderlinedAccessKey-3d146073.js} +1 -1
  181. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +1 -1
  182. package/dist/esm/{a11y.tipps-f367a979.js → a11y.tipps-f14bff66.js} +1 -1
  183. package/dist/esm/{a11y.tipps-f367a979.js.map → a11y.tipps-f14bff66.js.map} +1 -1
  184. package/dist/esm/{access-key-d70aa275.js → access-key-d9d3ed1b.js} +1 -1
  185. package/dist/esm/{access-key-d70aa275.js.map → access-key-d9d3ed1b.js.map} +1 -1
  186. package/dist/esm/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  187. package/dist/esm/align-floating-elements-e1edfaae.js.map +1 -0
  188. package/dist/esm/{alignment-493b6c84.js → alignment-3d2d9391.js} +1 -1
  189. package/dist/esm/{alignment-493b6c84.js.map → alignment-3d2d9391.js.map} +1 -1
  190. package/dist/esm/alternative-button-link-role-30b77bb6.js +4 -0
  191. package/dist/esm/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-30b77bb6.js.map} +1 -1
  192. package/dist/esm/app-globals-b8186895.js +4 -0
  193. package/dist/esm/{app-globals-f7f4352c.js.map → app-globals-b8186895.js.map} +1 -1
  194. package/dist/esm/{associated.controller-700d5133.js → associated.controller-e642039e.js} +1 -1
  195. package/dist/esm/{associated.controller-700d5133.js.map → associated.controller-e642039e.js.map} +1 -1
  196. package/dist/esm/{color-afc2e34f.js → color-d4c99af3.js} +1 -1
  197. package/dist/esm/{color-afc2e34f.js.map → color-d4c99af3.js.map} +1 -1
  198. package/dist/esm/{controller-17eb7878.js → controller-3577ccfd.js} +1 -1
  199. package/dist/esm/{controller-17eb7878.js.map → controller-3577ccfd.js.map} +1 -1
  200. package/dist/esm/{controller-60b830eb.js → controller-7d1c3e92.js} +1 -1
  201. package/dist/esm/{controller-60b830eb.js.map → controller-7d1c3e92.js.map} +1 -1
  202. package/dist/esm/{controller-6e772d91.js → controller-8698d9f4.js} +1 -1
  203. package/dist/esm/{controller-6e772d91.js.map → controller-8698d9f4.js.map} +1 -1
  204. package/dist/esm/{controller-ae07d1c7.js → controller-9df5563d.js} +1 -1
  205. package/dist/esm/{controller-ae07d1c7.js.map → controller-9df5563d.js.map} +1 -1
  206. package/dist/esm/{controller-e23535f2.js → controller-b2e189a7.js} +1 -1
  207. package/dist/esm/{controller-e23535f2.js.map → controller-b2e189a7.js.map} +1 -1
  208. package/dist/esm/{controller-icon-01cabd99.js → controller-icon-508a2cb1.js} +1 -1
  209. package/dist/esm/{controller-icon-01cabd99.js.map → controller-icon-508a2cb1.js.map} +1 -1
  210. package/dist/esm/custom-class-6cd3b804.js +4 -0
  211. package/dist/esm/{custom-class-603a7fda.js.map → custom-class-6cd3b804.js.map} +1 -1
  212. package/dist/esm/{dev.utils-da51d5d8.js → dev.utils-889226ab.js} +1 -1
  213. package/dist/esm/dev.utils-889226ab.js.map +1 -0
  214. package/dist/esm/devtools-cc168b70.js +4 -0
  215. package/dist/esm/devtools-cc168b70.js.map +1 -0
  216. package/dist/esm/{has-closer-091d5cc7.js → has-closer-0601d93e.js} +1 -1
  217. package/dist/esm/{has-closer-091d5cc7.js.map → has-closer-0601d93e.js.map} +1 -1
  218. package/dist/esm/{hide-label-e711f812.js → hide-label-6593df3f.js} +1 -1
  219. package/dist/esm/{hide-label-e711f812.js.map → hide-label-6593df3f.js.map} +1 -1
  220. package/dist/esm/{i18n-d92de40a.js → i18n-9a4c8edc.js} +1 -1
  221. package/dist/esm/{i18n-d92de40a.js.map → i18n-9a4c8edc.js.map} +1 -1
  222. package/dist/esm/{icons-1ad89985.js → icons-44b68720.js} +1 -1
  223. package/dist/esm/{icons-1ad89985.js.map → icons-44b68720.js.map} +1 -1
  224. package/dist/esm/{image-source-f76f6ad4.js → image-source-4b04e9f2.js} +1 -1
  225. package/dist/esm/{image-source-f76f6ad4.js.map → image-source-4b04e9f2.js.map} +1 -1
  226. package/dist/esm/index-12eec578.js +4 -0
  227. package/dist/esm/{index-9fc5c44a.js.map → index-12eec578.js.map} +1 -1
  228. package/dist/esm/index-5dfe6d77.js +4 -0
  229. package/dist/esm/index-5dfe6d77.js.map +1 -0
  230. package/dist/esm/index.js +1 -1
  231. package/dist/esm/kol-abbr.entry.js +1 -1
  232. package/dist/esm/kol-accordion.entry.js +1 -1
  233. package/dist/esm/kol-alert-wc_2.entry.js +1 -1
  234. package/dist/esm/kol-alert.entry.js +1 -1
  235. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  236. package/dist/esm/kol-avatar.entry.js +1 -1
  237. package/dist/esm/kol-badge.entry.js +1 -1
  238. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  239. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  240. package/dist/esm/kol-button-group.entry.js +1 -1
  241. package/dist/esm/kol-button-link-text-switch.entry.js +1 -1
  242. package/dist/esm/kol-button-link.entry.js +1 -1
  243. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  244. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  245. package/dist/esm/kol-button.entry.js +1 -1
  246. package/dist/esm/kol-card.entry.js +1 -1
  247. package/dist/esm/kol-details.entry.js +1 -1
  248. package/dist/esm/kol-form.entry.js +1 -1
  249. package/dist/esm/kol-heading.entry.js +1 -1
  250. package/dist/esm/kol-icon.entry.js +1 -1
  251. package/dist/esm/kol-image.entry.js +1 -1
  252. package/dist/esm/kol-indented-text.entry.js +1 -1
  253. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  254. package/dist/esm/kol-input-color.entry.js +1 -1
  255. package/dist/esm/kol-input-date.entry.js +1 -1
  256. package/dist/esm/kol-input-email.entry.js +1 -1
  257. package/dist/esm/kol-input-file.entry.js +1 -1
  258. package/dist/esm/kol-input-number.entry.js +1 -1
  259. package/dist/esm/kol-input-password.entry.js +1 -1
  260. package/dist/esm/kol-input-radio.entry.js +1 -1
  261. package/dist/esm/kol-input-range.entry.js +1 -1
  262. package/dist/esm/kol-input-text.entry.js +1 -1
  263. package/dist/esm/kol-input.entry.js +1 -1
  264. package/dist/esm/kol-kolibri.entry.js +1 -1
  265. package/dist/esm/kol-link-button.entry.js +1 -1
  266. package/dist/esm/kol-link-group.entry.js +1 -1
  267. package/dist/esm/kol-link-wc.entry.js +1 -1
  268. package/dist/esm/kol-link.entry.js +1 -1
  269. package/dist/esm/kol-logo.entry.js +1 -1
  270. package/dist/esm/kol-modal.entry.js +1 -1
  271. package/dist/esm/kol-modal.entry.js.map +1 -1
  272. package/dist/esm/kol-nav.entry.js +1 -1
  273. package/dist/esm/kol-pagination.entry.js +1 -1
  274. package/dist/esm/kol-popover-wc.entry.js +1 -1
  275. package/dist/esm/kol-progress.entry.js +1 -1
  276. package/dist/esm/kol-quote.entry.js +1 -1
  277. package/dist/esm/kol-select.entry.js +1 -1
  278. package/dist/esm/kol-skip-nav.entry.js +1 -1
  279. package/dist/esm/kol-span-wc.entry.js +1 -1
  280. package/dist/esm/kol-span.entry.js +1 -1
  281. package/dist/esm/kol-spin.entry.js +1 -1
  282. package/dist/esm/kol-split-button.entry.js +1 -1
  283. package/dist/esm/kol-symbol.entry.js +1 -1
  284. package/dist/esm/kol-table.entry.js +1 -1
  285. package/dist/esm/kol-tabs.entry.js +1 -1
  286. package/dist/esm/kol-textarea.entry.js +1 -1
  287. package/dist/esm/kol-toast-container.entry.js +1 -1
  288. package/dist/esm/kol-version.entry.js +1 -1
  289. package/dist/esm/kolibri.js +1 -1
  290. package/dist/esm/kolibri.js.map +1 -1
  291. package/dist/esm/{label-8ddb917e.js → label-8258848f.js} +1 -1
  292. package/dist/esm/{label-8ddb917e.js.map → label-8258848f.js.map} +1 -1
  293. package/dist/esm/loader.js +1 -1
  294. package/dist/esm/{open-0bdcff02.js → open-329b7907.js} +1 -1
  295. package/dist/esm/{open-0bdcff02.js.map → open-329b7907.js.map} +1 -1
  296. package/dist/esm/{prop.validators-f887ad3b.js → prop.validators-c12923a5.js} +1 -1
  297. package/dist/esm/{prop.validators-f887ad3b.js.map → prop.validators-c12923a5.js.map} +1 -1
  298. package/dist/esm/{rows-77cd583c.js → rows-14d6fb92.js} +1 -1
  299. package/dist/esm/{rows-77cd583c.js.map → rows-14d6fb92.js.map} +1 -1
  300. package/dist/esm/{show-8341c904.js → show-9a06c90e.js} +1 -1
  301. package/dist/esm/{show-8341c904.js.map → show-9a06c90e.js.map} +1 -1
  302. package/dist/esm/{suggestions-40d68773.js → suggestions-dc12a293.js} +1 -1
  303. package/dist/esm/{suggestions-40d68773.js.map → suggestions-dc12a293.js.map} +1 -1
  304. package/dist/esm/{tab-index-2206620f.js → tab-index-9e8a3c00.js} +1 -1
  305. package/dist/esm/{tab-index-2206620f.js.map → tab-index-9e8a3c00.js.map} +1 -1
  306. package/dist/esm/{tooltip-align-00398d75.js → tooltip-align-a3d27a89.js} +1 -1
  307. package/dist/esm/{tooltip-align-00398d75.js.map → tooltip-align-a3d27a89.js.map} +1 -1
  308. package/dist/esm/validation-17e52787.js +4 -0
  309. package/dist/esm/{validation-34db9bcf.js.map → validation-17e52787.js.map} +1 -1
  310. package/dist/esm/{validation-503191a4.js → validation-3c0b31d7.js} +1 -1
  311. package/dist/esm/{validation-503191a4.js.map → validation-3c0b31d7.js.map} +1 -1
  312. package/dist/kolibri/InternalUnderlinedAccessKey-3d146073.js +4 -0
  313. package/dist/kolibri/{a11y.tipps-f367a979.js → a11y.tipps-f14bff66.js} +1 -1
  314. package/dist/kolibri/access-key-d9d3ed1b.js +4 -0
  315. package/dist/kolibri/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  316. package/dist/kolibri/{align-floating-elements-cadb5c5b.js.map → align-floating-elements-e1edfaae.js.map} +1 -1
  317. package/dist/kolibri/{alignment-493b6c84.js → alignment-3d2d9391.js} +1 -1
  318. package/dist/kolibri/alternative-button-link-role-30b77bb6.js +4 -0
  319. package/dist/kolibri/app-globals-b8186895.js +4 -0
  320. package/dist/kolibri/{app-globals-f7f4352c.js.map → app-globals-b8186895.js.map} +1 -1
  321. package/dist/kolibri/{associated.controller-700d5133.js → associated.controller-e642039e.js} +1 -1
  322. package/dist/kolibri/{color-afc2e34f.js → color-d4c99af3.js} +1 -1
  323. package/dist/kolibri/{controller-17eb7878.js → controller-3577ccfd.js} +1 -1
  324. package/dist/kolibri/{controller-60b830eb.js → controller-7d1c3e92.js} +1 -1
  325. package/dist/kolibri/{controller-6e772d91.js → controller-8698d9f4.js} +1 -1
  326. package/dist/kolibri/{controller-ae07d1c7.js → controller-9df5563d.js} +1 -1
  327. package/dist/kolibri/{controller-e23535f2.js → controller-b2e189a7.js} +1 -1
  328. package/dist/kolibri/controller-icon-508a2cb1.js +4 -0
  329. package/dist/kolibri/custom-class-6cd3b804.js +4 -0
  330. package/dist/kolibri/{dev.utils-da51d5d8.js → dev.utils-889226ab.js} +1 -1
  331. package/dist/kolibri/dev.utils-889226ab.js.map +1 -0
  332. package/dist/kolibri/devtools-cc168b70.js +4 -0
  333. package/dist/kolibri/devtools-cc168b70.js.map +1 -0
  334. package/dist/kolibri/has-closer-0601d93e.js +4 -0
  335. package/dist/kolibri/hide-label-6593df3f.js +4 -0
  336. package/dist/kolibri/{i18n-d92de40a.js → i18n-9a4c8edc.js} +1 -1
  337. package/dist/kolibri/{icons-1ad89985.js → icons-44b68720.js} +1 -1
  338. package/dist/kolibri/image-source-4b04e9f2.js +4 -0
  339. package/dist/kolibri/{index-9fc5c44a.js → index-12eec578.js} +1 -1
  340. package/dist/kolibri/index-12eec578.js.map +1 -0
  341. package/dist/kolibri/index-5dfe6d77.js +5 -0
  342. package/dist/kolibri/index-5dfe6d77.js.map +1 -0
  343. package/dist/kolibri/index.esm.js +1 -1
  344. package/dist/kolibri/kol-abbr.entry.js +1 -1
  345. package/dist/kolibri/kol-accordion.entry.js +1 -1
  346. package/dist/kolibri/kol-alert-wc_2.entry.js +1 -1
  347. package/dist/kolibri/kol-alert.entry.js +1 -1
  348. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  349. package/dist/kolibri/kol-avatar.entry.js +1 -1
  350. package/dist/kolibri/kol-badge.entry.js +1 -1
  351. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  352. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  353. package/dist/kolibri/kol-button-group.entry.js +1 -1
  354. package/dist/kolibri/kol-button-link-text-switch.entry.js +1 -1
  355. package/dist/kolibri/kol-button-link.entry.js +1 -1
  356. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  357. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  358. package/dist/kolibri/kol-button.entry.js +1 -1
  359. package/dist/kolibri/kol-card.entry.js +1 -1
  360. package/dist/kolibri/kol-details.entry.js +1 -1
  361. package/dist/kolibri/kol-form.entry.js +1 -1
  362. package/dist/kolibri/kol-heading.entry.js +1 -1
  363. package/dist/kolibri/kol-icon.entry.js +1 -1
  364. package/dist/kolibri/kol-image.entry.js +1 -1
  365. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  366. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  367. package/dist/kolibri/kol-input-color.entry.js +1 -1
  368. package/dist/kolibri/kol-input-date.entry.js +1 -1
  369. package/dist/kolibri/kol-input-email.entry.js +1 -1
  370. package/dist/kolibri/kol-input-file.entry.js +1 -1
  371. package/dist/kolibri/kol-input-number.entry.js +1 -1
  372. package/dist/kolibri/kol-input-password.entry.js +1 -1
  373. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  374. package/dist/kolibri/kol-input-range.entry.js +1 -1
  375. package/dist/kolibri/kol-input-text.entry.js +1 -1
  376. package/dist/kolibri/kol-input.entry.js +1 -1
  377. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  378. package/dist/kolibri/kol-link-button.entry.js +1 -1
  379. package/dist/kolibri/kol-link-group.entry.js +1 -1
  380. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  381. package/dist/kolibri/kol-link.entry.js +1 -1
  382. package/dist/kolibri/kol-logo.entry.js +1 -1
  383. package/dist/kolibri/kol-modal.entry.js +1 -1
  384. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  385. package/dist/kolibri/kol-nav.entry.js +1 -1
  386. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  387. package/dist/kolibri/kol-pagination.entry.js +1 -1
  388. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  389. package/dist/kolibri/kol-progress.entry.js +1 -1
  390. package/dist/kolibri/kol-quote.entry.js +1 -1
  391. package/dist/kolibri/kol-select.entry.js +1 -1
  392. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  393. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  394. package/dist/kolibri/kol-span.entry.js +1 -1
  395. package/dist/kolibri/kol-spin.entry.js +1 -1
  396. package/dist/kolibri/kol-split-button.entry.js +1 -1
  397. package/dist/kolibri/kol-symbol.entry.js +1 -1
  398. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  399. package/dist/kolibri/kol-table.entry.js +1 -1
  400. package/dist/kolibri/kol-tabs.entry.js +1 -1
  401. package/dist/kolibri/kol-textarea.entry.js +1 -1
  402. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  403. package/dist/kolibri/kol-version.entry.js +1 -1
  404. package/dist/kolibri/kolibri.esm.js +1 -1
  405. package/dist/kolibri/kolibri.esm.js.map +1 -1
  406. package/dist/kolibri/{label-8ddb917e.js → label-8258848f.js} +1 -1
  407. package/dist/kolibri/open-329b7907.js +4 -0
  408. package/dist/kolibri/{prop.validators-f887ad3b.js → prop.validators-c12923a5.js} +1 -1
  409. package/dist/kolibri/rows-14d6fb92.js +4 -0
  410. package/dist/kolibri/show-9a06c90e.js +4 -0
  411. package/dist/kolibri/{suggestions-40d68773.js → suggestions-dc12a293.js} +1 -1
  412. package/dist/kolibri/tab-index-9e8a3c00.js +4 -0
  413. package/dist/kolibri/{tab-index-2206620f.js.map → tab-index-9e8a3c00.js.map} +1 -1
  414. package/dist/kolibri/tooltip-align-a3d27a89.js +4 -0
  415. package/dist/kolibri/validation-17e52787.js +4 -0
  416. package/dist/kolibri/{validation-503191a4.js → validation-3c0b31d7.js} +1 -1
  417. package/dist/types/utils/dev.utils.d.ts +2 -2
  418. package/doc/toaster.md +6 -0
  419. package/package.json +1 -1
  420. package/dist/cjs/access-key-08e22c70.js +0 -4
  421. package/dist/cjs/align-floating-elements-dca98687.js.map +0 -1
  422. package/dist/cjs/alternative-button-link-role-46c7e9ff.js +0 -4
  423. package/dist/cjs/custom-class-fe018ec9.js +0 -4
  424. package/dist/cjs/dev.utils-dd133f0a.js.map +0 -1
  425. package/dist/cjs/devtools-59e9f930.js +0 -4
  426. package/dist/cjs/devtools-59e9f930.js.map +0 -1
  427. package/dist/cjs/has-closer-e0792c7f.js +0 -4
  428. package/dist/cjs/hide-label-69a12ef6.js +0 -4
  429. package/dist/cjs/image-source-9b7df5ba.js +0 -4
  430. package/dist/cjs/index-de77e597.js +0 -5
  431. package/dist/cjs/index-de77e597.js.map +0 -1
  432. package/dist/cjs/open-4fe1ba4b.js +0 -4
  433. package/dist/cjs/rows-e1b2cbc4.js +0 -4
  434. package/dist/cjs/show-5514164d.js +0 -4
  435. package/dist/cjs/suggestions-c6f511ef.js +0 -4
  436. package/dist/esm/align-floating-elements-cadb5c5b.js.map +0 -1
  437. package/dist/esm/alternative-button-link-role-0fc029bf.js +0 -4
  438. package/dist/esm/app-globals-f7f4352c.js +0 -4
  439. package/dist/esm/custom-class-603a7fda.js +0 -4
  440. package/dist/esm/dev.utils-da51d5d8.js.map +0 -1
  441. package/dist/esm/devtools-308d0386.js +0 -4
  442. package/dist/esm/devtools-308d0386.js.map +0 -1
  443. package/dist/esm/index-6ea18cec.js +0 -5
  444. package/dist/esm/index-6ea18cec.js.map +0 -1
  445. package/dist/esm/index-9fc5c44a.js +0 -4
  446. package/dist/esm/validation-34db9bcf.js +0 -4
  447. package/dist/kolibri/InternalUnderlinedAccessKey-e3698cee.js +0 -4
  448. package/dist/kolibri/access-key-d70aa275.js +0 -4
  449. package/dist/kolibri/alternative-button-link-role-0fc029bf.js +0 -4
  450. package/dist/kolibri/app-globals-f7f4352c.js +0 -4
  451. package/dist/kolibri/controller-icon-01cabd99.js +0 -4
  452. package/dist/kolibri/custom-class-603a7fda.js +0 -4
  453. package/dist/kolibri/dev.utils-da51d5d8.js.map +0 -1
  454. package/dist/kolibri/devtools-308d0386.js +0 -4
  455. package/dist/kolibri/devtools-308d0386.js.map +0 -1
  456. package/dist/kolibri/has-closer-091d5cc7.js +0 -4
  457. package/dist/kolibri/hide-label-e711f812.js +0 -4
  458. package/dist/kolibri/image-source-f76f6ad4.js +0 -4
  459. package/dist/kolibri/index-6ea18cec.js +0 -5
  460. package/dist/kolibri/index-6ea18cec.js.map +0 -1
  461. package/dist/kolibri/index-9fc5c44a.js.map +0 -1
  462. package/dist/kolibri/open-0bdcff02.js +0 -4
  463. package/dist/kolibri/rows-77cd583c.js +0 -4
  464. package/dist/kolibri/show-8341c904.js +0 -4
  465. package/dist/kolibri/tab-index-2206620f.js +0 -4
  466. package/dist/kolibri/tooltip-align-00398d75.js +0 -4
  467. package/dist/kolibri/validation-34db9bcf.js +0 -4
  468. /package/dist/kolibri/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +0 -0
  469. /package/dist/kolibri/{a11y.tipps-f367a979.js.map → a11y.tipps-f14bff66.js.map} +0 -0
  470. /package/dist/kolibri/{access-key-d70aa275.js.map → access-key-d9d3ed1b.js.map} +0 -0
  471. /package/dist/kolibri/{alignment-493b6c84.js.map → alignment-3d2d9391.js.map} +0 -0
  472. /package/dist/kolibri/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-30b77bb6.js.map} +0 -0
  473. /package/dist/kolibri/{associated.controller-700d5133.js.map → associated.controller-e642039e.js.map} +0 -0
  474. /package/dist/kolibri/{color-afc2e34f.js.map → color-d4c99af3.js.map} +0 -0
  475. /package/dist/kolibri/{controller-17eb7878.js.map → controller-3577ccfd.js.map} +0 -0
  476. /package/dist/kolibri/{controller-60b830eb.js.map → controller-7d1c3e92.js.map} +0 -0
  477. /package/dist/kolibri/{controller-6e772d91.js.map → controller-8698d9f4.js.map} +0 -0
  478. /package/dist/kolibri/{controller-ae07d1c7.js.map → controller-9df5563d.js.map} +0 -0
  479. /package/dist/kolibri/{controller-e23535f2.js.map → controller-b2e189a7.js.map} +0 -0
  480. /package/dist/kolibri/{controller-icon-01cabd99.js.map → controller-icon-508a2cb1.js.map} +0 -0
  481. /package/dist/kolibri/{custom-class-603a7fda.js.map → custom-class-6cd3b804.js.map} +0 -0
  482. /package/dist/kolibri/{has-closer-091d5cc7.js.map → has-closer-0601d93e.js.map} +0 -0
  483. /package/dist/kolibri/{hide-label-e711f812.js.map → hide-label-6593df3f.js.map} +0 -0
  484. /package/dist/kolibri/{i18n-d92de40a.js.map → i18n-9a4c8edc.js.map} +0 -0
  485. /package/dist/kolibri/{icons-1ad89985.js.map → icons-44b68720.js.map} +0 -0
  486. /package/dist/kolibri/{image-source-f76f6ad4.js.map → image-source-4b04e9f2.js.map} +0 -0
  487. /package/dist/kolibri/{label-8ddb917e.js.map → label-8258848f.js.map} +0 -0
  488. /package/dist/kolibri/{open-0bdcff02.js.map → open-329b7907.js.map} +0 -0
  489. /package/dist/kolibri/{prop.validators-f887ad3b.js.map → prop.validators-c12923a5.js.map} +0 -0
  490. /package/dist/kolibri/{rows-77cd583c.js.map → rows-14d6fb92.js.map} +0 -0
  491. /package/dist/kolibri/{show-8341c904.js.map → show-9a06c90e.js.map} +0 -0
  492. /package/dist/kolibri/{suggestions-40d68773.js.map → suggestions-dc12a293.js.map} +0 -0
  493. /package/dist/kolibri/{tooltip-align-00398d75.js.map → tooltip-align-a3d27a89.js.map} +0 -0
  494. /package/dist/kolibri/{validation-34db9bcf.js.map → validation-17e52787.js.map} +0 -0
  495. /package/dist/kolibri/{validation-503191a4.js.map → validation-3c0b31d7.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as autoUpdate,b as alignFloatingElements,c as validateAlign}from"./align-floating-elements.js";import{f as watchString,m as getDocument,n as nonce}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateAccessKey,d as defineCustomElement$1}from"./component2.js";import{d as defineCustomElement$2}from"./component.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const styleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tkol-tooltip-wc {\n\t\tdisplay: contents;\n\t}\n\n\tkol-tooltip-wc .tooltip-floating {\n\t\tanimation-duration: 0.5s;\n\t\tanimation-iteration-count: 1;\n\t\tanimation-name: fadeInOpacity;\n\t\tanimation-timing-function: ease-in;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tvisibility: hidden;\n\t\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tmax-width: 90vw;\n\t\tmax-height: 90vh;\n\t\twidth: var(--kol-tooltip-width); /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n\t}\n\n\t/* Shared between content and arrow */\n\tkol-tooltip-wc .tooltip-area {\n\t\tbackground-color: #fff;\n\t\tcolor: #000;\n\t}\n\n\tkol-tooltip-wc .tooltip-arrow {\n\t\theight: 10px;\n\t\tposition: absolute;\n\t\ttransform: rotate(45deg);\n\t\twidth: 10px;\n\t\tz-index: 999;\n\t}\n\n\tkol-tooltip-wc .tooltip-content {\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n",KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("focusin",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("focusin",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.resyncListeners=(t,e,n=!1)=>{t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._accessKey=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:"…"}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}render(){return h(Host,null,""!==this.state._label&&h("div",{class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h("kol-span-wc",{class:"tooltip-area tooltip-content",id:this.state._id,_accessKey:this._accessKey,_label:this.state._label})))}validateAccessKey(t){validateAccessKey(this,t)}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,this.handleEventListeners()}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return styleCss}},[0,"kol-tooltip-wc",{_accessKey:[1,"_access-key"],_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip-wc","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip-wc":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolTooltip as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as autoUpdate,b as alignFloatingElements,c as validateAlign}from"./align-floating-elements.js";import{b as watchString,m as getDocument,n as nonce}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateAccessKey,d as defineCustomElement$1}from"./component2.js";import{d as defineCustomElement$2}from"./component.js";const validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach((t=>{t.style.setProperty("z-index","999")})),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const styleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tkol-tooltip-wc {\n\t\tdisplay: contents;\n\t}\n\n\tkol-tooltip-wc .tooltip-floating {\n\t\tanimation-duration: 0.5s;\n\t\tanimation-iteration-count: 1;\n\t\tanimation-name: fadeInOpacity;\n\t\tanimation-timing-function: ease-in;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: fixed;\n\t\tvisibility: hidden;\n\t\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tmax-width: 90vw;\n\t\tmax-height: 90vh;\n\t\twidth: var(--kol-tooltip-width); /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n\t}\n\n\t/* Shared between content and arrow */\n\tkol-tooltip-wc .tooltip-area {\n\t\tbackground-color: #fff;\n\t\tcolor: #000;\n\t}\n\n\tkol-tooltip-wc .tooltip-arrow {\n\t\theight: 10px;\n\t\tposition: fixed;\n\t\ttransform: rotate(45deg);\n\t\twidth: 10px;\n\t\tz-index: 999;\n\t}\n\n\tkol-tooltip-wc .tooltip-content {\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n",KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),getDocument().addEventListener("keyup",this.hideTooltipByEscape);const t=this.previousSibling,e=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(t,e,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(hideOverlay(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("focusin",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("focusin",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount),t.addEventListener("focusout",this.decrementOverFocusCount)},this.resyncListeners=(t,e,n=!1)=>{t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._accessKey=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:"…"}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}render(){return h(Host,null,""!==this.state._label&&h("div",{class:"tooltip-floating",ref:this.catchTooltipElement},h("div",{class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),h("kol-span-wc",{class:"tooltip-area tooltip-content",id:this.state._id,_accessKey:this._accessKey,_label:this.state._label})))}validateAccessKey(t){validateAccessKey(this,t)}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,this.handleEventListeners()}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return styleCss}},[0,"kol-tooltip-wc",{_accessKey:[1,"_access-key"],_align:[1],_id:[1],_label:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip-wc","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip-wc":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolTooltip as K,defineCustomElement as d};
@@ -1 +1 @@
1
- {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CAAC;YAC3C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;SACjC;QACD,IAAI,IAAI,CAAC,cAAc,EAAmC;YACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC9B;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/types/props/id.ts","src/utils/overlay.ts","src/components/tooltip/style.css?tag=kol-tooltip-wc","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","@import url(../style.css);\n@layer kol-component {\n\tkol-tooltip-wc {\n\t\tdisplay: contents;\n\t}\n\n\tkol-tooltip-wc .tooltip-floating {\n\t\tanimation-duration: 0.5s;\n\t\tanimation-iteration-count: 1;\n\t\tanimation-name: fadeInOpacity;\n\t\tanimation-timing-function: ease-in;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tvisibility: hidden;\n\t\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tmax-width: 90vw;\n\t\tmax-height: 90vh;\n\t\twidth: var(--kol-tooltip-width); /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n\t}\n\n\t/* Shared between content and arrow */\n\tkol-tooltip-wc .tooltip-area {\n\t\tbackground-color: #fff;\n\t\tcolor: #000;\n\t}\n\n\tkol-tooltip-wc .tooltip-arrow {\n\t\theight: 10px;\n\t\tposition: absolute;\n\t\ttransform: rotate(45deg);\n\t\twidth: 10px;\n\t\tz-index: 999;\n\t}\n\n\tkol-tooltip-wc .tooltip-content {\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { AlignPropType, validateAlign } from '../../types/props/align';\nimport { IdPropType, validateId } from '../../types/props/id';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { API, States } from './types';\nimport { AccessKeyPropType, validateAccessKey } from '../../types/props/access-key';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\n\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tstyleUrl: './style.css',\n\tshadow: false,\n})\nexport class KolTooltip implements API {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.addEventListener('focus', this.incrementOverFocusCount);\n\t\tel.addEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.addEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.addEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focus', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.removeEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.removeEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"tooltip-floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"tooltip-area tooltip-arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<kol-span-wc class=\"tooltip-area tooltip-content\" id={this.state._id} _accessKey={this._accessKey} _label={this.state._label}></kol-span-wc>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '…', // ⚠ required\n\t};\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: AccessKeyPropType): void {\n\t\tvalidateAccessKey(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tprivate overFocusCount = 0;\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate incrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount++;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate decrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount--;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.overFocusTimeout);\n\t\t\tif (this.overFocusCount > 0) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}, 250);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t\tthis.handleEventListeners();\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"component3.js","mappings":";;;;;;;;;;AAeO,MAAM,UAAU,GAAG,CAAC,SAAoC,EAAE,KAAkB;IAClF,WAAW,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC;;ACVD,MAAM,gBAAgB,GAAqB,IAAI,GAAG,EAAE,CAAC;SASrC,WAAW,CAAC,OAAoB;IAC/C,gBAAgB,CAAC,OAAO,CAAC,CAAC,cAAc;QACvC,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KACnD,CAAC,CAAC;IACH,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;SASe,WAAW,CAAC,OAAoB;IAC/C,gBAAgB,CAAC,MAAM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AC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;IAEO,oBAAoB;;QAC3B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACpF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;KAC/D;IAEM,iBAAiB;;QACvB,IAAI,CAAC,eAAe,GAAG,MAAA,IAAI,CAAC,IAAI,0CAAE,sBAAsB,CAAC;QACzD,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC5B;IAEM,kBAAkB;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC5B;IAKM,oBAAoB;QAC1B,IAAI,IAAI,CAAC,eAAe,EAAmC;YAC1D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC3C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;SACjC;QACD,IAAI,IAAI,CAAC,cAAc,EAAmC;YACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC9B;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/types/props/id.ts","src/utils/overlay.ts","src/components/tooltip/style.css?tag=kol-tooltip-wc","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","@import url(../style.css);\n@layer kol-component {\n\tkol-tooltip-wc {\n\t\tdisplay: contents;\n\t}\n\n\tkol-tooltip-wc .tooltip-floating {\n\t\tanimation-duration: 0.5s;\n\t\tanimation-iteration-count: 1;\n\t\tanimation-name: fadeInOpacity;\n\t\tanimation-timing-function: ease-in;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: fixed;\n\t\tvisibility: hidden;\n\t\t/* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tmax-width: 90vw;\n\t\tmax-height: 90vh;\n\t\twidth: var(--kol-tooltip-width); /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n\t}\n\n\t/* Shared between content and arrow */\n\tkol-tooltip-wc .tooltip-area {\n\t\tbackground-color: #fff;\n\t\tcolor: #000;\n\t}\n\n\tkol-tooltip-wc .tooltip-arrow {\n\t\theight: 10px;\n\t\tposition: fixed;\n\t\ttransform: rotate(45deg);\n\t\twidth: 10px;\n\t\tz-index: 999;\n\t}\n\n\tkol-tooltip-wc .tooltip-content {\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { AlignPropType, validateAlign } from '../../types/props/align';\nimport { IdPropType, validateId } from '../../types/props/id';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { API, States } from './types';\nimport { AccessKeyPropType, validateAccessKey } from '../../types/props/access-key';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\n\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tstyleUrl: './style.css',\n\tshadow: false,\n})\nexport class KolTooltip implements API {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape);\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.addEventListener('focus', this.incrementOverFocusCount);\n\t\tel.addEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.addEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.addEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseover', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focus', this.incrementOverFocusCount);\n\t\tel.removeEventListener('focusin', this.incrementOverFocusCount);\n\t\tel.removeEventListener('mouseout', this.decrementOverFocusCount);\n\t\tel.removeEventListener('blur', this.decrementOverFocusCount);\n\t\tel.addEventListener('focusout', this.decrementOverFocusCount);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"tooltip-floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"tooltip-area tooltip-arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<kol-span-wc class=\"tooltip-area tooltip-content\" id={this.state._id} _accessKey={this._accessKey} _label={this.state._label}></kol-span-wc>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '…', // ⚠ required\n\t};\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: AccessKeyPropType): void {\n\t\tvalidateAccessKey(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tprivate overFocusCount = 0;\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate incrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount++;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate decrementOverFocusCount = (): void => {\n\t\tthis.overFocusCount--;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.overFocusTimeout);\n\t\t\tif (this.overFocusCount > 0) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}, 250);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tthis.resyncListeners(this.previousSibling, this.host?.previousElementSibling, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling;\n\t\tthis.handleEventListeners();\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as validateLabelWithExpertSlot}from"./label.js";import{w as watchValidator,f as watchString}from"./prop.validators.js";const headingLevelOptions=[0,1,2,3,4,5,6],watchHeadingLevel=(e,a)=>{watchValidator(e,"_level",(e=>"number"==typeof e&&headingLevelOptions.includes(e)),new Set([`Number {${headingLevelOptions.join(", ")}`]),a,{defaultValue:1,required:!0})},headingVariantPropTypeOptions=["h1","h2","h3","h4","h5","h6","strong"],validateHeadingVariant=(e,a)=>{watchValidator(e,"_variant",(e=>"string"==typeof e&&headingVariantPropTypeOptions.includes(e)),new Set([`KoliBriHeadingVariant {${headingVariantPropTypeOptions.join(", ")}`]),a)},KolHeadingWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.renderHeadline=(e,a)=>{const t="number"==typeof a&&a>0&&a<=6?`h${a}`:"strong",i=this._variant||t;return h(t,{class:{headline:!0,[`headline-${i}`]:!0}},e,h("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,a)=>{switch(a){case 1:return h("span",{class:"secondary-headline"},e);case 2:return h("h2",{class:"secondary-headline"},e);case 3:return h("h3",{class:"secondary-headline"},e);case 4:return h("h4",{class:"secondary-headline"},e);case 5:return h("h5",{class:"secondary-headline"},e);case 6:return h("h6",{class:"secondary-headline"},e);default:return h("strong",{class:"secondary-headline"},e)}},this._label=void 0,this._level=1,this._secondaryHeadline=void 0,this._variant=void 0,this.state={_label:"",_level:1}}validateLabel(e){validateLabelWithExpertSlot(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateSecondaryHeadline(e){watchString(this,"_secondaryHeadline",e)}validateVariant(e){validateHeadingVariant(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline),this.validateVariant(this._variant)}render(){return h(Host,null,"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?h("hgroup",null,this.renderHeadline(this.state._label,this.state._level),this.state._secondaryHeadline&&this.renderSecondaryHeadline(this.state._secondaryHeadline,this.state._level+1)):this.renderHeadline(this.state._label,this.state._level))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"],_variant:["validateVariant"]}}},[4,"kol-heading-wc",{_label:[1],_level:[2],_secondaryHeadline:[1,"_secondary-headline"],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-heading-wc"].forEach((e=>{if("kol-heading-wc"===e)customElements.get(e)||customElements.define(e,KolHeadingWc)}))}export{KolHeadingWc as K,defineCustomElement as d,watchHeadingLevel as w};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as validateLabelWithExpertSlot}from"./label.js";import{w as watchValidator,b as watchString}from"./prop.validators.js";const headingLevelOptions=[0,1,2,3,4,5,6],watchHeadingLevel=(e,a)=>{watchValidator(e,"_level",(e=>"number"==typeof e&&headingLevelOptions.includes(e)),new Set([`Number {${headingLevelOptions.join(", ")}`]),a,{defaultValue:1,required:!0})},headingVariantPropTypeOptions=["h1","h2","h3","h4","h5","h6","strong"],validateHeadingVariant=(e,a)=>{watchValidator(e,"_variant",(e=>"string"==typeof e&&headingVariantPropTypeOptions.includes(e)),new Set([`KoliBriHeadingVariant {${headingVariantPropTypeOptions.join(", ")}`]),a)},KolHeadingWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.renderHeadline=(e,a)=>{const t="number"==typeof a&&a>0&&a<=6?`h${a}`:"strong",i=this._variant||t;return h(t,{class:{headline:!0,[`headline-${i}`]:!0}},e,h("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,a)=>{switch(a){case 1:return h("span",{class:"secondary-headline"},e);case 2:return h("h2",{class:"secondary-headline"},e);case 3:return h("h3",{class:"secondary-headline"},e);case 4:return h("h4",{class:"secondary-headline"},e);case 5:return h("h5",{class:"secondary-headline"},e);case 6:return h("h6",{class:"secondary-headline"},e);default:return h("strong",{class:"secondary-headline"},e)}},this._label=void 0,this._level=1,this._secondaryHeadline=void 0,this._variant=void 0,this.state={_label:"",_level:1}}validateLabel(e){validateLabelWithExpertSlot(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateSecondaryHeadline(e){watchString(this,"_secondaryHeadline",e)}validateVariant(e){validateHeadingVariant(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline),this.validateVariant(this._variant)}render(){return h(Host,null,"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?h("hgroup",null,this.renderHeadline(this.state._label,this.state._level),this.state._secondaryHeadline&&this.renderSecondaryHeadline(this.state._secondaryHeadline,this.state._level+1)):this.renderHeadline(this.state._label,this.state._level))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"],_variant:["validateVariant"]}}},[4,"kol-heading-wc",{_label:[1],_level:[2],_secondaryHeadline:[1,"_secondary-headline"],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-heading-wc"].forEach((e=>{if("kol-heading-wc"===e)customElements.get(e)||customElements.define(e,KolHeadingWc)}))}export{KolHeadingWc as K,defineCustomElement as d,watchHeadingLevel as w};
@@ -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 validateAlternativeButtonLinkRole,a as validateTabIndex}from"./tab-index.js";import{f as watchString,g as watchBoolean,w as watchValidator,v as setEventTarget,K as KoliBriDevHelper,x as getExperimentalMode,d as devHint,y as devWarning,z as mapBoolean2String,A as mapStringOrBoolean2String,r as propagateFocus,B as a11yHintDisabled,t as setState,s as showExpertSlot}from"./prop.validators.js";import{v as validateAccessKey,a as validateHideLabel,b as validateIcons,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 validateAriaControls=(t,e)=>{watchString(t,"_ariaControls",e)},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)},buttonTypePropTypeOptions=["button","reset","submit"],validateButtonType=(t,e)=>{watchValidator(t,"_type",(t=>"string"==typeof t&&buttonTypePropTypeOptions.includes(t)),new Set([`KoliBriButtonType {${buttonTypePropTypeOptions.join(", ")}`]),e)},buttonVariantPropTypeOptions=["primary","secondary","normal","tertiary","danger","ghost","custom"],validateButtonVariant=(t,e)=>{watchValidator(t,"_variant",(t=>"string"==typeof t&&buttonVariantPropTypeOptions.includes(t)),new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(", ")}`]),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;){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}getExperimentalMode()&&(console.log(t),devHint("↑ Search form element finished."))}return 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),i.submit();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 validateAriaSelected=(t,e)=>{watchBoolean(t,"_ariaSelected",e)},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||void 0,"aria-controls":this.state._ariaControls,"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:{button:!0,[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",{class:"button-inner",_accessKey:this.state._accessKey,_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,_accessKey:this._accessKey,_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._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=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){validateAccessKey(this,t)}validateAriaControls(t){validateAriaControls(this,t)}validateAriaExpanded(t){validateAriaExpanded(this,t)}validateAriaSelected(t){validateAriaSelected(this,t)}validateCustomClass(t){validateCustomClass(this,t)}validateDisabled(t){validateDisabled(this,t),!0===t&&a11yHintDisabled()}validateHideLabel(t){validateHideLabel(this,t)}validateIcons(t){validateIcons(this,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.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),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"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_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"],_ariaExpanded:[4,"_aria-expanded"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_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"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_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,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 validateAlternativeButtonLinkRole,a as validateTabIndex}from"./tab-index.js";import{b as watchString,f as watchBoolean,w as watchValidator,v as setEventTarget,K as KoliBriDevHelper,x as getExperimentalMode,d as devHint,y as devWarning,z as mapBoolean2String,A as mapStringOrBoolean2String,r as propagateFocus,B as a11yHintDisabled,t as setState,s as showExpertSlot}from"./prop.validators.js";import{v as validateAccessKey,a as validateHideLabel,b as validateIcons,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 validateAriaControls=(t,e)=>{watchString(t,"_ariaControls",e)},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)},buttonTypePropTypeOptions=["button","reset","submit"],validateButtonType=(t,e)=>{watchValidator(t,"_type",(t=>"string"==typeof t&&buttonTypePropTypeOptions.includes(t)),new Set([`KoliBriButtonType {${buttonTypePropTypeOptions.join(", ")}`]),e)},buttonVariantPropTypeOptions=["primary","secondary","normal","tertiary","danger","ghost","custom"],validateButtonVariant=(t,e)=>{watchValidator(t,"_variant",(t=>"string"==typeof t&&buttonVariantPropTypeOptions.includes(t)),new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(", ")}`]),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;){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}getExperimentalMode()&&(console.log(t),devHint("↑ Search form element finished."))}return 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),i.submit();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 validateAriaSelected=(t,e)=>{watchBoolean(t,"_ariaSelected",e)},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||void 0,"aria-controls":this.state._ariaControls,"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:{button:!0,[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",{class:"button-inner",_accessKey:this.state._accessKey,_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,_accessKey:this._accessKey,_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._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=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){validateAccessKey(this,t)}validateAriaControls(t){validateAriaControls(this,t)}validateAriaExpanded(t){validateAriaExpanded(this,t)}validateAriaSelected(t){validateAriaSelected(this,t)}validateCustomClass(t){validateCustomClass(this,t)}validateDisabled(t){validateDisabled(this,t),!0===t&&a11yHintDisabled()}validateHideLabel(t){validateHideLabel(this,t)}validateIcons(t){validateIcons(this,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.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),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"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_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"],_ariaExpanded:[4,"_aria-expanded"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_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"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_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,defineCustomElement as d,propagateSubmitEventToForm as p,validateCustomClass as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";import{L as Log,g as watchBoolean,t as setState,w as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$4}from"./component4.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],Icon=e=>h("kol-icon",{class:"heading-icon",_label:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),AlertIcon=e=>{switch(e.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e.label})}},KolAlertWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{class:{alert:!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{class:"heading"},h(AlertIcon,{label:this.state._label,type:this.state._type}),h("div",{class:"heading-content"},"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&h("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&h("div",{class:"content"},h("slot",null))),this.state._hasCloser&&h("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&h("div",{class:"content"},h("slot",null)))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&alertTypeOptions.includes(e)),new Set(`String {${alertTypeOptions.join(", ")}`),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&alertVariantOptions.includes(e)),new Set(`AlertVariant {${alertVariantOptions.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((e=>{switch(e){case"kol-alert-wc":customElements.get(e)||customElements.define(e,KolAlertWc);break;case"kol-button-wc":customElements.get(e)||defineCustomElement$5();break;case"kol-heading-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-icon":customElements.get(e)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(e)||defineCustomElement$1()}}))}export{KolAlertWc as K,defineCustomElement as d};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";import{L as Log,f as watchBoolean,t as setState,w as watchValidator}from"./prop.validators.js";import{w as watchHeadingLevel,d as defineCustomElement$4}from"./component4.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$2}from"./component2.js";import{d as defineCustomElement$1}from"./component3.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],Icon=e=>h("kol-icon",{class:"heading-icon",_label:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),AlertIcon=e=>{switch(e.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e.label})}},KolAlertWc=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{class:{alert:!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{class:"heading"},h(AlertIcon,{label:this.state._label,type:this.state._type}),h("div",{class:"heading-content"},"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&h("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&h("div",{class:"content"},h("slot",null))),this.state._hasCloser&&h("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&h("div",{class:"content"},h("slot",null)))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&alertTypeOptions.includes(e)),new Set(`String {${alertTypeOptions.join(", ")}`),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&alertVariantOptions.includes(e)),new Set(`AlertVariant {${alertVariantOptions.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((e=>{switch(e){case"kol-alert-wc":customElements.get(e)||customElements.define(e,KolAlertWc);break;case"kol-button-wc":customElements.get(e)||defineCustomElement$5();break;case"kol-heading-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-icon":customElements.get(e)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(e)||defineCustomElement$1()}}))}export{KolAlertWc as K,defineCustomElement as d};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateAlternativeButtonLinkRole,a as validateTabIndex}from"./tab-index.js";import{f as watchString,w as watchValidator,r as propagateFocus,v as setEventTarget,d as devHint,s as showExpertSlot}from"./prop.validators.js";import{v as validateAccessKey,a as validateHideLabel,b as validateIcons,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{o as onLocationChange}from"./ariaCurrentService.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const 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)},ariaCurrentValuePropTypeOptions=["date","location","page","step","time","true","false"],validateAriaCurrentValue=(t,e)=>{watchValidator(t,"_ariaCurrentValue",(t=>"string"==typeof t&&ariaCurrentValuePropTypeOptions.includes(t)),new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),e,{defaultValue:"page"})},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=()=>{const t="string"==typeof this.state._target&&"_self"!==this.state._target,e={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:t?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] Es muss ein Aria-Label gesetzt werden _hide-label gesetzt ist."),{isExternal:t,tagAttrs:e}},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this.state={_href:"…",_icons:{},_ariaCurrentValue:"page"}}render(){const{isExternal:t,tagAttrs:e}=this.getRenderValues(),a=showExpertSlot(this.state._label);return h(Host,null,h("a",Object.assign({ref:this.catchRef},e,{accessKey:this.state._accessKey,"aria-current":this.state._ariaCurrent,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,class:{"external-link":t,"hide-label":!0===this.state._hideLabel}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex}),h("kol-span-wc",{_accessKey:this.state._accessKey,_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:a?"":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:a||!this.state._hideLabel,_accessKey:this.state._accessKey,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}))}validateAccessKey(t){validateAccessKey(this,t)}validateAriaCurrentValue(t){validateAriaCurrentValue(this,t)}validateDownload(t){validateDownload(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateHref(t){validateHref(this,t)}validateIcons(t){validateIcons(this,t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateOn(t){validateLinkCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateTabIndex(t){validateTabIndex(this,t)}validateTarget(t){validateLinkTarget(this,t)}validateTargetDescription(t){watchString(this,"_targetDescription",t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel),this.validateHref(this._href),this.validateIcons(this._icons),this.validateLabel(this._label),this.validateOn(this._on),this.validateRole(this._role),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTargetDescription(this._targetDescription),this.validateTooltipAlign(this._tooltipAlign),this.unsubscribeOnLocationChange=onLocationChange((t=>{this.state._ariaCurrent=t===this.state._href?this.state._ariaCurrentValue:void 0}))}disconnectedCallback(){this.unsubscribeOnLocationChange&&this.unsubscribeOnLocationChange()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"]}}},[4,"kol-link-wc",{_accessKey:[1,"_access-key"],_ariaCurrentValue:[1,"_aria-current-value"],_download:[1],_hideLabel:[4,"_hide-label"],_href:[1],_icons:[1],_label:[1],_on:[16],_role:[1],_tabIndex:[2,"_tab-index"],_target:[1],_targetDescription:[1,"_target-description"],_tooltipAlign:[1,"_tooltip-align"],state:[32]},void 0,{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"]}]);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 validateAlternativeButtonLinkRole,a as validateTabIndex}from"./tab-index.js";import{b as watchString,w as watchValidator,r as propagateFocus,v as setEventTarget,d as devHint,s as showExpertSlot}from"./prop.validators.js";import{v as validateAccessKey,a as validateHideLabel,b as validateIcons,d as defineCustomElement$2}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{o as onLocationChange}from"./ariaCurrentService.js";import{d as defineCustomElement$3}from"./component.js";import{d as defineCustomElement$1}from"./component3.js";const 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)},ariaCurrentValuePropTypeOptions=["date","location","page","step","time","true","false"],validateAriaCurrentValue=(t,e)=>{watchValidator(t,"_ariaCurrentValue",(t=>"string"==typeof t&&ariaCurrentValuePropTypeOptions.includes(t)),new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),e,{defaultValue:"page"})},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=()=>{const t="string"==typeof this.state._target&&"_self"!==this.state._target,e={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:t?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return!0!==this.state._hideLabel||this.state._label||devHint("[KolLink] Es muss ein Aria-Label gesetzt werden _hide-label gesetzt ist."),{isExternal:t,tagAttrs:e}},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this.state={_href:"…",_icons:{},_ariaCurrentValue:"page"}}render(){const{isExternal:t,tagAttrs:e}=this.getRenderValues(),a=showExpertSlot(this.state._label);return h(Host,null,h("a",Object.assign({ref:this.catchRef},e,{accessKey:this.state._accessKey,"aria-current":this.state._ariaCurrent,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,class:{"external-link":t,"hide-label":!0===this.state._hideLabel}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex}),h("kol-span-wc",{_accessKey:this.state._accessKey,_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:a?"":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:a||!this.state._hideLabel,_accessKey:this.state._accessKey,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}))}validateAccessKey(t){validateAccessKey(this,t)}validateAriaCurrentValue(t){validateAriaCurrentValue(this,t)}validateDownload(t){validateDownload(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateHref(t){validateHref(this,t)}validateIcons(t){validateIcons(this,t)}validateLabel(t){validateLabelWithExpertSlot(this,t)}validateOn(t){validateLinkCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateTabIndex(t){validateTabIndex(this,t)}validateTarget(t){validateLinkTarget(this,t)}validateTargetDescription(t){watchString(this,"_targetDescription",t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel),this.validateHref(this._href),this.validateIcons(this._icons),this.validateLabel(this._label),this.validateOn(this._on),this.validateRole(this._role),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTargetDescription(this._targetDescription),this.validateTooltipAlign(this._tooltipAlign),this.unsubscribeOnLocationChange=onLocationChange((t=>{this.state._ariaCurrent=t===this.state._href?this.state._ariaCurrentValue:void 0}))}disconnectedCallback(){this.unsubscribeOnLocationChange&&this.unsubscribeOnLocationChange()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"]}}},[4,"kol-link-wc",{_accessKey:[1,"_access-key"],_ariaCurrentValue:[1,"_aria-current-value"],_download:[1],_hideLabel:[4,"_hide-label"],_href:[1],_icons:[1],_label:[1],_on:[16],_role:[1],_tabIndex:[2,"_tab-index"],_target:[1],_targetDescription:[1,"_target-description"],_tooltipAlign:[1,"_tooltip-align"],state:[32]},void 0,{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_on:["validateOn"],_role:["validateRole"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-link-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-link-wc":customElements.get(t)||customElements.define(t,KolLinkWc);break;case"kol-icon":customElements.get(t)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$2();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolLinkWc as K,defineCustomElement as d};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{g as watchBoolean,f as watchString,B as a11yHintDisabled,b as a11yHint,d as devHint,t as setState,o as objectObjectHandler,h as parseJson}from"./prop.validators.js";import{a as validateHideLabel}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{a as validateTabIndex}from"./tab-index.js";import{A as AssociatedInputController}from"./component5.js";const getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:n}},validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateTouched=(t,e)=>{watchBoolean(t,"_touched",e)};class ControlledInputController extends AssociatedInputController{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){validateTouched(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){validateAdjustHeight(this.component,t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateError(t){watchString(this.component,"_error",t)}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){validateHideLabel(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&a11yHint("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){validateLabelWithExpertSlot(this.component,t)}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,stopPropagation(t),tryToDispatchKoliBriEvent("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;tryToDispatchKoliBriEvent("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,stopPropagation(t),tryToDispatchKoliBriEvent("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{InputController as I,getRenderStates as g};
4
+ import{f as watchBoolean,b as watchString,B as a11yHintDisabled,a as a11yHint,d as devHint,t as setState,o as objectObjectHandler,h as parseJson}from"./prop.validators.js";import{a as validateHideLabel}from"./component2.js";import{a as validateLabelWithExpertSlot}from"./label.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{a as validateTabIndex}from"./tab-index.js";import{A as AssociatedInputController}from"./component5.js";const getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:n}},validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateTouched=(t,e)=>{watchBoolean(t,"_touched",e)};class ControlledInputController extends AssociatedInputController{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){validateTouched(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){validateAdjustHeight(this.component,t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateError(t){watchString(this.component,"_error",t)}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){validateHideLabel(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&a11yHint("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){validateLabelWithExpertSlot(this.component,t)}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,stopPropagation(t),tryToDispatchKoliBriEvent("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;tryToDispatchKoliBriEvent("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,stopPropagation(t),tryToDispatchKoliBriEvent("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{InputController as I,getRenderStates as g};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{b as a11yHint,G as watchJsonArrayString,g as watchBoolean,w as watchValidator,J as mapString2Unknown,t as setState,M as STATE_CHANGE_EVENT}from"./prop.validators.js";import{h as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label.js";import{I as InputController}from"./controller.js";const orientationOptions=["horizontal","vertical"],validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&a11yHint(`Ein abweichendes Aria-Label (${t.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},validateRequired=(t,e)=>{watchBoolean(t,"_required",e)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const n=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,n):t.set(n,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"string"==typeof t&&orientationOptions.includes(t)),new Set([`Orientation {${orientationOptions.join(", ")}`]),t,{defaultValue:"vertical"})}validateOptions(t){validateOptions(this.component,t,{hooks:{beforePatch:this.beforePatchOptions}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchOptions}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
4
+ import{a as a11yHint,G as watchJsonArrayString,f as watchBoolean,w as watchValidator,J as mapString2Unknown,t as setState,M as STATE_CHANGE_EVENT}from"./prop.validators.js";import{h as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label.js";import{I as InputController}from"./controller.js";const orientationOptions=["horizontal","vertical"],validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&a11yHint(`Ein abweichendes Aria-Label (${t.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},validateRequired=(t,e)=>{watchBoolean(t,"_required",e)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"string"==typeof t&&orientationOptions.includes(t)),new Set([`Orientation {${orientationOptions.join(", ")}`]),t,{defaultValue:"vertical"})}validateOptions(t){validateOptions(this.component,t,{hooks:{beforePatch:this.beforePatchOptions}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{beforePatch:this.beforePatchOptions}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{g as watchBoolean,w as watchValidator,C as watchNumber,f as watchString}from"./prop.validators.js";import{I as InputIconController}from"./controller-icon.js";const validateHasCounter=(t,e)=>{watchBoolean(t,"_hasCounter",e)};class InputPasswordController extends InputIconController{constructor(t,e,o){super(t,e,o),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHasCounter(t){validateHasCounter(this.component,t)}validateMaxLength(t){watchNumber(this.component,"_maxLength",t,{min:0})}validatePattern(t){watchString(this.component,"_pattern",t)}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value)}onBlur(t){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(t)}onFocus(t){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(t)}}export{InputPasswordController as I,validateHasCounter as v};
4
+ import{f as watchBoolean,w as watchValidator,C as watchNumber,b as watchString}from"./prop.validators.js";import{I as InputIconController}from"./controller-icon.js";const validateHasCounter=(t,e)=>{watchBoolean(t,"_hasCounter",e)};class InputPasswordController extends InputIconController{constructor(t,e,o){super(t,e,o),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHasCounter(t){validateHasCounter(this.component,t)}validateMaxLength(t){watchNumber(this.component,"_maxLength",t,{min:0})}validatePattern(t){watchString(this.component,"_pattern",t)}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value)}onBlur(t){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(t)}onFocus(t){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(t)}}export{InputPasswordController as I,validateHasCounter as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{P as initKoliBri,Q as getDevMode,R as renderDevAdvice,m as getDocument,L as Log,x as getExperimentalMode,T as getColorContrastAnalysis,U as KoliBriUtils,V as koliBriA11yColorContrast,a as KoliBri,O as koliBriQuerySelector,W as koliBriQuerySelectorAll,X as koliBriQuerySelectorColors,h as parseJson,Y as stringifyJson}from"./prop.validators.js";function prototypeKoliBri(o,e){try{Object.defineProperty(KoliBri,o,{get:function(){return e}})}catch(e){Log.debug(`KoliBri property ${o} is already bind.`)}}const metaModeLog=(o,e)=>Log.debug(`${o} ${e?"":"not "}activated`),initialize=()=>{if(initKoliBri(),getDevMode()){renderDevAdvice(),prototypeKoliBri("a11yColorContrast",koliBriA11yColorContrast),prototypeKoliBri("querySelector",koliBriQuerySelector),prototypeKoliBri("querySelectorAll",koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return KoliBriUtils})),prototypeKoliBri("parseJson",parseJson),prototypeKoliBri("stringifyJson",stringifyJson);const o=getDocument().body,e=getDocument().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',getDocument().body.appendChild(e),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(o),!1,!1)}),1e4)}),2500)}}};export{initialize};
4
+ import{P as initKoliBri,Q as getDevMode,R as renderDevAdvice,m as getDocument,L as Log,x as getExperimentalMode,T as getColorContrastAnalysis,U as KoliBriUtils,V as koliBriA11yColorContrast,g as getKoliBri,O as koliBriQuerySelector,W as koliBriQuerySelectorAll,X as koliBriQuerySelectorColors,h as parseJson,Y as stringifyJson}from"./prop.validators.js";function prototypeKoliBri(e,o){try{Object.defineProperty(getKoliBri(),e,{get:function(){return o}})}catch(o){Log.debug(`KoliBri property ${e} is already bind.`)}}const metaModeLog=(e,o)=>Log.debug(`${e} ${o?"":"not "}activated`),initialize=()=>{if(initKoliBri(),getDevMode()){renderDevAdvice(),prototypeKoliBri("a11yColorContrast",koliBriA11yColorContrast),prototypeKoliBri("querySelector",koliBriQuerySelector),prototypeKoliBri("querySelectorAll",koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return KoliBriUtils})),prototypeKoliBri("parseJson",parseJson),prototypeKoliBri("stringifyJson",stringifyJson);const e=getDocument().body,o=getDocument().createElement("svg");if(o.setAttribute("aria-label","KoliBri-DevTools"),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("role","toolbar"),o.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),o.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',getDocument().body.appendChild(o),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const o=setTimeout((()=>{clearTimeout(o),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(e),!1,!1)}),1e4)}),2500)}}};export{initialize};
@@ -1 +1 @@
1
- {"file":"devtools.js","mappings":";;;;;AAWA,SAAS,gBAAgB,CAAI,IAAY,EAAE,EAAK;IAC/C,IAAI;QACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE;YACpC,GAAG,EAAE;gBACJ,OAAO,EAAE,CAAC;aACV;SACD,CAAC,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACX,GAAG,CAAC,KAAK,CAAC,oBAAoB,IAAI,mBAAmB,CAAC,CAAC;KACvD;AACF,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,MAAe,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,MAAM,GAAG,EAAE,GAAG,MAAM,WAAW,CAAC,CAAC;MAEhG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;gBAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtB,WAAW,CAAC;oBACX,YAAY,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,wBAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;iBACtH,EAAE,KAAK,CAAC,CAAC;aACV,EAAE,IAAI,CAAC,CAAC;SACT;KAmBD;AACF;;;;","names":[],"sources":["src/global/devtools.ts"],"sourcesContent":["import { getColorContrastAnalysis, getDevMode, getDocument, getExperimentalMode, initKoliBri, KoliBri, Log, renderDevAdvice } from '../utils/dev.utils';\nimport {\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tKoliBriUtils,\n\tparseJson,\n\tstringifyJson,\n} from '../utils/prop.validators';\n\nfunction prototypeKoliBri<T>(name: string, cb: T) {\n\ttry {\n\t\tObject.defineProperty(KoliBri, name, {\n\t\t\tget: function () {\n\t\t\t\treturn cb;\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tLog.debug(`KoliBri property ${name} is already bind.`);\n\t}\n}\n\nconst metaModeLog = (name: string, active: boolean) => Log.debug(`${name} ${active ? '' : 'not '}activated`);\n\nexport const initialize = (): void => {\n\tinitKoliBri();\n\tif (getDevMode()) {\n\t\trenderDevAdvice();\n\n\t\tprototypeKoliBri('a11yColorContrast', koliBriA11yColorContrast);\n\t\tprototypeKoliBri('querySelector', koliBriQuerySelector);\n\t\tprototypeKoliBri('querySelectorAll', koliBriQuerySelectorAll);\n\t\tprototypeKoliBri('querySelectorColors', koliBriQuerySelectorColors);\n\t\tprototypeKoliBri('utils', function () {\n\t\t\treturn KoliBriUtils;\n\t\t});\n\t\tprototypeKoliBri('parseJson', parseJson);\n\t\tprototypeKoliBri('stringifyJson', stringifyJson);\n\n\t\tconst body = getDocument().body;\n\n\t\tconst div = getDocument().createElement('svg');\n\t\tdiv.setAttribute('aria-label', 'KoliBri-DevTools');\n\t\tdiv.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\t\tdiv.setAttribute('role', 'toolbar');\n\t\tdiv.setAttribute('style', 'position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;');\n\t\tdiv.innerHTML = `<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"50\"\n height=\"50\"\n viewBox=\"0 0 600 600\"\n>\n <path d=\"M353 322L213 304V434L353 322Z\" fill=\"#047\" />\n <path d=\"M209 564V304L149 434L209 564Z\" fill=\"#047\" />\n <path d=\"M357 316L417 250L361 210L275 244L357 316Z\" fill=\"#047\" />\n <path d=\"M353 318L35 36L213 300L353 318Z\" fill=\"#047\" />\n <path d=\"M329 218L237 92L250 222L272 241L329 218Z\" fill=\"#047\" />\n <path d=\"M391 286L565 272L421 252L391 286Z\" fill=\"#047\" />\n</svg>`;\n\n\t\tgetDocument().body.appendChild(div);\n\n\t\tmetaModeLog('Development mode', getDevMode());\n\t\tmetaModeLog('Experimental mode', getExperimentalMode());\n\t\tmetaModeLog('Color contrast analysis', getColorContrastAnalysis());\n\n\t\tif (getColorContrastAnalysis()) {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tKoliBriUtils.queryHtmlElementColors(getDocument().createElement('div'), koliBriA11yColorContrast(body), false, false);\n\t\t\t\t}, 10000);\n\t\t\t}, 2500);\n\t\t}\n\n\t\t// setTimeout(() => {\n\t\t// const kolButton = koliBriQuerySelector<HTMLButtonElement>(document, '[_label=\"Aktion ausführen\"]');\n\t\t// if (kolButton) {\n\t\t// const button = koliBriQuerySelector<HTMLButtonElement>(kolButton?.shadowRoot as ShadowRoot, 'button');\n\t\t// if (button) {\n\t\t// kolButton.style.backgroundColor = '#988';\n\t\t// button.style.backgroundColor = 'inherit';\n\t\t// button.style.color = '#988';\n\t\t// const kolButtonColors = koliBriQuerySelectorColors('[_label=\"Aktion ausführen\"]');\n\t\t// console.log(\n\t\t// koliBriQuerySelectorColors('button', {\n\t\t// ...kolButtonColors,\n\t\t// })\n\t\t// );\n\t\t// }\n\t\t// }\n\t\t// }, 2500);\n\t}\n};\n"],"version":3}
1
+ {"file":"devtools.js","mappings":";;;;;AAWA,SAAS,gBAAgB,CAAI,IAAY,EAAE,EAAK;IAC/C,IAAI;QACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE;YACzC,GAAG,EAAE;gBACJ,OAAO,EAAE,CAAC;aACV;SACD,CAAC,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACX,GAAG,CAAC,KAAK,CAAC,oBAAoB,IAAI,mBAAmB,CAAC,CAAC;KACvD;AACF,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,MAAe,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,MAAM,GAAG,EAAE,GAAG,MAAM,WAAW,CAAC,CAAC;MAEhG,UAAU,GAAG;IACzB,WAAW,EAAE,CAAC;IACd,IAAI,UAAU,EAAE,EAAE;QACjB,eAAe,EAAE,CAAC;QAElB,gBAAgB,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,CAAC;QAChE,gBAAgB,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;QACxD,gBAAgB,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC;QAC9D,gBAAgB,CAAC,qBAAqB,EAAE,0BAA0B,CAAC,CAAC;QACpE,gBAAgB,CAAC,OAAO,EAAE;YACzB,OAAO,YAAY,CAAC;SACpB,CAAC,CAAC;QACH,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACzC,gBAAgB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QAEjD,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC,IAAI,CAAC;QAEhC,MAAM,GAAG,GAAG,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;QACnD,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC;QACxD,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACpC,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,8EAA8E,CAAC,CAAC;QAC1G,GAAG,CAAC,SAAS,GAAG;;;;;;;;;;;;OAYX,CAAC;QAEN,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEpC,WAAW,CAAC,kBAAkB,EAAE,UAAU,EAAE,CAAC,CAAC;QAC9C,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACxD,WAAW,CAAC,yBAAyB,EAAE,wBAAwB,EAAE,CAAC,CAAC;QAEnE,IAAI,wBAAwB,EAAE,EAAE;YAC/B,MAAM,OAAO,GAAG,UAAU,CAAC;gBAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtB,WAAW,CAAC;oBACX,YAAY,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,wBAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;iBACtH,EAAE,KAAK,CAAC,CAAC;aACV,EAAE,IAAI,CAAC,CAAC;SACT;KAmBD;AACF;;;;","names":[],"sources":["src/global/devtools.ts"],"sourcesContent":["import { Log, getColorContrastAnalysis, getDevMode, getDocument, getExperimentalMode, getKoliBri, initKoliBri, renderDevAdvice } from '../utils/dev.utils';\nimport {\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tKoliBriUtils,\n\tparseJson,\n\tstringifyJson,\n} from '../utils/prop.validators';\n\nfunction prototypeKoliBri<T>(name: string, cb: T) {\n\ttry {\n\t\tObject.defineProperty(getKoliBri(), name, {\n\t\t\tget: function () {\n\t\t\t\treturn cb;\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tLog.debug(`KoliBri property ${name} is already bind.`);\n\t}\n}\n\nconst metaModeLog = (name: string, active: boolean) => Log.debug(`${name} ${active ? '' : 'not '}activated`);\n\nexport const initialize = (): void => {\n\tinitKoliBri();\n\tif (getDevMode()) {\n\t\trenderDevAdvice();\n\n\t\tprototypeKoliBri('a11yColorContrast', koliBriA11yColorContrast);\n\t\tprototypeKoliBri('querySelector', koliBriQuerySelector);\n\t\tprototypeKoliBri('querySelectorAll', koliBriQuerySelectorAll);\n\t\tprototypeKoliBri('querySelectorColors', koliBriQuerySelectorColors);\n\t\tprototypeKoliBri('utils', function () {\n\t\t\treturn KoliBriUtils;\n\t\t});\n\t\tprototypeKoliBri('parseJson', parseJson);\n\t\tprototypeKoliBri('stringifyJson', stringifyJson);\n\n\t\tconst body = getDocument().body;\n\n\t\tconst div = getDocument().createElement('svg');\n\t\tdiv.setAttribute('aria-label', 'KoliBri-DevTools');\n\t\tdiv.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\t\tdiv.setAttribute('role', 'toolbar');\n\t\tdiv.setAttribute('style', 'position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;');\n\t\tdiv.innerHTML = `<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"50\"\n height=\"50\"\n viewBox=\"0 0 600 600\"\n>\n <path d=\"M353 322L213 304V434L353 322Z\" fill=\"#047\" />\n <path d=\"M209 564V304L149 434L209 564Z\" fill=\"#047\" />\n <path d=\"M357 316L417 250L361 210L275 244L357 316Z\" fill=\"#047\" />\n <path d=\"M353 318L35 36L213 300L353 318Z\" fill=\"#047\" />\n <path d=\"M329 218L237 92L250 222L272 241L329 218Z\" fill=\"#047\" />\n <path d=\"M391 286L565 272L421 252L391 286Z\" fill=\"#047\" />\n</svg>`;\n\n\t\tgetDocument().body.appendChild(div);\n\n\t\tmetaModeLog('Development mode', getDevMode());\n\t\tmetaModeLog('Experimental mode', getExperimentalMode());\n\t\tmetaModeLog('Color contrast analysis', getColorContrastAnalysis());\n\n\t\tif (getColorContrastAnalysis()) {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tKoliBriUtils.queryHtmlElementColors(getDocument().createElement('div'), koliBriA11yColorContrast(body), false, false);\n\t\t\t\t}, 10000);\n\t\t\t}, 2500);\n\t\t}\n\n\t\t// setTimeout(() => {\n\t\t// const kolButton = koliBriQuerySelector<HTMLButtonElement>(document, '[_label=\"Aktion ausführen\"]');\n\t\t// if (kolButton) {\n\t\t// const button = koliBriQuerySelector<HTMLButtonElement>(kolButton?.shadowRoot as ShadowRoot, 'button');\n\t\t// if (button) {\n\t\t// kolButton.style.backgroundColor = '#988';\n\t\t// button.style.backgroundColor = 'inherit';\n\t\t// button.style.color = '#988';\n\t\t// const kolButtonColors = koliBriQuerySelectorColors('[_label=\"Aktion ausführen\"]');\n\t\t// console.log(\n\t\t// koliBriQuerySelectorColors('button', {\n\t\t// ...kolButtonColors,\n\t\t// })\n\t\t// );\n\t\t// }\n\t\t// }\n\t\t// }, 2500);\n\t}\n};\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{g as watchBoolean}from"./prop.validators.js";const validateHasCloser=(a,o)=>{watchBoolean(a,"_hasCloser",o)};export{validateHasCloser as v};
4
+ import{f as watchBoolean}from"./prop.validators.js";const validateHasCloser=(a,o)=>{watchBoolean(a,"_hasCloser",o)};export{validateHasCloser as v};