@public-ui/components 3.0.2-f97556ada8a20e9abe2dbb519562bad234f7191b.0 → 3.0.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/README.md +58 -8
  2. package/custom-elements.json +1 -1
  3. package/dist/cjs/Alert-9fdb7776.js +4 -0
  4. package/dist/cjs/Alert-9fdb7776.js.map +1 -0
  5. package/dist/cjs/{Collapsible-570c8f47.js → Collapsible-27f768b6.js} +1 -1
  6. package/dist/cjs/{Collapsible-570c8f47.js.map → Collapsible-27f768b6.js.map} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-fd9f39c4.js → CustomSuggestionsOptionsGroup-5aa8cb59.js} +1 -1
  8. package/dist/cjs/{CustomSuggestionsOptionsGroup-fd9f39c4.js.map → CustomSuggestionsOptionsGroup-5aa8cb59.js.map} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-8d9d9a4e.js → FieldControlStateWrapper-c24e99c5.js} +1 -1
  10. package/dist/cjs/{FieldControlStateWrapper-8d9d9a4e.js.map → FieldControlStateWrapper-c24e99c5.js.map} +1 -1
  11. package/dist/cjs/{Heading-cb5138ce.js → Heading-37af6473.js} +1 -1
  12. package/dist/cjs/{Heading-cb5138ce.js.map → Heading-37af6473.js.map} +1 -1
  13. package/dist/cjs/Icon-537bb332.js +4 -0
  14. package/dist/cjs/{Icon-ba73d59a.js.map → Icon-537bb332.js.map} +1 -1
  15. package/dist/cjs/{Input-76c169fc.js → Input-b3df5b7d.js} +1 -1
  16. package/dist/cjs/{Input-76c169fc.js.map → Input-b3df5b7d.js.map} +1 -1
  17. package/dist/cjs/{InputStateWrapper-03a79a3d.js → InputStateWrapper-4734d8d1.js} +1 -1
  18. package/dist/cjs/{InputStateWrapper-03a79a3d.js.map → InputStateWrapper-4734d8d1.js.map} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-c3ba39b9.js → InternalUnderlinedBadgeText-0ea7ba87.js} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-c3ba39b9.js.map → InternalUnderlinedBadgeText-0ea7ba87.js.map} +1 -1
  21. package/dist/cjs/{Span-c4c775c5.js → Span-0e05b374.js} +1 -1
  22. package/dist/cjs/{Span-c4c775c5.js.map → Span-0e05b374.js.map} +1 -1
  23. package/dist/cjs/{app-globals-e54f9a86.js → app-globals-cd9bce81.js} +1 -1
  24. package/dist/cjs/{app-globals-e54f9a86.js.map → app-globals-cd9bce81.js.map} +1 -1
  25. package/dist/cjs/{controller-32f31fc0.js → controller-4a3740d3.js} +1 -1
  26. package/dist/cjs/{controller-32f31fc0.js.map → controller-4a3740d3.js.map} +1 -1
  27. package/dist/cjs/{controller-f39e0ee2.js → controller-872e38fa.js} +1 -1
  28. package/dist/cjs/{controller-f39e0ee2.js.map → controller-872e38fa.js.map} +1 -1
  29. package/dist/cjs/{controller-e92133bb.js → controller-e3f2bc2d.js} +1 -1
  30. package/dist/cjs/{controller-e92133bb.js.map → controller-e3f2bc2d.js.map} +1 -1
  31. package/dist/cjs/{controller-icon-3891c0d4.js → controller-icon-01e6fff3.js} +1 -1
  32. package/dist/cjs/{controller-icon-3891c0d4.js.map → controller-icon-01e6fff3.js.map} +1 -1
  33. package/dist/cjs/{dev.utils-e57cfaef.js → dev.utils-c3903802.js} +1 -1
  34. package/dist/cjs/{dev.utils-e57cfaef.js.map → dev.utils-c3903802.js.map} +1 -1
  35. package/dist/cjs/{devtools-04497f51.js → devtools-c9352fa2.js} +1 -1
  36. package/dist/cjs/{devtools-04497f51.js.map → devtools-c9352fa2.js.map} +1 -1
  37. package/dist/cjs/{getRenderStates-4cab4c4e.js → getRenderStates-0f8144fb.js} +1 -1
  38. package/dist/cjs/{getRenderStates-4cab4c4e.js.map → getRenderStates-0f8144fb.js.map} +1 -1
  39. package/dist/cjs/index-c0d419b5.js +4 -0
  40. package/dist/cjs/index-c0d419b5.js.map +1 -0
  41. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
  45. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  104. package/dist/cjs/kolibri.cjs.js +1 -1
  105. package/dist/cjs/loader.cjs.js +1 -1
  106. package/dist/cjs/test-component.cjs.entry.js +1 -1
  107. package/dist/components/Alert.js +1 -1
  108. package/dist/components/Alert.js.map +1 -1
  109. package/dist/components/kol-alert-wc.js +1 -1
  110. package/dist/components/kol-alert-wc.js.map +1 -1
  111. package/dist/components/kol-image.js +1 -1
  112. package/dist/components/kol-image.js.map +1 -1
  113. package/dist/esm/Alert-4f2f7115.js +4 -0
  114. package/dist/esm/Alert-4f2f7115.js.map +1 -0
  115. package/dist/esm/{Collapsible-018af61d.js → Collapsible-7cb22ab1.js} +1 -1
  116. package/dist/esm/{Collapsible-018af61d.js.map → Collapsible-7cb22ab1.js.map} +1 -1
  117. package/dist/esm/{CustomSuggestionsOptionsGroup-535469be.js → CustomSuggestionsOptionsGroup-06278bda.js} +1 -1
  118. package/dist/esm/{CustomSuggestionsOptionsGroup-535469be.js.map → CustomSuggestionsOptionsGroup-06278bda.js.map} +1 -1
  119. package/dist/esm/{FieldControlStateWrapper-6b9c9eb1.js → FieldControlStateWrapper-602a7af3.js} +1 -1
  120. package/dist/esm/{FieldControlStateWrapper-6b9c9eb1.js.map → FieldControlStateWrapper-602a7af3.js.map} +1 -1
  121. package/dist/esm/{Heading-c0a196c8.js → Heading-7b90eeb4.js} +1 -1
  122. package/dist/esm/{Heading-c0a196c8.js.map → Heading-7b90eeb4.js.map} +1 -1
  123. package/dist/esm/{Icon-8b3c5e62.js → Icon-a2f91629.js} +1 -1
  124. package/dist/esm/{Icon-8b3c5e62.js.map → Icon-a2f91629.js.map} +1 -1
  125. package/dist/esm/{Input-3f54e170.js → Input-324f4b1d.js} +1 -1
  126. package/dist/esm/{Input-3f54e170.js.map → Input-324f4b1d.js.map} +1 -1
  127. package/dist/esm/{InputStateWrapper-45f3da21.js → InputStateWrapper-e0c888e4.js} +1 -1
  128. package/dist/esm/{InputStateWrapper-45f3da21.js.map → InputStateWrapper-e0c888e4.js.map} +1 -1
  129. package/dist/esm/{InternalUnderlinedBadgeText-8ef3526c.js → InternalUnderlinedBadgeText-2d939629.js} +1 -1
  130. package/dist/esm/{InternalUnderlinedBadgeText-8ef3526c.js.map → InternalUnderlinedBadgeText-2d939629.js.map} +1 -1
  131. package/dist/esm/{Span-72cf9403.js → Span-78135d4f.js} +1 -1
  132. package/dist/esm/{Span-72cf9403.js.map → Span-78135d4f.js.map} +1 -1
  133. package/dist/esm/{app-globals-32eb0548.js → app-globals-f57fb61d.js} +1 -1
  134. package/dist/esm/{app-globals-32eb0548.js.map → app-globals-f57fb61d.js.map} +1 -1
  135. package/dist/esm/{controller-60bea698.js → controller-2152c5b3.js} +1 -1
  136. package/dist/esm/{controller-60bea698.js.map → controller-2152c5b3.js.map} +1 -1
  137. package/dist/esm/{controller-166954d6.js → controller-75622398.js} +1 -1
  138. package/dist/esm/{controller-166954d6.js.map → controller-75622398.js.map} +1 -1
  139. package/dist/esm/{controller-35491a9e.js → controller-c6883e74.js} +1 -1
  140. package/dist/esm/{controller-35491a9e.js.map → controller-c6883e74.js.map} +1 -1
  141. package/dist/esm/{controller-icon-4b084fbf.js → controller-icon-6d59bc84.js} +1 -1
  142. package/dist/esm/{controller-icon-4b084fbf.js.map → controller-icon-6d59bc84.js.map} +1 -1
  143. package/dist/esm/{dev.utils-4d98f7de.js → dev.utils-ca3cce4b.js} +1 -1
  144. package/dist/esm/{dev.utils-4d98f7de.js.map → dev.utils-ca3cce4b.js.map} +1 -1
  145. package/dist/esm/{devtools-98df6631.js → devtools-fa819249.js} +1 -1
  146. package/dist/esm/{devtools-98df6631.js.map → devtools-fa819249.js.map} +1 -1
  147. package/dist/esm/{getRenderStates-0f300345.js → getRenderStates-1a7401a2.js} +1 -1
  148. package/dist/esm/{getRenderStates-0f300345.js.map → getRenderStates-1a7401a2.js.map} +1 -1
  149. package/dist/esm/index-2f6c3929.js +4 -0
  150. package/dist/esm/index-2f6c3929.js.map +1 -0
  151. package/dist/esm/kol-abbr.entry.js +1 -1
  152. package/dist/esm/kol-accordion.entry.js +1 -1
  153. package/dist/esm/kol-alert-wc.entry.js +1 -1
  154. package/dist/esm/kol-alert-wc.entry.js.map +1 -1
  155. package/dist/esm/kol-alert.entry.js +1 -1
  156. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  157. package/dist/esm/kol-avatar.entry.js +1 -1
  158. package/dist/esm/kol-badge.entry.js +1 -1
  159. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  160. package/dist/esm/kol-button-link.entry.js +1 -1
  161. package/dist/esm/kol-button-wc.entry.js +1 -1
  162. package/dist/esm/kol-button.entry.js +1 -1
  163. package/dist/esm/kol-card-wc.entry.js +1 -1
  164. package/dist/esm/kol-card.entry.js +1 -1
  165. package/dist/esm/kol-combobox.entry.js +1 -1
  166. package/dist/esm/kol-details.entry.js +1 -1
  167. package/dist/esm/kol-drawer.entry.js +1 -1
  168. package/dist/esm/kol-form.entry.js +1 -1
  169. package/dist/esm/kol-heading.entry.js +1 -1
  170. package/dist/esm/kol-icon.entry.js +1 -1
  171. package/dist/esm/kol-image.entry.js +1 -1
  172. package/dist/esm/kol-image.entry.js.map +1 -1
  173. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  174. package/dist/esm/kol-input-color.entry.js +1 -1
  175. package/dist/esm/kol-input-date.entry.js +1 -1
  176. package/dist/esm/kol-input-email.entry.js +1 -1
  177. package/dist/esm/kol-input-file.entry.js +1 -1
  178. package/dist/esm/kol-input-number.entry.js +1 -1
  179. package/dist/esm/kol-input-password.entry.js +1 -1
  180. package/dist/esm/kol-input-radio.entry.js +1 -1
  181. package/dist/esm/kol-input-range.entry.js +1 -1
  182. package/dist/esm/kol-input-text.entry.js +1 -1
  183. package/dist/esm/kol-kolibri.entry.js +1 -1
  184. package/dist/esm/kol-link-button.entry.js +1 -1
  185. package/dist/esm/kol-link-wc.entry.js +1 -1
  186. package/dist/esm/kol-link.entry.js +1 -1
  187. package/dist/esm/kol-modal.entry.js +1 -1
  188. package/dist/esm/kol-nav.entry.js +1 -1
  189. package/dist/esm/kol-pagination.entry.js +1 -1
  190. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  191. package/dist/esm/kol-popover-button.entry.js +1 -1
  192. package/dist/esm/kol-popover-wc.entry.js +1 -1
  193. package/dist/esm/kol-progress.entry.js +1 -1
  194. package/dist/esm/kol-quote.entry.js +1 -1
  195. package/dist/esm/kol-select.entry.js +1 -1
  196. package/dist/esm/kol-single-select.entry.js +1 -1
  197. package/dist/esm/kol-skip-nav.entry.js +1 -1
  198. package/dist/esm/kol-spin.entry.js +1 -1
  199. package/dist/esm/kol-split-button.entry.js +1 -1
  200. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  201. package/dist/esm/kol-table-stateful.entry.js +1 -1
  202. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  203. package/dist/esm/kol-table-stateless.entry.js +1 -1
  204. package/dist/esm/kol-tabs.entry.js +1 -1
  205. package/dist/esm/kol-textarea.entry.js +1 -1
  206. package/dist/esm/kol-toast-container.entry.js +1 -1
  207. package/dist/esm/kol-toolbar.entry.js +1 -1
  208. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  209. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  210. package/dist/esm/kol-tree-item.entry.js +1 -1
  211. package/dist/esm/kol-tree-wc.entry.js +1 -1
  212. package/dist/esm/kol-tree.entry.js +1 -1
  213. package/dist/esm/kol-version.entry.js +1 -1
  214. package/dist/esm/kolibri.js +1 -1
  215. package/dist/esm/loader.js +1 -1
  216. package/dist/esm/test-component.entry.js +1 -1
  217. package/dist/kolibri/Alert-4f2f7115.js +4 -0
  218. package/dist/kolibri/Alert-4f2f7115.js.map +1 -0
  219. package/dist/kolibri/{Collapsible-018af61d.js → Collapsible-7cb22ab1.js} +1 -1
  220. package/dist/kolibri/{CustomSuggestionsOptionsGroup-535469be.js → CustomSuggestionsOptionsGroup-06278bda.js} +1 -1
  221. package/dist/kolibri/{FieldControlStateWrapper-6b9c9eb1.js → FieldControlStateWrapper-602a7af3.js} +1 -1
  222. package/dist/kolibri/{Heading-c0a196c8.js → Heading-7b90eeb4.js} +1 -1
  223. package/dist/kolibri/Icon-a2f91629.js +4 -0
  224. package/dist/kolibri/Input-324f4b1d.js +4 -0
  225. package/dist/kolibri/{InputStateWrapper-45f3da21.js → InputStateWrapper-e0c888e4.js} +1 -1
  226. package/dist/kolibri/{InternalUnderlinedBadgeText-8ef3526c.js → InternalUnderlinedBadgeText-2d939629.js} +1 -1
  227. package/dist/kolibri/Span-78135d4f.js +4 -0
  228. package/dist/kolibri/{Span-72cf9403.js.map → Span-78135d4f.js.map} +1 -1
  229. package/dist/kolibri/app-globals-f57fb61d.js +4 -0
  230. package/dist/kolibri/{app-globals-32eb0548.js.map → app-globals-f57fb61d.js.map} +1 -1
  231. package/dist/kolibri/{controller-60bea698.js → controller-2152c5b3.js} +1 -1
  232. package/dist/kolibri/{controller-166954d6.js → controller-75622398.js} +1 -1
  233. package/dist/kolibri/{controller-35491a9e.js → controller-c6883e74.js} +1 -1
  234. package/dist/kolibri/{controller-icon-4b084fbf.js → controller-icon-6d59bc84.js} +1 -1
  235. package/dist/kolibri/{dev.utils-4d98f7de.js → dev.utils-ca3cce4b.js} +1 -1
  236. package/dist/kolibri/{devtools-98df6631.js → devtools-fa819249.js} +1 -1
  237. package/dist/kolibri/{getRenderStates-0f300345.js → getRenderStates-1a7401a2.js} +1 -1
  238. package/dist/kolibri/{index-c14cc40b.js → index-2f6c3929.js} +2 -2
  239. package/dist/kolibri/index-2f6c3929.js.map +1 -0
  240. package/dist/kolibri/kol-abbr.entry.js +1 -1
  241. package/dist/kolibri/kol-accordion.entry.js +1 -1
  242. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  243. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  244. package/dist/kolibri/kol-alert.entry.js +1 -1
  245. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  246. package/dist/kolibri/kol-avatar.entry.js +1 -1
  247. package/dist/kolibri/kol-badge.entry.js +1 -1
  248. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  249. package/dist/kolibri/kol-button-link.entry.js +1 -1
  250. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  251. package/dist/kolibri/kol-button.entry.js +1 -1
  252. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  253. package/dist/kolibri/kol-card.entry.js +1 -1
  254. package/dist/kolibri/kol-combobox.entry.js +1 -1
  255. package/dist/kolibri/kol-details.entry.js +1 -1
  256. package/dist/kolibri/kol-drawer.entry.js +1 -1
  257. package/dist/kolibri/kol-form.entry.js +1 -1
  258. package/dist/kolibri/kol-heading.entry.js +1 -1
  259. package/dist/kolibri/kol-icon.entry.js +1 -1
  260. package/dist/kolibri/kol-image.entry.js +1 -1
  261. package/dist/kolibri/kol-image.entry.js.map +1 -1
  262. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  263. package/dist/kolibri/kol-input-color.entry.js +1 -1
  264. package/dist/kolibri/kol-input-date.entry.js +1 -1
  265. package/dist/kolibri/kol-input-email.entry.js +1 -1
  266. package/dist/kolibri/kol-input-file.entry.js +1 -1
  267. package/dist/kolibri/kol-input-number.entry.js +1 -1
  268. package/dist/kolibri/kol-input-password.entry.js +1 -1
  269. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  270. package/dist/kolibri/kol-input-range.entry.js +1 -1
  271. package/dist/kolibri/kol-input-text.entry.js +1 -1
  272. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  273. package/dist/kolibri/kol-link-button.entry.js +1 -1
  274. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  275. package/dist/kolibri/kol-link.entry.js +1 -1
  276. package/dist/kolibri/kol-modal.entry.js +1 -1
  277. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  278. package/dist/kolibri/kol-nav.entry.js +1 -1
  279. package/dist/kolibri/kol-pagination.entry.js +1 -1
  280. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  281. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  282. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  283. package/dist/kolibri/kol-progress.entry.js +1 -1
  284. package/dist/kolibri/kol-quote.entry.js +1 -1
  285. package/dist/kolibri/kol-select.entry.js +1 -1
  286. package/dist/kolibri/kol-single-select.entry.js +1 -1
  287. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  288. package/dist/kolibri/kol-spin.entry.js +1 -1
  289. package/dist/kolibri/kol-split-button.entry.js +1 -1
  290. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  291. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  292. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  293. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  294. package/dist/kolibri/kol-tabs.entry.js +1 -1
  295. package/dist/kolibri/kol-textarea.entry.js +1 -1
  296. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  297. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  298. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  299. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  300. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  301. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  302. package/dist/kolibri/kol-tree.entry.js +1 -1
  303. package/dist/kolibri/kol-version.entry.js +1 -1
  304. package/dist/kolibri/kolibri.esm.js +1 -1
  305. package/dist/kolibri/test-component.entry.js +1 -1
  306. package/dist/types/schema/components/image.d.ts +5 -16
  307. package/dist/types/schema/props/alt.d.ts +7 -0
  308. package/dist/types/schema/props/image-sizes.d.ts +7 -0
  309. package/dist/types/schema/props/image-srcset.d.ts +7 -0
  310. package/dist/types/schema/props/index.d.ts +1 -1
  311. package/dist/types/schema/props/loading.d.ts +3 -0
  312. package/doc/components.md +4 -4
  313. package/package.json +1 -1
  314. package/dist/cjs/Alert-fd00aa65.js +0 -4
  315. package/dist/cjs/Alert-fd00aa65.js.map +0 -1
  316. package/dist/cjs/Icon-ba73d59a.js +0 -4
  317. package/dist/cjs/index-25983368.js +0 -4
  318. package/dist/cjs/index-25983368.js.map +0 -1
  319. package/dist/esm/Alert-8f3aaf4d.js +0 -4
  320. package/dist/esm/Alert-8f3aaf4d.js.map +0 -1
  321. package/dist/esm/index-c14cc40b.js +0 -4
  322. package/dist/esm/index-c14cc40b.js.map +0 -1
  323. package/dist/kolibri/Alert-8f3aaf4d.js +0 -4
  324. package/dist/kolibri/Alert-8f3aaf4d.js.map +0 -1
  325. package/dist/kolibri/Icon-8b3c5e62.js +0 -4
  326. package/dist/kolibri/Input-3f54e170.js +0 -4
  327. package/dist/kolibri/Span-72cf9403.js +0 -4
  328. package/dist/kolibri/app-globals-32eb0548.js +0 -4
  329. package/dist/kolibri/index-c14cc40b.js.map +0 -1
  330. /package/dist/kolibri/{Collapsible-018af61d.js.map → Collapsible-7cb22ab1.js.map} +0 -0
  331. /package/dist/kolibri/{CustomSuggestionsOptionsGroup-535469be.js.map → CustomSuggestionsOptionsGroup-06278bda.js.map} +0 -0
  332. /package/dist/kolibri/{FieldControlStateWrapper-6b9c9eb1.js.map → FieldControlStateWrapper-602a7af3.js.map} +0 -0
  333. /package/dist/kolibri/{Heading-c0a196c8.js.map → Heading-7b90eeb4.js.map} +0 -0
  334. /package/dist/kolibri/{Icon-8b3c5e62.js.map → Icon-a2f91629.js.map} +0 -0
  335. /package/dist/kolibri/{Input-3f54e170.js.map → Input-324f4b1d.js.map} +0 -0
  336. /package/dist/kolibri/{InputStateWrapper-45f3da21.js.map → InputStateWrapper-e0c888e4.js.map} +0 -0
  337. /package/dist/kolibri/{InternalUnderlinedBadgeText-8ef3526c.js.map → InternalUnderlinedBadgeText-2d939629.js.map} +0 -0
  338. /package/dist/kolibri/{controller-60bea698.js.map → controller-2152c5b3.js.map} +0 -0
  339. /package/dist/kolibri/{controller-166954d6.js.map → controller-75622398.js.map} +0 -0
  340. /package/dist/kolibri/{controller-35491a9e.js.map → controller-c6883e74.js.map} +0 -0
  341. /package/dist/kolibri/{controller-icon-4b084fbf.js.map → controller-icon-6d59bc84.js.map} +0 -0
  342. /package/dist/kolibri/{dev.utils-4d98f7de.js.map → dev.utils-ca3cce4b.js.map} +0 -0
  343. /package/dist/kolibri/{devtools-98df6631.js.map → devtools-fa819249.js.map} +0 -0
  344. /package/dist/kolibri/{getRenderStates-0f300345.js.map → getRenderStates-1a7401a2.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"Alert.js","mappings":";;;;;;;;;;;AAWA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAI,CAClE,EACF;AACH,CAAC,CAAC;AAEF,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;IAC3E,QAAQ,IAAI;QACX,KAAK,OAAO;YACX,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;QAC/F,KAAK,MAAM;YACV,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,EAAE,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;QAC7F,KAAK,SAAS;YACb,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE,IAAI,EAAC,yBAAyB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;QACnG,KAAK,SAAS;YACb,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,aAAa,CAA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ACvC,IAAI,EAAE,KAAK,IAAI,IAAI,KAAK,OAAO,GAAG,OAAO,GAAG,QAAQ,IAAI,SAAS,IAC9D,KAAK,CACR,CAAC;IAEF,QACC,2BAAS,SAAS;QACjB,WAAK,KAAK,EAAC,sBAAsB;YAChC,EAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI;YACvC,WAAK,KAAK,EAAC,8BAA8B;gBACvC,KAAK,KACL,EAAC,YAAY,IAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,IACjE,KAAK,CACQ,CACf;gBACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACpF,QAAQ,CACH,CACP,CACI;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n\t\t * @todo Move side-effect out of render-function to avoid multiple incarnations.\n\t\t */\n\t\tif (navigator.userActivation?.hasBeenActive) {\n\t\t\tnavigator?.vibrate?.([100, 75, 100, 75, 100]);\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
1
+ {"file":"Alert.js","mappings":";;;;;;;;;;;AAWA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAI,CAClE,EACF;AACH,CAAC,CAAC;AAEF,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;IAC3E,QAAQ,IAAI;QACX,KAAK,OAAO;YACX,OAAO,EAAC,IAAI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AAE,KAAK,EAAE,EAAE,EAAC,SAAS,IACjE,KAAK,CACQ,CACf;gBACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACpF,QAAQ,CACH,CACP,CACI;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\n/**\n * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n * - https://googlechrome.github.io/samples/vibration/\n * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n * @todo Move side-effect out of render-function to avoid multiple incarnations.\n */\nconst vibrateOnError = (): void => {\n\tif (typeof navigator === 'undefined' || typeof navigator.vibrate !== 'function') {\n\t\treturn;\n\t}\n\tconst ua = navigator.userActivation;\n\tconst hasGesture = ua?.isActive || ua?.hasBeenActive;\n\tif (!hasGesture) {\n\t\treturn;\n\t}\n\tif (!matchMedia('(any-pointer: coarse)').matches) {\n\t\treturn;\n\t}\n\ttry {\n\t\tnavigator.vibrate([100, 75, 100, 75, 100]);\n\t} catch {\n\t\t/* no-op */\n\t}\n};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\tvibrateOnError();\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as watchBoolean,k as setState,w as watchValidator}from"./index2.js";import{w as watchHeadingLevel}from"./validation.js";import{K as KolAlertFc}from"./Alert.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],KolAlertWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close")),this.host&&dispatchDomEvent(this.host,KolEvent.close)},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=0,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:0}}render(){const{_alert:e,_hasCloser:t,_label:a,_level:l,_type:i,_variant:s}=this.state,o={alert:e,hasCloser:t,label:a,level:l,type:i,variant:s,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return h(KolAlertFc,Object.assign({key:"9038051f21b86a9c83c8ac5619e723dff5ebcbeb"},o),h("slot",{key:"cfd116176ab783db5232d9d5520f8ae890ca44db"}))}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)}get host(){return this}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$1(){if("undefined"==typeof customElements)return;["kol-alert-wc"].forEach((e=>{if("kol-alert-wc"===e)customElements.get(e)||customElements.define(e,KolAlertWc$1)}))}const KolAlertWc=KolAlertWc$1,defineCustomElement=defineCustomElement$1;export{KolAlertWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as watchBoolean,k as setState,w as watchValidator}from"./index2.js";import{w as watchHeadingLevel}from"./validation.js";import{K as KolAlertFc}from"./Alert.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],KolAlertWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close")),this.host&&dispatchDomEvent(this.host,KolEvent.close)},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=0,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:0}}render(){const{_alert:e,_hasCloser:t,_label:a,_level:l,_type:i,_variant:s}=this.state,o={alert:e,hasCloser:t,label:a,level:l,type:i,variant:s,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return h(KolAlertFc,Object.assign({key:"2b0d74465270eef8d8d6f3da8c04377f862e8630"},o),h("slot",{key:"55e8ad62be763c26af16813e5ebfac2ce1f63b54"}))}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)}get host(){return this}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$1(){if("undefined"==typeof customElements)return;["kol-alert-wc"].forEach((e=>{if("kol-alert-wc"===e)customElements.get(e)||customElements.define(e,KolAlertWc$1)}))}const KolAlertWc=KolAlertWc$1,defineCustomElement=defineCustomElement$1;export{KolAlertWc,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-alert-wc.js","mappings":";;;;;;;;;;;AAKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAGrF,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU;;MCQ9CA,YAAU;;;;QAGL,UAAK,GAAG;;YACxB,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,mDAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC5C;SACD,CAAC;QAEe,uBAAkB,GAAG;YACrC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC1B,CAAC;Q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GM,YAAY,CAAC,KAAiB;QACpC,cAAc,CACb,IAAI,EACJ,OAAO,EACP,CAAC,KAAM,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzE,IAAI,GAAG,CAAC,WAAW,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EACjD,KAAK,CACL,CAAC;KACF;IAGM,eAAe,CAAC,KAAoB;QAC1C,cAAc,CACb,IAAI,EACJ,UAAU,EACV,CAAC,KAAM,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC5E,IAAI,GAAG,CAAC,iBAAiB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAC1D,KAAK,CACL,CAAC;KACF;IAEM,iBAAiB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAlertWc"],"sources":["src/schema/components/alert.ts","src/components/alert/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { HeadingLevel, PropAlert, PropHasCloser, PropLabel } from '../props';\nimport type { EventCallback } from '../types';\n\nexport const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'] as const;\nexport type AlertType = (typeof alertTypeOptions)[number];\n\nexport const alertVariantOptions = ['card', 'msg'] as const;\nexport type AlertVariant = (typeof alertVariantOptions)[number];\n\nexport type KoliBriAlertEventCallbacks = {\n\tonClose?: EventCallback<Event>;\n};\n\ntype RequiredAlertProps = NonNullable<unknown>;\ntype OptionalAlertProps = {\n\tlevel: HeadingLevel;\n\ton: KoliBriAlertEventCallbacks;\n\ttype: AlertType;\n\tvariant: AlertVariant;\n} & PropLabel &\n\tPropAlert &\n\tPropHasCloser;\n\ntype RequiredAlertStates = RequiredAlertProps;\ntype OptionalAlertStates = OptionalAlertProps;\n\nexport type InternalAlertProps = RequiredAlertProps & OptionalAlertProps;\n\nexport type AlertProps = Generic.Element.Members<RequiredAlertProps, OptionalAlertProps>;\nexport type AlertStates = Generic.Element.Members<RequiredAlertStates, OptionalAlertStates>;\nexport type AlertAPI = Generic.Element.ComponentApi<RequiredAlertProps, OptionalAlertProps, RequiredAlertStates, OptionalAlertStates>;\n","import type { JSX } from '@stencil/core';\nimport { alertTypeOptions, alertVariantOptions, setState, validateHasCloser, validateLabel, watchBoolean, watchValidator } from '../../schema';\nimport { Component, Element, h, Prop, State, Watch } from '@stencil/core';\nimport { watchHeadingLevel } from '../heading/validation';\nimport type { AlertAPI, AlertStates, AlertType, AlertVariant, HasCloserPropType, HeadingLevel, KoliBriAlertEventCallbacks, LabelPropType } from '../../schema';\nimport KolAlertFc, { type KolAlertFcProps } from '../../functional-components/Alert';\nimport { dispatchDomEvent, KolEvent } from '../../utils/events';\n\n/**\n * @internal\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-alert-wc',\n\tshadow: false,\n})\nexport class KolAlertWc implements AlertAPI {\n\t@Element() private readonly host?: HTMLKolAlertWcElement;\n\n\tprivate readonly close = () => {\n\t\tthis._on?.onClose?.(new Event('Close'));\n\t\tif (this.host) {\n\t\t\tdispatchDomEvent(this.host, KolEvent.close);\n\t\t}\n\t};\n\n\tprivate readonly handleAlertTimeout = () => {\n\t\tthis.validateAlert(false);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { _alert, _hasCloser, _label, _level, _type, _variant } = this.state;\n\n\t\tconst props: KolAlertFcProps = {\n\t\t\talert: _alert,\n\t\t\thasCloser: _hasCloser,\n\t\t\tlabel: _label,\n\t\t\tlevel: _level,\n\t\t\ttype: _type,\n\t\t\tvariant: _variant,\n\t\t\tonCloserClick: this.close,\n\t\t\tonAlertTimeout: this.handleAlertTimeout,\n\t\t};\n\n\t\treturn (\n\t\t\t<KolAlertFc {...props}>\n\t\t\t\t<slot />\n\t\t\t</KolAlertFc>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop() public _alert?: boolean = false;\n\n\t/**\n\t * Defines whether the element can be closed.\n\t * @TODO: Change type back to `HasCloserPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCloser?: boolean = false;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType;\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 0;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Alerts an.\n\t */\n\t@Prop() public _on?: KoliBriAlertEventCallbacks;\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: AlertVariant = 'msg';\n\n\t@State() public state: AlertStates = {\n\t\t_level: 0,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: HasCloserPropType): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\tprivate validateOnValue = (value: unknown): boolean =>\n\t\ttypeof value === 'object' && value !== null && typeof (value as KoliBriAlertEventCallbacks).onClose === 'function';\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAlertEventCallbacks): void {\n\t\tif (this.validateOnValue(value)) {\n\t\t\tsetState<KoliBriAlertEventCallbacks>(\n\t\t\t\tthis,\n\t\t\t\t'_on',\n\t\t\t\t{\n\t\t\t\t\tonClose: (value as KoliBriAlertEventCallbacks).onClose,\n\t\t\t\t},\n\t\t\t\t// {\n\t\t\t\t// \tafterPatch: (value: unknown) => {\n\t\t\t\t// \t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t\t// \t},\n\t\t\t\t// }\n\t\t\t);\n\t\t\t// } else {\n\t\t\t// \tsetState<KoliBriAlertEventCallbacks>(this, '_on', null, {\n\t\t\t// \t\tafterPatch: (value: unknown) => {\n\t\t\t// \t\t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t// \t\t},\n\t\t\t// \t});\n\t\t}\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value?) => typeof value === 'string' && alertTypeOptions.includes(value),\n\t\t\tnew Set(`String {${alertTypeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: AlertVariant): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_variant',\n\t\t\t(value?) => typeof value === 'string' && alertVariantOptions.includes(value),\n\t\t\tnew Set(`AlertVariant {${alertVariantOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-alert-wc.js","mappings":";;;;;;;;;;;AAKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAGrF,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU;;MCQ9CA,YAAU;;;;QAGL,UAAK,GAAG;;YACxB,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,mDAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,gBAAgB,CAAC,IAAI,CAAC,IAAmB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC3D;SACD,CAAC;QAEe,uBAAkB,GAAG;YACrC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC1B,CAAC;QAmFM,oBAAe,GAAG,CAAC,KAAc,KACxC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAQ,KAAoC,CAAC,OAAO,KAAK,UAAU,CAAC;sBA1DlF,KAAK;0BAMD,KAAK;;sBAUJ,CAAC;;qBAUL,SAAS;wBAKH,KAAK;qBAET;YACpC,MAAM,EAAE,CAAC;SACT;;IA3DM,MAAM;QACZ,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE3E,MAAM,KAAK,GAAoB;YAC9B,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,UAAU;YACrB,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,MAAM;YACb,IAAI,EA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L,CAAC;KACF;IAEM,iBAAiB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAlertWc"],"sources":["src/schema/components/alert.ts","src/components/alert/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { HeadingLevel, PropAlert, PropHasCloser, PropLabel } from '../props';\nimport type { EventCallback } from '../types';\n\nexport const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'] as const;\nexport type AlertType = (typeof alertTypeOptions)[number];\n\nexport const alertVariantOptions = ['card', 'msg'] as const;\nexport type AlertVariant = (typeof alertVariantOptions)[number];\n\nexport type KoliBriAlertEventCallbacks = {\n\tonClose?: EventCallback<Event>;\n};\n\ntype RequiredAlertProps = NonNullable<unknown>;\ntype OptionalAlertProps = {\n\tlevel: HeadingLevel;\n\ton: KoliBriAlertEventCallbacks;\n\ttype: AlertType;\n\tvariant: AlertVariant;\n} & PropLabel &\n\tPropAlert &\n\tPropHasCloser;\n\ntype RequiredAlertStates = RequiredAlertProps;\ntype OptionalAlertStates = OptionalAlertProps;\n\nexport type InternalAlertProps = RequiredAlertProps & OptionalAlertProps;\n\nexport type AlertProps = Generic.Element.Members<RequiredAlertProps, OptionalAlertProps>;\nexport type AlertStates = Generic.Element.Members<RequiredAlertStates, OptionalAlertStates>;\nexport type AlertAPI = Generic.Element.ComponentApi<RequiredAlertProps, OptionalAlertProps, RequiredAlertStates, OptionalAlertStates>;\n","import type { JSX } from '@stencil/core';\nimport { alertTypeOptions, alertVariantOptions, setState, validateHasCloser, validateLabel, watchBoolean, watchValidator } from '../../schema';\nimport { Component, Element, h, Prop, State, Watch } from '@stencil/core';\nimport { watchHeadingLevel } from '../heading/validation';\nimport type { AlertAPI, AlertStates, AlertType, AlertVariant, HasCloserPropType, HeadingLevel, KoliBriAlertEventCallbacks, LabelPropType } from '../../schema';\nimport KolAlertFc, { type KolAlertFcProps } from '../../functional-components/Alert';\nimport { dispatchDomEvent, KolEvent } from '../../utils/events';\n\n/**\n * @internal\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-alert-wc',\n\tshadow: false,\n})\nexport class KolAlertWc implements AlertAPI {\n\t@Element() private readonly host?: HTMLKolAlertWcElement;\n\n\tprivate readonly close = () => {\n\t\tthis._on?.onClose?.(new Event('Close'));\n\t\tif (this.host) {\n\t\t\tdispatchDomEvent(this.host as HTMLElement, KolEvent.close);\n\t\t}\n\t};\n\n\tprivate readonly handleAlertTimeout = () => {\n\t\tthis.validateAlert(false);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { _alert, _hasCloser, _label, _level, _type, _variant } = this.state;\n\n\t\tconst props: KolAlertFcProps = {\n\t\t\talert: _alert,\n\t\t\thasCloser: _hasCloser,\n\t\t\tlabel: _label,\n\t\t\tlevel: _level,\n\t\t\ttype: _type,\n\t\t\tvariant: _variant,\n\t\t\tonCloserClick: this.close,\n\t\t\tonAlertTimeout: this.handleAlertTimeout,\n\t\t};\n\n\t\treturn (\n\t\t\t<KolAlertFc {...props}>\n\t\t\t\t<slot />\n\t\t\t</KolAlertFc>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop() public _alert?: boolean = false;\n\n\t/**\n\t * Defines whether the element can be closed.\n\t * @TODO: Change type back to `HasCloserPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCloser?: boolean = false;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType;\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 0;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Alerts an.\n\t */\n\t@Prop() public _on?: KoliBriAlertEventCallbacks;\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: AlertVariant = 'msg';\n\n\t@State() public state: AlertStates = {\n\t\t_level: 0,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: HasCloserPropType): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\tprivate validateOnValue = (value: unknown): boolean =>\n\t\ttypeof value === 'object' && value !== null && typeof (value as KoliBriAlertEventCallbacks).onClose === 'function';\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAlertEventCallbacks): void {\n\t\tif (this.validateOnValue(value)) {\n\t\t\tsetState<KoliBriAlertEventCallbacks>(\n\t\t\t\tthis,\n\t\t\t\t'_on',\n\t\t\t\t{\n\t\t\t\t\tonClose: (value as KoliBriAlertEventCallbacks).onClose,\n\t\t\t\t},\n\t\t\t\t// {\n\t\t\t\t// \tafterPatch: (value: unknown) => {\n\t\t\t\t// \t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t\t// \t},\n\t\t\t\t// }\n\t\t\t);\n\t\t\t// } else {\n\t\t\t// \tsetState<KoliBriAlertEventCallbacks>(this, '_on', null, {\n\t\t\t// \t\tafterPatch: (value: unknown) => {\n\t\t\t// \t\t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t// \t\t},\n\t\t\t// \t});\n\t\t}\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value?) => typeof value === 'string' && alertTypeOptions.includes(value),\n\t\t\tnew Set(`String {${alertTypeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: AlertVariant): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_variant',\n\t\t\t(value?) => typeof value === 'string' && alertVariantOptions.includes(value),\n\t\t\tnew Set(`AlertVariant {${alertVariantOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchValidator,l as watchString}from"./index2.js";import{v as validateImageSource}from"./image-source.js";const loadingOptions=["eager","lazy"];function validateLoading(e,n){watchValidator(e,"_loading",(e=>"string"==typeof e&&loadingOptions.includes(e)),new Set(loadingOptions),n)}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-image {\n display: inline-block;\n max-height: 100%;\n max-width: 100%;\n }\n}",KolImageDefaultStyle0=defaultStyleCss,KolImage$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"",_loading:"lazy",_src:""}}validateAlt(e){watchString(this,"_alt",e,{required:!0})}validateLoading(e){validateLoading(this,e)}validateSizes(e){watchString(this,"_sizes",e)}validateSrc(e){validateImageSource(this,e,{required:!0})}validateSrcset(e){watchString(this,"_srcset",e)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h("img",{key:"23837493ec11632608a497a0319b945b91cadb6d",class:"kol-image",alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset})}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}static get style(){return{default:KolImageDefaultStyle0}}},[33,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],state:[32]},void 0,{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-image"].forEach((e=>{if("kol-image"===e)customElements.get(e)||customElements.define(e,KolImage$1)}))}const KolImage=KolImage$1,defineCustomElement=defineCustomElement$1;export{KolImage,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{l as watchString,w as watchValidator}from"./index2.js";import{v as validateImageSource}from"./image-source.js";const validateAlt=(e,n,t={})=>{watchString(e,"_alt",n,t)},validateImageSizes=(e,n,t={})=>{watchString(e,"_sizes",n,t)},validateImageSrcset=(e,n,t={})=>{watchString(e,"_srcset",n,t)},loadingOptions=["eager","lazy"];function validateLoading(e,n){watchValidator(e,"_loading",(e=>"string"==typeof e&&loadingOptions.includes(e)),new Set(loadingOptions),n)}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-image {\n display: inline-block;\n max-height: 100%;\n max-width: 100%;\n }\n}",KolImageDefaultStyle0=defaultStyleCss,KolImage$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"",_loading:"lazy",_src:""}}validateAlt(e){validateAlt(this,e,{required:!0})}validateLoading(e){validateLoading(this,e)}validateSizes(e){validateImageSizes(this,e)}validateSrc(e){validateImageSource(this,e,{required:!0})}validateSrcset(e){validateImageSrcset(this,e)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h("img",{key:"cca1e1b65e9aab11b4c15bea394d6c54ead1a123",class:"kol-image",alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset})}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}static get style(){return{default:KolImageDefaultStyle0}}},[33,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],state:[32]},void 0,{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-image"].forEach((e=>{if("kol-image"===e)customElements.get(e)||customElements.define(e,KolImage$1)}))}const KolImage=KolImage$1,defineCustomElement=defineCustomElement$1;export{Kol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,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAClC;IAEM,MAAM;QACZ,QACC,4DACC,KAAK,EAAC,WAAW,EACjB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GACpB,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolImage"],"sources":["src/schema/props/loading.ts","src/components/image/style.scss?tag=kol-image&mode=default&encapsulation=shadow","src/components/image/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils';\n\nconst loadingOptions = ['eager', 'lazy'] as const;\nexport type Loading = (typeof loadingOptions)[number];\n\nexport function validateLoading(component: Generic.Element.Component, value?: Loading): void {\n\twatchValidator<Loading>(component, '_loading', (value) => typeof value === 'string' && loadingOptions.includes(value), new Set(loadingOptions), value);\n}\n","@use '../../styles/global' as *;\n\n@layer kol-component {\n\t.kol-image {\n\t\tdisplay: inline-block;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","import type { ImageAPI, ImageSourcePropType, ImageStates, Loading } from '../../schema';\nimport { validateImageSource, validateLoading, watchString } from '../../schema';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\n\nimport type { JSX } from '@stencil/core';\n@Component({\n\ttag: 'kol-image',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolImage implements ImageAPI {\n\t/**\n\t * Setzt den alternativen Text.\n\t */\n\t@Prop() public _alt!: string;\n\n\t/**\n\t * Defines the loading mode for the image.\n\t */\n\t@Prop() public _loading?: Loading = 'lazy';\n\n\t/**\n\t * Defines the image sizes for different screen resolutions, supporting _srcset.\n\t */\n\t@Prop() public _sizes?: string;\n\n\t/**\n\t * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src!: ImageSourcePropType;\n\n\t/**\n\t * Setzt eine Liste von Quell-URLs mit Breiten der Bilder.\n\t */\n\t@Prop() public _srcset?: string;\n\n\t@State() public state: ImageStates = {\n\t\t_alt: '', // ⚠ required\n\t\t_loading: 'lazy',\n\t\t_src: '', // ⚠ required\n\t};\n\n\t@Watch('_alt')\n\tpublic validateAlt(value?: string): void {\n\t\twatchString(this, '_alt', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_loading')\n\tpublic validateLoading(value?: Loading): void {\n\t\tvalidateLoading(this, value);\n\t}\n\n\t@Watch('_sizes')\n\tpublic validateSizes(value?: string): void {\n\t\twatchString(this, '_sizes', value);\n\t}\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_srcset')\n\tpublic validateSrcset(value?: string): void {\n\t\twatchString(this, '_srcset', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlt(this._alt);\n\t\tthis.validateLoading(this._loading);\n\t\tthis.validateSizes(this._sizes);\n\t\tthis.validateSrc(this._src);\n\t\tthis.validateSrcset(this._srcset);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclass=\"kol-image\"\n\t\t\t\talt={this.state._alt}\n\t\t\t\tloading={this.state._loading}\n\t\t\t\tsizes={this.state._sizes}\n\t\t\t\tsrc={this.state._src}\n\t\t\t\tsrcset={this.state._srcset}\n\t\t\t></img>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-image.js","mappings":";;;;;;;AAg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GM,WAAW,CAAC,KAA2B;QAC7C,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE;YAChC,QAAQ,EAAE,IAAI;SACd,CAAC,CAAC;KACH;IAGM,cAAc,CAAC,KAAc;QACnC,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACjC;IAEM,iBAAiB;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAClC;IAEM,MAAM;QACZ,QACC,4DACC,KAAK,EAAC,WAAW,EACjB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GACpB,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolImage"],"sources":["src/schema/props/alt.ts","src/schema/props/image-sizes.ts","src/schema/props/image-srcset.ts","src/schema/props/loading.ts","src/components/image/style.scss?tag=kol-image&mode=default&encapsulation=shadow","src/components/image/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type AltPropType = string;\n\n/**\n * Sets the alternative text of the image.\n */\nexport type PropAlt = {\n\talt: AltPropType;\n};\n\n/* validator */\nexport const validateAlt = (component: Generic.Element.Component, value?: AltPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_alt', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type ImageSizesPropType = string;\n\n/**\n * Defines the image sizes for different screen resolutions, supporting _srcset.\n */\nexport type PropImageSizes = {\n\tsizes: ImageSizesPropType;\n};\n\n/* validator */\nexport const validateImageSizes = (component: Generic.Element.Component, value?: ImageSizesPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_sizes', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type ImageSrcsetPropType = string;\n\n/**\n * Sets a list of source URLs with widths of the images.\n */\nexport type PropImageSrcset = {\n\tsrcset: ImageSrcsetPropType;\n};\n\n/* validator */\nexport const validateImageSrcset = (component: Generic.Element.Component, value?: ImageSrcsetPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_srcset', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils';\n\nconst loadingOptions = ['eager', 'lazy'] as const;\nexport type Loading = (typeof loadingOptions)[number];\n\n/**\n * Sets the loading strategy for the image element.\n */\nexport type PropLoading = {\n\tloading: Loading;\n};\n\nexport function validateLoading(component: Generic.Element.Component, value?: Loading): void {\n\twatchValidator<Loading>(component, '_loading', (value) => typeof value === 'string' && loadingOptions.includes(value), new Set(loadingOptions), value);\n}\n","@use '../../styles/global' as *;\n\n@layer kol-component {\n\t.kol-image {\n\t\tdisplay: inline-block;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","import type { ImageAPI, ImageSourcePropType, ImageStates, Loading } from '../../schema';\nimport { validateAlt, validateImageSizes, validateImageSrcset, validateImageSource, validateLoading } from '../../schema';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\n\nimport type { JSX } from '@stencil/core';\n@Component({\n\ttag: 'kol-image',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolImage implements ImageAPI {\n\t/**\n\t * Setzt den alternativen Text.\n\t */\n\t@Prop() public _alt!: string;\n\n\t/**\n\t * Defines the loading mode for the image.\n\t */\n\t@Prop() public _loading?: Loading = 'lazy';\n\n\t/**\n\t * Defines the image sizes for different screen resolutions, supporting _srcset.\n\t */\n\t@Prop() public _sizes?: string;\n\n\t/**\n\t * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src!: ImageSourcePropType;\n\n\t/**\n\t * Setzt eine Liste von Quell-URLs mit Breiten der Bilder.\n\t */\n\t@Prop() public _srcset?: string;\n\n\t@State() public state: ImageStates = {\n\t\t_alt: '', // ⚠ required\n\t\t_loading: 'lazy',\n\t\t_src: '', // ⚠ required\n\t};\n\n\t@Watch('_alt')\n\tpublic validateAlt(value?: string): void {\n\t\tvalidateAlt(this, value, { required: true });\n\t}\n\n\t@Watch('_loading')\n\tpublic validateLoading(value?: Loading): void {\n\t\tvalidateLoading(this, value);\n\t}\n\n\t@Watch('_sizes')\n\tpublic validateSizes(value?: string): void {\n\t\tvalidateImageSizes(this, value);\n\t}\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_srcset')\n\tpublic validateSrcset(value?: string): void {\n\t\tvalidateImageSrcset(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlt(this._alt);\n\t\tthis.validateLoading(this._loading);\n\t\tthis.validateSizes(this._sizes);\n\t\tthis.validateSrc(this._src);\n\t\tthis.validateSrcset(this._srcset);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclass=\"kol-image\"\n\t\t\t\talt={this.state._alt}\n\t\t\t\tloading={this.state._loading}\n\t\t\t\tsizes={this.state._sizes}\n\t\t\t\tsrc={this.state._src}\n\t\t\t\tsrcset={this.state._srcset}\n\t\t\t></img>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-2f6c3929.js";import{c as clsx}from"./clsx-09a06a12.js";import{e as KolIconTag,b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{t as translate}from"./i18n-260f0fe9.js";import{a as BEM_CLASS_ALERT__ICON,b as bem,c as BEM_CLASS_ALERT__CONTENT,d as BEM_CLASS_ALERT__CLOSER}from"./bem-e4c3a2e6.js";import{K as KolHeadingFc}from"./Heading-7b90eeb4.js";const Icon=({ariaLabel:a,icon:e})=>h(Fragment,null,h("span",{class:"visually-hidden"},a),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:e})),AlertIcon=({type:a,label:e})=>{switch(a){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e})}},vibrateOnError=()=>{if("undefined"==typeof navigator||"function"!=typeof navigator.vibrate)return;const a=navigator.userActivation;if(((null==a?void 0:a.isActive)||(null==a?void 0:a.hasBeenActive))&&matchMedia("(any-pointer: coarse)").matches)try{navigator.vibrate([100,75,100,75,100])}catch(a){}},KolAlertFc=(a,e)=>{const{class:o={},alert:l=!1,hasCloser:n=!1,label:t,level:r=0,type:s="default",variant:i="msg",onAlertTimeout:c,onCloserClick:d}=a,_=__rest(a,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]);l&&(vibrateOnError(),setTimeout((()=>{null==c||c()}),1e4));const b=bem("kol-alert",{hasCloser:!!n,[`type-${s}`]:!0,[`variant-${i}`]:!0}),m=bem("kol-alert","heading",{[`h${r}`]:!0}),v=Object.assign({class:clsx(o,b),role:l?"error"===s?"alert":"status":void 0},_);return h("div",Object.assign({},v),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:t,type:s}),h("div",{class:"kol-alert__container-content"},t&&h(KolHeadingFc,{class:m,level:r,id:"heading"},t),"msg"===i&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":t?"heading":void 0},e)),n&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER,"data-testid":"alert-close-button",_ariaDescription:(null==t?void 0:t.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:d},_tooltipAlign:"left"})),"card"===i&&h("div",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":t?"heading":void 0},e))};export{KolAlertFc as K};
@@ -0,0 +1 @@
1
+ {"file":"Alert-4f2f7115.js","mappings":";;;;;;;;;;;AAWA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAI,CAClE,EACF;AACH,CAAC,CAAC;AAEF,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;IAC3E,QAAQ,IAAI;QACX,KAAK,OAAO;YACX,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;QAC/F,KAAK,MAAM;YACV,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,UAAU,C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SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\n/**\n * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n * - https://googlechrome.github.io/samples/vibration/\n * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n * @todo Move side-effect out of render-function to avoid multiple incarnations.\n */\nconst vibrateOnError = (): void => {\n\tif (typeof navigator === 'undefined' || typeof navigator.vibrate !== 'function') {\n\t\treturn;\n\t}\n\tconst ua = navigator.userActivation;\n\tconst hasGesture = ua?.isActive || ua?.hasBeenActive;\n\tif (!hasGesture) {\n\t\treturn;\n\t}\n\tif (!matchMedia('(any-pointer: coarse)').matches) {\n\t\treturn;\n\t}\n\ttry {\n\t\tnavigator.vibrate([100, 75, 100, 75, 100]);\n\t} catch {\n\t\t/* no-op */\n\t}\n};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\tvibrateOnError();\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-c14cc40b.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{K as KolHeadingFc}from"./Heading-c0a196c8.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:i,level:e=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:e,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:i,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-2f6c3929.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{K as KolHeadingFc}from"./Heading-7b90eeb4.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:e,level:i=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:i,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:e,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
@@ -1 +1 @@
1
- {"file":"Collapsible-018af61d.js","mappings":";;;;;;;;;MAuCM,gBAAgB,GAAyB,CAAC,KAAK,EAAE,QAAQ;IAC9D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAA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AAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,cAAc,CAAC;gBAC/E,0BAAkB,IAAI,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\nimport KolHeadingFc from '../Heading';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\t'collapsible--disabled': disabled === true,\n\t\t\t\t\t'collapsible--open': open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingFc ref={HeadingProps?.ref} level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingFc>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default KolCollapsibleFc;\n"],"version":3}
1
+ {"file":"Collapsible-7cb22ab1.js","mappings":";;;;;;;;;MAuCM,gBAAgB,GAAyB,CAAC,KAAK,EAAE,QAAQ;IAC9D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,GAAG,EAAE,EAAE,kBAAkB,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,KAAe,KAAK,EAAf,K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S,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\nimport KolHeadingFc from '../Heading';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\t'collapsible--disabled': disabled === true,\n\t\t\t\t\t'collapsible--open': open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingFc ref={HeadingProps?.ref} level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingFc>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default KolCollapsibleFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h}from"./index-c14cc40b.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";import{t as translate}from"./i18n-260f0fe9.js";import{c as clsx}from"./clsx-09a06a12.js";const getRenderStates=o=>{var s;const t="error"===(null===(s=o._msg)||void 0===s?void 0:s._type)&&!0===o._touched,e="string"==typeof o._hint&&o._hint.length>0,n=[];return!0===t&&n.push(`${o._id}-error`),!0===e&&n.push(`${o._id}-hint`),{hasMsg:t,hasHint:e,ariaDescribedBy:n}},CustomSuggestionsToggleFc=({onClick:o,disabled:s})=>h("button",{tabindex:"-1",class:"kol-custom-suggestions-toggle",onClick:o,disabled:s},h(KolIconTag,{_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown")})),CustomSuggestionsOptionFc=({index:o,ref:s,selected:t,onClick:e,onMouseOver:n,onFocus:i,onKeyDown:c,option:r})=>h("li",{id:`option-${o}`,key:`-${o}`,ref:s,"data-index":o,tabIndex:-1,role:"option","aria-selected":t?"true":void 0,onClick:e,onMouseOver:n,onFocus:i,class:"kol-custom-suggestions-option",onKeyDown:c},r),CustomSuggestionsOptionsGroupFc=({blockSuggestionMouseOver:o,onKeyDown:s,style:t},e)=>h("ul",{role:"listbox",style:t,class:clsx("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":o}),onKeyDown:s},e);export{CustomSuggestionsToggleFc as C,CustomSuggestionsOptionsGroupFc as a,CustomSuggestionsOptionFc as b,getRenderStates as g};
4
+ import{h}from"./index-2f6c3929.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";import{t as translate}from"./i18n-260f0fe9.js";import{c as clsx}from"./clsx-09a06a12.js";const getRenderStates=o=>{var s;const t="error"===(null===(s=o._msg)||void 0===s?void 0:s._type)&&!0===o._touched,e="string"==typeof o._hint&&o._hint.length>0,n=[];return!0===t&&n.push(`${o._id}-error`),!0===e&&n.push(`${o._id}-hint`),{hasMsg:t,hasHint:e,ariaDescribedBy:n}},CustomSuggestionsToggleFc=({onClick:o,disabled:s})=>h("button",{tabindex:"-1",class:"kol-custom-suggestions-toggle",onClick:o,disabled:s},h(KolIconTag,{_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown")})),CustomSuggestionsOptionFc=({index:o,ref:s,selected:t,onClick:e,onMouseOver:n,onFocus:i,onKeyDown:r,option:c})=>h("li",{id:`option-${o}`,key:`-${o}`,ref:s,"data-index":o,tabIndex:-1,role:"option","aria-selected":t?"true":void 0,onClick:e,onMouseOver:n,onFocus:i,class:"kol-custom-suggestions-option",onKeyDown:r},c),CustomSuggestionsOptionsGroupFc=({blockSuggestionMouseOver:o,onKeyDown:s,style:t},e)=>h("ul",{role:"listbox",style:t,class:clsx("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":o}),onKeyDown:s},e);export{CustomSuggestionsToggleFc as C,CustomSuggestionsOptionsGroupFc as a,CustomSuggestionsOptionFc as b,getRenderStates as g};
@@ -1 +1 @@
1
- {"file":"CustomSuggestionsOptionsGroup-535469be.js","mappings":";;;;;;;;MASa,eAAe,GAAG,CAAC,KAK/B;;IAKA,MAAM,cAAc,GAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,MAAK,OAAO,CAAC;IACrD,MAAM,MAAM,GAAG,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,IAAI,MAAM,KAAK,IAAI,EAAE;QACpB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;KAC3C;IACD,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;KAC1C;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AAC7C;;MCxBM,yBAAyB,GAAqC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE;IACzF,QACC,cAAQ,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,+BAA+B,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;QAC/F,EAAC,UAAU,IAAC,MAAM,EAAC,+BAA+B,EAAC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,GAAI,CAChF,EACR;AACH;;MCFM,yBAAyB,GAA+B,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE;IACxI,QACC,UACC,EAAE,EAAE,UAAU,KAAK,EAAE,EACrB,GAAG,EAAE,IAAI,KAAK,EAAE,EAChB,GAAG,EAAE,GAAG,gBACI,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,QAAQ,mBACE,QAAQ,GAAG,MAAM,GAAG,SAAS,EAC5C,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,+BAA+B,EACrC,SAAS,EAAE,SAAS,IAEnB,MAAM,CACH,EACJ;AACH;;MCtBM,+BAA+B,GAA2C,CAAC,EAAE,wBAAwB,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ;IACxI,QACC,UACC,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,CAAC,sCAAsC,EAAE;YACnD,qDAAqD,EAAE,wBAAwB;SAC/E,CAAC,EACF,SAAS,EAAE,SAAS,IAEnB,QAAQ,CACL,EACJ;AACH;;;;","names":[],"sources":["src/components/input/controller.ts","src/functional-components/CustomSuggestionsToggle/CustomSuggestionsToggle.tsx","src/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.tsx","src/functional-components/CustomSuggestionsOptionsGroup/CustomSuggestionsOptionsGroup.tsx"],"sourcesContent":["import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasMsg: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValid = state._msg?._type === 'error';\n\tconst hasMsg = isMessageValid && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMsg === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasMsg, hasHint, ariaDescribedBy };\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { JSXBase } from '@stencil/core/internal';\n\nexport type CustomSuggestionsToggleProps = JSXBase.HTMLAttributes<HTMLButtonElement> & { disabled?: boolean };\n\nconst CustomSuggestionsToggleFc: FC<CustomSuggestionsToggleProps> = ({ onClick, disabled }) => {\n\treturn (\n\t\t<button tabindex=\"-1\" class=\"kol-custom-suggestions-toggle\" onClick={onClick} disabled={disabled}>\n\t\t\t<KolIconTag _icons=\"codicon codicon-triangle-down\" _label={translate('kol-dropdown')} />\n\t\t</button>\n\t);\n};\nexport default CustomSuggestionsToggleFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type CustomSuggestionsProps = JSXBase.HTMLAttributes<HTMLLIElement> & {\n\tindex: number;\n\toption: W3CInputValue;\n\tselected: boolean;\n\tref?: ((elm?: HTMLLIElement | undefined) => void) | undefined;\n};\n\nconst CustomSuggestionsOptionFc: FC<CustomSuggestionsProps> = ({ index, ref, selected, onClick, onMouseOver, onFocus, onKeyDown, option }) => {\n\treturn (\n\t\t<li\n\t\t\tid={`option-${index}`}\n\t\t\tkey={`-${index}`}\n\t\t\tref={ref}\n\t\t\tdata-index={index}\n\t\t\ttabIndex={-1}\n\t\t\trole=\"option\"\n\t\t\taria-selected={selected ? 'true' : undefined}\n\t\t\tonClick={onClick}\n\t\t\tonMouseOver={onMouseOver}\n\t\t\tonFocus={onFocus}\n\t\t\tclass=\"kol-custom-suggestions-option\"\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{option}\n\t\t</li>\n\t);\n};\nexport default CustomSuggestionsOptionFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type CustomSuggestionsOptionsGroupProps = JSXBase.HTMLAttributes<HTMLUListElement> & {\n\tblockSuggestionMouseOver: boolean;\n};\n\nconst CustomSuggestionsOptionsGroupFc: FC<CustomSuggestionsOptionsGroupProps> = ({ blockSuggestionMouseOver, onKeyDown, style }, children) => {\n\treturn (\n\t\t<ul\n\t\t\trole=\"listbox\"\n\t\t\tstyle={style}\n\t\t\tclass={clsx('kol-custom-suggestions-options-group', {\n\t\t\t\t'kol-custom-suggestions-options-group--cursor-hidden': blockSuggestionMouseOver,\n\t\t\t})}\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{children}\n\t\t</ul>\n\t);\n};\nexport default CustomSuggestionsOptionsGroupFc;\n"],"version":3}
1
+ {"file":"CustomSuggestionsOptionsGroup-06278bda.js","mappings":";;;;;;;;MASa,eAAe,GAAG,CAAC,KAK/B;;IAKA,MAAM,cAAc,GAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,MAAK,OAAO,CAAC;IACrD,MAAM,MAAM,GAAG,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,IAAI,MAAM,KAAK,IAAI,EAAE;QACpB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;KAC3C;IACD,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,O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/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.tsx","src/functional-components/CustomSuggestionsOptionsGroup/CustomSuggestionsOptionsGroup.tsx"],"sourcesContent":["import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasMsg: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValid = state._msg?._type === 'error';\n\tconst hasMsg = isMessageValid && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMsg === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasMsg, hasHint, ariaDescribedBy };\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { JSXBase } from '@stencil/core/internal';\n\nexport type CustomSuggestionsToggleProps = JSXBase.HTMLAttributes<HTMLButtonElement> & { disabled?: boolean };\n\nconst CustomSuggestionsToggleFc: FC<CustomSuggestionsToggleProps> = ({ onClick, disabled }) => {\n\treturn (\n\t\t<button tabindex=\"-1\" class=\"kol-custom-suggestions-toggle\" onClick={onClick} disabled={disabled}>\n\t\t\t<KolIconTag _icons=\"codicon codicon-triangle-down\" _label={translate('kol-dropdown')} />\n\t\t</button>\n\t);\n};\nexport default CustomSuggestionsToggleFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type CustomSuggestionsProps = JSXBase.HTMLAttributes<HTMLLIElement> & {\n\tindex: number;\n\toption: W3CInputValue;\n\tselected: boolean;\n\tref?: ((elm?: HTMLLIElement | undefined) => void) | undefined;\n};\n\nconst CustomSuggestionsOptionFc: FC<CustomSuggestionsProps> = ({ index, ref, selected, onClick, onMouseOver, onFocus, onKeyDown, option }) => {\n\treturn (\n\t\t<li\n\t\t\tid={`option-${index}`}\n\t\t\tkey={`-${index}`}\n\t\t\tref={ref}\n\t\t\tdata-index={index}\n\t\t\ttabIndex={-1}\n\t\t\trole=\"option\"\n\t\t\taria-selected={selected ? 'true' : undefined}\n\t\t\tonClick={onClick}\n\t\t\tonMouseOver={onMouseOver}\n\t\t\tonFocus={onFocus}\n\t\t\tclass=\"kol-custom-suggestions-option\"\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{option}\n\t\t</li>\n\t);\n};\nexport default CustomSuggestionsOptionFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type CustomSuggestionsOptionsGroupProps = JSXBase.HTMLAttributes<HTMLUListElement> & {\n\tblockSuggestionMouseOver: boolean;\n};\n\nconst CustomSuggestionsOptionsGroupFc: FC<CustomSuggestionsOptionsGroupProps> = ({ blockSuggestionMouseOver, onKeyDown, style }, children) => {\n\treturn (\n\t\t<ul\n\t\t\trole=\"listbox\"\n\t\t\tstyle={style}\n\t\t\tclass={clsx('kol-custom-suggestions-options-group', {\n\t\t\t\t'kol-custom-suggestions-options-group--cursor-hidden': blockSuggestionMouseOver,\n\t\t\t})}\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{children}\n\t\t</ul>\n\t);\n};\nexport default CustomSuggestionsOptionsGroupFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-c14cc40b.js";import{c as clsx}from"./clsx-09a06a12.js";import{m as showExpertSlot,C as buildBadgeTextString}from"./index-ebe5a881.js";import{b as FormFieldTooltipFc,K as KolFormFieldLabelFc,d as KolFormFieldHintFc,c as checkHasMsg,a as convertMsgToInternMsg}from"./getRenderStates-0f300345.js";const InputContainer=(e,l)=>{var{class:o}=e,t=__rest(e,["class"]);return h("div",Object.assign({class:clsx("kol-field-control__input",o)},t),l)},KolFieldControlFc=(e,l)=>{const{class:o,id:t,disabled:r,label:s,hideLabel:i,labelAlign:n,renderNoTooltip:a,hint:d,renderNoHint:c,tooltipAlign:b,accessKey:p,shortKey:g,msg:F,touched:_,required:f,readonly:u,fieldControlInputProps:m,fieldControlLabelProps:y,fieldControlTooltipProps:C,fieldControlHintProps:K}=e,k=__rest(e,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),x=!c,j=!a,T=checkHasMsg(F,_),v=showExpertSlot(s),B=j&&!v&&i,P=buildBadgeTextString(p,g),L=[h(Fragment,null,h(InputContainer,Object.assign({},m),l),B&&h(FormFieldTooltipFc,Object.assign({},C||{},{id:t,label:s,hideLabel:i,align:b,badgeText:P}))),h(KolFormFieldLabelFc,Object.assign({},y||{},{id:t,baseClassName:"kol-field-control",class:clsx(null==y?void 0:y.class,{"kol-field-control__label--visually-hidden":Boolean(i)}),hasExpertSlot:v,label:s,accessKey:p,shortKey:g}))];"left"===n&&L.reverse();const O={"kol-field-control--disabled":Boolean(r),"kol-field-control--required":Boolean(f),"kol-field-control--touched":Boolean(_),"kol-field-control--hide-label":Boolean(i),"kol-field-control--read-only":Boolean(u),[`kol-field-control--${(null==F?void 0:F.type)||"error"}`]:Boolean(T),[`kol-field-control--label-align-${n}`]:Boolean(n)};return h("div",Object.assign({class:clsx("kol-field-control",O,o)},k),L,x&&h(KolFormFieldHintFc,Object.assign({},K||{},{baseClassName:"kol-field-control",id:t,hint:d})))};function getFieldControlProps(e){const l={id:e._id,disabled:e._disabled,msg:convertMsgToInternMsg(e._msg),hint:e._hint,label:e._label,hideLabel:e._hideLabel,touched:e._touched};return"_required"in e&&(l.required=e._required),"_readOnly"in e&&(l.readonly=e._readOnly),"_labelAlign"in e&&(l.labelAlign=e._labelAlign),"_accessKey"in e&&(l.accessKey=e._accessKey),"_shortKey"in e&&(l.shortKey=e._shortKey),l}const FieldControlStateWrapper=(e,l)=>{var{state:o}=e,t=__rest(e,["state"]);return h(KolFieldControlFc,Object.assign({},getFieldControlProps(o),t),l)};export{FieldControlStateWrapper as F};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-2f6c3929.js";import{c as clsx}from"./clsx-09a06a12.js";import{m as showExpertSlot,C as buildBadgeTextString}from"./index-ebe5a881.js";import{b as FormFieldTooltipFc,K as KolFormFieldLabelFc,d as KolFormFieldHintFc,c as checkHasMsg,a as convertMsgToInternMsg}from"./getRenderStates-1a7401a2.js";const InputContainer=(e,l)=>{var{class:o}=e,t=__rest(e,["class"]);return h("div",Object.assign({class:clsx("kol-field-control__input",o)},t),l)},KolFieldControlFc=(e,l)=>{const{class:o,id:t,disabled:r,label:s,hideLabel:i,labelAlign:n,renderNoTooltip:a,hint:d,renderNoHint:c,tooltipAlign:b,accessKey:p,shortKey:g,msg:F,touched:_,required:f,readonly:u,fieldControlInputProps:m,fieldControlLabelProps:y,fieldControlTooltipProps:C,fieldControlHintProps:K}=e,k=__rest(e,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),x=!c,j=!a,T=checkHasMsg(F,_),v=showExpertSlot(s),B=j&&!v&&i,P=buildBadgeTextString(p,g),L=[h(Fragment,null,h(InputContainer,Object.assign({},m),l),B&&h(FormFieldTooltipFc,Object.assign({},C||{},{id:t,label:s,hideLabel:i,align:b,badgeText:P}))),h(KolFormFieldLabelFc,Object.assign({},y||{},{id:t,baseClassName:"kol-field-control",class:clsx(null==y?void 0:y.class,{"kol-field-control__label--visually-hidden":Boolean(i)}),hasExpertSlot:v,label:s,accessKey:p,shortKey:g}))];"left"===n&&L.reverse();const O={"kol-field-control--disabled":Boolean(r),"kol-field-control--required":Boolean(f),"kol-field-control--touched":Boolean(_),"kol-field-control--hide-label":Boolean(i),"kol-field-control--read-only":Boolean(u),[`kol-field-control--${(null==F?void 0:F.type)||"error"}`]:Boolean(T),[`kol-field-control--label-align-${n}`]:Boolean(n)};return h("div",Object.assign({class:clsx("kol-field-control",O,o)},k),L,x&&h(KolFormFieldHintFc,Object.assign({},K||{},{baseClassName:"kol-field-control",id:t,hint:d})))};function getFieldControlProps(e){const l={id:e._id,disabled:e._disabled,msg:convertMsgToInternMsg(e._msg),hint:e._hint,label:e._label,hideLabel:e._hideLabel,touched:e._touched};return"_required"in e&&(l.required=e._required),"_readOnly"in e&&(l.readonly=e._readOnly),"_labelAlign"in e&&(l.labelAlign=e._labelAlign),"_accessKey"in e&&(l.accessKey=e._accessKey),"_shortKey"in e&&(l.shortKey=e._shortKey),l}const FieldControlStateWrapper=(e,l)=>{var{state:o}=e,t=__rest(e,["state"]);return h(KolFieldControlFc,Object.assign({},getFieldControlProps(o),t),l)};export{FieldControlStateWrapper as F};
@@ -1 +1 @@
1
- {"file":"FieldControlStateWrapper-6b9c9eb1.js","mappings":";;;;;;;;;AAqCA,MAAM,cAAc,GAA+C,CAAC,EAA+B,EAAE,QAAQ;QAAzC,EAAE,KAAK,EAAE,UAAU,OAAY,EAAP,KAAK,cAA7B,SAA+B,CAAF;IAChG,QACC,yBAAK,KAAK,EAAE,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,IAAM,KAAK,GACjE,QAAQ,CACJ,EACL;AACH,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAA0B,CAAC,KAAK,EAAE,QAAQ;IAChE,MAA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Q;KACvB,CAAC;IAEF,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,aAAa,IAAI,KAAK,EAAE;QAC3B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC;KACrC;IAED,IAAI,YAAY,IAAI,KAAK,EAAE;QAC1B,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC;KACnC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;MAEK,wBAAwB,GAAsC,CAAC,EAAmB,EAAE,QAAQ;QAA7B,EAAE,KAAK,OAAY,EAAP,KAAK,cAAjB,SAAmB,CAAF;IACrF,QACC,EAAC,iBAAiB,oBAAK,oBAAoB,CAAC,KAAK,CAAC,EAAM,KAAK,GAC3D,QAAQ,CACU,EACnB;AACH;;;;","names":["KolFieldControlTooltipFc","KolFieldControlLabelFc","KolFieldControlHintFc"],"sources":["src/functional-components/FieldControl/FieldControl.tsx","src/functional-component-wrappers/FieldControlStateWrapper/FieldControlStateWrapper.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { type AlignPropType, type LabelAlignPropType, buildBadgeTextString, checkHasMsg, type InternMsgPropType, showExpertSlot } from '../../schema';\nimport KolFieldControlTooltipFc from '../FormFieldTooltip';\nimport KolFieldControlLabelFc from '../FormFieldLabel';\nimport KolFieldControlHintFc from '../FormFieldHint';\n\nexport type FieldControlProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\thint?: string;\n\tlabel: string;\n\thideLabel?: boolean;\n\tlabelAlign?: LabelAlignPropType;\n\taccessKey?: string;\n\tshortKey?: string;\n\ttooltipAlign?: AlignPropType;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\trequired?: boolean;\n\treadonly?: boolean;\n\tshowTooltip?: boolean;\n\n\trenderNoLabel?: boolean;\n\trenderNoHint?: boolean;\n\trenderNoTooltip?: boolean;\n\n\tfieldControlLabelProps?: JSXBase.HTMLAttributes<Omit<HTMLLabelElement | HTMLLegendElement, 'id' | 'hidden' | 'htmlFor'>> & {\n\t\tcomponent?: 'label' | 'legend';\n\t\tshowBadge?: boolean;\n\t};\n\tfieldControlInputProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tfieldControlTooltipProps?: Pick<JSXBase.HTMLAttributes<HTMLElement>, 'class'>;\n\tfieldControlHintProps?: JSXBase.HTMLAttributes<HTMLElement>;\n};\n\nconst InputContainer: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-field-control__input', classNames)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolFieldControlFc: FC<FieldControlProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames,\n\t\tid,\n\t\tdisabled,\n\t\tlabel,\n\t\thideLabel,\n\t\tlabelAlign,\n\t\trenderNoTooltip,\n\t\thint,\n\t\trenderNoHint,\n\t\ttooltipAlign,\n\t\taccessKey,\n\t\tshortKey,\n\t\tmsg,\n\t\ttouched,\n\t\trequired,\n\t\treadonly,\n\t\tfieldControlInputProps,\n\t\tfieldControlLabelProps,\n\t\tfieldControlTooltipProps,\n\t\tfieldControlHintProps,\n\t\t...other\n\t} = props;\n\n\tconst canShowHint = !renderNoHint;\n\tconst canShowTooltip = !renderNoTooltip;\n\tconst showMsg = checkHasMsg(msg, touched);\n\tconst hasExpertSlot = showExpertSlot(label);\n\tconst useTooltipInsteadOfLabel = canShowTooltip && !hasExpertSlot && hideLabel;\n\tconst badgeText = buildBadgeTextString(accessKey, shortKey);\n\n\tconst components = [\n\t\t<>\n\t\t\t<InputContainer {...fieldControlInputProps}>{children}</InputContainer>\n\t\t\t{useTooltipInsteadOfLabel && (\n\t\t\t\t<KolFieldControlTooltipFc\n\t\t\t\t\t{...(fieldControlTooltipProps || {})}\n\t\t\t\t\tid={id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\thideLabel={hideLabel}\n\t\t\t\t\talign={tooltipAlign}\n\t\t\t\t\tbadgeText={badgeText}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>,\n\t\t<KolFieldControlLabelFc\n\t\t\t{...(fieldControlLabelProps || {})}\n\t\t\tid={id}\n\t\t\tbaseClassName=\"kol-field-control\"\n\t\t\tclass={clsx(fieldControlLabelProps?.class, {\n\t\t\t\t['kol-field-control__label--visually-hidden']: Boolean(hideLabel),\n\t\t\t})}\n\t\t\thasExpertSlot={hasExpertSlot}\n\t\t\tlabel={label}\n\t\t\taccessKey={accessKey}\n\t\t\tshortKey={shortKey}\n\t\t/>,\n\t];\n\n\tif (labelAlign === 'left') {\n\t\tcomponents.reverse();\n\t}\n\n\tconst stateCssClasses = {\n\t\t['kol-field-control--disabled']: Boolean(disabled),\n\t\t['kol-field-control--required']: Boolean(required),\n\t\t['kol-field-control--touched']: Boolean(touched),\n\t\t['kol-field-control--hide-label']: Boolean(hideLabel),\n\t\t['kol-field-control--read-only']: Boolean(readonly),\n\t\t[`kol-field-control--${msg?.type || 'error'}`]: Boolean(showMsg),\n\t\t[`kol-field-control--label-align-${labelAlign}`]: Boolean(labelAlign),\n\t};\n\n\treturn (\n\t\t<div class={clsx('kol-field-control', stateCssClasses, classNames)} {...other}>\n\t\t\t{components}\n\t\t\t{canShowHint && <KolFieldControlHintFc {...(fieldControlHintProps || {})} baseClassName=\"kol-field-control\" id={id} hint={hint} />}\n\t\t</div>\n\t);\n};\n\nexport default KolFieldControlFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolFieldControlFc, { type FieldControlProps } from '../../functional-components/FieldControl';\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\ttype SelectStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates\n\t| SelectStates;\n\nexport type FieldControlStateWrapperProps = Partial<FieldControlProps> & {\n\tstate: InputState;\n};\n\nfunction getFieldControlProps(state: InputState): FieldControlProps {\n\tconst props: FieldControlProps = {\n\t\tid: state._id,\n\t\tdisabled: state._disabled,\n\t\tmsg: convertMsgToInternMsg(state._msg),\n\t\thint: state._hint,\n\t\tlabel: state._label,\n\t\thideLabel: state._hideLabel,\n\t\ttouched: state._touched,\n\t};\n\n\tif ('_required' in state) {\n\t\tprops.required = state._required;\n\t}\n\n\tif ('_readOnly' in state) {\n\t\tprops.readonly = state._readOnly;\n\t}\n\n\tif ('_labelAlign' in state) {\n\t\tprops.labelAlign = state._labelAlign;\n\t}\n\n\tif ('_accessKey' in state) {\n\t\tprops.accessKey = state._accessKey;\n\t}\n\n\tif ('_shortKey' in state) {\n\t\tprops.shortKey = state._shortKey;\n\t}\n\n\treturn props;\n}\n\nconst FieldControlStateWrapper: FC<FieldControlStateWrapperProps> = ({ state, ...other }, children) => {\n\treturn (\n\t\t<KolFieldControlFc {...getFieldControlProps(state)} {...other}>\n\t\t\t{children}\n\t\t</KolFieldControlFc>\n\t);\n};\n\nexport default FieldControlStateWrapper;\n"],"version":3}
1
+ {"file":"FieldControlStateWrapper-602a7af3.js","mappings":";;;;;;;;;AAqCA,MAAM,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C,MAAM,KAAK,GAAsB;QAChC,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,GAAG,EAAE,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,IAAI,EAAE,KAAK,CAAC,KAAK;QACjB,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC;IAEF,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,aAAa,IAAI,KAAK,EAAE;QAC3B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC;KACrC;IAED,IAAI,YAAY,IAAI,KAAK,EAAE;QAC1B,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC;KACnC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;MAEK,wBAAwB,GAAsC,CAAC,EAAmB,EAAE,QAAQ;QAA7B,EAAE,KAAK,OAAY,EAAP,KAAK,cAAjB,SAAmB,CAAF;IACrF,QACC,EAAC,iBAAiB,oBAAK,oBAAoB,CAAC,KAAK,CAAC,EAAM,KAAK,GAC3D,QAAQ,CACU,EACnB;AACH;;;;","names":["KolFieldControlTooltipFc","KolFieldControlLabelFc","KolFieldControlHintFc"],"sources":["src/functional-components/FieldControl/FieldControl.tsx","src/functional-component-wrappers/FieldControlStateWrapper/FieldControlStateWrapper.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { type AlignPropType, type LabelAlignPropType, buildBadgeTextString, checkHasMsg, type InternMsgPropType, showExpertSlot } from '../../schema';\nimport KolFieldControlTooltipFc from '../FormFieldTooltip';\nimport KolFieldControlLabelFc from '../FormFieldLabel';\nimport KolFieldControlHintFc from '../FormFieldHint';\n\nexport type FieldControlProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\thint?: string;\n\tlabel: string;\n\thideLabel?: boolean;\n\tlabelAlign?: LabelAlignPropType;\n\taccessKey?: string;\n\tshortKey?: string;\n\ttooltipAlign?: AlignPropType;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\trequired?: boolean;\n\treadonly?: boolean;\n\tshowTooltip?: boolean;\n\n\trenderNoLabel?: boolean;\n\trenderNoHint?: boolean;\n\trenderNoTooltip?: boolean;\n\n\tfieldControlLabelProps?: JSXBase.HTMLAttributes<Omit<HTMLLabelElement | HTMLLegendElement, 'id' | 'hidden' | 'htmlFor'>> & {\n\t\tcomponent?: 'label' | 'legend';\n\t\tshowBadge?: boolean;\n\t};\n\tfieldControlInputProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tfieldControlTooltipProps?: Pick<JSXBase.HTMLAttributes<HTMLElement>, 'class'>;\n\tfieldControlHintProps?: JSXBase.HTMLAttributes<HTMLElement>;\n};\n\nconst InputContainer: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-field-control__input', classNames)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolFieldControlFc: FC<FieldControlProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames,\n\t\tid,\n\t\tdisabled,\n\t\tlabel,\n\t\thideLabel,\n\t\tlabelAlign,\n\t\trenderNoTooltip,\n\t\thint,\n\t\trenderNoHint,\n\t\ttooltipAlign,\n\t\taccessKey,\n\t\tshortKey,\n\t\tmsg,\n\t\ttouched,\n\t\trequired,\n\t\treadonly,\n\t\tfieldControlInputProps,\n\t\tfieldControlLabelProps,\n\t\tfieldControlTooltipProps,\n\t\tfieldControlHintProps,\n\t\t...other\n\t} = props;\n\n\tconst canShowHint = !renderNoHint;\n\tconst canShowTooltip = !renderNoTooltip;\n\tconst showMsg = checkHasMsg(msg, touched);\n\tconst hasExpertSlot = showExpertSlot(label);\n\tconst useTooltipInsteadOfLabel = canShowTooltip && !hasExpertSlot && hideLabel;\n\tconst badgeText = buildBadgeTextString(accessKey, shortKey);\n\n\tconst components = [\n\t\t<>\n\t\t\t<InputContainer {...fieldControlInputProps}>{children}</InputContainer>\n\t\t\t{useTooltipInsteadOfLabel && (\n\t\t\t\t<KolFieldControlTooltipFc\n\t\t\t\t\t{...(fieldControlTooltipProps || {})}\n\t\t\t\t\tid={id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\thideLabel={hideLabel}\n\t\t\t\t\talign={tooltipAlign}\n\t\t\t\t\tbadgeText={badgeText}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>,\n\t\t<KolFieldControlLabelFc\n\t\t\t{...(fieldControlLabelProps || {})}\n\t\t\tid={id}\n\t\t\tbaseClassName=\"kol-field-control\"\n\t\t\tclass={clsx(fieldControlLabelProps?.class, {\n\t\t\t\t['kol-field-control__label--visually-hidden']: Boolean(hideLabel),\n\t\t\t})}\n\t\t\thasExpertSlot={hasExpertSlot}\n\t\t\tlabel={label}\n\t\t\taccessKey={accessKey}\n\t\t\tshortKey={shortKey}\n\t\t/>,\n\t];\n\n\tif (labelAlign === 'left') {\n\t\tcomponents.reverse();\n\t}\n\n\tconst stateCssClasses = {\n\t\t['kol-field-control--disabled']: Boolean(disabled),\n\t\t['kol-field-control--required']: Boolean(required),\n\t\t['kol-field-control--touched']: Boolean(touched),\n\t\t['kol-field-control--hide-label']: Boolean(hideLabel),\n\t\t['kol-field-control--read-only']: Boolean(readonly),\n\t\t[`kol-field-control--${msg?.type || 'error'}`]: Boolean(showMsg),\n\t\t[`kol-field-control--label-align-${labelAlign}`]: Boolean(labelAlign),\n\t};\n\n\treturn (\n\t\t<div class={clsx('kol-field-control', stateCssClasses, classNames)} {...other}>\n\t\t\t{components}\n\t\t\t{canShowHint && <KolFieldControlHintFc {...(fieldControlHintProps || {})} baseClassName=\"kol-field-control\" id={id} hint={hint} />}\n\t\t</div>\n\t);\n};\n\nexport default KolFieldControlFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolFieldControlFc, { type FieldControlProps } from '../../functional-components/FieldControl';\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\ttype SelectStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates\n\t| SelectStates;\n\nexport type FieldControlStateWrapperProps = Partial<FieldControlProps> & {\n\tstate: InputState;\n};\n\nfunction getFieldControlProps(state: InputState): FieldControlProps {\n\tconst props: FieldControlProps = {\n\t\tid: state._id,\n\t\tdisabled: state._disabled,\n\t\tmsg: convertMsgToInternMsg(state._msg),\n\t\thint: state._hint,\n\t\tlabel: state._label,\n\t\thideLabel: state._hideLabel,\n\t\ttouched: state._touched,\n\t};\n\n\tif ('_required' in state) {\n\t\tprops.required = state._required;\n\t}\n\n\tif ('_readOnly' in state) {\n\t\tprops.readonly = state._readOnly;\n\t}\n\n\tif ('_labelAlign' in state) {\n\t\tprops.labelAlign = state._labelAlign;\n\t}\n\n\tif ('_accessKey' in state) {\n\t\tprops.accessKey = state._accessKey;\n\t}\n\n\tif ('_shortKey' in state) {\n\t\tprops.shortKey = state._shortKey;\n\t}\n\n\treturn props;\n}\n\nconst FieldControlStateWrapper: FC<FieldControlStateWrapperProps> = ({ state, ...other }, children) => {\n\treturn (\n\t\t<KolFieldControlFc {...getFieldControlProps(state)} {...other}>\n\t\t\t{children}\n\t\t</KolFieldControlFc>\n\t);\n};\n\nexport default FieldControlStateWrapper;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-c14cc40b.js";import{c as clsx}from"./clsx-09a06a12.js";const MIN_HEADING_LEVEL=1,MAX_HEADING_LEVEL=6;function isValidHeadingLevel(e){return e>=MIN_HEADING_LEVEL&&e<=6}function getHeadlineTag(e){return isValidHeadingLevel(e)?`h${e}`:"strong"}function getSubHeadlineTag(e){return 1===e?"span":getHeadlineTag(e)}const KolHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getHeadlineTag(a);return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${c}`,s)},n),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getSubHeadlineTag(a+1);return h(c,Object.assign({class:clsx("kol-headline kol-headline--group kol-headline--secondary",s)},n),l)},KolHeadingFc=(e,l)=>{var{secondaryHeadline:s,level:a=MIN_HEADING_LEVEL,class:n,HeadingGroupProps:c={},SecondaryHeadlineProps:i={}}=e,o=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const r=Object.assign({level:a},o);if(!s)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},r),l);const{class:d}=c,t=__rest(c,["class"]),g=Object.assign({class:clsx("kol-heading-group",d)},t);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},r),l),h(KolSecondaryHeadlineFc,Object.assign({level:a},i),s))};export{KolHeadingFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-2f6c3929.js";import{c as clsx}from"./clsx-09a06a12.js";const MIN_HEADING_LEVEL=1,MAX_HEADING_LEVEL=6;function isValidHeadingLevel(e){return e>=MIN_HEADING_LEVEL&&e<=6}function getHeadlineTag(e){return isValidHeadingLevel(e)?`h${e}`:"strong"}function getSubHeadlineTag(e){return 1===e?"span":getHeadlineTag(e)}const KolHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getHeadlineTag(a);return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${c}`,s)},n),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getSubHeadlineTag(a+1);return h(c,Object.assign({class:clsx("kol-headline kol-headline--group kol-headline--secondary",s)},n),l)},KolHeadingFc=(e,l)=>{var{secondaryHeadline:s,level:a=MIN_HEADING_LEVEL,class:n,HeadingGroupProps:c={},SecondaryHeadlineProps:i={}}=e,o=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const r=Object.assign({level:a},o);if(!s)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},r),l);const{class:d}=c,t=__rest(c,["class"]),g=Object.assign({class:clsx("kol-heading-group",d)},t);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},r),l),h(KolSecondaryHeadlineFc,Object.assign({level:a},i),s))};export{KolHeadingFc as K};
@@ -1 +1 @@
1
- {"file":"Heading-c0a196c8.js","mappings":";;;;;;;AAyBA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAW5B,SAAS,mBAAmB,CAAC,KAAa;IACzC,OAAO,KAAK,I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M,aAAa,mBAClB,KAAK,IACF,KAAK,CACR,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACvB,QACC,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,sBAAsB,CAAC,IAAM,aAAa,GAC/E,QAAQ,CACM,EACf;KACF;IAED,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,iBAAiB,EAAjC,WAAW,UAAK,iBAAiB,EAA9D,SAA0C,CAAoB,CAAC;IACrE,MAAM,kBAAkB,mBACvB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,IAC9C,WAAW,CACd,CAAC;IAEF,QACC,8BAAY,kBAAkB;QAC7B,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,IAAM,aAAa,GACvG,QAAQ,CACM;QAChB,EAAC,sBAAsB,kBAAC,KAAK,EAAE,KAAK,IAAM,sBAAsB,GAC9D,iBAAiB,CACM,CACjB,EACR;AACH;;;;","names":[],"sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = BaseProps;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement>;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\ntype SubHeadlineTag = 'span' | HeadlineTag;\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Returns the appropriate sub-headline tag based on the level.\n * If the level is 1, returns 'span', otherwise returns the headline tag.\n * @param level - The heading level.\n * @returns The corresponding sub-headline tag.\n */\nexport function getSubHeadlineTag(level: HeadingLevel | number): SubHeadlineTag {\n\treturn level === 1 ? 'span' : getHeadlineTag(level);\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getSubHeadlineTag(level + 1);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc level={level} {...SecondaryHeadlineProps}>\n\t\t\t\t{secondaryHeadline}\n\t\t\t</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"version":3}
1
+ {"file":"Heading-7b90eeb4.js","mappings":";;;;;;;AAyBA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAW5B,SAAS,mBAAmB,CAAC,KAAa;IACzC,OAAO,KAAK,IAAI,iBAAiB,IAAI,KAAK,IAAI,iBAAiB,CAAC;AACjE,CAAC;SAQe,cAAc,CAAC,KAA4B;IAC1D,OAAO,mBAAmB,CAAC,KAAK,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,IAAI,CAAC,UAAU,EAAE,sBAAsB,CAAC,IAAM,aAAa,GAC/E,QAAQ,CACM,EACf;KACF;IAED,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,iBAAiB,EAAjC,WAAW,UAAK,iBAAiB,EAA9D,SAA0C,CAAoB,CAAC;IACrE,MAAM,kBAAkB,mBACvB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,IAC9C,WAAW,CACd,CAAC;IAEF,QACC,8BAAY,kBAAkB;QAC7B,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,IAAM,aAAa,GACvG,QAAQ,CACM;QAChB,EAAC,sBAAsB,kBAAC,KAAK,EAAE,KAAK,IAAM,sBAAsB,GAC9D,iBAAiB,CACM,CACjB,EACR;AACH;;;;","names":[],"sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = BaseProps;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement>;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\ntype SubHeadlineTag = 'span' | HeadlineTag;\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Returns the appropriate sub-headline tag based on the level.\n * If the level is 1, returns 'span', otherwise returns the headline tag.\n * @param level - The heading level.\n * @returns The corresponding sub-headline tag.\n */\nexport function getSubHeadlineTag(level: HeadingLevel | number): SubHeadlineTag {\n\treturn level === 1 ? 'span' : getHeadlineTag(level);\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getSubHeadlineTag(level + 1);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc level={level} {...SecondaryHeadlineProps}>\n\t\t\t\t{secondaryHeadline}\n\t\t\t</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h}from"./index-c14cc40b.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";const KolIconFc=o=>{const{class:c,style:n,icons:s,label:l,onClick:a}=o;return h(KolIconTag,{class:c,style:n,onClick:a,_icons:s,_label:l})};export{KolIconFc as K};
4
+ import{h}from"./index-2f6c3929.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";const KolIconFc=o=>{const{class:c,style:n,icons:s,label:l,onClick:a}=o;return h(KolIconTag,{class:c,style:n,onClick:a,_icons:s,_label:l})};export{KolIconFc as K};
@@ -1 +1 @@
1
- {"file":"Icon-8b3c5e62.js","mappings":";;;;;;MAUM,SAAS,GAAkB,CAAC,KAAK;IACtC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAElE,OAAO,EAAC,UAAU,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAAC;AACxG;;;;","names":[],"sources":["src/functional-components/Icon/Icon.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { InternalIconProps } from '../../schema';\n\nexport type IconProps = InternalIconProps & {\n\tclass?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolIconFc: FC<IconProps> = (props) => {\n\tconst { class: classNames, style, icons, label, onClick } = props;\n\n\treturn <KolIconTag class={classNames} style={style} onClick={onClick} _icons={icons} _label={label} />;\n};\n\nexport default KolIconFc;\n"],"version":3}
1
+ {"file":"Icon-a2f91629.js","mappings":";;;;;;MAUM,SAAS,GAAkB,CAAC,KAAK;IACtC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAElE,OAAO,EAAC,UAAU,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAAC;AACxG;;;;","names":[],"sources":["src/functional-components/Icon/Icon.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { InternalIconProps } from '../../schema';\n\nexport type IconProps = InternalIconProps & {\n\tclass?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolIconFc: FC<IconProps> = (props) => {\n\tconst { class: classNames, style, icons, label, onClick } = props;\n\n\treturn <KolIconTag class={classNames} style={style} onClick={onClick} _icons={icons} _label={label} />;\n};\n\nexport default KolIconFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-c14cc40b.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-ebe5a881.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-0f300345.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:t,touched:i,readonly:o,ariaDescribedBy:r,hideLabel:d,label:n,suggestions:c,value:u}=e,b=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),p=checkHasMsg(a,i),g={"kol-input--disabled":Boolean(t),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(i),"kol-input--readonly":Boolean(o),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:p},m=Object.assign(Object.assign({class:clsx("kol-input",g,s),required:l,disabled:t,readonly:o,type:"text",list:c?`${b.id}-list`:void 0},getDefaultProps({ariaDescribedBy:r,hideLabel:d,label:n})),b);return h(Fragment,null,h("input",Object.assign({},m,{value:u})),c)};export{InputFc as I};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-2f6c3929.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-ebe5a881.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-1a7401a2.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:t,touched:i,readonly:o,ariaDescribedBy:r,hideLabel:d,label:n,suggestions:c,value:u}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b=checkHasMsg(a,i),g={"kol-input--disabled":Boolean(t),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(i),"kol-input--readonly":Boolean(o),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:b},m=Object.assign(Object.assign({class:clsx("kol-input",g,s),required:l,disabled:t,readonly:o,type:"text",list:c?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:r,hideLabel:d,label:n})),p);return h(Fragment,null,h("input",Object.assign({},m,{value:u})),c)};export{InputFc as I};
@@ -1 +1 @@
1
- {"file":"Input-3f54e170.js","mappings":";;;;;;;;;MAkBM,OAAO,GAAmB,CAAC,KAAK;IACrC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,KAAe,KAAK,EAAf,KAAK,UAAK,KAAK,EAA1I,gIAAkI,CAAQ,CAAC;IAEjJ,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAE1C,MAAM,eAAe,GAAG;QACvB,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC1C,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC1C,CAAC,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;QACxC,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC1C,CAAC,cAAc,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,OAAO,EAAE,GAAG,OAAO;KAC/C,CAAC;IAEF,MAAM,UAAU,iCACf,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,eAAe,EAAE,UAAU,CAAC,EACrD,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,WAAW,GAAG,GAAG,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,IAC/C,eAAe,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GACtD,KAAK,CACR,CAAC;IAEF,QACC;QACC,6BAAW,UAAU,IAAE,KAAK,EAAE,KAAK,IAAI;QACtC,WAAW,CACV,EACF;AACH;;;;","names":[],"sources":["src/functional-components/inputs/Input/Input.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { checkHasMsg, type InternMsgPropType } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type InputProps = DefaultInputProps<JSXBase.InputHTMLAttributes<HTMLInputElement>> & {\n\tvalue?: string | number | string[];\n\ttouched?: boolean;\n\tsuggestions?: VNode;\n\tspellcheck?: boolean;\n\tmsg?: InternMsgPropType;\n} & {\n\t[key: `data-${string}`]: unknown;\n\t[key: `aria-${string}`]: unknown;\n};\n\nconst InputFc: FC<InputProps> = (props) => {\n\tconst { class: classNames, msg, required, disabled, touched, readonly, ariaDescribedBy, hideLabel, label, suggestions, value, ...other } = props;\n\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input--disabled']: Boolean(disabled),\n\t\t['kol-input--required']: Boolean(required),\n\t\t['kol-input--touched']: Boolean(touched),\n\t\t['kol-input--readonly']: Boolean(readonly),\n\t\t[`kol-input--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst inputProps: JSXBase.InputHTMLAttributes<HTMLInputElement> = {\n\t\tclass: clsx('kol-input', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\ttype: 'text',\n\t\tlist: suggestions ? `${other.id}-list` : undefined,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...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,IAAI;QACtC,WAAW,CACV,EACF;AACH;;;;","names":[],"sources":["src/functional-components/inputs/Input/Input.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { checkHasMsg, type InternMsgPropType } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type InputProps = DefaultInputProps<JSXBase.InputHTMLAttributes<HTMLInputElement>> & {\n\tvalue?: string | number | string[];\n\ttouched?: boolean;\n\tsuggestions?: VNode;\n\tspellcheck?: boolean;\n\tmsg?: InternMsgPropType;\n} & {\n\t[key: `data-${string}`]: unknown;\n\t[key: `aria-${string}`]: unknown;\n};\n\nconst InputFc: FC<InputProps> = (props) => {\n\tconst { class: classNames, msg, required, disabled, touched, readonly, ariaDescribedBy, hideLabel, label, suggestions, value, ...other } = props;\n\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input--disabled']: Boolean(disabled),\n\t\t['kol-input--required']: Boolean(required),\n\t\t['kol-input--touched']: Boolean(touched),\n\t\t['kol-input--readonly']: Boolean(readonly),\n\t\t[`kol-input--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst inputProps: JSXBase.InputHTMLAttributes<HTMLInputElement> = {\n\t\tclass: clsx('kol-input', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\ttype: 'text',\n\t\tlist: suggestions ? `${other.id}-list` : undefined,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<input {...inputProps} value={value} />\n\t\t\t{suggestions}\n\t\t</>\n\t);\n};\n\nexport default InputFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-c14cc40b.js";import{I as InputFc}from"./Input-3f54e170.js";import"./index-ebe5a881.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-0f300345.js";const SuggestionsFc=e=>{var{id:t,suggestions:s}=e,n=__rest(e,["id","suggestions"]);return s?h("datalist",Object.assign({id:`${t}-list`},n),s.map((e=>h("option",{value:e})))):null};function getInputProps(e,t){const{ariaDescribedBy:s}=getRenderStates(e),n={id:e._id,hideLabel:e._hideLabel,label:e._label,disabled:e._disabled,name:e._name,ariaDescribedBy:s};if("_accessKey"in e&&(n.accessKey=e._accessKey),"_type"in e&&(n.type=e._type),"_value"in e&&(n.value=e._value),"_required"in e&&(n.required=e._required),"_maxLength"in e&&(n.maxlength=e._maxLength),"_placeholder"in e&&(n.placeholder=e._placeholder),"_autoComplete"in e&&(n.autoComplete=e._autoComplete),"_spellCheck"in e&&(n.spellcheck=e._spellCheck),"_pattern"in e&&(n.pattern=e._pattern),"_readOnly"in e&&(n.readonly=e._readOnly),"_min"in e&&(n.min=e._min),"_max"in e&&(n.max=e._max),"_step"in e&&(n.step=e._step),"_multiple"in e&&(n.multiple=e._multiple),"_checked"in e&&(n.checked=e._checked),"_indeterminate"in e&&(n.indeterminate=e._indeterminate),"_touched"in e&&(n.touched=e._touched),"_msg"in e&&(n.msg=convertMsgToInternMsg(e._msg)),"_suggestions"in e&&!t){Array.isArray(e._suggestions)&&e._suggestions.length>0&&(n.suggestions=h(SuggestionsFc,{id:e._id,suggestions:e._suggestions}))}return n}const InputStateWrapper=e=>{var{state:t,customSuggestions:s}=e,n=__rest(e,["state","customSuggestions"]);return h(InputFc,Object.assign({},getInputProps(t,s),n))};export{InputStateWrapper as I,SuggestionsFc as S};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-2f6c3929.js";import{I as InputFc}from"./Input-324f4b1d.js";import"./index-ebe5a881.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-1a7401a2.js";const SuggestionsFc=e=>{var{id:t,suggestions:s}=e,n=__rest(e,["id","suggestions"]);return s?h("datalist",Object.assign({id:`${t}-list`},n),s.map((e=>h("option",{value:e})))):null};function getInputProps(e,t){const{ariaDescribedBy:s}=getRenderStates(e),n={id:e._id,hideLabel:e._hideLabel,label:e._label,disabled:e._disabled,name:e._name,ariaDescribedBy:s};if("_accessKey"in e&&(n.accessKey=e._accessKey),"_type"in e&&(n.type=e._type),"_value"in e&&(n.value=e._value),"_required"in e&&(n.required=e._required),"_maxLength"in e&&(n.maxlength=e._maxLength),"_placeholder"in e&&(n.placeholder=e._placeholder),"_autoComplete"in e&&(n.autoComplete=e._autoComplete),"_spellCheck"in e&&(n.spellcheck=e._spellCheck),"_pattern"in e&&(n.pattern=e._pattern),"_readOnly"in e&&(n.readonly=e._readOnly),"_min"in e&&(n.min=e._min),"_max"in e&&(n.max=e._max),"_step"in e&&(n.step=e._step),"_multiple"in e&&(n.multiple=e._multiple),"_checked"in e&&(n.checked=e._checked),"_indeterminate"in e&&(n.indeterminate=e._indeterminate),"_touched"in e&&(n.touched=e._touched),"_msg"in e&&(n.msg=convertMsgToInternMsg(e._msg)),"_suggestions"in e&&!t){Array.isArray(e._suggestions)&&e._suggestions.length>0&&(n.suggestions=h(SuggestionsFc,{id:e._id,suggestions:e._suggestions}))}return n}const InputStateWrapper=e=>{var{state:t,customSuggestions:s}=e,n=__rest(e,["state","customSuggestions"]);return h(InputFc,Object.assign({},getInputProps(t,s),n))};export{InputStateWrapper as I,SuggestionsFc as S};
@@ -1 +1 @@
1
- {"file":"InputStateWrapper-45f3da21.js","mappings":";;;;;;;;;MASM,aAAa,GAAyB,CAAC,EAA6B;QAA7B,EAAE,EAAE,EAAE,WAAW,OAAY,EAAP,KAAK,cAA3B,qBAA6B,CAAF;IACvE,IAAI,CAAC,WAAW,EAAE;QACjB,OAAO,IAAI,CAAC;KACZ;IAED,QACC,8BAAU,EAAE,EAAE,GAAG,EAAE,OAAO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AtC,EAAE,KAAK,EAAE,iBAAiB,OAAY,EAAP,KAAK,cAApC,8BAAsC,CAAF;IAC1F,OAAO,EAACA,OAAU,oBAAK,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAM,KAAK,EAAI,CAAC;AAC/E;;;;","names":["KolInputFc"],"sources":["src/functional-components/Suggestions/Suggestions.tsx","src/functional-component-wrappers/InputStateWrapper/InputStateWrapper.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type SuggestionsProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\nconst SuggestionsFc: FC<SuggestionsProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={`${id}-list`} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\nexport default SuggestionsFc;\n","import type { VNode } from '@stencil/core';\nimport { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolInputFc, { type InputProps } from '../../functional-components/inputs/Input';\n\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\nimport SuggestionsFc from '../../functional-components/Suggestions';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates;\n\nexport type InputStateWrapperProps = Partial<InputProps> & {\n\tstate: InputState;\n\tcustomSuggestions?: boolean;\n};\n\n/**\n * @param state\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, customSuggestions?: boolean): InputProps {\n\tconst { ariaDescribedBy } = getRenderStates(state);\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state) props.maxlength = state._maxLength;\n\tif ('_placeholder' in state) props.placeholder = state._placeholder;\n\tif ('_autoComplete' in state) props.autoComplete = state._autoComplete;\n\tif ('_spellCheck' in state) props.spellcheck = state._spellCheck;\n\tif ('_pattern' in state) props.pattern = state._pattern;\n\tif ('_readOnly' in state) props.readonly = state._readOnly;\n\tif ('_min' in state) props.min = state._min;\n\tif ('_max' in state) props.max = state._max;\n\tif ('_step' in state) props.step = state._step;\n\tif ('_multiple' in state) props.multiple = state._multiple;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\tif ('_suggestions' in state && !customSuggestions) {\n\t\tconst hasSuggestions = Array.isArray(state._suggestions) && state._suggestions.length > 0;\n\t\tif (hasSuggestions) {\n\t\t\tprops.suggestions = (<SuggestionsFc id={state._id} suggestions={state._suggestions} />) as VNode;\n\t\t}\n\t}\n\n\treturn props;\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, customSuggestions)} {...other} />;\n};\n\nexport default InputStateWrapper;\n"],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MAAM,GAAG,CAAC,CAAC;QAC1F,IAAI,cAAc,EAAE;YACnB,KAAK,CAAC,WAAW,IAAI,EAAC,aAAa,IAAC,EAAE,EAAE,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,CAAC,YAAY,GAAI,CAAU,CAAC;SACjG;KACD;IAED,OAAO,KAAK,CAAC;AACd,CAAC;MAEK,iBAAiB,GAA+B,CAAC,EAAsC;QAAtC,EAAE,KAAK,EAAE,iBAAiB,OAAY,EAAP,KAAK,cAApC,8BAAsC,CAAF;IAC1F,OAAO,EAACA,OAAU,oBAAK,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAM,KAAK,EAAI,CAAC;AAC/E;;;;","names":["KolInputFc"],"sources":["src/functional-components/Suggestions/Suggestions.tsx","src/functional-component-wrappers/InputStateWrapper/InputStateWrapper.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type SuggestionsProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\nconst SuggestionsFc: FC<SuggestionsProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={`${id}-list`} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\nexport default SuggestionsFc;\n","import type { VNode } from '@stencil/core';\nimport { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolInputFc, { type InputProps } from '../../functional-components/inputs/Input';\n\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\nimport SuggestionsFc from '../../functional-components/Suggestions';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates;\n\nexport type InputStateWrapperProps = Partial<InputProps> & {\n\tstate: InputState;\n\tcustomSuggestions?: boolean;\n};\n\n/**\n * @param state\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, customSuggestions?: boolean): InputProps {\n\tconst { ariaDescribedBy } = getRenderStates(state);\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state) props.maxlength = state._maxLength;\n\tif ('_placeholder' in state) props.placeholder = state._placeholder;\n\tif ('_autoComplete' in state) props.autoComplete = state._autoComplete;\n\tif ('_spellCheck' in state) props.spellcheck = state._spellCheck;\n\tif ('_pattern' in state) props.pattern = state._pattern;\n\tif ('_readOnly' in state) props.readonly = state._readOnly;\n\tif ('_min' in state) props.min = state._min;\n\tif ('_max' in state) props.max = state._max;\n\tif ('_step' in state) props.step = state._step;\n\tif ('_multiple' in state) props.multiple = state._multiple;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\tif ('_suggestions' in state && !customSuggestions) {\n\t\tconst hasSuggestions = Array.isArray(state._suggestions) && state._suggestions.length > 0;\n\t\tif (hasSuggestions) {\n\t\t\tprops.suggestions = (<SuggestionsFc id={state._id} suggestions={state._suggestions} />) as VNode;\n\t\t}\n\t}\n\n\treturn props;\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, customSuggestions)} {...other} />;\n};\n\nexport default InputStateWrapper;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{i as isArray,a as isObjectLike,b as baseGetTag}from"./isArray-7a60fa7f.js";import{h,F as Fragment}from"./index-c14cc40b.js";var stringTag="[object String]";function isString(e){return"string"==typeof e||!isArray(e)&&isObjectLike(e)&&baseGetTag(e)==stringTag}const KolInternalUnderlinedBadgeTextFc=({badgeText:e,label:t})=>{const n=e;let[r,...a]=t.split(n);return 0===a.length&&(e=n.toUpperCase(),[r,...a]=t.split(n)),0===a.length&&(e=n.toLowerCase(),[r,...a]=t.split(n)),h(Fragment,null,r,a.length?h(Fragment,null,h("u",null,e),a.join(n)):null)};export{KolInternalUnderlinedBadgeTextFc as K,isString as i};
4
+ import{i as isArray,a as isObjectLike,b as baseGetTag}from"./isArray-7a60fa7f.js";import{h,F as Fragment}from"./index-2f6c3929.js";var stringTag="[object String]";function isString(e){return"string"==typeof e||!isArray(e)&&isObjectLike(e)&&baseGetTag(e)==stringTag}const KolInternalUnderlinedBadgeTextFc=({badgeText:e,label:t})=>{const n=e;let[r,...a]=t.split(n);return 0===a.length&&(e=n.toUpperCase(),[r,...a]=t.split(n)),0===a.length&&(e=n.toLowerCase(),[r,...a]=t.split(n)),h(Fragment,null,r,a.length?h(Fragment,null,h("u",null,e),a.join(n)):null)};export{KolInternalUnderlinedBadgeTextFc as K,isString as i};
@@ -1 +1 @@
1
- {"file":"InternalUnderlinedBadgeText-8ef3526c.js","mappings":";;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC;AAC/E;;MCnBM,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;IAEnG,MAAM,iBAAiB,GAAW,SAAS,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,QACC;QACE,KAAK;QACL,IAAI,CAAC,MAAM,IACX;YACC,aAAI,SAAS,CAAK;YACjB,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN,EACF;AACH;;;;","names":[],"sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"version":3}
1
+ {"file":"InternalUnderlinedBadgeText-2d939629.js","mappings":";;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC;AAC/E;;MCnBM,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;IAEnG,MAAM,iBAAiB,GAAW,SAAS,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,QACC;QACE,KAAK;QACL,IAAI,CAAC,MAAM,IACX;YACC,aAAI,SAAS,CAAK;YACjB,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN,EACF;AACH;;;;","names":[],"sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"version":3}