@public-ui/components 3.0.1 → 3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.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 (479) hide show
  1. package/README.md +58 -8
  2. package/custom-elements.json +72 -1
  3. package/dist/cjs/Alert-5ca7c116.js +4 -0
  4. package/dist/cjs/Alert-5ca7c116.js.map +1 -0
  5. package/dist/cjs/{Collapsible-5aa541cb.js → Collapsible-2225015b.js} +1 -1
  6. package/dist/cjs/{Collapsible-5aa541cb.js.map → Collapsible-2225015b.js.map} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-421dca3c.js → CustomSuggestionsOptionsGroup-fd532c80.js} +1 -1
  8. package/dist/cjs/{CustomSuggestionsOptionsGroup-421dca3c.js.map → CustomSuggestionsOptionsGroup-fd532c80.js.map} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-18976ee0.js → FieldControlStateWrapper-736434ca.js} +1 -1
  10. package/dist/cjs/{FieldControlStateWrapper-18976ee0.js.map → FieldControlStateWrapper-736434ca.js.map} +1 -1
  11. package/dist/cjs/{Heading-90ce384c.js → Heading-6bf1ffac.js} +1 -1
  12. package/dist/cjs/{Heading-90ce384c.js.map → Heading-6bf1ffac.js.map} +1 -1
  13. package/dist/cjs/Icon-0537cd28.js +4 -0
  14. package/dist/cjs/{Icon-add098ba.js.map → Icon-0537cd28.js.map} +1 -1
  15. package/dist/cjs/{Input-4af8f547.js → Input-b7b2e83b.js} +1 -1
  16. package/dist/cjs/{Input-4af8f547.js.map → Input-b7b2e83b.js.map} +1 -1
  17. package/dist/cjs/{InputStateWrapper-587d58dd.js → InputStateWrapper-5c622a6d.js} +1 -1
  18. package/dist/cjs/{InputStateWrapper-587d58dd.js.map → InputStateWrapper-5c622a6d.js.map} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js → InternalUnderlinedBadgeText-a54799ae.js} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js.map → InternalUnderlinedBadgeText-a54799ae.js.map} +1 -1
  21. package/dist/cjs/{Span-cd26b541.js → Span-c9f5cc1a.js} +1 -1
  22. package/dist/cjs/{Span-cd26b541.js.map → Span-c9f5cc1a.js.map} +1 -1
  23. package/dist/cjs/{app-globals-81f95eac.js → app-globals-171737a2.js} +1 -1
  24. package/dist/cjs/{app-globals-81f95eac.js.map → app-globals-171737a2.js.map} +1 -1
  25. package/dist/cjs/{associated.controller-03ae298d.js → associated.controller-103272e2.js} +1 -1
  26. package/dist/cjs/{associated.controller-03ae298d.js.map → associated.controller-103272e2.js.map} +1 -1
  27. package/dist/cjs/{bootstrap-e11bb4f7.js → bootstrap-a35cdb5f.js} +1 -1
  28. package/dist/cjs/{bootstrap-e11bb4f7.js.map → bootstrap-a35cdb5f.js.map} +1 -1
  29. package/dist/cjs/component-names-f5f2ca3a.js +4 -0
  30. package/dist/cjs/component-names-f5f2ca3a.js.map +1 -0
  31. package/dist/cjs/{controller-ead08764.js → controller-1ead3829.js} +1 -1
  32. package/dist/cjs/{controller-ead08764.js.map → controller-1ead3829.js.map} +1 -1
  33. package/dist/cjs/{controller-61f2f5b4.js → controller-57e0e326.js} +1 -1
  34. package/dist/cjs/{controller-61f2f5b4.js.map → controller-57e0e326.js.map} +1 -1
  35. package/dist/cjs/{controller-cb68b652.js → controller-b85b16a2.js} +1 -1
  36. package/dist/cjs/{controller-cb68b652.js.map → controller-b85b16a2.js.map} +1 -1
  37. package/dist/cjs/{controller-b2da8abe.js → controller-c6c3ab7a.js} +1 -1
  38. package/dist/cjs/{controller-b2da8abe.js.map → controller-c6c3ab7a.js.map} +1 -1
  39. package/dist/cjs/{controller-icon-429a5f31.js → controller-icon-cbcacd17.js} +1 -1
  40. package/dist/cjs/{controller-icon-429a5f31.js.map → controller-icon-cbcacd17.js.map} +1 -1
  41. package/dist/cjs/{dev.utils-6759aaf5.js → dev.utils-bfd07ca6.js} +1 -1
  42. package/dist/cjs/{dev.utils-6759aaf5.js.map → dev.utils-bfd07ca6.js.map} +1 -1
  43. package/dist/cjs/{devtools-3485dda6.js → devtools-c3023af8.js} +1 -1
  44. package/dist/cjs/{devtools-3485dda6.js.map → devtools-c3023af8.js.map} +1 -1
  45. package/dist/cjs/{getRenderStates-8372d842.js → getRenderStates-f985f2e4.js} +1 -1
  46. package/dist/cjs/{getRenderStates-8372d842.js.map → getRenderStates-f985f2e4.js.map} +1 -1
  47. package/dist/cjs/index-ae732dfd.js +4 -0
  48. package/dist/cjs/index-ae732dfd.js.map +1 -0
  49. package/dist/cjs/index.cjs.js +1 -1
  50. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-card-wc.cjs.entry.js +4 -0
  64. package/dist/cjs/kol-card-wc.cjs.entry.js.map +1 -0
  65. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-drawer.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-popover-button-wc.cjs.entry.js.map +1 -1
  96. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +1 -1
  116. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  121. package/dist/cjs/kolibri.cjs.js +1 -1
  122. package/dist/cjs/loader.cjs.js +1 -1
  123. package/dist/cjs/test-component.cjs.entry.js +1 -1
  124. package/dist/components/Alert.js +1 -1
  125. package/dist/components/Alert.js.map +1 -1
  126. package/dist/components/component-names.js +1 -1
  127. package/dist/components/component-names.js.map +1 -1
  128. package/dist/components/kol-alert-wc.js +1 -1
  129. package/dist/components/kol-alert-wc.js.map +1 -1
  130. package/dist/components/kol-button-wc.js +1 -1
  131. package/dist/components/kol-button-wc.js.map +1 -1
  132. package/dist/components/kol-card-wc.d.ts +11 -0
  133. package/dist/components/kol-card-wc.js +4 -0
  134. package/dist/components/kol-card-wc.js.map +1 -0
  135. package/dist/components/kol-card.js +1 -1
  136. package/dist/components/kol-card.js.map +1 -1
  137. package/dist/components/kol-combobox.js +1 -1
  138. package/dist/components/kol-details.js +1 -1
  139. package/dist/components/kol-drawer.js +1 -1
  140. package/dist/components/kol-drawer.js.map +1 -1
  141. package/dist/components/kol-form.js +1 -1
  142. package/dist/components/kol-heading.js +1 -1
  143. package/dist/components/kol-icon.js +1 -1
  144. package/dist/components/kol-icon.js.map +1 -1
  145. package/dist/components/kol-image.js +1 -1
  146. package/dist/components/kol-image.js.map +1 -1
  147. package/dist/components/kol-input-checkbox.js +1 -1
  148. package/dist/components/kol-input-color.js +1 -1
  149. package/dist/components/kol-input-date.js +1 -1
  150. package/dist/components/kol-input-email.js +1 -1
  151. package/dist/components/kol-input-file.js +1 -1
  152. package/dist/components/kol-input-number.js +1 -1
  153. package/dist/components/kol-input-password.js +1 -1
  154. package/dist/components/kol-input-radio.js +1 -1
  155. package/dist/components/kol-input-range.js +1 -1
  156. package/dist/components/kol-input-text.js +1 -1
  157. package/dist/components/kol-kolibri.js +1 -1
  158. package/dist/components/kol-link-button.js +1 -1
  159. package/dist/components/kol-link-wc.js +1 -1
  160. package/dist/components/kol-link.js +1 -1
  161. package/dist/components/kol-modal.js +1 -1
  162. package/dist/components/kol-nav.js +1 -1
  163. package/dist/components/kol-pagination.js +1 -1
  164. package/dist/components/kol-popover-button-wc.js +1 -1
  165. package/dist/components/kol-popover-button-wc.js.map +1 -1
  166. package/dist/components/kol-popover-button.js +1 -1
  167. package/dist/components/kol-popover-wc.js +1 -1
  168. package/dist/components/kol-progress.js +1 -1
  169. package/dist/components/kol-quote.js +1 -1
  170. package/dist/components/kol-select.js +1 -1
  171. package/dist/components/kol-single-select.js +1 -1
  172. package/dist/components/kol-skip-nav.js +1 -1
  173. package/dist/components/kol-spin.js +1 -1
  174. package/dist/components/kol-split-button.js +1 -1
  175. package/dist/components/kol-split-button.js.map +1 -1
  176. package/dist/components/kol-table-settings-wc.js +1 -1
  177. package/dist/components/kol-table-stateful.js +1 -1
  178. package/dist/components/kol-table-stateless-wc.js +1 -1
  179. package/dist/components/kol-table-stateless.js +1 -1
  180. package/dist/components/kol-tabs.js +1 -1
  181. package/dist/components/kol-textarea.js +1 -1
  182. package/dist/components/kol-toast-container.js +1 -1
  183. package/dist/components/kol-toolbar.js +1 -1
  184. package/dist/components/kol-tooltip-wc.js +1 -1
  185. package/dist/components/kol-tooltip-wc.js.map +1 -1
  186. package/dist/components/kol-tree-item-wc.js +1 -1
  187. package/dist/components/kol-tree-item.js +1 -1
  188. package/dist/components/kol-tree-wc.js +1 -1
  189. package/dist/components/kol-tree.js +1 -1
  190. package/dist/components/kol-version.js +1 -1
  191. package/dist/esm/Alert-c6ac1427.js +4 -0
  192. package/dist/esm/Alert-c6ac1427.js.map +1 -0
  193. package/dist/esm/{Collapsible-af548d40.js → Collapsible-7be44a00.js} +1 -1
  194. package/dist/esm/{Collapsible-af548d40.js.map → Collapsible-7be44a00.js.map} +1 -1
  195. package/dist/esm/CustomSuggestionsOptionsGroup-cdea277e.js +4 -0
  196. package/dist/esm/{CustomSuggestionsOptionsGroup-dcff90e4.js.map → CustomSuggestionsOptionsGroup-cdea277e.js.map} +1 -1
  197. package/dist/esm/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-6c17f96e.js} +1 -1
  198. package/dist/esm/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-6c17f96e.js.map} +1 -1
  199. package/dist/esm/{Heading-733c8dda.js → Heading-31a470a8.js} +1 -1
  200. package/dist/esm/{Heading-733c8dda.js.map → Heading-31a470a8.js.map} +1 -1
  201. package/dist/esm/Icon-e36657fc.js +4 -0
  202. package/dist/esm/{Icon-446dff9e.js.map → Icon-e36657fc.js.map} +1 -1
  203. package/dist/esm/{Input-8502a991.js → Input-b352cf7a.js} +1 -1
  204. package/dist/esm/{Input-8502a991.js.map → Input-b352cf7a.js.map} +1 -1
  205. package/dist/esm/{InputStateWrapper-9b8419a8.js → InputStateWrapper-38536b7a.js} +1 -1
  206. package/dist/esm/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-38536b7a.js.map} +1 -1
  207. package/dist/esm/{InternalUnderlinedBadgeText-781ef373.js → InternalUnderlinedBadgeText-b1330190.js} +1 -1
  208. package/dist/esm/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-b1330190.js.map} +1 -1
  209. package/dist/esm/{Span-d15a3ea1.js → Span-88b22574.js} +1 -1
  210. package/dist/esm/{Span-d15a3ea1.js.map → Span-88b22574.js.map} +1 -1
  211. package/dist/esm/{app-globals-081a982f.js → app-globals-f7121568.js} +1 -1
  212. package/dist/esm/{app-globals-081a982f.js.map → app-globals-f7121568.js.map} +1 -1
  213. package/dist/esm/{associated.controller-92af2554.js → associated.controller-22684481.js} +1 -1
  214. package/dist/esm/{associated.controller-92af2554.js.map → associated.controller-22684481.js.map} +1 -1
  215. package/dist/esm/{bootstrap-93c7a706.js → bootstrap-dcdb1765.js} +1 -1
  216. package/dist/esm/{bootstrap-93c7a706.js.map → bootstrap-dcdb1765.js.map} +1 -1
  217. package/dist/esm/component-names-553d8bfa.js +4 -0
  218. package/dist/esm/component-names-553d8bfa.js.map +1 -0
  219. package/dist/esm/{controller-f5a335ce.js → controller-7a002c8f.js} +1 -1
  220. package/dist/esm/{controller-f5a335ce.js.map → controller-7a002c8f.js.map} +1 -1
  221. package/dist/esm/{controller-ce246aad.js → controller-8b5dbe81.js} +1 -1
  222. package/dist/esm/{controller-ce246aad.js.map → controller-8b5dbe81.js.map} +1 -1
  223. package/dist/esm/{controller-912bda08.js → controller-ac40e13c.js} +1 -1
  224. package/dist/esm/{controller-912bda08.js.map → controller-ac40e13c.js.map} +1 -1
  225. package/dist/esm/{controller-91a4c3ba.js → controller-cf01f031.js} +1 -1
  226. package/dist/esm/{controller-91a4c3ba.js.map → controller-cf01f031.js.map} +1 -1
  227. package/dist/esm/{controller-icon-de12de48.js → controller-icon-0d71a8a2.js} +1 -1
  228. package/dist/esm/{controller-icon-de12de48.js.map → controller-icon-0d71a8a2.js.map} +1 -1
  229. package/dist/esm/{dev.utils-cb61837d.js → dev.utils-ffecab2f.js} +1 -1
  230. package/dist/esm/{dev.utils-cb61837d.js.map → dev.utils-ffecab2f.js.map} +1 -1
  231. package/dist/esm/{devtools-90d0e710.js → devtools-a4e8658c.js} +1 -1
  232. package/dist/esm/{devtools-90d0e710.js.map → devtools-a4e8658c.js.map} +1 -1
  233. package/dist/esm/{getRenderStates-c4b5c6cb.js → getRenderStates-c4bde254.js} +1 -1
  234. package/dist/esm/{getRenderStates-c4b5c6cb.js.map → getRenderStates-c4bde254.js.map} +1 -1
  235. package/dist/esm/index-02bdb302.js +4 -0
  236. package/dist/esm/index-02bdb302.js.map +1 -0
  237. package/dist/esm/index.js +1 -1
  238. package/dist/esm/kol-abbr.entry.js +1 -1
  239. package/dist/esm/kol-accordion.entry.js +1 -1
  240. package/dist/esm/kol-alert-wc.entry.js +1 -1
  241. package/dist/esm/kol-alert-wc.entry.js.map +1 -1
  242. package/dist/esm/kol-alert.entry.js +1 -1
  243. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  244. package/dist/esm/kol-avatar.entry.js +1 -1
  245. package/dist/esm/kol-badge.entry.js +1 -1
  246. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  247. package/dist/esm/kol-button-link.entry.js +1 -1
  248. package/dist/esm/kol-button-wc.entry.js +1 -1
  249. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  250. package/dist/esm/kol-button.entry.js +1 -1
  251. package/dist/esm/kol-card-wc.entry.js +4 -0
  252. package/dist/esm/kol-card-wc.entry.js.map +1 -0
  253. package/dist/esm/kol-card.entry.js +1 -1
  254. package/dist/esm/kol-card.entry.js.map +1 -1
  255. package/dist/esm/kol-combobox.entry.js +1 -1
  256. package/dist/esm/kol-details.entry.js +1 -1
  257. package/dist/esm/kol-drawer.entry.js +1 -1
  258. package/dist/esm/kol-drawer.entry.js.map +1 -1
  259. package/dist/esm/kol-form.entry.js +1 -1
  260. package/dist/esm/kol-heading.entry.js +1 -1
  261. package/dist/esm/kol-icon.entry.js +1 -1
  262. package/dist/esm/kol-icon.entry.js.map +1 -1
  263. package/dist/esm/kol-image.entry.js +1 -1
  264. package/dist/esm/kol-image.entry.js.map +1 -1
  265. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  266. package/dist/esm/kol-input-color.entry.js +1 -1
  267. package/dist/esm/kol-input-date.entry.js +1 -1
  268. package/dist/esm/kol-input-email.entry.js +1 -1
  269. package/dist/esm/kol-input-file.entry.js +1 -1
  270. package/dist/esm/kol-input-number.entry.js +1 -1
  271. package/dist/esm/kol-input-password.entry.js +1 -1
  272. package/dist/esm/kol-input-radio.entry.js +1 -1
  273. package/dist/esm/kol-input-range.entry.js +1 -1
  274. package/dist/esm/kol-input-text.entry.js +1 -1
  275. package/dist/esm/kol-kolibri.entry.js +1 -1
  276. package/dist/esm/kol-link-button.entry.js +1 -1
  277. package/dist/esm/kol-link-wc.entry.js +1 -1
  278. package/dist/esm/kol-link.entry.js +1 -1
  279. package/dist/esm/kol-modal.entry.js +1 -1
  280. package/dist/esm/kol-nav.entry.js +1 -1
  281. package/dist/esm/kol-pagination.entry.js +1 -1
  282. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  283. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  284. package/dist/esm/kol-popover-button.entry.js +1 -1
  285. package/dist/esm/kol-popover-wc.entry.js +1 -1
  286. package/dist/esm/kol-progress.entry.js +1 -1
  287. package/dist/esm/kol-quote.entry.js +1 -1
  288. package/dist/esm/kol-select.entry.js +1 -1
  289. package/dist/esm/kol-single-select.entry.js +1 -1
  290. package/dist/esm/kol-skip-nav.entry.js +1 -1
  291. package/dist/esm/kol-spin.entry.js +1 -1
  292. package/dist/esm/kol-split-button.entry.js +1 -1
  293. package/dist/esm/kol-split-button.entry.js.map +1 -1
  294. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  295. package/dist/esm/kol-table-stateful.entry.js +1 -1
  296. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  297. package/dist/esm/kol-table-stateless.entry.js +1 -1
  298. package/dist/esm/kol-tabs.entry.js +1 -1
  299. package/dist/esm/kol-textarea.entry.js +1 -1
  300. package/dist/esm/kol-toast-container.entry.js +1 -1
  301. package/dist/esm/kol-toolbar.entry.js +1 -1
  302. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  303. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  304. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  305. package/dist/esm/kol-tree-item.entry.js +1 -1
  306. package/dist/esm/kol-tree-wc.entry.js +1 -1
  307. package/dist/esm/kol-tree.entry.js +1 -1
  308. package/dist/esm/kol-version.entry.js +1 -1
  309. package/dist/esm/kolibri.js +1 -1
  310. package/dist/esm/loader.js +1 -1
  311. package/dist/esm/test-component.entry.js +1 -1
  312. package/dist/kolibri/Alert-c6ac1427.js +4 -0
  313. package/dist/kolibri/Alert-c6ac1427.js.map +1 -0
  314. package/dist/kolibri/{Collapsible-af548d40.js → Collapsible-7be44a00.js} +1 -1
  315. package/dist/kolibri/{CustomSuggestionsOptionsGroup-dcff90e4.js → CustomSuggestionsOptionsGroup-cdea277e.js} +1 -1
  316. package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-6c17f96e.js} +1 -1
  317. package/dist/kolibri/{Heading-733c8dda.js → Heading-31a470a8.js} +1 -1
  318. package/dist/kolibri/Icon-e36657fc.js +4 -0
  319. package/dist/kolibri/{Input-8502a991.js → Input-b352cf7a.js} +1 -1
  320. package/dist/kolibri/{InputStateWrapper-9b8419a8.js → InputStateWrapper-38536b7a.js} +1 -1
  321. package/dist/kolibri/InternalUnderlinedBadgeText-b1330190.js +4 -0
  322. package/dist/kolibri/Span-88b22574.js +4 -0
  323. package/dist/kolibri/app-globals-f7121568.js +4 -0
  324. package/dist/kolibri/{app-globals-081a982f.js.map → app-globals-f7121568.js.map} +1 -1
  325. package/dist/kolibri/{associated.controller-92af2554.js → associated.controller-22684481.js} +1 -1
  326. package/dist/kolibri/{bootstrap-93c7a706.js → bootstrap-dcdb1765.js} +1 -1
  327. package/dist/kolibri/component-names-553d8bfa.js +4 -0
  328. package/dist/kolibri/component-names-553d8bfa.js.map +1 -0
  329. package/dist/kolibri/{controller-f5a335ce.js → controller-7a002c8f.js} +1 -1
  330. package/dist/kolibri/{controller-ce246aad.js → controller-8b5dbe81.js} +1 -1
  331. package/dist/kolibri/{controller-912bda08.js → controller-ac40e13c.js} +1 -1
  332. package/dist/kolibri/{controller-91a4c3ba.js → controller-cf01f031.js} +1 -1
  333. package/dist/kolibri/{controller-icon-de12de48.js → controller-icon-0d71a8a2.js} +1 -1
  334. package/dist/kolibri/{dev.utils-cb61837d.js → dev.utils-ffecab2f.js} +1 -1
  335. package/dist/kolibri/{devtools-90d0e710.js → devtools-a4e8658c.js} +1 -1
  336. package/dist/kolibri/{getRenderStates-c4b5c6cb.js → getRenderStates-c4bde254.js} +1 -1
  337. package/dist/kolibri/{index-1ed13705.js → index-02bdb302.js} +2 -2
  338. package/dist/kolibri/index-02bdb302.js.map +1 -0
  339. package/dist/kolibri/index.esm.js +1 -1
  340. package/dist/kolibri/kol-abbr.entry.js +1 -1
  341. package/dist/kolibri/kol-accordion.entry.js +1 -1
  342. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  343. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  344. package/dist/kolibri/kol-alert.entry.js +1 -1
  345. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  346. package/dist/kolibri/kol-avatar.entry.js +1 -1
  347. package/dist/kolibri/kol-badge.entry.js +1 -1
  348. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  349. package/dist/kolibri/kol-button-link.entry.js +1 -1
  350. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  351. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  352. package/dist/kolibri/kol-button.entry.js +1 -1
  353. package/dist/kolibri/kol-card-wc.entry.js +4 -0
  354. package/dist/kolibri/kol-card-wc.entry.js.map +1 -0
  355. package/dist/kolibri/kol-card.entry.js +1 -1
  356. package/dist/kolibri/kol-card.entry.js.map +1 -1
  357. package/dist/kolibri/kol-combobox.entry.js +1 -1
  358. package/dist/kolibri/kol-details.entry.js +1 -1
  359. package/dist/kolibri/kol-drawer.entry.js +1 -1
  360. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  361. package/dist/kolibri/kol-form.entry.js +1 -1
  362. package/dist/kolibri/kol-heading.entry.js +1 -1
  363. package/dist/kolibri/kol-icon.entry.js +1 -1
  364. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  365. package/dist/kolibri/kol-image.entry.js +1 -1
  366. package/dist/kolibri/kol-image.entry.js.map +1 -1
  367. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  368. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  369. package/dist/kolibri/kol-input-color.entry.js +1 -1
  370. package/dist/kolibri/kol-input-date.entry.js +1 -1
  371. package/dist/kolibri/kol-input-email.entry.js +1 -1
  372. package/dist/kolibri/kol-input-file.entry.js +1 -1
  373. package/dist/kolibri/kol-input-number.entry.js +1 -1
  374. package/dist/kolibri/kol-input-password.entry.js +1 -1
  375. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  376. package/dist/kolibri/kol-input-range.entry.js +1 -1
  377. package/dist/kolibri/kol-input-text.entry.js +1 -1
  378. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  379. package/dist/kolibri/kol-link-button.entry.js +1 -1
  380. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  381. package/dist/kolibri/kol-link.entry.js +1 -1
  382. package/dist/kolibri/kol-modal.entry.js +1 -1
  383. package/dist/kolibri/kol-nav.entry.js +1 -1
  384. package/dist/kolibri/kol-pagination.entry.js +1 -1
  385. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  386. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  387. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  388. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  389. package/dist/kolibri/kol-progress.entry.js +1 -1
  390. package/dist/kolibri/kol-quote.entry.js +1 -1
  391. package/dist/kolibri/kol-select.entry.js +1 -1
  392. package/dist/kolibri/kol-single-select.entry.js +1 -1
  393. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  394. package/dist/kolibri/kol-spin.entry.js +1 -1
  395. package/dist/kolibri/kol-split-button.entry.js +1 -1
  396. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  397. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  398. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  399. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  400. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  401. package/dist/kolibri/kol-tabs.entry.js +1 -1
  402. package/dist/kolibri/kol-textarea.entry.js +1 -1
  403. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  404. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  405. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  406. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  407. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  408. package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
  409. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  410. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  411. package/dist/kolibri/kol-tree.entry.js +1 -1
  412. package/dist/kolibri/kol-version.entry.js +1 -1
  413. package/dist/kolibri/kolibri.esm.js +1 -1
  414. package/dist/kolibri/kolibri.esm.js.map +1 -1
  415. package/dist/kolibri/test-component.entry.js +1 -1
  416. package/dist/types/components/button/component.d.ts +1 -2
  417. package/dist/types/components/card/component.d.ts +19 -0
  418. package/dist/types/components/card/shadow.d.ts +2 -12
  419. package/dist/types/components/drawer/shadow.d.ts +3 -1
  420. package/dist/types/components/split-button/shadow.d.ts +11 -4
  421. package/dist/types/components/tooltip/component.d.ts +5 -5
  422. package/dist/types/components.d.ts +89 -8
  423. package/dist/types/core/component-names.d.ts +1 -0
  424. package/dist/types/schema/components/drawer.d.ts +3 -3
  425. package/dist/types/schema/components/image.d.ts +5 -16
  426. package/dist/types/schema/props/alt.d.ts +7 -0
  427. package/dist/types/schema/props/image-sizes.d.ts +7 -0
  428. package/dist/types/schema/props/image-srcset.d.ts +7 -0
  429. package/dist/types/schema/props/index.d.ts +1 -1
  430. package/dist/types/schema/props/loading.d.ts +3 -0
  431. package/doc/card.md +1 -1
  432. package/doc/components.md +4 -4
  433. package/doc/drawer.md +7 -6
  434. package/doc/split-button.md +41 -18
  435. package/package.json +1 -1
  436. package/vscode-custom-data.json +37 -0
  437. package/dist/cjs/Alert-22627abf.js +0 -4
  438. package/dist/cjs/Alert-22627abf.js.map +0 -1
  439. package/dist/cjs/Icon-add098ba.js +0 -4
  440. package/dist/cjs/component-names-82c4d68d.js +0 -4
  441. package/dist/cjs/component-names-82c4d68d.js.map +0 -1
  442. package/dist/cjs/index-a40019ac.js +0 -4
  443. package/dist/cjs/index-a40019ac.js.map +0 -1
  444. package/dist/esm/Alert-112aec59.js +0 -4
  445. package/dist/esm/Alert-112aec59.js.map +0 -1
  446. package/dist/esm/CustomSuggestionsOptionsGroup-dcff90e4.js +0 -4
  447. package/dist/esm/Icon-446dff9e.js +0 -4
  448. package/dist/esm/component-names-7924d82a.js +0 -4
  449. package/dist/esm/component-names-7924d82a.js.map +0 -1
  450. package/dist/esm/index-1ed13705.js +0 -4
  451. package/dist/esm/index-1ed13705.js.map +0 -1
  452. package/dist/kolibri/Alert-112aec59.js +0 -4
  453. package/dist/kolibri/Alert-112aec59.js.map +0 -1
  454. package/dist/kolibri/Icon-446dff9e.js +0 -4
  455. package/dist/kolibri/InternalUnderlinedBadgeText-781ef373.js +0 -4
  456. package/dist/kolibri/Span-d15a3ea1.js +0 -4
  457. package/dist/kolibri/app-globals-081a982f.js +0 -4
  458. package/dist/kolibri/component-names-7924d82a.js +0 -4
  459. package/dist/kolibri/component-names-7924d82a.js.map +0 -1
  460. package/dist/kolibri/index-1ed13705.js.map +0 -1
  461. /package/dist/kolibri/{Collapsible-af548d40.js.map → Collapsible-7be44a00.js.map} +0 -0
  462. /package/dist/kolibri/{CustomSuggestionsOptionsGroup-dcff90e4.js.map → CustomSuggestionsOptionsGroup-cdea277e.js.map} +0 -0
  463. /package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-6c17f96e.js.map} +0 -0
  464. /package/dist/kolibri/{Heading-733c8dda.js.map → Heading-31a470a8.js.map} +0 -0
  465. /package/dist/kolibri/{Icon-446dff9e.js.map → Icon-e36657fc.js.map} +0 -0
  466. /package/dist/kolibri/{Input-8502a991.js.map → Input-b352cf7a.js.map} +0 -0
  467. /package/dist/kolibri/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-38536b7a.js.map} +0 -0
  468. /package/dist/kolibri/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-b1330190.js.map} +0 -0
  469. /package/dist/kolibri/{Span-d15a3ea1.js.map → Span-88b22574.js.map} +0 -0
  470. /package/dist/kolibri/{associated.controller-92af2554.js.map → associated.controller-22684481.js.map} +0 -0
  471. /package/dist/kolibri/{bootstrap-93c7a706.js.map → bootstrap-dcdb1765.js.map} +0 -0
  472. /package/dist/kolibri/{controller-f5a335ce.js.map → controller-7a002c8f.js.map} +0 -0
  473. /package/dist/kolibri/{controller-ce246aad.js.map → controller-8b5dbe81.js.map} +0 -0
  474. /package/dist/kolibri/{controller-912bda08.js.map → controller-ac40e13c.js.map} +0 -0
  475. /package/dist/kolibri/{controller-91a4c3ba.js.map → controller-cf01f031.js.map} +0 -0
  476. /package/dist/kolibri/{controller-icon-de12de48.js.map → controller-icon-0d71a8a2.js.map} +0 -0
  477. /package/dist/kolibri/{dev.utils-cb61837d.js.map → dev.utils-ffecab2f.js.map} +0 -0
  478. /package/dist/kolibri/{devtools-90d0e710.js.map → devtools-a4e8658c.js.map} +0 -0
  479. /package/dist/kolibri/{getRenderStates-c4b5c6cb.js.map → getRenderStates-c4bde254.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"file":"Alert-c6ac1427.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,CAAC,EAAE,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;QAChG;YACC,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,aAAa,CAAC,EA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B,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-1ed13705.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-7924d82a.js";import{K as KolHeadingFc}from"./Heading-733c8dda.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,_=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),b=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},_),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-${b}`,_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-02bdb302.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{K as KolHeadingFc}from"./Heading-31a470a8.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};
@@ -1 +1 @@
1
- {"file":"Collapsible-af548d40.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,KAAK,UAAK,KAAK,EAArJ,sHAA6I,CAAQ,CAAC;IAC5J,MAAM,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;IAErC,QACC,yBACC,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,IAAI,CACV,aAAa,EACb;YACC,uBAAuB,EAAE,QAAQ,KAAK,IAAI;YAC1C,mBAAmB,EAAE,IAAI,KAAK,IAAI;SAClC,EACD,UAAU,CACV,IACG,KAAK;QAET,EAAC,YAAY,IAAC,GAAG,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;YAC3G,EAAC,cAAc,IACd,KAAK,EAAE,IAAI,CAAC,6BAA6B,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,CAAC,EACrE,GAAG,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,GAAG,EAC5B,IAAI,EAAC,QAAQ,EACb,aAAa,EAAE,GAAG,EAAE,UAAU,EAC9B,aAAa,EAAE,IAAI,EACnB,SAAS,EAAE,QAAQ,EACnB,MAAM,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,KAAI,mBAAmB,IAAI,EAAE,EAC/D,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,EAAE,OAAO,EAAE,GACC,CACJ;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,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-7be44a00.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,KAAK,UAAK,KAAK,EAArJ,sHAA6I,CAAQ,CAAC;IAC5J,MAAM,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;IAErC,QACC,yBACC,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,IAAI,CACV,aAAa,EACb;YACC,uBAAuB,EAAE,QAAQ,KAAK,IAAI;YAC1C,mBAAmB,EAAE,IAAI,KAAK,IAAI;SAClC,EACD,UAAU,CACV,IACG,KAAK;QAET,EAAC,YAAY,IAAC,GAAG,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;YAC3G,EAAC,cAAc,IACd,KAAK,EAAE,IAAI,CAAC,6BAA6B,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,CAAC,EACrE,GAAG,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,GAAG,EAC5B,IAAI,EAAC,QAAQ,EACb,aAAa,EAAE,GAAG,EAAE,UAAU,EAC9B,aAAa,EAAE,IAAI,EACnB,SAAS,EAAE,QAAQ,EACnB,MAAM,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,KAAI,mBAAmB,IAAI,EAAE,EAC/D,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,EAAE,OAAO,EAAE,GACC,CACJ;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,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}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{h}from"./index-02bdb302.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:g})=>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},g),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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,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-cdea277e.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,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-1ed13705.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-c4b5c6cb.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-02bdb302.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-c4bde254.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-7dba1400.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,MAAM,EACL,KAAK,EAAE,UAAU,EACjB,EAAE,EACF,QAAQ,EACR,KAAK,EACL,SAAS,EACT,UAAU,EACV,eAAe,EACf,IAAI,EACJ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ACjC;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-6c17f96e.js","mappings":";;;;;;;;;AAqCA,MAAM,cAAc,GAA+C,CAAC,EAA+B,EAAE,QAAQ;QAAzC,EAAE,KAAK,EAAE,UAAU,OAAY,EAAP,KAAK,cAA7B,SAA+B,CAA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AAE,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-1ed13705.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-02bdb302.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-733c8dda.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,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,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-31a470a8.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,CAAC,GAAI,IAAI,KAAK,EAAkB,GAAG,QAAQ,CAAC;AAC7E,CAAC;SAQe,iBAAiB,CAAC,KAA4B;IAC7D,OAAO,KAAK,KA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e,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}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{h}from"./index-02bdb302.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-446dff9e.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-e36657fc.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-1ed13705.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-ebe5a881.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-c4b5c6cb.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-02bdb302.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-ebe5a881.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-c4bde254.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})),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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
+ {"file":"Input-b352cf7a.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...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-1ed13705.js";import{I as InputFc}from"./Input-8502a991.js";import"./index-ebe5a881.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-c4b5c6cb.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-02bdb302.js";import{I as InputFc}from"./Input-b352cf7a.js";import"./index-ebe5a881.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-c4bde254.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-9b8419a8.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,IAAM,KAAK,GACnC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtC,cAAQ,KAAK,EAAE,MAAM,GAAI,CACzB,CAAC,CACQ,EACV;AACH;;ACkBA,SAAS,aAAa,CAAC,KAAiB,EAAE,iBAA2B;IACpE,MAAM,EAAE,eAAe,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAEnD,MAAM,KAAK,GAAe;QACzB,EAAE,EAAE,KAAK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,OAAO,IAAI,KAAK;QAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;IAC/C,IAAI,WAAW,IAAI,KAAK;QAAE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3D,IAAI,UAAU,IAAI,KAAK;QAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;IACxD,IAAI,gBAAgB,IAAI,KAAK;QAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC;IAC1E,IAAI,UAAU,IAAI,KAAK;QAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;IACxD,IAAI,MAAM,IAAI,KAAK;QAAE,KAAK,CAAC,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEnE,IAAI,cAAc,IAAI,KAAK,IAAI,CAAC,iBAAiB,EAAE;QAClD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,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
+ {"file":"InputStateWrapper-38536b7a.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,IAAM,KAAK,GACnC,WA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,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-1ed13705.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-02bdb302.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-781ef373.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-b1330190.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,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-1ed13705.js";import{c as clsx}from"./clsx-09a06a12.js";import{K as KolIconFc}from"./Icon-446dff9e.js";import{m as showExpertSlot}from"./index-ebe5a881.js";import{m as md}from"./markdown-f827f2ac.js";import{i as isString,K as KolInternalUnderlinedBadgeTextFc}from"./InternalUnderlinedBadgeText-781ef373.js";import{i as isObject}from"./isObject-ffcbbb76.js";const IconHelper=e=>{const{class:l,style:a,label:s,icon:n}=e;return h(KolIconFc,{class:clsx("icon",l),style:a,label:s||"",icons:n})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:a,badgeText:s})=>{if(l||!isString(e))return null;const n="kol-span__label";return a?h("span",{class:clsx(n,"md"),innerHTML:md(e)}):h("span",{class:clsx(n)},s?h(KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:s}):e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:a,allowMarkdown:s},n)=>{const t=!showExpertSlot(l);return h(Fragment,null,t&&h(LabelHelper,{label:l,hideLabel:e,badgeText:a,allowMarkdown:s}),h("span",{"aria-hidden":t?"true":void 0,class:"kol-span__label",hidden:t},n),isString(a)&&a.length>0&&h("span",{class:"badge-text-hint","aria-hidden":"true"},a))},KolSpanFc=(e,l)=>{const{class:a,label:s,hideLabel:n=!1,badgeText:t,allowMarkdown:o,icons:r}=e,c=__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let i=null,b=null,d=null,p=null;return isObject(r)?(i=r.top,b=r.left,d=r.right,p=r.bottom):isString(r)&&(b={icon:r}),h("span",Object.assign({class:clsx("kol-span",{"kol-span--hide-label":n},a)},c),isObject(i)&&h(IconHelper,Object.assign({class:"top"},i)),h("span",{class:"kol-span__container"},isObject(b)&&h(IconHelper,Object.assign({class:"left"},b)),h(KolSpanCoreHelperFc,{label:s,hideLabel:n,allowMarkdown:o,badgeText:t},l),isObject(d)&&h(IconHelper,Object.assign({class:"right"},d))),isObject(p)&&h(IconHelper,Object.assign({class:"bottom"},p)))};export{KolSpanFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-02bdb302.js";import{c as clsx}from"./clsx-09a06a12.js";import{K as KolIconFc}from"./Icon-e36657fc.js";import{m as showExpertSlot}from"./index-ebe5a881.js";import{m as md}from"./markdown-f827f2ac.js";import{i as isString,K as KolInternalUnderlinedBadgeTextFc}from"./InternalUnderlinedBadgeText-b1330190.js";import{i as isObject}from"./isObject-ffcbbb76.js";const IconHelper=e=>{const{class:l,style:a,label:s,icon:n}=e;return h(KolIconFc,{class:clsx("icon",l),style:a,label:s||"",icons:n})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:a,badgeText:s})=>{if(l||!isString(e))return null;const n="kol-span__label";return a?h("span",{class:clsx(n,"md"),innerHTML:md(e)}):h("span",{class:clsx(n)},s?h(KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:s}):e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:a,allowMarkdown:s},n)=>{const t=!showExpertSlot(l);return h(Fragment,null,t&&h(LabelHelper,{label:l,hideLabel:e,badgeText:a,allowMarkdown:s}),h("span",{"aria-hidden":t?"true":void 0,class:"kol-span__label",hidden:t},n),isString(a)&&a.length>0&&h("span",{class:"badge-text-hint","aria-hidden":"true"},a))},KolSpanFc=(e,l)=>{const{class:a,label:s,hideLabel:n=!1,badgeText:t,allowMarkdown:o,icons:r}=e,c=__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let i=null,b=null,d=null,p=null;return isObject(r)?(i=r.top,b=r.left,d=r.right,p=r.bottom):isString(r)&&(b={icon:r}),h("span",Object.assign({class:clsx("kol-span",{"kol-span--hide-label":n},a)},c),isObject(i)&&h(IconHelper,Object.assign({class:"top"},i)),h("span",{class:"kol-span__container"},isObject(b)&&h(IconHelper,Object.assign({class:"left"},b)),h(KolSpanCoreHelperFc,{label:s,hideLabel:n,allowMarkdown:o,badgeText:t},l),isObject(d)&&h(IconHelper,Object.assign({class:"right"},d))),isObject(p)&&h(IconHelper,Object.assign({class:"bottom"},p)))};export{KolSpanFc as K};
@@ -1 +1 @@
1
- {"file":"Span-d15a3ea1.js","mappings":";;;;;;;;;;;;AAMA,MAAM,UAAU,GAA+C,CAAC,KAAK;IACpE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAExD,OAAO,EAAC,SAAS,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,GAAI,CAAC;AACtG,CAAC;;ACHD,MAAM,WAAW,GAAsH,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C,UAAU,kBAAC,KAAK,EAAC,QAAQ,IAAK,eAAe,EAAI,CAC1E,EACN;AACH;;;;","names":["SpanCoreHelper"],"sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<span class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isString, isObject } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"version":3}
1
+ {"file":"Span-88b22574.js","mappings":";;;;;;;;;;;;AAMA,MAAM,UAAU,GAA+C,CAAC,KAAK;IACpE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAExD,OAAO,EAAC,SAAS,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,GAAI,CAAC;AACtG,CAAC;;ACHD,MAAM,WAAW,GAAsH,CAAC,EACvI,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,GACT;IACA,IAAI,SAAS,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACZ;IAED,MAAM,cAAc,GAAG,iBAAiB,CAAC;IAEzC,IAAI,aAAa,EAAE;QAClB,OAAO,YAAM,KAAK,EAAE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AAI,cAAc,GAAa,IAAI,CAAC;IACpC,IAAI,eAAe,GAAa,IAAI,CAAC;IAErC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;QACpB,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC;QACzB,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC;QAC3B,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC;QAC7B,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC;KAC/B;SAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC3B,aAAa,GAAG;YACf,IAAI,EAAE,KAAK;SACX,CAAC;KACF;IAED,QACC,0BAAM,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,sBAAsB,EAAE,SAAS,EAAE,EAAE,UAAU,CAAC,IAAM,KAAK;QACzF,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAC,UAAU,kBAAC,KAAK,EAAC,KAAK,IAAK,YAAY,EAAI;QACvE,YAAM,KAAK,EAAC,qBAAqB;YAC/B,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAC,UAAU,kBAAC,KAAK,EAAC,MAAM,IAAK,aAAa,EAAI;YAC1E,EAACA,mBAAc,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,IACpG,QAAQ,CACO;YAChB,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAC,UAAU,kBAAC,KAAK,EAAC,OAAO,IAAK,cAAc,EAAI,CACvE;QACN,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAC,UAAU,kBAAC,KAAK,EAAC,QAAQ,IAAK,eAAe,EAAI,CAC1E,EACN;AACH;;;;","names":["SpanCoreHelper"],"sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<span class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isString, isObject } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{L as Log,n as ne,b}from"./index-ebe5a881.js";import{a as setMode}from"./index-1ed13705.js";setMode((o=>{try{o.shadowRoot instanceof ShadowRoot&&ne(o,b(o))}catch(o){}return"default"})),import("./devtools-90d0e710.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{Log.error(o)}));const globalFn=()=>{},globalScripts=globalFn;export{globalScripts as g};
4
+ import{L as Log,n as ne,b}from"./index-ebe5a881.js";import{a as setMode}from"./index-02bdb302.js";setMode((o=>{try{o.shadowRoot instanceof ShadowRoot&&ne(o,b(o))}catch(o){}return"default"})),import("./devtools-a4e8658c.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{Log.error(o)}));const globalFn=()=>{},globalScripts=globalFn;export{globalScripts as g};
@@ -1 +1 @@
1
- {"file":"app-globals-081a982f.js","mappings":";;;;;;AAKA,OAAO,CAAC,CAAC,GAAG;IACX,IAAI;QACH,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;YACzCA,EAAa,CAAC,GAAG,EAAEC,CAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SACzC;KACD;IAAC,OAAO,KAAK,EAAE;KAMf;IACD,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,wBAAY,CAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;QACnG,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;AACF,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK;IACZ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;;;AC3BQ,MAAC,aAAa,GAAGC;;;;","names":["setThemeStyle","getThemeDetails","appGlobalScript"],"sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\n\nsetMode((elm) => {\n\ttry {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t} catch (error) {\n\t\t/**\n\t\t * Try is needed for SSR.\n\t\t * - no HTMLElement is available\n\t\t * - no ShadowRoot is available\n\t\t */\n\t}\n\treturn 'default';\n});\n\nimport('./devtools')\n\t.then((devTools) => {\n\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\tdevTools.initialize();\n\t\t}\n\t})\n\t.catch((error) => {\n\t\tLog.error(error);\n\t});\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
1
+ {"file":"app-globals-f7121568.js","mappings":";;;;;;AAKA,OAAO,CAAC,CAAC,GAAG;IACX,IAAI;QACH,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;YACzCA,EAAa,CAAC,GAAG,EAAEC,CAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SACzC;KACD;IAAC,OAAO,KAAK,EAAE;KAMf;IACD,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,wBAAY,CAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;QACnG,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;AACF,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK;IACZ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;;;AC3BQ,MAAC,aAAa,GAAGC;;;;","names":["setThemeStyle","getThemeDetails","appGlobalScript"],"sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\n\nsetMode((elm) => {\n\ttry {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t} catch (error) {\n\t\t/**\n\t\t * Try is needed for SSR.\n\t\t * - no HTMLElement is available\n\t\t * - no ShadowRoot is available\n\t\t */\n\t}\n\treturn 'default';\n});\n\nimport('./devtools')\n\t.then((devTools) => {\n\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\tdevTools.initialize();\n\t\t}\n\t})\n\t.catch((error) => {\n\t\tLog.error(error);\n\t});\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{B as watchString,F as getExperimentalMode,D as devHint,G as devWarning}from"./index-ebe5a881.js";import{g as getOptions}from"./bootstrap-93c7a706.js";const validateName=(t,e,i)=>{watchString(t,"_name",e,i)},isAssociatedTagName=t=>"KOL-BUTTON"===t||"KOL-COMBOBOX"===t||"KOL-INPUT-CHECKBOX"===t||"KOL-INPUT-COLOR"===t||"KOL-INPUT-DATE"===t||"KOL-INPUT-EMAIL"===t||"KOL-INPUT-FILE"===t||"KOL-INPUT-NUMBER"===t||"KOL-INPUT-PASSWORD"===t||"KOL-INPUT-RADIO"===t||"KOL-INPUT-RANGE"===t||"KOL-INPUT-TEXT"===t||"KOL-SELECT"===t||"KOL-SINGLE-SELECT"===t||"KOL-TEXTAREA"===t;class AssociatedInputController{constructor(t,e,i){var s,o,a,r;if(this.experimentalMode=getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.type=e,(null===(s=getOptions())||void 0===s?void 0:s.reflectInputValues)&&isAssociatedTagName(null===(o=this.host)||void 0===o?void 0:o.tagName)&&t._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":i.files=t;break;case"select":i.querySelectorAll("option").forEach((t=>{i.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),i.appendChild(t)}}));break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:"string"==typeof e?(i.setAttribute("value",e),i.value=e):(i.removeAttribute("value"),i.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&devHint("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}export{AssociatedInputController as A};
4
+ import{B as watchString,F as getExperimentalMode,D as devHint,G as devWarning}from"./index-ebe5a881.js";import{g as getOptions}from"./bootstrap-dcdb1765.js";const validateName=(t,e,i)=>{watchString(t,"_name",e,i)},isAssociatedTagName=t=>"KOL-BUTTON"===t||"KOL-COMBOBOX"===t||"KOL-INPUT-CHECKBOX"===t||"KOL-INPUT-COLOR"===t||"KOL-INPUT-DATE"===t||"KOL-INPUT-EMAIL"===t||"KOL-INPUT-FILE"===t||"KOL-INPUT-NUMBER"===t||"KOL-INPUT-PASSWORD"===t||"KOL-INPUT-RADIO"===t||"KOL-INPUT-RANGE"===t||"KOL-INPUT-TEXT"===t||"KOL-SELECT"===t||"KOL-SINGLE-SELECT"===t||"KOL-TEXTAREA"===t;class AssociatedInputController{constructor(t,e,i){var s,o,a,r;if(this.experimentalMode=getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.type=e,(null===(s=getOptions())||void 0===s?void 0:s.reflectInputValues)&&isAssociatedTagName(null===(o=this.host)||void 0===o?void 0:o.tagName)&&t._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":i.files=t;break;case"select":i.querySelectorAll("option").forEach((t=>{i.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),i.appendChild(t)}}));break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:"string"==typeof e?(i.setAttribute("value",e),i.value=e):(i.removeAttribute("value"),i.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&devHint("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}export{AssociatedInputController as A};
@@ -1 +1 @@
1
- {"file":"associated.controller-92af2554.js","mappings":";;;;;;AAgBO,MAAM,YAAY,GAAG,CAAC,SAAoC,EAAE,KAAoB,EAAE,OAA4B;IACpH,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;;ACDD,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACzC,IAAI,KAAK,YAAY;IACrB,IAAI,KAAK,cAAc;IACvB,IAAI,KAAK,oBAAoB;IAC7B,IAAI,KAAK,iBAAiB;IAC1B,IAAI,KAAK,gBAAgB;IACzB,IAAI,KAAK,iBAAiB;IAC1B,IAAI,KAAK,gBAAgB;IACzB,IAAI,KAAK,kBAAkB;IAC3B,IAAI,KAAK,oBAAoB;IAC7B,IAAI,KAAK,iBAAiB;IAC1B,IAAI,KA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ACC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;wBACjC,iBAAiB,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;wBAClD,iBAAiB,CAAC,KAAK,GAAG,QAAQ,CAAC;qBACnC;yBAAM;wBACN,iBAAiB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;wBAC3C,iBAAiB,CAAC,KAAK,GAAG,EAAE,CAAC;qBAC7B;aACF;SACD;KACD;IAEM,YAAY,CAAC,KAAoB;QACvC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;YACnC,KAAK,EAAE;gBACN,UAAU,EAAE;oBACX,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;iBACrF;aACD;SACD,CAAC,CAAC;QACH,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YACjC,OAAO,CACN,uKAAuK,CACvK,CAAC;SACF;KACD;IAEM,2BAA2B,CAAC,KAAmC;QACrE,IAAI,IAAI,CAAC,gBAAgB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAA+D,CAAC;YAC1G,IAAI,KAAK,EAAwC;gBAChD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;aAC5B;SACD;KACD;IAEM,iBAAiB;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;KACtE;;;;;","names":[],"sources":["src/schema/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import type { NamePropType, PropSyncValueBySelector, StencilUnknown, SyncValueBySelectorPropType } from '../../schema';\nimport { devHint, devWarning, getExperimentalMode, validateName } from '../../schema';\n\nimport type { Generic } from 'adopted-style-sheets';\nimport { getOptions } from '../../core/bootstrap';\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\ntype HTMLInputFileElement = HTMLInputElement & {\n\tfiles: FileList;\n};\n\nconst isAssociatedTagName = (name?: string): boolean =>\n\tname === 'KOL-BUTTON' ||\n\tname === 'KOL-COMBOBOX' ||\n\tname === 'KOL-INPUT-CHECKBOX' ||\n\tname === 'KOL-INPUT-COLOR' ||\n\tname === 'KOL-INPUT-DATE' ||\n\tname === 'KOL-INPUT-EMAIL' ||\n\tname === 'KOL-INPUT-FILE' ||\n\tname === 'KOL-INPUT-NUMBER' ||\n\tname === 'KOL-INPUT-PASSWORD' ||\n\tname === 'KOL-INPUT-RADIO' ||\n\tname === 'KOL-INPUT-RANGE' ||\n\tname === 'KOL-INPUT-TEXT' ||\n\tname === 'KOL-SELECT' ||\n\tname === 'KOL-SINGLE-SELECT' ||\n\tname === 'KOL-TEXTAREA';\n\nexport class AssociatedInputController implements Watches {\n\tprivate readonly experimentalMode = getExperimentalMode();\n\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly type: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, type: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.type = type;\n\n\t\tif (getOptions()?.reflectInputValues && isAssociatedTagName(this.host?.tagName) && component._name) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'button':\n\t\t\t\tcase 'color':\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'email':\n\t\t\t\tcase 'file':\n\t\t\t\tcase 'number':\n\t\t\t\tcase 'password':\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'text':\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', this.type);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox': // Checkbox uses default case\n\t\t\t\tcase 'single-select': // SingleSelect uses default case\n\t\t\t\tcase 'combobox': // Combobox uses default case\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (this.experimentalMode) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'file':\n\t\t\t\t\t(associatedElement as HTMLInputFileElement).files = rawValue as FileList;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.setAttribute('checked', '');\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (this.experimentalMode && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"version":3}
1
+ {"file":"associated.controller-22684481.js","mappings":";;;;;;AAgBO,MAAM,YAAY,GAAG,CAAC,SAAoC,EAAE,KAAoB,EAAE,OAA4B;IACpH,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;;ACDD,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACzC,IAAI,KAAK,YAAY;IACrB,IAAI,KAAK,cAAc;IACvB,IAAI,KAAK,oBAAoB;IAC7B,IAAI,KAAK,iBAAiB;IAC1B,IAAI,KAAK,gBAAgB;IACzB,IAAI,KAAK,iBAAiB;IAC1B,IAAI,KAAK,gBAAgB;IACzB,IAAI,KAAK,kBAAkB;IA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,iBAAiB,CAAC,KAAK,GAAG,QAAQ,CAAC;qBACnC;oBACD,MAAM;gBACP;oBACC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;wBACjC,iBAAiB,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;wBAClD,iBAAiB,CAAC,KAAK,GAAG,QAAQ,CAAC;qBACnC;yBAAM;wBACN,iBAAiB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;wBAC3C,iBAAiB,CAAC,KAAK,GAAG,EAAE,CAAC;qBAC7B;aACF;SACD;KACD;IAEM,YAAY,CAAC,KAAoB;QACvC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;YACnC,KAAK,EAAE;gBACN,UAAU,EAAE;oBACX,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;iBACrF;aACD;SACD,CAAC,CAAC;QACH,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YACjC,OAAO,CACN,uKAAuK,CACvK,CAAC;SACF;KACD;IAEM,2BAA2B,CAAC,KAAmC;QACrE,IAAI,IAAI,CAAC,gBAAgB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAA+D,CAAC;YAC1G,IAAI,KAAK,EAAwC;gBAChD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;aAC5B;SACD;KACD;IAEM,iBAAiB;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;KACtE;;;;;","names":[],"sources":["src/schema/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import type { NamePropType, PropSyncValueBySelector, StencilUnknown, SyncValueBySelectorPropType } from '../../schema';\nimport { devHint, devWarning, getExperimentalMode, validateName } from '../../schema';\n\nimport type { Generic } from 'adopted-style-sheets';\nimport { getOptions } from '../../core/bootstrap';\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\ntype HTMLInputFileElement = HTMLInputElement & {\n\tfiles: FileList;\n};\n\nconst isAssociatedTagName = (name?: string): boolean =>\n\tname === 'KOL-BUTTON' ||\n\tname === 'KOL-COMBOBOX' ||\n\tname === 'KOL-INPUT-CHECKBOX' ||\n\tname === 'KOL-INPUT-COLOR' ||\n\tname === 'KOL-INPUT-DATE' ||\n\tname === 'KOL-INPUT-EMAIL' ||\n\tname === 'KOL-INPUT-FILE' ||\n\tname === 'KOL-INPUT-NUMBER' ||\n\tname === 'KOL-INPUT-PASSWORD' ||\n\tname === 'KOL-INPUT-RADIO' ||\n\tname === 'KOL-INPUT-RANGE' ||\n\tname === 'KOL-INPUT-TEXT' ||\n\tname === 'KOL-SELECT' ||\n\tname === 'KOL-SINGLE-SELECT' ||\n\tname === 'KOL-TEXTAREA';\n\nexport class AssociatedInputController implements Watches {\n\tprivate readonly experimentalMode = getExperimentalMode();\n\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly type: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, type: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.type = type;\n\n\t\tif (getOptions()?.reflectInputValues && isAssociatedTagName(this.host?.tagName) && component._name) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'button':\n\t\t\t\tcase 'color':\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'email':\n\t\t\t\tcase 'file':\n\t\t\t\tcase 'number':\n\t\t\t\tcase 'password':\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'text':\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', this.type);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox': // Checkbox uses default case\n\t\t\t\tcase 'single-select': // SingleSelect uses default case\n\t\t\t\tcase 'combobox': // Combobox uses default case\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (this.experimentalMode) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'file':\n\t\t\t\t\t(associatedElement as HTMLInputFileElement).files = rawValue as FileList;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.setAttribute('checked', '');\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (this.experimentalMode && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{V,s as setDevMode}from"./index-ebe5a881.js";import{s as setCustomTagNames}from"./component-names-7924d82a.js";import{i as initializeI18n}from"./i18n-45224cc3.js";let options,initialized=!1;const bootstrap=async(i,t,o)=>{var n,s;setDevMode("development"===(null==o?void 0:o.environment)),initializeI18n(null!==(s=null===(n=null==o?void 0:o.translation)||void 0===n?void 0:n.name)&&void 0!==s?s:"de",null==o?void 0:o.translations),(null==o?void 0:o.transformTagName)&&setCustomTagNames(null==o?void 0:o.transformTagName);const e=await V(i,t,o);return initialized=!0,options=o,e},register=bootstrap,isInitialized=()=>initialized,getOptions=()=>options;export{bootstrap as b,getOptions as g,isInitialized as i,register as r};
4
+ import{V,s as setDevMode}from"./index-ebe5a881.js";import{s as setCustomTagNames}from"./component-names-553d8bfa.js";import{i as initializeI18n}from"./i18n-45224cc3.js";let options,initialized=!1;const bootstrap=async(i,t,o)=>{var n,s;setDevMode("development"===(null==o?void 0:o.environment)),initializeI18n(null!==(s=null===(n=null==o?void 0:o.translation)||void 0===n?void 0:n.name)&&void 0!==s?s:"de",null==o?void 0:o.translations),(null==o?void 0:o.transformTagName)&&setCustomTagNames(null==o?void 0:o.transformTagName);const e=await V(i,t,o);return initialized=!0,options=o,e},register=bootstrap,isInitialized=()=>initialized,getOptions=()=>options;export{bootstrap as b,getOptions as g,isInitialized as i,register as r};
@@ -1 +1 @@
1
- {"file":"bootstrap-93c7a706.js","mappings":";;;;;;;AAwBA,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,OAAmC,CAAC;MAE3B,SAAS,GAAG,OACxB,MAG6D,EAC7D,OAAgE,EAChE,cAA+B;;IAE/B,UAAU,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,MAAK,aAAa,CAAC,CAAC;IAE1D,cAAc,CAAC,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,0CAAE,IAAI,mCAAI,IAAI,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC,CAAC;IACxF,IAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,EAAE;QACrC,iBAAiB,CAAC,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC,CAAC;KACpD;IACD,MAAM,uBAAuB,GAAG,MAAMA,CAAY,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IACpF,WAAW,GAAG,IAAI,CAAC;IACnB,OAAO,GAAG,cAAc,CAAC;IAEzB,OAAO,uBAAuB,CAAC;AAChC,EAAE;MAEW,QAAQ,GAAG,UAAU;MACrB,aAAa,GAAG,MAAM,YAAY;MAClC,UAAU,GAAG,MAAM;;;;","names":["coreRegister"],"sources":["src/core/bootstrap.ts"],"sourcesContent":["import type { Generic, LoaderCallback, RegisterOptions } from 'adopted-style-sheets';\nimport { register as coreRegister } from 'adopted-style-sheets';\nimport { setDevMode } from '../schema';\nimport { setCustomTagNames } from './component-names';\nimport { initializeI18n } from './i18n';\n\ntype Environment = 'development' | 'production';\n\ntype KoliBriOptions = RegisterOptions & {\n\t/**\n\t * The environment in which the application is running.\n\t */\n\tenvironment?: Environment;\n\t/**\n\t * This option allows you to transform the component tag names.\n\t */\n\ttransformTagName?: (tagName: string) => string;\n\n\t/**\n\t * When enabled, all input fields will reflect their current value to the host element, making it accessible outside the shadow DOM.\n\t */\n\treflectInputValues?: boolean;\n};\n\nlet initialized = false;\nlet options: KoliBriOptions | undefined;\n\nexport const bootstrap = async (\n\tthemes:\n\t\t| Generic.Theming.RegisterPatch<string, string, string>\n\t\t| Generic.Theming.RegisterPatch<string, string, string>[]\n\t\t| Set<Generic.Theming.RegisterPatch<string, string, string>>,\n\tloaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>,\n\tkoliBriOptions?: KoliBriOptions,\n): Promise<void[]> => {\n\tsetDevMode(koliBriOptions?.environment === 'development');\n\n\tinitializeI18n(koliBriOptions?.translation?.name ?? 'de', koliBriOptions?.translations);\n\tif (koliBriOptions?.transformTagName) {\n\t\tsetCustomTagNames(koliBriOptions?.transformTagName);\n\t}\n\tconst coreRegisterReturnValue = await coreRegister(themes, loaders, koliBriOptions);\n\tinitialized = true;\n\toptions = koliBriOptions;\n\n\treturn coreRegisterReturnValue;\n};\n\nexport const register = bootstrap;\nexport const isInitialized = () => initialized;\nexport const getOptions = () => options;\n"],"version":3}
1
+ {"file":"bootstrap-dcdb1765.js","mappings":";;;;;;;AAwBA,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,OAAmC,CAAC;MAE3B,SAAS,GAAG,OACxB,MAG6D,EAC7D,OAAgE,EAChE,cAA+B;;IAE/B,UAAU,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,MAAK,aAAa,CAAC,CAAC;IAE1D,cAAc,CAAC,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,0CAAE,IAAI,mCAAI,IAAI,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC,CAAC;IACxF,IAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,EAAE;QACrC,iBAAiB,CAAC,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC,CAAC;KACpD;IACD,MAAM,uBAAuB,GAAG,MAAMA,CAAY,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IACpF,WAAW,GAAG,IAAI,CAAC;IACnB,OAAO,GAAG,cAAc,CAAC;IAEzB,OAAO,uBAAuB,CAAC;AAChC,EAAE;MAEW,QAAQ,GAAG,UAAU;MACrB,aAAa,GAAG,MAAM,YAAY;MAClC,UAAU,GAAG,MAAM;;;;","names":["coreRegister"],"sources":["src/core/bootstrap.ts"],"sourcesContent":["import type { Generic, LoaderCallback, RegisterOptions } from 'adopted-style-sheets';\nimport { register as coreRegister } from 'adopted-style-sheets';\nimport { setDevMode } from '../schema';\nimport { setCustomTagNames } from './component-names';\nimport { initializeI18n } from './i18n';\n\ntype Environment = 'development' | 'production';\n\ntype KoliBriOptions = RegisterOptions & {\n\t/**\n\t * The environment in which the application is running.\n\t */\n\tenvironment?: Environment;\n\t/**\n\t * This option allows you to transform the component tag names.\n\t */\n\ttransformTagName?: (tagName: string) => string;\n\n\t/**\n\t * When enabled, all input fields will reflect their current value to the host element, making it accessible outside the shadow DOM.\n\t */\n\treflectInputValues?: boolean;\n};\n\nlet initialized = false;\nlet options: KoliBriOptions | undefined;\n\nexport const bootstrap = async (\n\tthemes:\n\t\t| Generic.Theming.RegisterPatch<string, string, string>\n\t\t| Generic.Theming.RegisterPatch<string, string, string>[]\n\t\t| Set<Generic.Theming.RegisterPatch<string, string, string>>,\n\tloaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>,\n\tkoliBriOptions?: KoliBriOptions,\n): Promise<void[]> => {\n\tsetDevMode(koliBriOptions?.environment === 'development');\n\n\tinitializeI18n(koliBriOptions?.translation?.name ?? 'de', koliBriOptions?.translations);\n\tif (koliBriOptions?.transformTagName) {\n\t\tsetCustomTagNames(koliBriOptions?.transformTagName);\n\t}\n\tconst coreRegisterReturnValue = await coreRegister(themes, loaders, koliBriOptions);\n\tinitialized = true;\n\toptions = koliBriOptions;\n\n\treturn coreRegisterReturnValue;\n};\n\nexport const register = bootstrap;\nexport const isInitialized = () => initialized;\nexport const getOptions = () => options;\n"],"version":3}